From patchwork Mon Feb 27 10:01:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 9592913 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3313460574 for ; Mon, 27 Feb 2017 10:25:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EAA728395 for ; Mon, 27 Feb 2017 10:25:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 236F5283C2; Mon, 27 Feb 2017 10:25:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C7F9283B3 for ; Mon, 27 Feb 2017 10:25:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbdB0KZc (ORCPT ); Mon, 27 Feb 2017 05:25:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60380 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbdB0KZ2 (ORCPT ); Mon, 27 Feb 2017 05:25:28 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14AC77E9CD; Mon, 27 Feb 2017 10:01:48 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-43.ams2.redhat.com [10.36.116.43]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1RA1g4X030174; Mon, 27 Feb 2017 05:01:46 -0500 From: Hans de Goede To: Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo Cc: Hans de Goede , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com Subject: [PATCH 2/4] brcmfmac: p2p and normal ap access are not always possible at the same time Date: Mon, 27 Feb 2017 11:01:38 +0100 Message-Id: <20170227100140.5190-3-hdegoede@redhat.com> In-Reply-To: <20170227100140.5190-1-hdegoede@redhat.com> References: <20170227100140.5190-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 27 Feb 2017 10:01:48 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The firmware responding with -EBUSY when trying to add an extra virtual-if is a normal thing, do not print an error for this. Signed-off-by: Hans de Goede --- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 14 ++++++++++---- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 7ffc4ab..c54e8b4 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -688,11 +688,17 @@ static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy, return ERR_PTR(-EINVAL); } - if (IS_ERR(wdev)) - brcmf_err("add iface %s type %d failed: err=%d\n", - name, type, (int)PTR_ERR(wdev)); - else + if (IS_ERR(wdev)) { + err = PTR_ERR(wdev); + if (err != -EBUSY) + brcmf_err("add iface %s type %d failed: err=%d\n", + name, type, err); + else + brcmf_dbg(INFO, "add iface %s type %d failed: err=%d\n", + name, type, err); + } else { brcmf_cfg80211_update_proto_addr_mode(wdev); + } return wdev; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index de19c7c..b5df0a0 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -2090,7 +2090,10 @@ static struct wireless_dev *brcmf_p2p_create_p2pdev(struct brcmf_p2p_info *p2p, /* Initialize P2P Discovery in the firmware */ err = brcmf_fil_iovar_int_set(pri_ifp, "p2p_disc", 1); if (err < 0) { - brcmf_err("set p2p_disc error\n"); + if (err != -EBUSY) + brcmf_err("set p2p_disc error\n"); + else + brcmf_dbg(INFO, "set p2p_disc error\n"); brcmf_fweh_p2pdev_setup(pri_ifp, false); brcmf_cfg80211_arm_vif_event(p2p->cfg, NULL); goto fail;