diff mbox series

[wireless-next,4/4] wifi: brcmfmac: prevent disable controller in apmode stop

Message ID 20250604091629.3943-5-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: Ian Lin <ian.lin-ee@infineon.com>

Wpa_supplicant will firstly call scan before start apmode.
In mbss case, controller will be disabled during stop apmode
so next time it reports fail in starting apmpde.
Fix by removing the disable operation.

Signed-off-by: Ian Lin <ian.lin-ee@infineon.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Arend van Spriel June 4, 2025, 10:25 a.m. UTC | #1
On 6/4/2025 11:16 AM, Ian Lin wrote:
> From: Ian Lin <ian.lin-ee@infineon.com>
> 
> Wpa_supplicant will firstly call scan before start apmode.
> In mbss case, controller will be disabled during stop apmode
> so next time it reports fail in starting apmpde.
> Fix by removing the disable operation.

The function brcmf_cfg80211_stop_ap() is a bit tricky. The flag 
ifp->vif->mbss is set to true only when there are multiple AP interface 
and only for subsequent AP interface. For the first AP interface being 
created the flag is false.

Now looking at the function I suspect there is an assumption that each 
AP interface will be stopped. So for a subsequent AP interfaces is will 
do a BRCMF_C_DOWN and for the first interface it will do other stuff 
below the if statement follwed by BRCMF_C_UP.

Clearly you are solving another scenario here so could you elaborate on 
that?

Regards,
Arend

> Signed-off-by: Ian Lin <ian.lin-ee@infineon.com>
> ---
>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> index e23cd6fc0f56..b4078e74f135 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> @@ -5392,11 +5392,6 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
>   			profile->use_fwauth = BIT(BRCMF_PROFILE_FWAUTH_NONE);
>   		}
>   
> -		if (ifp->vif->mbss) {
> -			err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
> -			return err;
> -		}
> -
>   		/* First BSS doesn't get a full reset */
>   		if (ifp->bsscfgidx == 0)
>   			brcmf_fil_iovar_int_set(ifp, "closednet", 0);
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 e23cd6fc0f56..b4078e74f135 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5392,11 +5392,6 @@  static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
 			profile->use_fwauth = BIT(BRCMF_PROFILE_FWAUTH_NONE);
 		}
 
-		if (ifp->vif->mbss) {
-			err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
-			return err;
-		}
-
 		/* First BSS doesn't get a full reset */
 		if (ifp->bsscfgidx == 0)
 			brcmf_fil_iovar_int_set(ifp, "closednet", 0);