1 From ae5848cb4511bbbfe0306fcdbe5d9a95cd9546a9 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Fri, 26 Oct 2018 13:22:32 +0200
4 Subject: [PATCH] brcmutil: print invalid chanspec when WARN-ing
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 On one of my devices I got WARNINGs when brcmfmac tried to decode
10 chanspec. I couldn't tell if it was some unsupported format or just a
11 malformed value passed by a firmware.
13 Print chanspec value so it's possible to debug a possible problem.
15 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
16 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
18 drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 14 +++++++-------
19 1 file changed, 7 insertions(+), 7 deletions(-)
21 --- a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
22 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
23 @@ -128,7 +128,7 @@ static void brcmu_d11n_decchspec(struct
28 + WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
32 @@ -140,7 +140,7 @@ static void brcmu_d11n_decchspec(struct
33 ch->band = BRCMU_CHAN_BAND_2G;
37 + WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
41 @@ -167,7 +167,7 @@ static void brcmu_d11ac_decchspec(struct
42 ch->sb = BRCMU_CHAN_SB_U;
43 ch->control_ch_num += CH_10MHZ_APART;
46 + WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
49 case BRCMU_CHSPEC_D11AC_BW_80:
50 @@ -188,7 +188,7 @@ static void brcmu_d11ac_decchspec(struct
51 ch->control_ch_num += CH_30MHZ_APART;
55 + WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
59 @@ -222,13 +222,13 @@ static void brcmu_d11ac_decchspec(struct
60 ch->control_ch_num += CH_70MHZ_APART;
64 + WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
68 case BRCMU_CHSPEC_D11AC_BW_8080:
71 + WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
75 @@ -240,7 +240,7 @@ static void brcmu_d11ac_decchspec(struct
76 ch->band = BRCMU_CHAN_BAND_2G;
80 + WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);