diff mbox series

[wireless-next,2/4] wifi: brcmfmac: revise SoftAP channel setting

Message ID 20250604091629.3943-3-ian.lin@infineon.com
State New
Headers show
Series wifi: brcmfmac: apmode related fix | expand

Commit Message

Ian Lin June 4, 2025, 9:16 a.m. UTC
From: Ting-Ying Li <tingying.li@cypress.com>

Fmac need to update "chanspec" iovar for each SoftAP creation
because firmware will update the chanspec to current bsscfg
for each bss. If it doesn't update 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 <tingying.li@cypress.com>
Signed-off-by: Ian Lin <ian.lin@infineon.com>
---
 .../broadcom/brcm80211/brcmfmac/cfg80211.c    | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Arend van Spriel June 4, 2025, 9:38 a.m. UTC | #1
On 6/4/2025 11:16 AM, Ian Lin wrote:
> From: Ting-Ying Li <tingying.li@cypress.com>
> 
> Fmac need to update "chanspec" iovar for each SoftAP creation
> because firmware will update the chanspec to current bsscfg
> for each bss. If it doesn't update 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.

Sorry, but the wl utility is irrelevant to upstream driver so that does 
not count as argument for this change. What does iw show?

Regards,
Arend
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 2e06fd0dbb2a..820dc5fee730 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5248,17 +5248,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);