All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] brcmfmac: p2p/miracast/apsta fixes
@ 2018-11-08  3:48 Chi-Hsien Lin
  2018-11-08  3:48 ` [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface Chi-Hsien Lin
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Chi-Hsien Lin @ 2018-11-08  3:48 UTC (permalink / raw)
  To: linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
	Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo,
	Chi-Hsien Lin

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface.
  2018-11-08  3:48 [PATCH 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
@ 2018-11-08  3:48 ` Chi-Hsien Lin
  2018-11-09 12:48   ` Arend van Spriel
  2018-11-08  3:48 ` [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop" Chi-Hsien Lin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Chi-Hsien Lin @ 2018-11-08  3:48 UTC (permalink / raw)
  To: linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
	Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo,
	Chi-Hsien Lin

From: Wright Feng <wright.feng@cypress.com>

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 <wright.feng@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
---
 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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"
  2018-11-08  3:48 [PATCH 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
  2018-11-08  3:48 ` [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface Chi-Hsien Lin
@ 2018-11-08  3:48 ` Chi-Hsien Lin
  2018-11-08 19:19   ` Franky Lin
  2018-11-08  3:48 ` [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Chi-Hsien Lin
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Chi-Hsien Lin @ 2018-11-08  3:48 UTC (permalink / raw)
  To: linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
	Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo,
	Chi-Hsien Lin

From: Wright Feng <wright.feng@cypress.com>

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 <wright.feng@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
---
 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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request
  2018-11-08  3:48 [PATCH 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
  2018-11-08  3:48 ` [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface Chi-Hsien Lin
  2018-11-08  3:48 ` [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop" Chi-Hsien Lin
@ 2018-11-08  3:48 ` Chi-Hsien Lin
  2018-11-09 12:48   ` Arend van Spriel
  2018-11-08  3:48 ` [PATCH 4/5] brcmfmac: only generate random p2p address when needed Chi-Hsien Lin
  2018-11-08  3:48 ` [PATCH 5/5] brcmfmac: add vendor ie for association responses Chi-Hsien Lin
  4 siblings, 1 reply; 14+ messages in thread
From: Chi-Hsien Lin @ 2018-11-08  3:48 UTC (permalink / raw)
  To: linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
	Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo,
	Madhan Mohan R, Chi-Hsien Lin

From: Madhan Mohan R <MadhanMohan.R@cypress.com>

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 <MadhanMohan.R@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
---
 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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/5] brcmfmac: only generate random p2p address when needed
  2018-11-08  3:48 [PATCH 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
                   ` (2 preceding siblings ...)
  2018-11-08  3:48 ` [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Chi-Hsien Lin
@ 2018-11-08  3:48 ` Chi-Hsien Lin
  2018-11-09 12:49   ` Arend van Spriel
  2018-11-08  3:48 ` [PATCH 5/5] brcmfmac: add vendor ie for association responses Chi-Hsien Lin
  4 siblings, 1 reply; 14+ messages in thread
From: Chi-Hsien Lin @ 2018-11-08  3:48 UTC (permalink / raw)
  To: linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
	Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo,
	Chi-Hsien Lin

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 <chi-hsien.lin@cypress.com>
---
 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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/5] brcmfmac: add vendor ie for association responses
  2018-11-08  3:48 [PATCH 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
                   ` (3 preceding siblings ...)
  2018-11-08  3:48 ` [PATCH 4/5] brcmfmac: only generate random p2p address when needed Chi-Hsien Lin
@ 2018-11-08  3:48 ` Chi-Hsien Lin
  2018-11-09 12:49   ` Arend van Spriel
  4 siblings, 1 reply; 14+ messages in thread
From: Chi-Hsien Lin @ 2018-11-08  3:48 UTC (permalink / raw)
  To: linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
	Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo,
	Ryohei Kondo, Chi-Hsien Lin

From: Ryohei Kondo <ryohei.kondo@cypress.com>

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 <ryohei.kondo@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
---
 .../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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"
  2018-11-08  3:48 ` [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop" Chi-Hsien Lin
@ 2018-11-08 19:19   ` Franky Lin
  2018-11-12  2:10     ` Wright Feng
  0 siblings, 1 reply; 14+ messages in thread
From: Franky Lin @ 2018-11-08 19:19 UTC (permalink / raw)
  To: Chi-Hsien Lin
  Cc: open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER,
	brcm80211-dev-list, brcm80211-dev-list, Arend Van Spriel,
	Hante Meuleman, Wright Feng, Kalle Valo

On Wed, Nov 7, 2018 at 7:48 PM Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com> wrote:
>
> From: Wright Feng <wright.feng@cypress.com>
>
> 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 <wright.feng@cypress.com>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
> ---
>  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
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface.
  2018-11-08  3:48 ` [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface Chi-Hsien Lin
@ 2018-11-09 12:48   ` Arend van Spriel
  2018-11-12  3:03     ` Wright Feng
  0 siblings, 1 reply; 14+ messages in thread
From: Arend van Spriel @ 2018-11-09 12:48 UTC (permalink / raw)
  To: Chi-Hsien Lin, linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Franky Lin,
	Hante Meuleman, Wright Feng, Kalle Valo

On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
> From: Wright Feng <wright.feng@cypress.com>
>
> 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 <wright.feng@cypress.com>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request
  2018-11-08  3:48 ` [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Chi-Hsien Lin
@ 2018-11-09 12:48   ` Arend van Spriel
  0 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2018-11-09 12:48 UTC (permalink / raw)
  To: Chi-Hsien Lin, linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Franky Lin,
	Hante Meuleman, Wright Feng, Kalle Valo, Madhan Mohan R,
	Jouni Malinen

+ Jouni

On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
> From: Madhan Mohan R <MadhanMohan.R@cypress.com>
>
> 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 <MadhanMohan.R@cypress.com>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/5] brcmfmac: only generate random p2p address when needed
  2018-11-08  3:48 ` [PATCH 4/5] brcmfmac: only generate random p2p address when needed Chi-Hsien Lin
@ 2018-11-09 12:49   ` Arend van Spriel
  0 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2018-11-09 12:49 UTC (permalink / raw)
  To: Chi-Hsien Lin, linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Franky Lin,
	Hante Meuleman, Wright Feng, Kalle Valo, Hans de Goede

+ 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 <arend.vanspriel@broadcom.com>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/5] brcmfmac: add vendor ie for association responses
  2018-11-08  3:48 ` [PATCH 5/5] brcmfmac: add vendor ie for association responses Chi-Hsien Lin
@ 2018-11-09 12:49   ` Arend van Spriel
  0 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2018-11-09 12:49 UTC (permalink / raw)
  To: Chi-Hsien Lin, linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Franky Lin,
	Hante Meuleman, Wright Feng, Kalle Valo, Ryohei Kondo

On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
> From: Ryohei Kondo <ryohei.kondo@cypress.com>
>
> 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 <arend.vanspriel@broadcom.com>
> Signed-off-by: Ryohei Kondo <ryohei.kondo@cypress.com>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
> ---
>  .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c    | 14 ++++++++++++++
>  .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h    |  4 ++++
>  2 files changed, 18 insertions(+)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"
  2018-11-08 19:19   ` Franky Lin
@ 2018-11-12  2:10     ` Wright Feng
  2018-11-12 20:08       ` Franky Lin
  0 siblings, 1 reply; 14+ messages in thread
From: Wright Feng @ 2018-11-12  2:10 UTC (permalink / raw)
  To: Franky Lin, Chi-Hsien Lin
  Cc: open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER,
	brcm80211-dev-list, brcm80211-dev-list, Arend Van Spriel,
	Hante Meuleman, Kalle Valo



On 2018/11/9 上午 03:19, Franky Lin wrote:
> On Wed, Nov 7, 2018 at 7:48 PM Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com> wrote:
>>
>> From: Wright Feng <wright.feng@cypress.com>
>>
>> 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 <wright.feng@cypress.com>
>> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
>> ---
>>   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.
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface.
  2018-11-09 12:48   ` Arend van Spriel
@ 2018-11-12  3:03     ` Wright Feng
  0 siblings, 0 replies; 14+ messages in thread
From: Wright Feng @ 2018-11-12  3:03 UTC (permalink / raw)
  To: Arend van Spriel, Chi-Hsien Lin, linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list, Franky Lin,
	Hante Meuleman, Kalle Valo



On 2018/11/9 下午 08:48, Arend van Spriel wrote:
> On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote:
>> From: Wright Feng <wright.feng@cypress.com>
>>
>> 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 <wright.feng@cypress.com>
>> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
>> ---
>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"
  2018-11-12  2:10     ` Wright Feng
@ 2018-11-12 20:08       ` Franky Lin
  0 siblings, 0 replies; 14+ messages in thread
From: Franky Lin @ 2018-11-12 20:08 UTC (permalink / raw)
  To: Wright Feng
  Cc: Chi-Hsien Lin,
	open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER,
	brcm80211-dev-list, brcm80211-dev-list, Arend Van Spriel,
	Hante Meuleman, Kalle Valo

On Sun, Nov 11, 2018 at 6:10 PM Wright Feng <Wright.Feng@cypress.com> wrote:
>
>
>
> On 2018/11/9 上午 03:19, Franky Lin wrote:
> > On Wed, Nov 7, 2018 at 7:48 PM Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com> wrote:
> >>
> >> From: Wright Feng <wright.feng@cypress.com>
> >>
> >> 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 <wright.feng@cypress.com>
> >> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>

Reviewed-by: Franky Lin <franky.lin@broadcom.com>

> >> ---
> >>   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.
> >

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-11-12 20:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08  3:48 [PATCH 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
2018-11-08  3:48 ` [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface Chi-Hsien Lin
2018-11-09 12:48   ` Arend van Spriel
2018-11-12  3:03     ` Wright Feng
2018-11-08  3:48 ` [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop" Chi-Hsien Lin
2018-11-08 19:19   ` Franky Lin
2018-11-12  2:10     ` Wright Feng
2018-11-12 20:08       ` Franky Lin
2018-11-08  3:48 ` [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Chi-Hsien Lin
2018-11-09 12:48   ` Arend van Spriel
2018-11-08  3:48 ` [PATCH 4/5] brcmfmac: only generate random p2p address when needed Chi-Hsien Lin
2018-11-09 12:49   ` Arend van Spriel
2018-11-08  3:48 ` [PATCH 5/5] brcmfmac: add vendor ie for association responses Chi-Hsien Lin
2018-11-09 12:49   ` Arend van Spriel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.