mac80211: update brcmfmac backporting brcmf_err cleanups
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 319-0002-brcmfmac-be-more-verbose-when-PSM-s-watchdog-fires.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Mon, 30 Jan 2017 16:09:52 +0100
3 Subject: [PATCH] brcmfmac: be more verbose when PSM's watchdog fires
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 It's important to inform user so he knows things went wrong. He may also
9 want to get memory dump for further debugging purposes.
10
11 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
12 Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
13 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
14 ---
15
16 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c
17 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c
18 @@ -58,10 +58,18 @@ static int brcmf_debug_psm_watchdog_noti
19 const struct brcmf_event_msg *evtmsg,
20 void *data)
21 {
22 + int err;
23 +
24 brcmf_dbg(TRACE, "enter: bsscfgidx=%d\n", ifp->bsscfgidx);
25
26 - return brcmf_debug_create_memdump(ifp->drvr->bus_if, data,
27 - evtmsg->datalen);
28 + brcmf_err("PSM's watchdog has fired!\n");
29 +
30 + err = brcmf_debug_create_memdump(ifp->drvr->bus_if, data,
31 + evtmsg->datalen);
32 + if (err)
33 + brcmf_err("Failed to get memory dump, %d\n", err);
34 +
35 + return err;
36 }
37
38 void brcmf_debugfs_init(void)