summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2025-09-07 11:51:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-13 15:37:18 -0500
commit23a2935b20e7e32afb4e49a2ab5560460274768b (patch)
tree53d016e94f3c6a89ae232d3a68d9be00fcfceb0a /net/wireless
parent57534db1bbc4ca772393bb7d92e69d5e7b9051cf (diff)
downloadlinux-23a2935b20e7e32afb4e49a2ab5560460274768b.tar.gz
linux-23a2935b20e7e32afb4e49a2ab5560460274768b.tar.bz2
linux-23a2935b20e7e32afb4e49a2ab5560460274768b.zip
wifi: cfg80211: update the time stamps in hidden ssid
[ Upstream commit 185cc2352cb1ef2178fe4e9a220a73c94007b8bb ] 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 <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250907115135.712745e498c0.I38186abf5d20dec6f6f2d42d2e1cdb50c6bfea25@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/scan.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 6c7b7c3828a4..90a9187a6b13 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1816,6 +1816,9 @@ static void cfg80211_update_hidden_bsses(struct cfg80211_internal_bss *known,
WARN_ON(ies != old_ies);
rcu_assign_pointer(bss->pub.beacon_ies, new_ies);
+
+ bss->ts = known->ts;
+ bss->pub.ts_boottime = known->pub.ts_boottime;
}
}
@@ -1882,6 +1885,10 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
{
lockdep_assert_held(&rdev->bss_lock);
+ /* Update time stamps */
+ known->ts = new->ts;
+ known->pub.ts_boottime = new->pub.ts_boottime;
+
/* Update IEs */
if (rcu_access_pointer(new->pub.proberesp_ies)) {
const struct cfg80211_bss_ies *old;
@@ -1945,8 +1952,6 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
if (signal_valid)
known->pub.signal = new->pub.signal;
known->pub.capability = new->pub.capability;
- known->ts = new->ts;
- known->pub.ts_boottime = new->pub.ts_boottime;
known->parent_tsf = new->parent_tsf;
known->pub.chains = new->pub.chains;
memcpy(known->pub.chain_signal, new->pub.chain_signal,