xref: /freebsd/sys/contrib/dev/rtw89/sar.h (revision ecaeac805b044f715c98960a8fbf19fe2b76ae6b)
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 S8_MAX
11 #define RTW89_SAR_TXPWR_MAC_MIN S8_MIN
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, s32 *cfg);
17 };
18 
19 extern const struct cfg80211_sar_capa rtw89_sar_capa;
20 
21 s8 rtw89_query_sar(struct rtw89_dev *rtwdev);
22 void rtw89_print_sar(struct seq_file *m, struct rtw89_dev *rtwdev);
23 int rtw89_ops_set_sar_specs(struct ieee80211_hw *hw,
24 			    const struct cfg80211_sar_specs *sar);
25 
26 #endif
27