diff mbox series

[7/7] wifi: mac80211_hwsim: add support for BSS color

Message ID 20240416045943.576656-8-quic_adisi@quicinc.com
State Superseded
Headers show
Series wifi: cfg80211/mac80211: add support for HE BSS color handling with Multi-Link Operation | expand

Commit Message

Aditya Kumar Singh April 16, 2024, 4:59 a.m. UTC
Advertise support for BSS color and then once the countdown reaches 0,
call color change finish.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
---
 drivers/net/wireless/virtual/mac80211_hwsim.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Johannes Berg April 22, 2024, 8:15 a.m. UTC | #1
On Tue, 2024-04-16 at 10:29 +0530, Aditya Kumar Singh wrote:
> Advertise support for BSS color and then once the countdown reaches 0,
> call color change finish.
> 
> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
> ---
>  drivers/net/wireless/virtual/mac80211_hwsim.c | 6 ++++++
> 

Not quite related to this patch, but I wonder ... what are you testing
with this? How?

Seems like we should actually filter on BSS color in hwsim on RX
somehow? We don't have PPDUs per se, so we'd have to tag it somewhere
else, but that's doable?

Otherwise are we even testing all of this fully?

johannes
Aditya Kumar Singh April 22, 2024, 8:48 a.m. UTC | #2
On 4/22/24 13:45, Johannes Berg wrote:
> On Tue, 2024-04-16 at 10:29 +0530, Aditya Kumar Singh wrote:
>> Advertise support for BSS color and then once the countdown reaches 0,
>> call color change finish.
>>
>> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
>> ---
>>   drivers/net/wireless/virtual/mac80211_hwsim.c | 6 ++++++
>>
> 
> Not quite related to this patch, but I wonder ... what are you testing
> with this? How?
>

I'm testing only color change done via user space for now. Currently 
hostapd does not have support for that but I have changes for it too. So 
after adding cli support, I have added hw_sim test cases to test and 
validate it (non-MLO or HE scenario as well as MLO). And like CSA, 
currently for MLO, color change test only on first link. Non-first link 
will be added later.

> Seems like we should actually filter on BSS color in hwsim on RX
> somehow? We don't have PPDUs per se, so we'd have to tag it somewhere
> else, but that's doable?
> 

Yeah seems like but need to deep dive. Have not thought about this yet.

> Otherwise are we even testing all of this fully?

Not fully. As an initial step, currently supporting changes via cli. 
Then we can add the required RX details via some means so that when it 
reports packets to mac80211, color collision detection can automatically 
happen.
Aditya Kumar Singh April 22, 2024, 12:46 p.m. UTC | #3
On 4/22/24 14:18, Aditya Kumar Singh wrote:
> I have added hw_sim test cases to test and validate it (non-MLO or HE 
> scenario as well as MLO).

Here is the hostapd change -
 
https://patchwork.ozlabs.org/project/hostap/list/?series=403938&archive=both&state=*
diff mbox series

Patch

diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
index 4399eb1d9f46..2298e89fb7b6 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
@@ -2313,6 +2313,10 @@  static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
 
 	if (link_conf->csa_active && ieee80211_beacon_cntdwn_is_complete(vif, link_id))
 		ieee80211_csa_finish(vif, link_id);
+
+	if (link_conf->color_change_active &&
+	    ieee80211_beacon_cntdwn_is_complete(vif, link_id))
+		ieee80211_color_change_finish(vif, link_id);
 }
 
 static enum hrtimer_restart
@@ -5323,6 +5327,8 @@  static int mac80211_hwsim_new_radio(struct genl_info *info,
 
 	wiphy_ext_feature_set(hw->wiphy,
 			      NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT);
+	wiphy_ext_feature_set(hw->wiphy,
+			      NL80211_EXT_FEATURE_BSS_COLOR);
 
 	hw->wiphy->interface_modes = param->iftypes;