[PATCH v9 04/12] wifi: ath11k: update regulatory rules when interface added
Aditya Kumar Singh
quic_adisi at quicinc.com
Mon Dec 11 09:20:55 PST 2023
On 12/11/23 11:52, Baochen Qiang wrote:
> diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
> index 7f7b39817773..1e314fcab41b 100644
> --- a/drivers/net/wireless/ath/ath11k/mac.c
> +++ b/drivers/net/wireless/ath/ath11k/mac.c
> @@ -6943,6 +6943,14 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
> ret);
> }
>
> + if (ath11k_wmi_supports_6ghz_cc_ext(ar)) {
> + struct cur_regulatory_info *reg_info;
> +
> + reg_info = &ab->reg_info_store[ar->pdev_idx];
> + ath11k_dbg(ab, ATH11K_DBG_MAC, "mac interface added to change reg rules\n");
> + ath11k_reg_handle_chan_list(ab, reg_info, IEEE80211_REG_LPI_AP);
> + }
> +
So we update the rules by default for AP. Then in next patch 5/12, once
STA connects to AP, we put the proper power mode and refresh the rules.
So if user wants to bring up 1 STA interface alone, in total 3
regulatory updates will happen from driver to upper layer -
1. During initial boot time
2. During interface create time (above hunk)
3. During channel context assignment (5/12 patch)
Does this seem good? 3 times we would be changing regulatory rules and
first 2 times we are doing the same thing.
More information about the ath11k
mailing list