2022-09-29 05:15:35

by Ian Lin

[permalink] [raw]
Subject: [PATCH 4/4] brcmfmac: revise SoftAP channel setting

From: Ting-Ying Li <[email protected]>

We need to update "chanspec" iovar for each SoftAP creation
because firmware will update the chanspec to current bsscfg
for each bss. If we do not update it then the wrong chanspec
will be shown on the result of 'wl -i [interface] status'
command. No need to handle channel resource reusing for mbss
mode by the host driver, it should be covered by firmware.

Signed-off-by: Ting-Ying Li <[email protected]>
Signed-off-by: Ian Lin <[email protected]>
---
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index d0aee6c1aa0d..67cb1f568e7e 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5061,17 +5061,17 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
err);
goto exit;
}
- if (!mbss) {
- /* Firmware 10.x requires setting channel after enabling
- * AP and before bringing interface up.
- */
- err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
- if (err < 0) {
- bphy_err(drvr, "Set Channel failed: chspec=%d, %d\n",
- chanspec, err);
- goto exit;
- }
+
+ /* Firmware 10.x requires setting channel after enabling
+ * AP and before bringing interface up.
+ */
+ err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
+ if (err < 0) {
+ bphy_err(drvr, "Set Channel failed: chspec=%d, %d\n",
+ chanspec, err);
+ goto exit;
}
+
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1);
if (err < 0) {
bphy_err(drvr, "BRCMF_C_UP error (%d)\n", err);
--
2.25.0


2022-10-05 07:44:00

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 4/4] brcmfmac: revise SoftAP channel setting

Ian Lin <[email protected]> wrote:

> From: Ting-Ying Li <[email protected]>
>
> We need to update "chanspec" iovar for each SoftAP creation
> because firmware will update the chanspec to current bsscfg
> for each bss. If we do not update it then the wrong chanspec
> will be shown on the result of 'wl -i [interface] status'
> command. No need to handle channel resource reusing for mbss
> mode by the host driver, it should be covered by firmware.
>
> Signed-off-by: Ting-Ying Li <[email protected]>
> Signed-off-by: Ian Lin <[email protected]>

The term "SoftAP" is a bit confusing. From an upstream driver point of view
it's just AP mode, right?

What's wl? Is that some proprietary tool or what?

Patch set to Changes Requested.

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2022-10-05 10:47:02

by Arend Van Spriel

[permalink] [raw]
Subject: Re: [PATCH 4/4] brcmfmac: revise SoftAP channel setting

On 10/5/2022 9:35 AM, Kalle Valo wrote:
> Ian Lin <[email protected]> wrote:
>
>> From: Ting-Ying Li <[email protected]>
>>
>> We need to update "chanspec" iovar for each SoftAP creation
>> because firmware will update the chanspec to current bsscfg
>> for each bss. If we do not update it then the wrong chanspec
>> will be shown on the result of 'wl -i [interface] status'
>> command. No need to handle channel resource reusing for mbss
>> mode by the host driver, it should be covered by firmware.
>>
>> Signed-off-by: Ting-Ying Li <[email protected]>
>> Signed-off-by: Ian Lin <[email protected]>
>
> The term "SoftAP" is a bit confusing. From an upstream driver point of view
> it's just AP mode, right?

It is. If I have understood things the term is used for using AP
interface on a non-router platform. To me it always has been a vague term.

> What's wl? Is that some proprietary tool or what?

Yup. Please avoid such references. Same for the term "current bsscfg".

I think I will need to take a closer look at this patch.

Thanks,
Arend