[openwrt/openwrt] kernel: broadcom-wl: add patch fixing compilation warning

LEDE Commits lede-commits at lists.infradead.org
Thu May 11 18:25:16 PDT 2023


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/40b075042bf74121c4dbca68a49bc5c7b45b3e6f

commit 40b075042bf74121c4dbca68a49bc5c7b45b3e6f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue May 9 18:12:02 2023 +0200

    kernel: broadcom-wl: add patch fixing compilation warning
    
    Add patch fixing compilation warning related to if clause not guarding in
    wl_iw.c
    Fix compilation warning:
    /__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_legacy/broadcom-wl-5.10.56.27.3/driver/wl_iw.c: In function 'wl_iw_set_freq':
    /__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_legacy/broadcom-wl-5.10.56.27.3/driver/wl_iw.c:393:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
      393 |         if (fwrq->m > 4000 && fwrq->m < 5000)
          |         ^~
    /__w/openwrt/openwrt/openwrt/build_dir/target-mipsel-openwrt-linux-musl_musl/linux-bcm47xx_legacy/broadcom-wl-5.10.56.27.3/driver/wl_iw.c:396:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      396 |                 chan = wf_mhz2channel(fwrq->m, sf);
          |                 ^~~~
    cc1: all warnings being treated as errors
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...-wl_id-fix-compilation-warning-if-does-not-guard.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/package/kernel/broadcom-wl/patches/101-wl_id-fix-compilation-warning-if-does-not-guard.patch b/package/kernel/broadcom-wl/patches/101-wl_id-fix-compilation-warning-if-does-not-guard.patch
new file mode 100644
index 0000000000..e5c17cb9b9
--- /dev/null
+++ b/package/kernel/broadcom-wl/patches/101-wl_id-fix-compilation-warning-if-does-not-guard.patch
@@ -0,0 +1,15 @@
+--- a/driver/wl_iw.c
++++ a/driver/wl_iw.c
+@@ -381,9 +381,9 @@ wl_iw_set_freq(
+ 			while (fwrq->e++ < 6)
+ 				fwrq->m /= 10;
+ 		}
+-	/* handle 4.9GHz frequencies as Japan 4 GHz based channelization */
+-	if (fwrq->m > 4000 && fwrq->m < 5000)
+-		sf = WF_CHAN_FACTOR_4_G; /* start factor for 4 GHz */
++		/* handle 4.9GHz frequencies as Japan 4 GHz based channelization */
++		if (fwrq->m > 4000 && fwrq->m < 5000)
++			sf = WF_CHAN_FACTOR_4_G; /* start factor for 4 GHz */
+ 
+ 		chan = wf_mhz2channel(fwrq->m, sf);
+ 	}




More information about the lede-commits mailing list