]> git.karo-electronics.de Git - linux-beck.git/commitdiff
brcmfmac: print name of connect status event
authorRafał Miłecki <rafal@milecki.pl>
Fri, 14 Oct 2016 07:45:59 +0000 (09:45 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 17 Nov 2016 06:44:35 +0000 (08:44 +0200)
This simplifies debugging. Format %s (%u) comes from similar debugging
message in brcmf_fweh_event_worker.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h

index b777e1b2f87aeb06d6c1b527b1b92aee744dd2e1..1e7c6f029c05e4663537e72f7c2f563eeb08ab5b 100644 (file)
@@ -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");
index 79c081fd560ff26bd482e3816d42c52e2e8e0c3e..c79306b575324f05a63b38a80068179db316f6a3 100644 (file)
@@ -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";
 }
index 26ff5a9648f3517ac72209fbe1ff6b140e26b01b..5fba4b49f3b3536c1960dd42e70aa17f916a26ae 100644 (file)
@@ -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,