2018-11-08 03:48:13

by Chi-Hsien Lin

[permalink] [raw]
Subject: [PATCH 0/5] brcmfmac: p2p/miracast/apsta fixes

This patch series addresses failures seen during p2p/miracast/apsta testing.

Chi-Hsien Lin (1):
brcmfmac: only generate random p2p address when needed

Madhan Mohan R (1):
brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request

Ryohei Kondo (1):
brcmfmac: add vendor ie for association responses

Wright Feng (2):
brcmfmac: set apsta to 1 when AP start on primary interface.
brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"

.../broadcom/brcm80211/brcmfmac/cfg80211.c | 18 ++++++++++++---
.../broadcom/brcm80211/brcmfmac/cfg80211.h | 4 ++++
.../wireless/broadcom/brcm80211/brcmfmac/core.c | 2 --
.../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 27 +++++++++++++++++++---
4 files changed, 43 insertions(+), 8 deletions(-)

--
2.1.0



2018-11-08 03:48:13

by Chi-Hsien Lin

[permalink] [raw]
Subject: [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface.

From: Wright Feng <[email protected]>

APSTA can work on two band concurrently with using VSDB(Virtual
Simultaneous Dual-Band) or RSDB(Real Simultaneous Dual-Band) features.
In this case, we have to keep apsta is 1 in firmware side. However, if
we start wpa_supplicant on wlan0 and then start hostapd on wlan 1, the
apsta will be set to 0, and we will see data stall on wlan0(station)
So that, we only set apsta to 1 when AP start on primary interface.

Signed-off-by: Wright Feng <[email protected]>
Signed-off-by: Chi-Hsien Lin <[email protected]>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 230a378c26fc..165ab1a3f943 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -4513,9 +4513,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
}
}

