Compilation of kernel fails with error in BWN driver on 14.3-RELEASE. To reproduce, as root: 1. Back up existing source tree to /usr/src.original 2. Download a fresh copy of 14.3-RELEASE source tree, extract archive to /usr/src 3. copy /usr/src/sys/amd64/conf/GENERIC to /usr/src/sys/amd64/conf/WIRELESS 4. edit /usr/src/sys/amd64/conf/WIRELESS to 4a. uncomment line 297, 4b. insert new line 298 "options BWN_GPL_PHY", 4c. insert new line 299 "options BWN_DEBUG". 5. "cd /usr/src/" 6. "make buildkernel KERNCONF=WIRELESS" compilation fails with error message /usr/src/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_ppr.c:250:11: error: comparison of different enumeration types ('bwn_phy_band_t' and 'bwn_band_t') [-Werror,-Wenum-compare] 250 | if (band == BWN_BAND_2G) { | ~~~~ ^ ~~~~~~~~~~~ 1 error generated.
Just to be clear bwn and BWN_DEBUG compile, it is BWN_GPL_PHY which causes the error.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2f16c8d4fa0f5788d52d74fa875c386c475249ec commit 2f16c8d4fa0f5788d52d74fa875c386c475249ec Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-06-22 00:15:38 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-06-22 00:19:42 +0000 bwn(4): BWN_GPL_PHY: make compile again compiler complains about error: comparison of different enumeration types ('bwn_phy_band_t' and 'bwn_band_t'); so use the correct enum value. Sponsored by: The FreeBSD Foundation PR: 287695 Reported by: (tom.mcclean gmail.com) MFC after: 3 days sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_ppr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Hi, thanks for reporting. I'll merge the fix in a few days to stable/14. You may need to manually cherry-pick the one line change to your releng/14.3-derived branch to make it compile.
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=48c4eac328eaffe4eed0461d75e6c2bb463b3efc commit 48c4eac328eaffe4eed0461d75e6c2bb463b3efc Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-06-22 00:15:38 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-07-13 19:25:02 +0000 bwn(4): BWN_GPL_PHY: make compile again compiler complains about error: comparison of different enumeration types ('bwn_phy_band_t' and 'bwn_band_t'); so use the correct enum value. Sponsored by: The FreeBSD Foundation PR: 287695 Reported by: (tom.mcclean gmail.com) (cherry picked from commit 2f16c8d4fa0f5788d52d74fa875c386c475249ec) sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_ppr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks a lot for reporting. The fix is in main and stable/14.