From: Rafał Miłecki Date: Wed, 7 Nov 2018 10:16:25 +0000 (+0100) Subject: mac80211: brcmfmac: backport the last accepted 4.21 changes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4d5b0efc099486e497cc95dda1c68166f83e9537;p=openwrt%2Fstaging%2Fmkresin.git mac80211: brcmfmac: backport the last accepted 4.21 changes It's a typo fix & patch that helps debugging possible WARN-ings. Signed-off-by: Rafał Miłecki --- diff --git a/package/kernel/mac80211/patches/brcm/322-v4.21-0001-brcmfmac-fix-spelling-mistake-Retreiving-Retrieving.patch b/package/kernel/mac80211/patches/brcm/322-v4.21-0001-brcmfmac-fix-spelling-mistake-Retreiving-Retrieving.patch new file mode 100644 index 0000000000..c1aea25cba --- /dev/null +++ b/package/kernel/mac80211/patches/brcm/322-v4.21-0001-brcmfmac-fix-spelling-mistake-Retreiving-Retrieving.patch @@ -0,0 +1,34 @@ +From e966a79c2f761a696dec9cfb0e2d4aa977bf78cb Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Tue, 16 Oct 2018 18:43:42 +0100 +Subject: [PATCH] brcmfmac: fix spelling mistake "Retreiving" -> "Retrieving" + +Trivial fix to spelling mistake in brcmf_err error message. + +Signed-off-by: Colin Ian King +Acked-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -214,7 +214,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i + err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr, + sizeof(ifp->mac_addr)); + if (err < 0) { +- brcmf_err("Retreiving cur_etheraddr failed, %d\n", err); ++ brcmf_err("Retrieving cur_etheraddr failed, %d\n", err); + goto done; + } + memcpy(ifp->drvr->wiphy->perm_addr, ifp->drvr->mac, ETH_ALEN); +@@ -269,7 +269,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i + strcpy(buf, "ver"); + err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf)); + if (err < 0) { +- brcmf_err("Retreiving version information failed, %d\n", ++ brcmf_err("Retrieving version information failed, %d\n", + err); + goto done; + } diff --git a/package/kernel/mac80211/patches/brcm/323-v4.21-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch b/package/kernel/mac80211/patches/brcm/323-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/brcm/323-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?= +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 +Signed-off-by: Kalle Valo +--- + 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; + } + }