From patchwork Thu May 26 23:03:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9137477 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 2C4F8602A7 for ; Thu, 26 May 2016 23:04:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E94925D97 for ; Thu, 26 May 2016 23:04:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12F95282E1; Thu, 26 May 2016 23:04:14 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 BA19325D97 for ; Thu, 26 May 2016 23:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755336AbcEZXDn (ORCPT ); Thu, 26 May 2016 19:03:43 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33570 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755162AbcEZXDl (ORCPT ); Thu, 26 May 2016 19:03:41 -0400 Received: by mail-wm0-f68.google.com with SMTP id a136so9649256wme.0; Thu, 26 May 2016 16:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sgTrfCAk3SEAyrMBS9JqTiZNaCG9JNXmgUbjXOxxET0=; b=n8Td+nFBxHIDp3haF0Z2rqV6a4+m1EIix7qtZrarcVbpBFT8qzu+V2823ciMjCiGLG n9S1l/sYAAXhv/Gb3UOzbwgVrC5/rU5MSyzoTUiEnh6mCKodLVBtl44cubKqVs6S4+VM 8L9uCkh1V98d7JEbvUlz0dsdHlmuzSJRHaXpB0MfRvuPNus7oh6Ofs3UJNDN8W6HNTRq ocbgr8BFgUjKPXw4m24wWKPU6hOmtFf3oMUSRiqMMVvvDUOHZtG4aPGVmnNG7zEZOEg1 Cn4fkqGzVREsOTgypMki72nq2iYI8LavHhUVi+i/XzNAzHr2URqlJpGwxIi9fywM8MQX DrFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sgTrfCAk3SEAyrMBS9JqTiZNaCG9JNXmgUbjXOxxET0=; b=JFVsuigfSDN6hAVEB2VARrolI5zHSJEzGe8AkblVo+PTIzwGvj5aXCj3vZud2uVtMD FVToLUYPnsrVeM3SwTJFtBnVu3q9KLwjQCV1mKhaqq9uIMPN/7H1KPvA0x8wQrQQW/3G bQe6qKdkXOFeCsWBgpFFZvctWvg0OJAySjJN1JIrleiowI+PE4FGFmMUP52IhkIC9zdd AKU9z8mICuZKKqd049BwrVcugJMR/1cx1JFj5sjzRG5kaYExPKtKIr0gdwsVDHBIHESZ AkLIclIXpfj7IK5qW/Qd+HmU4rRA5birKP0JrJWeKgth/gt3GVAh+e32VvV/niogFhNE kh2A== X-Gm-Message-State: ALyK8tL5VfY4mRmeffi7A6Wu3ZsS6qN/okLJA+v1mXdLMd45oMTCzivFOvO5pmQmoQn7hQ== X-Received: by 10.194.0.138 with SMTP id 10mr11582465wje.73.1464303819975; Thu, 26 May 2016 16:03:39 -0700 (PDT) Received: from linux-samsung.lan (esy55.neoplus.adsl.tpnet.pl. [83.20.144.55]) by smtp.gmail.com with ESMTPSA id x124sm5659216wmg.24.2016.05.26.16.03.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 May 2016 16:03:38 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo Cc: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Brett Rudley , Arend van Spriel , "Franky (Zhenhui) Lin" , Hante Meuleman , Pieter-Paul Giesberts , linux-wireless@vger.kernel.org (open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER), brcm80211-dev-list@broadcom.com (open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER), netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH V4] brcmfmac: print errors if creating interface fails Date: Fri, 27 May 2016 01:03:07 +0200 Message-Id: <1464303792-3041-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1464216299-25232-1-git-send-email-zajec5@gmail.com> References: <1464216299-25232-1-git-send-email-zajec5@gmail.com> MIME-Version: 1.0 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 This is helpful for debugging. Without this all I was getting from "iw" command on failed creating of P2P interface was: > command failed: Too many open files in system (-23) Signed-off-by: Rafał Miłecki --- V2: s/in/if/ in commit message V3: Add one more error message as suggested by Arend V4: Also update brcmf_cfg80211_add_iface & print error for AP --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 ++++++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 3d09d23..e7975a3 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -669,14 +669,18 @@ static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy, return ERR_PTR(-EOPNOTSUPP); case NL80211_IFTYPE_AP: wdev = brcmf_ap_add_vif(wiphy, name, flags, params); - if (!IS_ERR(wdev)) + if (IS_ERR(wdev)) + brcmf_err("Failed to create AP interface %s: %d\n", name, PTR_ERR(wdev)); + else brcmf_cfg80211_update_proto_addr_mode(wdev); return wdev; case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_P2P_GO: case NL80211_IFTYPE_P2P_DEVICE: wdev = brcmf_p2p_add_vif(wiphy, name, name_assign_type, type, flags, params); - if (!IS_ERR(wdev)) + if (IS_ERR(wdev)) + brcmf_err("Failed to create P2P interface %s: %d\n", name, PTR_ERR(wdev)); + else brcmf_cfg80211_update_proto_addr_mode(wdev); return wdev; case NL80211_IFTYPE_UNSPECIFIED: diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index 1652a48..bc26aec 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -2031,7 +2031,7 @@ static int brcmf_p2p_request_p2p_if(struct brcmf_p2p_info *p2p, err = brcmf_fil_iovar_data_set(ifp, "p2p_ifadd", &if_request, sizeof(if_request)); if (err) - return err; + brcmf_err("p2p_ifadd failed %d\n", err); return err; } @@ -2185,6 +2185,7 @@ struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, err = brcmf_p2p_request_p2p_if(&cfg->p2p, ifp, cfg->p2p.int_addr, iftype); if (err) { + brcmf_err("Failed to request P2P virtual interface %s\n", name); brcmf_cfg80211_arm_vif_event(cfg, NULL); goto fail; }