Re: [PATCH -next 1/2] brcmfmac: Support multiple AP interfaces and fix STA disconnection issue

From: Alvin Šipraga
Date: Tue Aug 23 2022 - 06:38:14 EST


Hi Franky,

On Mon, Aug 22, 2022 at 10:12:14AM -0700, Franky Lin wrote:
> On Wed, Aug 17, 2022 at 1:50 AM Alvin Šipraga <ALSI@xxxxxxxxxxxxxxx> wrote:
> > On Wed, Aug 10, 2022 at 02:32:06PM -0700, Franky Lin wrote:
> > > On Fri, Jul 22, 2022 at 5:30 AM Alvin Šipraga <alvin@xxxxxxx> wrote:
> > > > /**
> > > > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
> > > > index fe01da9e620d..83e023a22f9b 100644
> > > > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
> > > > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
> > > > @@ -303,6 +303,11 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
> > > > brcmf_dbg(INFO, "CLM version = %s\n", clmver);
> > > > }
> > > >
> > > > + /* set apsta */
> > > > + err = brcmf_fil_iovar_int_set(ifp, "apsta", 1);
> > > > + if (err)
> > > > + brcmf_info("failed setting apsta, %d\n", err);
> > > > +
> > >
> > > I do not understand why entering apsta mode by default. The mode is
> > > supposed to be enabled only when an AP interface is created in
> > > brcmf_cfg80211_start_ap. I think one of the side effects of apsta mode
> > > is that memory footprint significantly increases. It should remain
> > > disabled for STA only mode (which is the major use case) for better
> > > performance.
> >
> > By better performance, do you just mean "lower chance of memory
> > exhaustion"? If so, surely the firmware would be designed such that it
> > doesn't run out of memory under the advertised use-cases (STA, AP+STA
> > etc.), regardless of the current apsta setting?
>
> I think some packet related buffers will be adjusted for apsta mode so
> the sta mode performance will hurt because there is less buffer to
> use.
>
> Another significant impact I am sure about is some power saving
> features will be turned off once apsta mode is enabled. So the chip
> will drain more power even the AP interface is not created.

OK. And this apsta mode seems only to be used for STA + P2P mode in the
upstream driver's current form. But doesn't the driver also support AP +
STA mode ordinarily? Would apsta=1 not be necessary for that use-case?
Of course I assume you can only answer me for Broadcom chipsets.

Trying to understand whether to drop this whole series or whether a
modified version can be suitably upstreamed.

Kind regards,
Alvin

>
> Regards,
> - Franky