On 06/18/15 08:13, Jörg Krause wrote:
Hi Arend,
On Di, 2015-06-16 at 16:26 +0200, Arend van Spriel wrote:
On 06/16/15 11:59, Jörg Krause wrote:
Hi Arend,
as I wrote in my previous mail ("brcmfmac: brcmf_p2p_create_p2pdev:
timeout occurred") I get a p2p0 interface when loading the brcmfmac
module with p2pon=1 (Linux kernel 4.0.5, BCM43362).
Unfortunatly, if I try to use the p2p0 interface with
wpa_supplicant
2.4 I get an error:
Failed to create interface p2p-dev-p2p0: -28 (No space left on
device)
nl80211: Failed to create a P2P Device interface p2p-dev-p2p0
P2P: Failed to enable P2P Device interface
Using p2pon=1 is old-school p2p, ie. it creates a regular netdev for
doing p2p management stuff. Problem is that brcmfmac also indicates
p2p
device support. We can remove p2pon parameter or not indicate p2p dev
support when p2pon=1.
I used p2pon because the p2p0 interface is not created without it. It
fails with the error message "brcmf_p2p_create_p2pdev: timeout
occurred" as written in my previous mails. I would prefer not to use
it, so maybe we can find a solution how to get it working without it.
43362 firmware may have issues with regular p2p dev support so let's
stick with p2pon for now.
Can you patch brcmfmac and give it a try. Need to start
wpa_supplicant
for two interface and if I recall correctly p2p0 must be specified
first.
Can you give me a hint where to patch brcmfmac. Many thanks!
Attached is patch against 4.0.5 kernel.
Regards,
Arend
From 99bbbaa540fe9543156018b7f8596b46f60a723c Mon Sep 17 00:00:00 2001
From: Arend van Spriel <arend@xxxxxxxxxxxx>
Date: Thu, 18 Jun 2015 10:23:50 +0200
Subject: [PATCH] brcmfmac: disable p2pdev support when using p2pon=1
Avoid wpa_supplicant from creating a p2pdev interface when we
already have a p2p0 interface, ie. loaded the driver with p2pon=1.
Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
---
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
index b59b8c6..10eaabf 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
@@ -5789,8 +5789,11 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_P2P_CLIENT) |
- BIT(NL80211_IFTYPE_P2P_GO) |
- BIT(NL80211_IFTYPE_P2P_DEVICE);
+ BIT(NL80211_IFTYPE_P2P_GO);
+ /* only annouce p2pdev when p2pon is zero */
+ if (!ifp->drvr->iflist[1])
+ wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_DEVICE);
+
/* need VSDB firmware feature for concurrent channels */
ifc_combo = brcmf_iface_combos[0];
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN))
--
1.9.1