Message ID | 1470894260-18128-1-git-send-email-wright.feng@cypress.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
On 11 August 2016 at 07:44, Wright Feng <wright.feng@cypress.com> wrote: > When stopping hostap on virtual interface, driver will set INFRA and AP > mode that may affect the functionality on primary interface. For example, > if we create and stop hostapd on virtual interface then association > cannot work on primary interface because INFRA mode has been set to IBSS. > Hence we shut down AP and set IBSS mode only on primary interface. You also excluded from execution code setting BRCMF_C_SET_AP to 0. Does it get a reset at some point? Maybe with a "bss" call? I'm wondering if it's possible to use interface in managed mode if it was used as AP once.
From: Rafał Miłecki [mailto:zajec5@gmail.com] > On 11 August 2016 at 07:44, Wright Feng <wright.feng@cypress.com> wrote: > > When stopping hostap on virtual interface, driver will set INFRA and > > AP mode that may affect the functionality on primary interface. For > > example, if we create and stop hostapd on virtual interface then > > association cannot work on primary interface because INFRA mode has > been set to IBSS. > > Hence we shut down AP and set IBSS mode only on primary interface. > > You also excluded from execution code setting BRCMF_C_SET_AP to 0. > Does it get a reset at some point? Maybe with a "bss" call? I'm wondering if > it's possible to use interface in managed mode if it was used as AP once. In this case, the virtual interface cannot be managed mode unless re-creating the interface. Driver should just exclude from setting INFRA mode when stopping AP with virtual interface, and I'll update this change in PATCH v3. Thanks for your review. > > -- > Rafał Regards, Wright This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
On 22 August 2016 at 05:40, Wright Feng <wefe@cypress.com> wrote:
> This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
You are aware you're writing to few open mailing lists, aren't you? I
don't think such footer makes any/much sense, please avoid it.
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 2628d5e..0687ab9 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4716,6 +4716,8 @@ exit: static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) { + struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); + struct net_device *primary_ndev = cfg_to_ndev(cfg); struct brcmf_if *ifp = netdev_priv(ndev); s32 err; struct brcmf_fil_bss_enable_le bss_enable; @@ -4723,7 +4725,8 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) brcmf_dbg(TRACE, "Enter\n"); - if (ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) { + if ((ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) && + (ndev == primary_ndev)) { /* Due to most likely deauths outstanding we sleep */ /* first to make sure they get processed by fw. */ msleep(400);
When stopping hostap on virtual interface, driver will set INFRA and AP mode that may affect the functionality on primary interface. For example, if we create and stop hostapd on virtual interface then association cannot work on primary interface because INFRA mode has been set to IBSS. Hence we shut down AP and set IBSS mode only on primary interface. Signed-off-by: Wright Feng <wright.feng@cypress.com> --- V2:Remove the footnote from the mail. --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)