- if ((dev_role == NL80211_IFTYPE_AP) &&
- ((ifp->ifidx == 0) ||
- !brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB))) {
+ if (dev_role == NL80211_IFTYPE_AP && ifp->ifidx == 0) {
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0) {
brcmf_err("BRCMF_C_DOWN error %d\n", err);
--
2.1.0


2018-11-08 03:48:26

by Chi-Hsien Lin

[permalink] [raw]
Subject: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"

From: Wright Feng <[email protected]>

The firmware does not respond ARP request and causes ping failure with
following steps:

1. Bring up interface
ifconfig wlan0 up or start wpa_supplicant
2. Set the IP address
ifconfig wlan0 192.168.100.10
3. Bring down interface or
ifconfig wlan0 down or kill wpa_supplicant
4. Bring up interface again and set the same IP address
5. Connect to AP(192.168.100.1) and ping to AP will be failed.

FMAC clears arp_hostip when bringing down the interface, but not set it
back if setting the same IP address. We are able to see the IP address
in interface info(inconfig wlan0) but the ping still cannot work because
the firmware ARP offload does not respond the ARP request.
Because of that, we remove "arp_hostip_clear" from function
"brcmf_netdev_stop"

Signed-off-by: Wright Feng <[email protected]>
Signed-off-by: Chi-Hsien Lin <[email protected]>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index b1f702faff4f..e1666cf3801c 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -533,8 +533,6 @@ static int brcmf_netdev_stop(struct net_device *ndev)

brcmf_cfg80211_down(ndev);

- brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
-
brcmf_net_setcarrier(ifp, false);

return 0;
--
2.1.0


2018-11-08 03:48:29

by Chi-Hsien Lin

[permalink] [raw]
Subject: [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request

From: Madhan Mohan R <[email protected]>

Send p2p presence response from the p2p interface address instead
of the p2p device address. This is needed for p2p cert 6.1.9 to pass.

Signed-off-by: Madhan Mohan R <[email protected]>
Signed-off-by: Chi-Hsien Lin <[email protected]>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index 456a1bf008b3..dfdd30b19c42 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -1493,6 +1493,7 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p,
struct brcmf_fil_af_params_le *af_params)
{
struct brcmf_cfg80211_vif *vif;
+ struct brcmf_p2p_action_frame *p2p_af;
s32 err = 0;
s32 timeout = 0;

@@ -1502,7 +1503,13 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p,
clear_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status);
clear_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status);

- vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif;
+ /* check if it is a p2p_presence response */
+ p2p_af = (struct brcmf_p2p_action_frame *)af_params->action_frame.data;
+ if (p2p_af->subtype == P2P_AF_PRESENCE_RSP)
+ vif = p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif;
+ else
+ vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif;
+
err = brcmf_fil_bsscfg_data_set(vif->ifp, "actframe", af_params,
sizeof(*af_params));
if (err) {
--
2.1.0


2018-11-08 03:48:31

by Chi-Hsien Lin

[permalink] [raw]
Subject: [PATCH 4/5] brcmfmac: only generate random p2p address when needed

P2p spec mentioned that the p2p device address should be the globally
administered address with locally administered bit set. Therefore,
follow this guideline by default.

When the primary interface is set to a locally administered address, the
locally administered bit cannot be set again. Generate a random locally
administered address for this case.

Signed-off-by: Chi-Hsien Lin <[email protected]>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index dfdd30b19c42..1629ceecd9b5 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -467,10 +467,21 @@ static int brcmf_p2p_set_firmware(struct brcmf_if *ifp, u8 *p2p_mac)
*/
static void brcmf_p2p_generate_bss_mac(struct brcmf_p2p_info *p2p, u8 *dev_addr)
{
+ struct brcmf_if *pri_ifp = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp;
bool random_addr = false;
+ bool local_admin = false;

- if (!dev_addr || is_zero_ether_addr(dev_addr))
- random_addr = true;
+ if (!dev_addr || is_zero_ether_addr(dev_addr)) {
+ /* If the primary interface address is already locally
+ * administered, create a new random address.
+ */
+ if (pri_ifp->mac_addr[0] & 0x02) {
+ random_addr = true;
+ } else {
+ dev_addr = pri_ifp->mac_addr;
+ local_admin = true;
+ }
+ }

/* Generate the P2P Device Address obtaining a random ethernet
* address with the locally administered bit set.
@@ -480,6 +491,9 @@ static void brcmf_p2p_generate_bss_mac(struct brcmf_p2p_info *p2p, u8 *dev_addr)
else
memcpy(p2p->dev_addr, dev_addr, ETH_ALEN);

+ if (local_admin)
+ p2p->dev_addr[0] |= 0x02;
+
/* Generate the P2P Interface Address. If the discovery and connection
* BSSCFGs need to simultaneously co-exist, then this address must be
* different from the P2P Device Address, but also locally administered.
--
2.1.0


2018-11-08 03:48:32

by Chi-Hsien Lin

[permalink] [raw]
Subject: [PATCH 5/5] brcmfmac: add vendor ie for association responses

From: Ryohei Kondo <[email protected]>

Miracast Certification clause 6.1.2 may fail if there is no WFD IE in
p2p assoc response. This change allows WFD IE to be added to p2p assoc
response.

Related WFA certification:
6.1.2 P-SnUT operating as a Group Owner accepts a WFD Session with a
Reference Source

Signed-off-by: Ryohei Kondo <[email protected]>
Signed-off-by: Chi-Hsien Lin <[email protected]>
---
.../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 14 ++++++++++++++
.../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 4 ++++
2 files changed, 18 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 165ab1a3f943..8cb02befcf81 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -4237,6 +4237,11 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_cfg80211_vif *vif, s32 pktflag,
mgmt_ie_len = &saved_ie->assoc_req_ie_len;
mgmt_ie_buf_len = sizeof(saved_ie->assoc_req_ie);
break;
+ case BRCMF_VNDR_IE_ASSOCRSP_FLAG:
+ mgmt_ie_buf = saved_ie->assoc_res_ie;
+ mgmt_ie_len = &saved_ie->assoc_res_ie_len;
+ mgmt_ie_buf_len = sizeof(saved_ie->assoc_res_ie);
+ break;
default:
err = -EPERM;
brcmf_err("not suitable type\n");
@@ -4386,6 +4391,15 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg80211_vif *vif,
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Probe Resp\n");

+ /* Set Assoc Response IEs to FW */
+ err = brcmf_vif_set_mgmt_ie(vif, BRCMF_VNDR_IE_ASSOCRSP_FLAG,
+ beacon->assocresp_ies,
+ beacon->assocresp_ies_len);
+ if (err)
+ brcmf_err("Set Assoc Resp IE Failed\n");
+ else
+ brcmf_dbg(TRACE, "Applied Vndr IEs for Assoc Resp\n");
+
return err;
}

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
index a4aec0004e4f..6a2a3b276cda 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
@@ -162,19 +162,23 @@ enum brcmf_vif_status {
* @probe_req_ie: IE info for probe request.
* @probe_res_ie: IE info for probe response.
* @beacon_ie: IE info for beacon frame.
+ * @assoc_res_ie: IE info for association response frame.
* @probe_req_ie_len: IE info length for probe request.
* @probe_res_ie_len: IE info length for probe response.
* @beacon_ie_len: IE info length for beacon frame.
+ * @assoc_res_ie_len: IE info length for association response frame.
*/
struct vif_saved_ie {
u8 probe_req_ie[IE_MAX_LEN];
u8 probe_res_ie[IE_MAX_LEN];
u8 beacon_ie[IE_MAX_LEN];
u8 assoc_req_ie[IE_MAX_LEN];
+ u8 assoc_res_ie[IE_MAX_LEN];
u32 probe_req_ie_len;
u32 probe_res_ie_len;
u32 beacon_ie_len;
u32 assoc_req_ie_len;
+ u32 assoc_res_ie_len;
};

/**
--
2.1.0


2018-11-08 19:19:29

by Franky Lin

[permalink] [raw]
Subject: Re: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"

On Wed, Nov 7, 2018 at 7:48 PM Chi-Hsien Lin <[email protected]> wrote:
>
> From: Wright Feng <[email protected]>
>
> The firmware does not respond ARP request and causes ping failure with
> following steps:
>
> 1. Bring up interface
> ifconfig wlan0 up or start wpa_supplicant
> 2. Set the IP address
> ifconfig wlan0 192.168.100.10
> 3. Bring down interface or
> ifconfig wlan0 down or kill wpa_supplicant
> 4. Bring up interface again and set the same IP address
> 5. Connect to AP(192.168.100.1) and ping to AP will be failed.
>
> FMAC clears arp_hostip when bringing down the interface, but not set it
> back if setting the same IP address. We are able to see the IP address
> in interface info(inconfig wlan0) but the ping still cannot work because
> the firmware ARP offload does not respond the ARP request.
> Because of that, we remove "arp_hostip_clear" from function
> "brcmf_netdev_stop"

Shouldn't brcmf_inetaddr_changed get called when the interface up again?

Thanks,
- Franky

>
> Signed-off-by: Wright Feng <[email protected]>
> Signed-off-by: Chi-Hsien Lin <[email protected]>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> index b1f702faff4f..e1666cf3801c 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> @@ -533,8 +533,6 @@ static int brcmf_netdev_stop(struct net_device *ndev)
>
> brcmf_cfg80211_down(ndev);
>
> - brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
> -
> brcmf_net_setcarrier(ifp, false);
>
> return 0;
> --
> 2.1.0
>

2018-11-09 12:48:47

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface.

On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
> From: Wright Feng <[email protected]>
>
> APSTA can work on two band concurrently with using VSDB(Virtual
> Simultaneous Dual-Band) or RSDB(Real Simultaneous Dual-Band) features.
> In this case, we have to keep apsta is 1 in firmware side. However, if
> we start wpa_supplicant on wlan0 and then start hostapd on wlan 1, the
> apsta will be set to 0, and we will see data stall on wlan0(station)
> So that, we only set apsta to 1 when AP start on primary interface.

The description makes my head spin. From reading the commit message I
think the code should add a !VSDB check instead of dropping the !RSDB
check. Would you agree?

Regards,
Arend

> Signed-off-by: Wright Feng <[email protected]>
> Signed-off-by: Chi-Hsien Lin <[email protected]>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)


2018-11-09 12:49:31

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request

+ Jouni

On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
> From: Madhan Mohan R <[email protected]>
>
> Send p2p presence response from the p2p interface address instead
> of the p2p device address. This is needed for p2p cert 6.1.9 to pass.

I am not really into the P2P spec, but if this is indeed a requirement
(@Jouni: can you confirm?) I would expect wpa_supplicant to send the
action frame over the correct netdevice (although there is no netdev for
P2P_DEVICE interface so expect primary interface will be used).

So instead of looking at the action frame subtype it seems to be more
appropriate to determine and pass the appropriate vif in
brcmf_p2p_send_action_frame().

Regards,
Arend

> Signed-off-by: Madhan Mohan R <[email protected]>
> Signed-off-by: Chi-Hsien Lin <[email protected]>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)


2018-11-09 12:49:31

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH 4/5] brcmfmac: only generate random p2p address when needed

+ Hans

On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
> P2p spec mentioned that the p2p device address should be the globally
> administered address with locally administered bit set. Therefore,
> follow this guideline by default.
>
> When the primary interface is set to a locally administered address, the
> locally administered bit cannot be set again. Generate a random locally
> administered address for this case.

We discussed this on the linux-wireless list a while ago. I have no
problem with the approach in this patch.

Reviewed-by: Arend van Spriel <[email protected]>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.l[email protected]>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)


2018-11-09 12:49:35

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH 5/5] brcmfmac: add vendor ie for association responses

On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
> From: Ryohei Kondo <[email protected]>
>
> Miracast Certification clause 6.1.2 may fail if there is no WFD IE in
> p2p assoc response. This change allows WFD IE to be added to p2p assoc
> response.
>
> Related WFA certification:
> 6.1.2 P-SnUT operating as a Group Owner accepts a WFD Session with a
> Reference Source

Reviewed-by: Arend van Spriel <[email protected]>
> Signed-off-by: Ryohei Kondo <[email protected]>
> Signed-off-by: Chi-Hsien Lin <[email protected]>
> ---
> .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 14 ++++++++++++++
> .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 4 ++++
> 2 files changed, 18 insertions(+)


2018-11-12 02:10:55

by Wright Feng

[permalink] [raw]
Subject: Re: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"



On 2018/11/9 上午 03:19, Franky Lin wrote:
> On Wed, Nov 7, 2018 at 7:48 PM Chi-Hsien Lin <[email protected]> wrote:
>>
>> From: Wright Feng <[email protected]>
>>
>> The firmware does not respond ARP request and causes ping failure with
>> following steps:
>>
>> 1. Bring up interface
>> ifconfig wlan0 up or start wpa_supplicant
>> 2. Set the IP address
>> ifconfig wlan0 192.168.100.10
>> 3. Bring down interface or
>> ifconfig wlan0 down or kill wpa_supplicant
>> 4. Bring up interface again and set the same IP address
>> 5. Connect to AP(192.168.100.1) and ping to AP will be failed.
>>
>> FMAC clears arp_hostip when bringing down the interface, but not set it
>> back if setting the same IP address. We are able to see the IP address
>> in interface info(inconfig wlan0) but the ping still cannot work because
>> the firmware ARP offload does not respond the ARP request.
>> Because of that, we remove "arp_hostip_clear" from function
>> "brcmf_netdev_stop"
>
> Shouldn't brcmf_inetaddr_changed get called when the interface up again?
>
> Thanks,
> - Franky
>
The brcmf_inetaddr_changed only be called in inet_del_ifa and
inet_insert_ifa. If the IP address is not changed when the interface up
again, the brcmf_inetaddr_changed will not be called.

-Wright
>>
>> Signed-off-by: Wright Feng <[email protected]>
>> Signed-off-by: Chi-Hsien Lin <[email protected]>
>> ---
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
>> index b1f702faff4f..e1666cf3801c 100644
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
>> @@ -533,8 +533,6 @@ static int brcmf_netdev_stop(struct net_device *ndev)
>>
>> brcmf_cfg80211_down(ndev);
>>
>> - brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
>> -
>> brcmf_net_setcarrier(ifp, false);
>>
>> return 0;
>> --
>> 2.1.0
>>
>
>
> ----------
>
> You're receiving this message because you're a member of the brcm80211-dev-list group.
>

2018-11-12 03:03:16

by Wright Feng

[permalink] [raw]
Subject: Re: [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface.



On 2018/11/9 下午 08:48, Arend van Spriel wrote:
> On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
>> From: Wright Feng <[email protected]>
>>
>> APSTA can work on two band concurrently with using VSDB(Virtual
>> Simultaneous Dual-Band) or RSDB(Real Simultaneous Dual-Band) features.
>> In this case, we have to keep apsta is 1 in firmware side. However, if
>> we start wpa_supplicant on wlan0 and then start hostapd on wlan 1, the
>> apsta will be set to 0, and we will see data stall on wlan0(station)
>> So that, we only set apsta to 1 when AP start on primary interface.
>
> The description makes my head spin. From reading the commit message I
> think the code should add a !VSDB check instead of dropping the !RSDB
> check. Would you agree?
>
> Regards,
> Arend
I will revise the commit message as below and add two checks (!MCHAN and
!RSDB)in v2. Let me know if you have concern about that.

When starting station mode on wlan0 and AP mode on wlan1, the
apsta will be disabled and cause data stall on wlan0(station)
The apsta feature with MCHAN(Multi-Channel Concurrent) or RSDB(Real
Simultaneous Dual-Band) can make STA+AP work on two bands concurrently.
Because of that, we keep apsta enabled if firmware supports MCHAN or
RSDB features.

- Wright
>
>> Signed-off-by: Wright Feng <[email protected]>
>> Signed-off-by: Chi-Hsien Lin <[email protected]>
>> ---
>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>

2018-11-12 20:08:35

by Franky Lin

[permalink] [raw]
Subject: Re: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"

On Sun, Nov 11, 2018 at 6:10 PM Wright Feng <[email protected]> wrote:
>
>
>
> On 2018/11/9 上午 03:19, Franky Lin wrote:
> > On Wed, Nov 7, 2018 at 7:48 PM Chi-Hsien Lin <[email protected]> wrote:
> >>
> >> From: Wright Feng <[email protected]>
> >>
> >> The firmware does not respond ARP request and causes ping failure with
> >> following steps:
> >>
> >> 1. Bring up interface
> >> ifconfig wlan0 up or start wpa_supplicant
> >> 2. Set the IP address
> >> ifconfig wlan0 192.168.100.10
> >> 3. Bring down interface or
> >> ifconfig wlan0 down or kill wpa_supplicant
> >> 4. Bring up interface again and set the same IP address
> >> 5. Connect to AP(192.168.100.1) and ping to AP will be failed.
> >>
> >> FMAC clears arp_hostip when bringing down the interface, but not set it
> >> back if setting the same IP address. We are able to see the IP address
> >> in interface info(inconfig wlan0) but the ping still cannot work because
> >> the firmware ARP offload does not respond the ARP request.
> >> Because of that, we remove "arp_hostip_clear" from function
> >> "brcmf_netdev_stop"
> >
> > Shouldn't brcmf_inetaddr_changed get called when the interface up again?
> >
> > Thanks,
> > - Franky
> >
> The brcmf_inetaddr_changed only be called in inet_del_ifa and
> inet_insert_ifa. If the IP address is not changed when the interface up
> again, the brcmf_inetaddr_changed will not be called.

Thanks, looks good to me.

>
> -Wright
> >>
> >> Signed-off-by: Wright Feng <[email protected]>
> >> Signed-off-by: Chi-Hsien Lin <[email protected]>

Reviewed-by: Franky Lin <[email protected]>

> >> ---
> >> drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 --
> >> 1 file changed, 2 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> >> index b1f702faff4f..e1666cf3801c 100644
> >> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> >> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> >> @@ -533,8 +533,6 @@ static int brcmf_netdev_stop(struct net_device *ndev)
> >>
> >> brcmf_cfg80211_down(ndev);
> >>
> >> - brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
> >> -
> >> brcmf_net_setcarrier(ifp, false);
> >>
> >> return 0;
> >> --
> >> 2.1.0
> >>
> >
> >
> > ----------
> >
> > You're receiving this message because you're a member of the brcm80211-dev-list group.
> >