ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baochen Qiang <quic_bqiang@quicinc.com>
To: Aditya Kumar Singh <quic_adisi@quicinc.com>,
	<ath11k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v9 04/12] wifi: ath11k: update regulatory rules when interface added
Date: Thu, 14 Dec 2023 15:09:16 +0800	[thread overview]
Message-ID: <e4e7ab59-8df8-4aa7-bc84-e8aca8aa3ce1@quicinc.com> (raw)
In-Reply-To: <87882ad2-496b-4e7d-80d1-39d121f04ca3@quicinc.com>



On 12/12/2023 1:20 AM, Aditya Kumar Singh wrote:
> 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.
No, the first two times are not the same: as mentioned in the commit 
log, at the first time when boot up, interface mode is not determined, 
so the argument vdev_type is 0 when calling ath11k_reg_build_regd(), as 
a result AP reg info is chosen. And for the second time, here when 
adding interface, we know exactly the interface type, say a STA, 
vdev_type is 2 when calling ath11k_reg_build_regd(), resulting in that 
client reg info is chosen. see the changes to ath11k_reg_build_regd() in 
patch 1/12.


  reply	other threads:[~2023-12-14  7:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11  6:22 [PATCH v9 00/12] wifi: ath11k: add support for 6 GHz station for various modes : LPI, SP and VLP Baochen Qiang
2023-12-11  6:22 ` [PATCH v9 01/12] wifi: ath11k: add support to select 6 GHz regulatory type Baochen Qiang
2023-12-11 21:56   ` Jeff Johnson
2023-12-11  6:22 ` [PATCH v9 02/12] wifi: ath11k: store cur_regulatory_info for each radio Baochen Qiang
2023-12-11 21:46   ` Jeff Johnson
2023-12-11  6:22 ` [PATCH v9 03/12] wifi: ath11k: fix a possible dead lock caused by ab->base_lock Baochen Qiang
2023-12-11  6:22 ` [PATCH v9 04/12] wifi: ath11k: update regulatory rules when interface added Baochen Qiang
2023-12-11 17:20   ` Aditya Kumar Singh
2023-12-14  7:09     ` Baochen Qiang [this message]
2023-12-14  7:34       ` Aditya Kumar Singh
2023-12-11  6:22 ` [PATCH v9 05/12] wifi: ath11k: update regulatory rules when connect to AP on 6 GHz band for station Baochen Qiang
2023-12-11  6:22 ` [PATCH v9 06/12] wifi: ath11k: save power spectral density(PSD) of regulatory rule Baochen Qiang
2023-12-11  6:22 ` [PATCH v9 07/12] wifi: ath11k: add parse of transmit power envelope element Baochen Qiang
2023-12-11  6:22 ` [PATCH v9 08/12] wifi: ath11k: save max tx power in vdev start response event from firmware Baochen Qiang
2023-12-11  6:22 ` [PATCH v9 09/12] wifi: ath11k: fill parameters for vdev set tpc power WMI command Baochen Qiang
2023-12-11  6:22 ` [PATCH v9 10/12] wifi: ath11k: add WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT service bit Baochen Qiang
2023-12-11  6:22 ` [PATCH v9 11/12] wifi: ath11k: add handler for WMI_VDEV_SET_TPC_POWER_CMDID Baochen Qiang
2023-12-11 21:52   ` Jeff Johnson
2023-12-11  6:22 ` [PATCH v9 12/12] wifi: ath11k: use WMI_VDEV_SET_TPC_POWER_CMDID when EXT_TPC_REG_SUPPORT for 6 GHz Baochen Qiang
2023-12-11 21:54   ` Jeff Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4e7ab59-8df8-4aa7-bc84-e8aca8aa3ce1@quicinc.com \
    --to=quic_bqiang@quicinc.com \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_adisi@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox