From patchwork Fri Oct 14 07:45:59 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: 9376147 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 696196075E for ; Fri, 14 Oct 2016 07:47:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 603202A19C for ; Fri, 14 Oct 2016 07:47:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53E3F2A4D9; Fri, 14 Oct 2016 07:47:39 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 E921B2A19C for ; Fri, 14 Oct 2016 07:47:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932245AbcJNHrS (ORCPT ); Fri, 14 Oct 2016 03:47:18 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:35178 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756930AbcJNHrD (ORCPT ); Fri, 14 Oct 2016 03:47:03 -0400 Received: by mail-lf0-f65.google.com with SMTP id x79so16758654lff.2; Fri, 14 Oct 2016 00:46:23 -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:mime-version :content-transfer-encoding; bh=Ef9rziVA5Gv9HahUIXNasweCkjZWWcKDkUfHVQ/S7BQ=; b=XWL88hvZGIoxcpAKYkW9HPaAzBjmXNekWTb0DVug+29rIT0uzjlZUuBz4RYTywjRyJ Brdo/fmmqIhvrsmFvjvkHwURA9SR50e3A0Fg7EeqrVaLWQJya97Dvr2r+EW0LKju6c4q rEH8CBRR/kqY6oGy0Gq03d60/K76cLPqeF8bPOXNr0mVAiDwsUIIGS03YqGumT5jURY5 I6oNfjQ4hPlJFbuv63W6+Qh3GWwP6RipE7qj6LtHMEReipk64Z3WKmruEctH+fsgXZ31 RCCoQTt0mIwyeVtPOKn6dPE+EFEk6JjM2C98EZYaIzGvTnLtme5pPkPCZ+X27uwwk7r/ 0P3Q== 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:mime-version :content-transfer-encoding; bh=Ef9rziVA5Gv9HahUIXNasweCkjZWWcKDkUfHVQ/S7BQ=; b=W0+u1rN76iqrD1O+fGj9zYzaif1/DjgHPQ5w9DQ0VL3tnYxmaqI5gLu6NFw7+V3MCD e48KoCMp7B3zUDdrJqS6doHH3DpLkBJ4d7onIlabLtlRF4fyrAvJJGKSdNM5uRIqxY2b fX1NKgLRpSY3w8vTgb3aBDiyII20qFN9jBe6FyWDURoiMIIxrrzmyZCBC0OnBjwWUdXZ ZvM7JBs/UQaOhuVRl3J1YEp9xbiz+rlxs7Tz3hVqitkuKe2W8kjkqAXMGbOjjaVOfJOg XgyQzmU1xQjO3twqOxKdNE/wF9Me9YMdWpUVbPAXEFNkH7ORrm+aPKW3Jlv1alQpZ1c5 iUaA== X-Gm-Message-State: AA6/9RkNTIClerk8dj2zZOw7Ve5+BWIuxowZJRFQk9MYt3sW2fbpCFq9udnS8Ro3rfo5Mg== X-Received: by 10.25.221.20 with SMTP id u20mr1909227lfg.1.1476431182286; Fri, 14 Oct 2016 00:46:22 -0700 (PDT) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id 24sm4710779lfr.49.2016.10.14.00.46.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Oct 2016 00:46:21 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo Cc: Arend van Spriel , Franky Lin , Hante Meuleman , Pieter-Paul Giesberts , Franky Lin , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH] brcmfmac: print name of connect status event Date: Fri, 14 Oct 2016 09:45:59 +0200 Message-Id: <20161014074559.22962-1-zajec5@gmail.com> X-Mailer: git-send-email 2.9.3 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 From: Rafał Miłecki This simplifies debugging. Format %s (%u) comes from similar debugging message in brcmf_fweh_event_worker. Signed-off-by: Rafał Miłecki --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 ++- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index b777e1b..1e7c6f0 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5506,7 +5506,8 @@ brcmf_notify_connect_status_ap(struct brcmf_cfg80211_info *cfg, u32 reason = e->reason; struct station_info sinfo; - brcmf_dbg(CONN, "event %d, reason %d\n", event, reason); + brcmf_dbg(CONN, "event %s (%u), reason %d\n", + brcmf_fweh_event_name(event), event, reason); if (event == BRCMF_E_LINK && reason == BRCMF_E_REASON_LINK_BSSCFG_DIS && ndev != cfg_to_ndev(cfg)) { brcmf_dbg(CONN, "AP mode link down\n"); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c index 79c081f..c79306b 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c @@ -69,7 +69,7 @@ static struct brcmf_fweh_event_name fweh_event_names[] = { * * @code: code to lookup. */ -static const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code) +const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code) { int i; for (i = 0; i < ARRAY_SIZE(fweh_event_names); i++) { @@ -79,7 +79,7 @@ static const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code) return "unknown"; } #else -static const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code) +const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code) { return "nodebug"; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h index 26ff5a9..5fba4b4 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h @@ -287,6 +287,8 @@ struct brcmf_fweh_info { void *data); }; +const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code); + void brcmf_fweh_attach(struct brcmf_pub *drvr); void brcmf_fweh_detach(struct brcmf_pub *drvr); int brcmf_fweh_register(struct brcmf_pub *drvr, enum brcmf_fweh_event_code code,