* [PATCH V2 0/5] brcmfmac: p2p/miracast/apsta fixes
@ 2020-04-27 6:59 Chi-Hsien Lin
2020-04-27 6:59 ` [PATCH V2 1/5] brcmfmac: keep apsta enabled when AP starts with MCHAN feature Chi-Hsien Lin
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Chi-Hsien Lin @ 2020-04-27 6:59 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.
This is V2 for an old series https://patchwork.kernel.org/cover/10673417/
Change since V1:
- Rebase to wt-2020-04-25
- Add two checks (!MCHAN and !RSDB) for 01/05. Update commit message.
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: keep apsta enabled when AP starts with MCHAN feature
brcmfmac: remove arp_hostip_clear from brcmf_netdev_stop
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 17 +++++++++++++-
.../broadcom/brcm80211/brcmfmac/cfg80211.h | 4 ++++
.../wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ---
.../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 27 +++++++++++++++++++---
4 files changed, 44 insertions(+), 7 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH V2 1/5] brcmfmac: keep apsta enabled when AP starts with MCHAN feature
2020-04-27 6:59 [PATCH V2 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
@ 2020-04-27 6:59 ` Chi-Hsien Lin
2020-05-04 9:49 ` Kalle Valo
2020-04-27 7:00 ` [PATCH V2 2/5] brcmfmac: remove arp_hostip_clear from brcmf_netdev_stop Chi-Hsien Lin
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Chi-Hsien Lin @ 2020-04-27 6:59 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>
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
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index fa846471dac2..e54f6fa6dc8f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -4727,7 +4727,8 @@ 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))) {
+ (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB) &&
+ !brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN)))) {
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0) {
bphy_err(drvr, "BRCMF_C_DOWN error %d\n",
--
2.1.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH V2 2/5] brcmfmac: remove arp_hostip_clear from brcmf_netdev_stop
2020-04-27 6:59 [PATCH V2 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
2020-04-27 6:59 ` [PATCH V2 1/5] brcmfmac: keep apsta enabled when AP starts with MCHAN feature Chi-Hsien Lin
@ 2020-04-27 7:00 ` Chi-Hsien Lin
2020-04-27 7:00 ` [PATCH V2 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Chi-Hsien Lin
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Chi-Hsien Lin @ 2020-04-27 7:00 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>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 436f501be937..c88655acc78c 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -579,9 +579,6 @@ static int brcmf_netdev_stop(struct net_device *ndev)
brcmf_cfg80211_down(ndev);
- if (ifp->drvr->bus_if->state == BRCMF_BUS_UP)
- 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] 7+ messages in thread
* [PATCH V2 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request
2020-04-27 6:59 [PATCH V2 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
2020-04-27 6:59 ` [PATCH V2 1/5] brcmfmac: keep apsta enabled when AP starts with MCHAN feature Chi-Hsien Lin
2020-04-27 7:00 ` [PATCH V2 2/5] brcmfmac: remove arp_hostip_clear from brcmf_netdev_stop Chi-Hsien Lin
@ 2020-04-27 7:00 ` Chi-Hsien Lin
2020-04-27 7:00 ` [PATCH V2 4/5] brcmfmac: only generate random p2p address when needed Chi-Hsien Lin
2020-04-27 7:00 ` [PATCH V2 5/5] brcmfmac: add vendor ie for association responses Chi-Hsien Lin
4 siblings, 0 replies; 7+ messages in thread
From: Chi-Hsien Lin @ 2020-04-27 7:00 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 1f5deea5a288..c68edb198819 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -1491,6 +1491,7 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p,
{
struct brcmf_pub *drvr = p2p->cfg->pub;
struct brcmf_cfg80211_vif *vif;
+ struct brcmf_p2p_action_frame *p2p_af;
s32 err = 0;
s32 timeout = 0;
@@ -1500,7 +1501,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] 7+ messages in thread
* [PATCH V2 4/5] brcmfmac: only generate random p2p address when needed
2020-04-27 6:59 [PATCH V2 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
` (2 preceding siblings ...)
2020-04-27 7:00 ` [PATCH V2 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Chi-Hsien Lin
@ 2020-04-27 7:00 ` Chi-Hsien Lin
2020-04-27 7:00 ` [PATCH V2 5/5] brcmfmac: add vendor ie for association responses Chi-Hsien Lin
4 siblings, 0 replies; 7+ messages in thread
From: Chi-Hsien Lin @ 2020-04-27 7:00 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.
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(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index c68edb198819..f8ece9f381a5 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -457,10 +457,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.
@@ -470,6 +481,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] 7+ messages in thread
* [PATCH V2 5/5] brcmfmac: add vendor ie for association responses
2020-04-27 6:59 [PATCH V2 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
` (3 preceding siblings ...)
2020-04-27 7:00 ` [PATCH V2 4/5] brcmfmac: only generate random p2p address when needed Chi-Hsien Lin
@ 2020-04-27 7:00 ` Chi-Hsien Lin
4 siblings, 0 replies; 7+ messages in thread
From: Chi-Hsien Lin @ 2020-04-27 7:00 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
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(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index e54f6fa6dc8f..4bd69d85fab9 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -4449,6 +4449,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;
bphy_err(drvr, "not suitable type\n");
@@ -4595,6 +4600,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 6ce48f6275a4..3ca8c07d6370 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
@@ -153,19 +153,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] 7+ messages in thread
* Re: [PATCH V2 1/5] brcmfmac: keep apsta enabled when AP starts with MCHAN feature
2020-04-27 6:59 ` [PATCH V2 1/5] brcmfmac: keep apsta enabled when AP starts with MCHAN feature Chi-Hsien Lin
@ 2020-05-04 9:49 ` Kalle Valo
0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2020-05-04 9:49 UTC (permalink / raw)
To: Chi-Hsien Lin
Cc: linux-wireless, brcm80211-dev-list, brcm80211-dev-list,
Arend van Spriel, Franky Lin, Hante Meuleman, Wright Feng,
Chi-Hsien Lin
Chi-Hsien Lin <chi-hsien.lin@cypress.com> wrote:
> From: Wright Feng <wright.feng@cypress.com>
>
> 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
>
> Signed-off-by: Wright Feng <wright.feng@cypress.com>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
5 patches applied to wireless-drivers-next.git, thanks.
774965f22dc7 brcmfmac: keep apsta enabled when AP starts with MCHAN feature
19f557a9b8d1 brcmfmac: remove arp_hostip_clear from brcmf_netdev_stop
d524d5ce3655 brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request
053ac9e1438a brcmfmac: only generate random p2p address when needed
2719afcae759 brcmfmac: add vendor ie for association responses
--
https://patchwork.kernel.org/patch/11511247/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-04 9:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-27 6:59 [PATCH V2 0/5] brcmfmac: p2p/miracast/apsta fixes Chi-Hsien Lin
2020-04-27 6:59 ` [PATCH V2 1/5] brcmfmac: keep apsta enabled when AP starts with MCHAN feature Chi-Hsien Lin
2020-05-04 9:49 ` Kalle Valo
2020-04-27 7:00 ` [PATCH V2 2/5] brcmfmac: remove arp_hostip_clear from brcmf_netdev_stop Chi-Hsien Lin
2020-04-27 7:00 ` [PATCH V2 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Chi-Hsien Lin
2020-04-27 7:00 ` [PATCH V2 4/5] brcmfmac: only generate random p2p address when needed Chi-Hsien Lin
2020-04-27 7:00 ` [PATCH V2 5/5] brcmfmac: add vendor ie for association responses Chi-Hsien Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).