Date: Wed, 11 Jun 2025 09:14:27 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 88d897ec1a95 - stable/14 - LinuxKPI: 802.11: fix lkpi_scan_ies_add() channel lookup Message-ID: <202506110914.55B9ERkT062346@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=88d897ec1a957bb8be41e52495f9c32c56b38e96 commit 88d897ec1a957bb8be41e52495f9c32c56b38e96 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-06-05 21:53:35 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-06-10 23:40:47 +0000 LinuxKPI: 802.11: fix lkpi_scan_ies_add() channel lookup When looking up the channel we may not get a result if no flags are passed in as net80211 channel list setup and lookup coding requires a matching flag (band). So pass in IEEE80211_CHAN_[AG] depending on band to increase the chances of finding a base channel and from that derive rates, etc. Sponsored by: The FreeBSD Foundation (cherry picked from commit f1a110f1f0f2ef83758f7d0a984b14f512ea00fd) --- sys/compat/linuxkpi/common/src/linux_80211.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1b1e5721d7b2..1487e20bebc7 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4118,12 +4118,26 @@ lkpi_scan_ies_add(uint8_t *p, struct ieee80211_scan_ies *scan_ies, channels = supband->channels; chan = NULL; for (i = 0; i < supband->n_channels; i++) { + uint32_t flags; if (channels[i].flags & IEEE80211_CHAN_DISABLED) continue; + flags = 0; + switch (band) { + case NL80211_BAND_2GHZ: + flags |= IEEE80211_CHAN_G; + break; + case NL80211_BAND_5GHZ: + flags |= IEEE80211_CHAN_A; + break; + default: + panic("%s:%d: unupported band %d\n", + __func__, __LINE__, band); + } + chan = ieee80211_find_channel(ic, - channels[i].center_freq, 0); + channels[i].center_freq, flags); if (chan != NULL) break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506110914.55B9ERkT062346>