Date: Sun, 23 Feb 2025 00:38:53 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 73cd1c5d44ea - main - LinuxKPI: 802.11: add further checks for deflink.supp_rates[] Message-ID: <202502230038.51N0crBq014495@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=73cd1c5d44ead3b84cebcc0c24278429afa9e6ec commit 73cd1c5d44ead3b84cebcc0c24278429afa9e6ec Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-12-30 06:35:03 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-02-22 23:16:25 +0000 LinuxKPI: 802.11: add further checks for deflink.supp_rates[] When setting the per-band supp_rates bitfield check for mandatory rates only. We cannot easily say at that point for 2Ghz whether 11g is supported so assume these days it is not pure-b. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 041789857f0d..62d29feabb09 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -550,10 +550,30 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], continue; for (i = 0; i < supband->n_bitrates; i++) { - - IMPROVE("Further supband->bitrates[i]* checks?"); - /* or should we get them from the ni? */ - sta->deflink.supp_rates[band] |= BIT(i); + switch (band) { + case NL80211_BAND_2GHZ: + switch (supband->bitrates[i].bitrate) { + case 240: /* 11g only */ + case 120: /* 11g only */ + case 110: + case 60: /* 11g only */ + case 55: + case 20: + case 10: + sta->deflink.supp_rates[band] |= BIT(i); + break; + } + break; + case NL80211_BAND_5GHZ: + switch (supband->bitrates[i].bitrate) { + case 240: + case 120: + case 60: + sta->deflink.supp_rates[band] |= BIT(i); + break; + } + break; + } } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502230038.51N0crBq014495>