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