162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
262306a36Sopenharmony_ci/* Copyright(c) 2019-2020  Realtek Corporation
362306a36Sopenharmony_ci */
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#ifndef __RTW89_SAR_H__
662306a36Sopenharmony_ci#define __RTW89_SAR_H__
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#include "core.h"
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#define RTW89_SAR_TXPWR_MAC_MAX S8_MAX
1162306a36Sopenharmony_ci#define RTW89_SAR_TXPWR_MAC_MIN S8_MIN
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_cistruct rtw89_sar_handler {
1462306a36Sopenharmony_ci	const char *descr_sar_source;
1562306a36Sopenharmony_ci	u8 txpwr_factor_sar;
1662306a36Sopenharmony_ci	int (*query_sar_config)(struct rtw89_dev *rtwdev, u32 center_freq, s32 *cfg);
1762306a36Sopenharmony_ci};
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciextern const struct cfg80211_sar_capa rtw89_sar_capa;
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_cis8 rtw89_query_sar(struct rtw89_dev *rtwdev, u32 center_freq);
2262306a36Sopenharmony_civoid rtw89_print_sar(struct seq_file *m, struct rtw89_dev *rtwdev, u32 center_freq);
2362306a36Sopenharmony_civoid rtw89_print_tas(struct seq_file *m, struct rtw89_dev *rtwdev);
2462306a36Sopenharmony_ciint rtw89_ops_set_sar_specs(struct ieee80211_hw *hw,
2562306a36Sopenharmony_ci			    const struct cfg80211_sar_specs *sar);
2662306a36Sopenharmony_civoid rtw89_tas_init(struct rtw89_dev *rtwdev);
2762306a36Sopenharmony_civoid rtw89_tas_reset(struct rtw89_dev *rtwdev);
2862306a36Sopenharmony_civoid rtw89_tas_track(struct rtw89_dev *rtwdev);
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci#endif
31