brcmfmac: shut down AP and set IBSS mode only on primary interface
Arend Van Spriel
maintainerQuoted 25 lines · Wright Feng
Hi Arend,
Thanks for the reply.
Quoted 11 lines · Arend Van Spriel
Quoted 4 lines · Wright Feng
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.
Quoted 1 line
Hence we shut down AP and set IBSS mode only on primary interface.
What is actually the use-case here. Can you elaborate?
BRCMF_C_DOWNcommand turns out to be effectively bring the whole stack down and not just the supplied interface. I suppose you are hitting that issue here as well, right?We want to use AP mode to let client connecting in AP+STA mode with 43438 wi-fi chip. After that, the AP mode will be stopped, and
wpa_supplicantcannot associate to the access point. I describe the steps in detail as below.
1. Create virtual interface and set mode to__ap
2. startwpa_supplicanton primary interface and connect to wireless router.
3. start hostap daemon on virtual interface and let client connecting.
4. stop hostap daemon
5.wpa_supplicantcannot associate to access point normally.
Quoted 4 lines
Like you said, the issue may be hit by
BRCMF_C_DOWNand same asBRCMF_C_SET_INFRABRCMF_C_SET_INFRAis not just for the supplied interface either. The default bss will be changed in firmware and let firmware uses IBSS mode to join. AboutBRCMF_C_DOWN, driver will setBRCMF_C_UPcommand to bring device back up so it can be used again.
However, there is no way to set INFRA mode back except starting AP mode again.
Ok.
Quoted 40 lines
Quoted 40 lines
Regards,
ArendQuoted 3 lines
Signed-off-by Wright Feng <[email protected]>--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5++++-
Quoted 32 lines
1 file changed, 4 insertions(+), 1 deletion(-)diff --git
a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.cb/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.cindex 2628d5e..0687ab9 100644drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +2
-0@@ -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");drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +2
-2-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 ); --1.9.1
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
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.
Quoted 1 line
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.
Is there any way for you to get rid of this foot note. It may keep Kalle from taking this patch. Other option is to take this patch through our internal tree.
Regards,
Arend
Arend Van Spriel
maintainerQuoted 5 lines · Wright Feng
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.
What is actually the use-case here. Can you elaborate? BRCMF_C_DOWN command turns out to be effectively bring the whole stack down and not just the supplied interface. I suppose you are hitting that issue here as well, right?
Regards,
Arend
Quoted 34 lines
Signed-off-by Wright Feng <[email protected]>--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +4
-2@@ -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 ); --1.9.1
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.
PATCH 1/1 brcmfmac: shut down AP and set IBSS mode only on primary interface
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.
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +4 -1
@@ -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 );
--
1.9.1
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.
Hi Arend,
Thanks for the reply.
Quoted 11 lines · Arend Van Spriel
Quoted 4 lines · Wright Feng
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.
Quoted 1 line
Hence we shut down AP and set IBSS mode only on primary interface.
What is actually the use-case here. Can you elaborate?
BRCMF_C_DOWNcommand turns out to be effectively bring the whole stack down and not just the supplied interface. I suppose you are hitting that issue here as well, right?
We want to use AP mode to let client connecting in AP+STA mode with 43438 wi-fi chip. After that, the AP mode will be stopped, and wpa_supplicant cannot associate to the access point. I describe the steps in detail as below.
1. Create virtual interface and set mode to __ap
2. start wpa_supplicant on primary interface and connect to wireless router.
3. start hostap daemon on virtual interface and let client connecting.
4. stop hostap daemon
5. wpa_supplicant cannot associate to access point normally.
Like you said, the issue may be hit by BRCMF_C_DOWN and same as BRCMF_C_SET_INFRABRCMF_C_SET_INFRA is not just for the supplied interface either. The default bss will be changed in firmware and let firmware uses IBSS mode to join. About BRCMF_C_DOWN, driver will set BRCMF_C_UP command to bring device back up so it can be used again.
However, there is no way to set INFRA mode back except starting AP mode again.
Quoted 40 lines
Regards,
ArendQuoted 3 lines
Signed-off-by Wright Feng <[email protected]>--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5++++-
Quoted 32 lines
1 file changed, 4 insertions(+), 1 deletion(-)diff --git
a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.cb/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.cindex 2628d5e..0687ab9 100644drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +2
-0@@ -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");drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +2
-2-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 ); --1.9.1
Quoted 4 lines
Quoted 1 line
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.
Quoted 1 line
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.
Quoted 86 lines · Arend Van Spriel
Quoted 16 lines · Wright Feng
Hi Arend,
Thanks for the reply.
Quoted 11 lines · Arend Van Spriel
Quoted 4 lines · Wright Feng
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.
Quoted 1 line
Hence we shut down AP and set IBSS mode only on primary interface.
What is actually the use-case here. Can you elaborate?
BRCMF_C_DOWNcommand turns out to be effectively bring the whole stack down and not just the supplied interface. I suppose you are hitting that issue here aswell, right?
Quoted 1 line
We want to use AP mode to let client connecting in AP+STA mode with
43438 wi-fi chip.
Quoted 1 line
After that, the AP mode will be stopped, and
wpa_supplicantcannotassociate to the access point.
Quoted 9 lines
I describe the steps in detail as below.
1. Create virtual interface and set mode to__ap2. startwpa_supplicanton primary interface and connect to wireless router.
3. start hostap daemon on virtual interface and let client connecting.
4. stop hostap daemon
5.wpa_supplicantcannot associate to access point normally.Like you said, the issue may be hit by
BRCMF_C_DOWNand same asBRCMF_C_SET_INFRABRCMF_C_SET_INFRAis not just for the suppliedinterface either. The default bss will be changed in firmware and let firmware uses IBSS mode to join.
Quoted 1 line
About
BRCMF_C_DOWN, driver will setBRCMF_C_UPcommand to bringdevice back up so it can be used again.
Quoted 1 line
However, there is no way to set INFRA mode back except starting AP mode
again.
Ok.
Quoted 46 lines
Quoted 45 lines
Regards,
ArendQuoted 3 lines
Signed-off-by Wright Feng <[email protected]>--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5++++-
Quoted 32 lines
1 file changed, 4 insertions(+), 1 deletion(-)diff --git
a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.cb/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.cindex 2628d5e..0687ab9 100644drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +3
-0@@ -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");drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +2
-2-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 ); --1.9.1
Quoted 2 lines
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.
Quoted 1 line
Quoted 6 lines
Quoted 1 line
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.
Is there any way for you to get rid of this foot note. It may keep Kalle from taking this patch. Other option is to take this patch through our internal tree.
No problem. I will remove the footnote from the PATCH v2.
Quoted 3 lines
Regards,
Arend
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.
Quoted 6 lines · Arend Van Spriel
Quoted 3 lines
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.
Is there any way for you to get rid of this foot note. It may keep Kalle from taking this patch.
Correct. I'll automatically drop patches with these kind of notices.
Signature · 1 line
Kalle Valo
Quoted 20 lines · Wright Feng
Quoted 20 lines
-----Original Message-----
From: Kalle Valo [mailto:[email protected]]
Sent: Monday, August 15, 2016 4:05 PM
To: Arend Van Spriel <[email protected]>
Cc: Wright Feng <[email protected]>; brcm80211-dev- [email protected]; [email protected]; [email protected]; [email protected]; Chi-Hsien Lin <[email protected]>; [email protected]
Subject: Re: [PATCH] brcmfmac: shut down AP and set IBSS mode only on primary interfaceQuoted 6 lines · Arend Van Spriel
Quoted 3 lines
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.
Is there any way for you to get rid of this foot note. It may keep Kalle from taking this patch.
Quoted 6 lines
Quoted 1 line
Correct. I'll automatically drop patches with these kind of notices.
I've removed the foot note and sent the [PATCH v2] to you on 8/11. Is that okay to you?
From a quick look seems to be ok. But I'll do proper review later, need
to go through pile of mails after coming back from vacation.
Signature · 1 line
Kalle Valo
Hi Kalle and Arend,
Quoted 13 lines
-----Original Message-----
From: Kalle Valo [mailto:[email protected]]
Sent: Monday, August 15, 2016 4:05 PM
To: Arend Van Spriel <[email protected]>
Cc: Wright Feng <[email protected]>; brcm80211-dev- [email protected]; [email protected]; [email protected]; [email protected]; Chi-Hsien Lin <[email protected]>; [email protected]
Subject: Re: [PATCH] brcmfmac: shut down AP and set IBSS mode only on primary interfaceArend Van Spriel <[email protected]> writes:
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
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.
Is there any way for you to get rid of this foot note. It may keep Kalle from taking this patch.
Correct. I'll automatically drop patches with these kind of notices.
I've removed the foot note and sent the [PATCH v2] to you on 8/11. Is that okay to you?
Quoted 3 lines
--
Kalle Valo
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.