On 06/23/15 13:31, Jörg Krause wrote:
Hi Arend,

On So, 2015-06-21 at 23:18 +0200, Arend van Spriel wrote:

My bad. The patch removes p2pdev from interface modes, but it is
still
listed in the interface combinations and cfg80211 will complain about
it. Have to extend the patch. I better do that after a good nights
sleep.

Never mind! Did you had a good night sleep already :-) ?

Several ;-) Did not get to this earlier. Thanks for the reminder.

Had a closer look at wiphy_verify_combinations() and I am hopeful the attached patch will fix the wiphy_register() failure.

Regards,
Arend

Best regards
Jörg Krause

From f490a7cdb2a754ac79af9d9082b8526812164d4f Mon Sep 17 00:00:00 2001
From: Arend van Spriel <[email protected]>
Date: Tue, 23 Jun 2015 13:59:23 +0200
Subject: [PATCH] brcmfmac: no p2pdev limit needed when p2pon=1 is used

Avoid failure upon wiphy_register() by not providing the limit
for iftype P2P_DEVICE.

Signed-off-by: Arend van Spriel <[email protected]>
---
 drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c 
b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
index 10eaabf..ffa9aca 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
@@ -5802,6 +5802,10 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct 
brcmf_if *ifp)
                ifc_combo.n_limits = ARRAY_SIZE(brcmf_iface_limits_mbss),
                ifc_combo.limits = brcmf_iface_limits_mbss;
        }
+       /* don't give p2pdev limit when p2pon is set */
+       if (ifp->drvr->iflist[1])
+               ifc_combo.limits--;
+
        wiphy->iface_combinations = kmemdup(&ifc_combo,
                                            sizeof(ifc_combo),
                                            GFP_KERNEL);
-- 
1.9.1

Reply via email to