sar.h 997 B

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