The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=53d9c14af6a65dcc037527c6ff5308c94806fafe
commit 53d9c14af6a65dcc037527c6ff5308c94806fafe Author: Bjoern A. Zeeb <[email protected]> AuthorDate: 2026-06-22 01:11:18 +0000 Commit: Bjoern A. Zeeb <[email protected]> CommitDate: 2026-06-22 01:21:39 +0000 LinuxKPI: 802.11: track bandwidth/rx_nss change in lkpi_sta_sync_from_ni() In lkpi_sta_sync_from_ni() track the bandwidth and rx_nss at the beginning so at the end we can diff if they changed in order to generate the appropriate RC*CHNAGED flags for the (*link_sta_rc_update) downcall. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9125ed1cb4b4..33587016fe8d 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -908,6 +908,8 @@ lkpi_sta_sync_from_ni(struct ieee80211_hw *hw, struct ieee80211_vif *vif, { enum ieee80211_bss_changed bss_changed; enum ieee80211_rate_control_changed_flags rc_changed; + enum ieee80211_sta_rx_bandwidth bandwidth; + uint8_t rx_nss; if (updchnctx) lockdep_assert_wiphy(hw->wiphy); @@ -915,6 +917,12 @@ lkpi_sta_sync_from_ni(struct ieee80211_hw *hw, struct ieee80211_vif *vif, bss_changed = 0; rc_changed = 0; + bandwidth = sta->deflink.bandwidth; + rx_nss = sta->deflink.rx_nss; + + TRACE_RATES("updchnctx %d bandwidth %d rx_nss %u", + updchnctx, bandwidth, rx_nss); + /* * Ensure rx_nss is at least 1 as otherwise drivers run into * unexpected problems. @@ -940,6 +948,11 @@ lkpi_sta_sync_from_ni(struct ieee80211_hw *hw, struct ieee80211_vif *vif, bss_changed |= lkpi_sta_supp_rates(hw, vif, ni, &rc_changed); + if (sta->deflink.bandwidth != bandwidth) + rc_changed |= IEEE80211_RC_BW_CHANGED; + if (sta->deflink.rx_nss != rx_nss) + rc_changed |= IEEE80211_RC_NSS_CHANGED; + TRACE_RATES("updchnctx %d rc_change %#010x bss_changed %#010jx " "bandwidth %d rx_nss %u", updchnctx, rc_changed, (uintmax_t)bss_changed,
