Skip to content

Commit 185cc23

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
wifi: cfg80211: update the time stamps in hidden ssid
In hidden SSID we have separate BSS entries for the beacon and for the probe response(s). The BSS entry time stamps represent the age of the BSS; when was the last time we heard the BSS. When we receive a beacon of a hidden SSID it means that we heard that BSS, so it makes sense to indicate that in the probe response entries. Do that. Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250907115135.712745e498c0.I38186abf5d20dec6f6f2d42d2e1cdb50c6bfea25@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent ea92854 commit 185cc23

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

net/wireless/scan.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,6 +1816,9 @@ static void cfg80211_update_hidden_bsses(struct cfg80211_internal_bss *known,
18161816
WARN_ON(ies != old_ies);
18171817

18181818
rcu_assign_pointer(bss->pub.beacon_ies, new_ies);
1819+
1820+
bss->ts = known->ts;
1821+
bss->pub.ts_boottime = known->pub.ts_boottime;
18191822
}
18201823
}
18211824

@@ -1882,6 +1885,10 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
18821885
{
18831886
lockdep_assert_held(&rdev->bss_lock);
18841887

1888+
/* Update time stamps */
1889+
known->ts = new->ts;
1890+
known->pub.ts_boottime = new->pub.ts_boottime;
1891+
18851892
/* Update IEs */
18861893
if (rcu_access_pointer(new->pub.proberesp_ies)) {
18871894
const struct cfg80211_bss_ies *old;
@@ -1944,8 +1951,6 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
19441951
if (signal_valid)
19451952
known->pub.signal = new->pub.signal;
19461953
known->pub.capability = new->pub.capability;
1947-
known->ts = new->ts;
1948-
known->pub.ts_boottime = new->pub.ts_boottime;
19491954
known->parent_tsf = new->parent_tsf;
19501955
known->pub.chains = new->pub.chains;
19511956
memcpy(known->pub.chain_signal, new->pub.chain_signal,

0 commit comments

Comments
 (0)