summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael-CY Lee <michael-cy.lee@mediatek.com>2024-07-05 15:43:46 +0800
committerJohannes Berg <johannes.berg@intel.com>2024-07-08 18:28:47 +0200
commit4044b23781104801f70c4a4ec3ca090730a161c5 (patch)
treedcd506aaef050063fd47b35befb65e48c038495b
parent7cd445635562a38c1e3534e3e691c25d2737be54 (diff)
downloadlinux-4044b23781104801f70c4a4ec3ca090730a161c5.tar.gz
linux-4044b23781104801f70c4a4ec3ca090730a161c5.tar.bz2
linux-4044b23781104801f70c4a4ec3ca090730a161c5.zip
wifi: mac80211: do not check BSS color collision in certain cases
Do not check BSS color collision in following cases 1. already under a color change 2. color change is disabled Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> Link: https://patch.msgid.link/20240705074346.11228-1-michael-cy.lee@mediatek.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/rx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 0ff9062a130c..59ad24a71141 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3358,6 +3358,7 @@ static void
ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
{
struct ieee80211_mgmt *mgmt = (void *)rx->skb->data;
+ struct ieee80211_bss_conf *bss_conf;
const struct element *ie;
size_t baselen;
@@ -3368,7 +3369,9 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
if (ieee80211_hw_check(&rx->local->hw, DETECTS_COLOR_COLLISION))
return;
- if (rx->link->conf->csa_active)
+ bss_conf = rx->link->conf;
+ if (bss_conf->csa_active || bss_conf->color_change_active ||
+ !bss_conf->he_bss_color.enabled)
return;
baselen = mgmt->u.beacon.variable - rx->skb->data;
@@ -3380,7 +3383,6 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
rx->skb->len - baselen);
if (ie && ie->datalen >= sizeof(struct ieee80211_he_operation) &&
ie->datalen >= ieee80211_he_oper_size(ie->data + 1)) {
- struct ieee80211_bss_conf *bss_conf = rx->link->conf;
const struct ieee80211_he_operation *he_oper;
u8 color;