On Wed, 2019-12-18 at 17:48 +0200, Kalle Valo wrote:
> From: Wen Gong <[email protected]>
>
> Add support for a vendor command for STATION, the command
> QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS which is already defined in
> git://w1.fi/hostap.git (src/command/qca-vendor.h). This allows user
> space to configure power limits for 2.4 GHz and 5 GHz bands.
>
> ath10k set pdev parameter WMI_PDEV_PARAM_TXPOWER_LIMIT2G and
> WMI_PDEV_PARAM_TXPOWER_LIMIT5G to firmware, the 2 value will
> be used as one input source to affect the tx power.
>
> When QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS set to ath10k, it will
> be saved the 2.4G and 5G limit value, If STATION is connected meanwhile,
> then the 2.4G and 5G WMI command will be set to firmware, otherwise
> it will not set to firmware at this moment. When STATION connect
> next time, it will set to firmware.
>
> Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029.
>
> Signed-off-by: Wen Gong <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>
> ---
> drivers/net/wireless/ath/ath10k/Makefile | 1 +
> drivers/net/wireless/ath/ath10k/core.c | 2 +
> drivers/net/wireless/ath/ath10k/core.h | 2 +
> drivers/net/wireless/ath/ath10k/hw.h | 3 +
> drivers/net/wireless/ath/ath10k/mac.c | 64 +++++++++++++++++
> drivers/net/wireless/ath/ath10k/mac.h | 2 +-
> drivers/net/wireless/ath/ath10k/vendor.c | 114
> +++++++++++++++++++++++++++++++
> drivers/net/wireless/ath/ath10k/vendor.h | 13 ++++
> drivers/net/wireless/ath/ath10k/wmi.h | 6 ++
> 9 files changed, 206 insertions(+), 1 deletion(-)
> create mode 100644 drivers/net/wireless/ath/ath10k/vendor.c
> create mode 100644 drivers/net/wireless/ath/ath10k/vendor.h
>
[...]
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.h
> b/drivers/net/wireless/ath/ath10k/wmi.h
> index 972d53d77654..f0cadaa12399 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.h
> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
> @@ -3695,6 +3695,12 @@ struct wmi_csa_event {
> #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500
> #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500
>
> +/* the mask of 4 sub band of 5G for SAR parameters */
> +#define ATH10K_WMI_SAR_5G_0_MASK GENMASK(7, 0)
> +#define ATH10K_WMI_SAR_5G_1_MASK GENMASK(15, 8)
> +#define ATH10K_WMI_SAR_5G_2_MASK GENMASK(23, 16)
> +#define ATH10K_WMI_SAR_5G_3_MASK GENMASK(31, 24)
> +
These masks aren't used.
Do you use 'u32' as four 'u8' SAR power limit for four bands?
> struct wmi_pdev_param_map {
> u32 tx_chain_mask;
> u32 rx_chain_mask;
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k