mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00

TAS state switching mechanism now incorporates the TX ratio as a decision parameter. The average power calculation has been improved by using a higher resolution conversion from dBm to linear. During scan or MCC operations, TAS state is forced to static SAR and suspend the average power calculation. Additionally, TAS window size depends on the regulatory domain and band to ensure compliance. TAS is enabled when permitted by the regulatory domain and is currently supported on the 8852CE. For debugging, add a flag to disable_dm that can stop TAS mechanism. Co-developed-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250306021144.12854-3-pkshih@realtek.com
34 lines
1.1 KiB
C
34 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
/* Copyright(c) 2019-2020 Realtek Corporation
|
|
*/
|
|
|
|
#ifndef __RTW89_SAR_H__
|
|
#define __RTW89_SAR_H__
|
|
|
|
#include "core.h"
|
|
|
|
#define RTW89_SAR_TXPWR_MAC_MAX 63
|
|
#define RTW89_SAR_TXPWR_MAC_MIN -64
|
|
|
|
struct rtw89_sar_handler {
|
|
const char *descr_sar_source;
|
|
u8 txpwr_factor_sar;
|
|
int (*query_sar_config)(struct rtw89_dev *rtwdev, u32 center_freq, s32 *cfg);
|
|
};
|
|
|
|
extern const struct cfg80211_sar_capa rtw89_sar_capa;
|
|
|
|
s8 rtw89_query_sar(struct rtw89_dev *rtwdev, u32 center_freq);
|
|
int rtw89_print_sar(struct rtw89_dev *rtwdev, char *buf, size_t bufsz,
|
|
u32 center_freq);
|
|
int rtw89_print_tas(struct rtw89_dev *rtwdev, char *buf, size_t bufsz);
|
|
int rtw89_ops_set_sar_specs(struct ieee80211_hw *hw,
|
|
const struct cfg80211_sar_specs *sar);
|
|
void rtw89_tas_init(struct rtw89_dev *rtwdev);
|
|
void rtw89_tas_reset(struct rtw89_dev *rtwdev, bool force);
|
|
void rtw89_tas_track(struct rtw89_dev *rtwdev);
|
|
void rtw89_tas_scan(struct rtw89_dev *rtwdev, bool start);
|
|
void rtw89_tas_chanctx_cb(struct rtw89_dev *rtwdev,
|
|
enum rtw89_chanctx_state state);
|
|
|
|
#endif
|