diff mbox series

[3/4] wifi: cfg80211: skip overriding direct/MBSSID BSS with per-STA profile BSS

Message ID 1718009524-5579-4-git-send-email-quic_vjakkam@quicinc.com (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series wifi: cfg80211: fix per-STA profile BSS entry issues | expand

Commit Message

Veerendranath Jakkam June 10, 2024, 8:52 a.m. UTC
Skip overriding BSS information generated from MBSSID or direct source
with BSS information generated from per-STA profile source to avoid
loosing actual signal strength and information elements such as RNR and
Basic ML elements.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
---
 net/wireless/scan.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 2850718..37ebe5a 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1891,6 +1891,10 @@  __cfg80211_bss_update(struct cfg80211_registered_device *rdev,
 	found = rb_find_bss(rdev, tmp, BSS_CMP_REGULAR);
 
 	if (found) {
+		if (tmp->bss_source == BSS_SOURCE_STA_PROFILE &&
+		    found->bss_source != BSS_SOURCE_STA_PROFILE)
+			goto free_ies;
+
 		if (!cfg80211_update_known_bss(rdev, found, tmp, signal_valid))
 			return NULL;
 	} else {