1e3ec7017SPing-Ke Shih /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2e3ec7017SPing-Ke Shih /* Copyright(c) 2019-2020 Realtek Corporation 3e3ec7017SPing-Ke Shih */ 4e3ec7017SPing-Ke Shih 5e3ec7017SPing-Ke Shih #ifndef __RTW89_SAR_H__ 6e3ec7017SPing-Ke Shih #define __RTW89_SAR_H__ 7e3ec7017SPing-Ke Shih 8e3ec7017SPing-Ke Shih #include "core.h" 9e3ec7017SPing-Ke Shih 10e3ec7017SPing-Ke Shih #define RTW89_SAR_TXPWR_MAC_MAX S8_MAX 11e3ec7017SPing-Ke Shih #define RTW89_SAR_TXPWR_MAC_MIN S8_MIN 12e3ec7017SPing-Ke Shih 13e3ec7017SPing-Ke Shih struct rtw89_sar_handler { 14e3ec7017SPing-Ke Shih const char *descr_sar_source; 15e3ec7017SPing-Ke Shih u8 txpwr_factor_sar; 16*bfbadacfSZong-Zhe Yang int (*query_sar_config)(struct rtw89_dev *rtwdev, u32 center_freq, s32 *cfg); 17e3ec7017SPing-Ke Shih }; 18e3ec7017SPing-Ke Shih 19e3ec7017SPing-Ke Shih extern const struct cfg80211_sar_capa rtw89_sar_capa; 20e3ec7017SPing-Ke Shih 21*bfbadacfSZong-Zhe Yang s8 rtw89_query_sar(struct rtw89_dev *rtwdev, u32 center_freq); 22*bfbadacfSZong-Zhe Yang void rtw89_print_sar(struct seq_file *m, struct rtw89_dev *rtwdev, u32 center_freq); 23eb2624f5SKuan-Chung Chen void rtw89_print_tas(struct seq_file *m, struct rtw89_dev *rtwdev); 24e3ec7017SPing-Ke Shih int rtw89_ops_set_sar_specs(struct ieee80211_hw *hw, 25e3ec7017SPing-Ke Shih const struct cfg80211_sar_specs *sar); 26eb2624f5SKuan-Chung Chen void rtw89_tas_init(struct rtw89_dev *rtwdev); 27eb2624f5SKuan-Chung Chen void rtw89_tas_reset(struct rtw89_dev *rtwdev); 28eb2624f5SKuan-Chung Chen void rtw89_tas_track(struct rtw89_dev *rtwdev); 29e3ec7017SPing-Ke Shih 30e3ec7017SPing-Ke Shih #endif 31