git: 1cb6a2a2deb6 - stable/15 - LinuxKPI: 802.11: make lkpi_sta_sync_from_ni() return bss_changes

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Mon, 29 Jun 2026 06:34:40 UTC
The branch stable/15 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=1cb6a2a2deb6bef711b51ae3bf3ca67eda3429f5

commit 1cb6a2a2deb6bef711b51ae3bf3ca67eda3429f5
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-06-17 14:37:42 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-06-29 03:54:46 +0000

    LinuxKPI: 802.11: make lkpi_sta_sync_from_ni() return bss_changes
    
    This is a preparatory change with no functional changes.
    
    Sponosred by:   The FreeBSD Foundation
    
    (cherry picked from commit 038489e46ea3e77484ea85c4369610ba3ee8381b)
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 8a761be3d6fd..777caa6d14e4 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -746,14 +746,17 @@ skip_bw:
 }
 #endif
 
-static void
+static enum ieee80211_bss_changed
 lkpi_sta_sync_from_ni(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
     struct ieee80211_sta *sta, struct ieee80211_node *ni, bool updchnctx)
 {
+	enum ieee80211_bss_changed bss_changed;
 
 	if (updchnctx)
 		lockdep_assert_wiphy(hw->wiphy);
 
+	bss_changed = 0;
+
 	/*
 	 * Ensure rx_nss is at least 1 as otherwise drivers run into
 	 * unexpected problems.
@@ -776,6 +779,8 @@ lkpi_sta_sync_from_ni(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	 */
 	if (updchnctx)
 		lkpi_sync_chanctx_cw_from_rx_bw(hw, vif, sta);
+
+	return (bss_changed);
 }
 
 #if 0
@@ -940,7 +945,7 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN],
 	sta->deflink.rx_nss = 1;
 	sta->deflink.sta = sta;
 
-	lkpi_sta_sync_from_ni(hw, vif, sta, ni, false);
+	(void)lkpi_sta_sync_from_ni(hw, vif, sta, ni, false);
 
 	IMPROVE("he, eht, bw_320, ... smps_mode, ..");
 
@@ -3064,8 +3069,9 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int
 		IMPROVE("net80211 does not consider node authorized");
 	}
 
+	bss_changed = 0;
 	IMPROVE("Is this the right spot, has net80211 done all updates already?");
-	lkpi_sta_sync_from_ni(hw, vif, sta, ni, true);
+	bss_changed |= lkpi_sta_sync_from_ni(hw, vif, sta, ni, true);
 
 	/* Update thresholds. */
 	hw->wiphy->frag_threshold = vap->iv_fragthreshold;
@@ -3093,7 +3099,6 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int
 	 */
 	IMPROVE("Need that bssid setting, and the keys");
 
-	bss_changed = 0;
 	bss_changed |= lkpi_update_dtim_tsf(vif, ni, vap, __func__, __LINE__);
 	lkpi_bss_info_change(hw, vif, bss_changed);