ath10k: allow dynamic SAR power limits via common API
authorCarl Huang <cjhuang@codeaurora.org>
Tue, 26 Jan 2021 16:56:22 +0000 (18:56 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 28 Jan 2021 07:18:17 +0000 (09:18 +0200)
commit442545ba5452b50c471fd5cd04b7688945c8a7da
tree997d4ccf8d74e619c91c09e587f3335b5aaae580
parent337cd0d3ce0c2e005b650d8ab8f2b05a91ca132e
ath10k: allow dynamic SAR power limits via common API

ath10k assigns ath10k_mac_set_sar_specs to ath10k_ops, and
this function is called when user space application calls
NL80211_CMD_SET_SAR_SPECS. ath10k also registers SAR type,
and supported frequency ranges to wiphy so user space can
query SAR capabilities.

This SAR power limitation is compared to regulatory txpower
and selects the minimal one to set when station is connected.
Otherwise, it delays until the station is connected. If the
station is disconnected, it returns to regulatory txpower.

This feature is controlled by hw parameter: dynamic_sar_support.

Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1

Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Abhishek Kumar <kuabhs@chromium.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201203103728.3034-4-cjhuang@codeaurora.org
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/hw.h
drivers/net/wireless/ath/ath10k/mac.c