xref: /openbmc/linux/drivers/net/wireless/realtek/rtw88/sar.h (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1*8704d0beSZong-Zhe Yang /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2*8704d0beSZong-Zhe Yang /* Copyright(c) 2018-2021  Realtek Corporation
3*8704d0beSZong-Zhe Yang  */
4*8704d0beSZong-Zhe Yang 
5*8704d0beSZong-Zhe Yang #include "main.h"
6*8704d0beSZong-Zhe Yang 
7*8704d0beSZong-Zhe Yang /* NL80211_SAR_TYPE_POWER means unit is in 0.25 dBm,
8*8704d0beSZong-Zhe Yang  * where 0.25 = 1/4 = 2^(-2), so make factor 2.
9*8704d0beSZong-Zhe Yang  */
10*8704d0beSZong-Zhe Yang #define RTW_COMMON_SAR_FCT 2
11*8704d0beSZong-Zhe Yang 
12*8704d0beSZong-Zhe Yang struct rtw_sar_arg {
13*8704d0beSZong-Zhe Yang 	u8 sar_band;
14*8704d0beSZong-Zhe Yang 	u8 path;
15*8704d0beSZong-Zhe Yang 	u8 rs;
16*8704d0beSZong-Zhe Yang };
17*8704d0beSZong-Zhe Yang 
18*8704d0beSZong-Zhe Yang extern const struct cfg80211_sar_capa rtw_sar_capa;
19*8704d0beSZong-Zhe Yang 
20*8704d0beSZong-Zhe Yang s8 rtw_query_sar(struct rtw_dev *rtwdev, const struct rtw_sar_arg *arg);
21*8704d0beSZong-Zhe Yang int rtw_set_sar_specs(struct rtw_dev *rtwdev,
22*8704d0beSZong-Zhe Yang 		      const struct cfg80211_sar_specs *sar);
23