aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/349-v4.21-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-11-07 12:21:59 +0100
committerRafał Miłecki <rafal@milecki.pl>2018-11-07 12:28:32 +0100
commit2e54de4e54d8a6b4180c69da53f2eb6e80e575ea (patch)
tree86ef99f91a5793817e0a6f952bff8473160f210e /package/kernel/mac80211/patches/349-v4.21-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch
parent941256c004009cd093b234f7e9bc6e04d7b71458 (diff)
downloadupstream-2e54de4e54d8a6b4180c69da53f2eb6e80e575ea.tar.gz
upstream-2e54de4e54d8a6b4180c69da53f2eb6e80e575ea.tar.bz2
upstream-2e54de4e54d8a6b4180c69da53f2eb6e80e575ea.zip
mac80211: brcmutil: backport chanspec debugging patch
It helps debugging possible WARN-ings. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/349-v4.21-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch')
-rw-r--r--package/kernel/mac80211/patches/349-v4.21-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/349-v4.21-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch b/package/kernel/mac80211/patches/349-v4.21-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch
new file mode 100644
index 0000000000..566336cbc3
--- /dev/null
+++ b/package/kernel/mac80211/patches/349-v4.21-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch
@@ -0,0 +1,83 @@
+From ae5848cb4511bbbfe0306fcdbe5d9a95cd9546a9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Fri, 26 Oct 2018 13:22:32 +0200
+Subject: [PATCH] brcmutil: print invalid chanspec when WARN-ing
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On one of my devices I got WARNINGs when brcmfmac tried to decode
+chanspec. I couldn't tell if it was some unsupported format or just a
+malformed value passed by a firmware.
+
+Print chanspec value so it's possible to debug a possible problem.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
+@@ -128,7 +128,7 @@ static void brcmu_d11n_decchspec(struct
+ }
+ break;
+ default:
+- WARN_ON_ONCE(1);
++ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
+ break;
+ }
+
+@@ -140,7 +140,7 @@ static void brcmu_d11n_decchspec(struct
+ ch->band = BRCMU_CHAN_BAND_2G;
+ break;
+ default:
+- WARN_ON_ONCE(1);
++ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
+ break;
+ }
+ }
+@@ -167,7 +167,7 @@ static void brcmu_d11ac_decchspec(struct
+ ch->sb = BRCMU_CHAN_SB_U;
+ ch->control_ch_num += CH_10MHZ_APART;
+ } else {
+- WARN_ON_ONCE(1);
++ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
+ }
+ break;
+ case BRCMU_CHSPEC_D11AC_BW_80:
+@@ -188,7 +188,7 @@ static void brcmu_d11ac_decchspec(struct
+ ch->control_ch_num += CH_30MHZ_APART;
+ break;
+ default:
+- WARN_ON_ONCE(1);
++ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
+ break;
+ }
+ break;
+@@ -222,13 +222,13 @@ static void brcmu_d11ac_decchspec(struct
+ ch->control_ch_num += CH_70MHZ_APART;
+ break;
+ default:
+- WARN_ON_ONCE(1);
++ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
+ break;
+ }
+ break;
+ case BRCMU_CHSPEC_D11AC_BW_8080:
+ default:
+- WARN_ON_ONCE(1);
++ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
+ break;
+ }
+
+@@ -240,7 +240,7 @@ static void brcmu_d11ac_decchspec(struct
+ ch->band = BRCMU_CHAN_BAND_2G;
+ break;
+ default:
+- WARN_ON_ONCE(1);
++ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
+ break;
+ }
+ }