Search Linux Wireless

[PATCH 1/2] wifi: mac80211: track obss color bitmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Track OBSS BSS colors on checking OBSS Beacons and report used color bitmap to
hostapd when collide.

Signed-off-by: Yi-Chia Hsieh <yi-chia.hsieh@xxxxxxxxxxxx>
---
 include/net/mac80211.h | 1 +
 net/mac80211/rx.c      | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 219fd15893b0..f003e0dbc7c4 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -749,6 +749,7 @@ struct ieee80211_bss_conf {
 
 	bool color_change_active;
 	u8 color_change_color;
+	u64 used_color_bitmap;
 
 	bool vht_su_beamformer;
 	bool vht_su_beamformee;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index f7fdfe710951..e4a60992e4eb 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3264,9 +3264,11 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
 
 		color = le32_get_bits(he_oper->he_oper_params,
 				      IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
+		bss_conf->used_color_bitmap |= BIT_ULL(color);
+
 		if (color == bss_conf->he_bss_color.color)
 			ieee80211_obss_color_collision_notify(&rx->sdata->vif,
-							      BIT_ULL(color),
+							      bss_conf->used_color_bitmap,
 							      GFP_ATOMIC);
 	}
 }
-- 
2.39.0




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux