Date: Wed, 26 Feb 2025 02:12:00 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: 3e022a91c91c - main - LinuxKPI: 802.11: ensure to select the correct channel width Message-ID: <202502260212.51Q2C0ZB074059@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=3e022a91c91cf1b967d7de7b6fe81c6632fe1207 commit 3e022a91c91cf1b967d7de7b6fe81c6632fe1207 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-02-25 01:57:46 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-02-26 02:10:55 +0000 LinuxKPI: 802.11: ensure to select the correct channel width If HT is enabled but not using CHW=40 set CHW=20 to make sure we do not get stuck on any other value. If VHT and the VHT Operation element Channel Width field is 0 (use 20/40) do not update the bandwidth but stick with what HT selected. This is better than disabling VHT alltogether for 20/40 and allows us to work on VHT20 and VHT40 APs it seems. We will have to do more work to can align with the chanctx or deal with Operating Mode Notification Action frames in LinuxKPI or net80211. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1c9f8bc63292..410ec0679d44 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -401,6 +401,8 @@ lkpi_sta_sync_ht_from_ni(struct ieee80211_sta *sta, struct ieee80211_node *ni) if ((sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) != 0) sta->deflink.bandwidth = IEEE80211_STA_RX_BW_40; + else + sta->deflink.bandwidth = IEEE80211_STA_RX_BW_20; /* * 802.11n-2009 20.6 Parameters for HT MCSs gives the mandatory/ @@ -450,6 +452,13 @@ lkpi_sta_sync_vht_from_ni(struct ieee80211_sta *sta, struct ieee80211_node *ni) sta->deflink.vht_cap.cap = ni->ni_vhtcap; sta->deflink.vht_cap.vht_mcs = ni->ni_vht_mcsinfo; + /* + * If VHT20/40 are selected do not update the bandwidth + * from HT but stya on VHT. + */ + if (ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_USE_HT) + goto skip_bw; + width = (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK); switch (width) { #if 0 @@ -467,7 +476,7 @@ lkpi_sta_sync_vht_from_ni(struct ieee80211_sta *sta, struct ieee80211_node *ni) #endif sta->deflink.bandwidth = IEEE80211_STA_RX_BW_80; } - +skip_bw: rx_nss = 0; rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502260212.51Q2C0ZB074059>