From patchwork Thu Jun 18 08:27:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 6634361 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 60573C0020 for ; Thu, 18 Jun 2015 08:28:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0F802061B for ; Thu, 18 Jun 2015 08:28:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 891942055C for ; Thu, 18 Jun 2015 08:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753708AbbFRI16 (ORCPT ); Thu, 18 Jun 2015 04:27:58 -0400 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]:60208 "EHLO mail-gw2-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753227AbbFRI1x (ORCPT ); Thu, 18 Jun 2015 04:27:53 -0400 X-IronPort-AV: E=Sophos;i="5.13,638,1427785200"; d="scan'208,223";a="67737045" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw2-out.broadcom.com with ESMTP; 18 Jun 2015 01:41:42 -0700 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 18 Jun 2015 01:27:52 -0700 Received: from mail-sj1-12.sj.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.3.235.1; Thu, 18 Jun 2015 01:27:52 -0700 Received: from [10.176.128.58] (xl-bun-04.bun.broadcom.com [10.176.128.58]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id 83F7C27A82; Thu, 18 Jun 2015 01:27:51 -0700 (PDT) Message-ID: <55828106.7060004@broadcom.com> Date: Thu, 18 Jun 2015 10:27:50 +0200 From: Arend van Spriel User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.24) Gecko/20111103 Lightning/1.0b2 Thunderbird/3.1.16 MIME-Version: 1.0 To: =?UTF-8?B?SsO2cmcgS3JhdXNl?= CC: "linux-wireless@vger.kernel.org" , brcm80211-dev-list Subject: Re: brcmfmac: Failed to create interface p2p-dev-p2p0: -28 (No space left on device) References: <1433766944.28058.16.camel@embedded.rocks> <55758D7E.3000603@broadcom.com> <1433771289.28058.24.camel@embedded.rocks> <5575C6FA.6030104@broadcom.com> <1433794640.28058.26.camel@embedded.rocks> <557605CC.6070907@broadcom.com> <1434448766.21949.9.camel@embedded.rocks> <55803214.2030204@broadcom.com> <1434608018.5481.4.camel@embedded.rocks> In-Reply-To: <1434608018.5481.4.camel@embedded.rocks> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 --- 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))