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

Arend van Spriel <[email protected]>
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
On 6/4/2025 11:16 AM, Ian Lin wrote:
> From: Ian Lin <[email protected]>
> 
> 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 <[email protected]>
> ---
>   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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.