wifi: mac80211: refactor STA CSA parsing flows
Subsystems (3)
v4 cover wifi: mac80211: refactor STA CSA parsing flows
These patches refactor the STA CSA parsing flows and add an utility to help.
Michael-CY Lee (2):
wifi: mac80211: Add utility for converting op_class into chandef
wifi: mac80211: refactor STA CSA parsing flows
include/net/cfg80211.h | 13 ++ net/mac80211/spectmgmt.c | 302 ++++++++++++++++++++++++++++++++------- net/wireless/util.c | 76 ++++++++++ 3 files changed, 338 insertions(+), 53 deletions(-)
Signature · 1 line
2.25.1
PATCH v4 1/2 wifi: mac80211: Add utility for converting op_class into chandef
This utility is used in STA CSA handling. The op_class in the ECSA Element can be converted into chandef.
---
v4: no change
--- include/net/cfg80211.h | 13 ++++++++ net/wireless/util.c | 76 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+)
include/net/cfg80211.h +13 -0
@@ -8672,6 +8672,19 @@ void cfg80211_ch_switch_started_notify(struct net_device *dev,bool ieee80211_operating_class_to_band (u8 operating_class,enum nl80211_band *band); +/** +* ieee80211_operating_class_to_chandef - convert operating class to chandef +* +* @operating_class: the operating class to convert +* @chan: the ieee80211_channel to convert +* @chandef: a pointer to the resulting chandef +* +* Returns %true if the conversion was successful, %false otherwise. +*/ +bool ieee80211_operating_class_to_chandef (u8 operating_class, +struct ieee80211_channel *chan, +struct cfg80211_chan_def *chandef); +/** * ieee80211_chandef_to_operating_class - convert chandef to operation class *
net/wireless/util.c +76 -0
82 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v4 2/2 wifi: mac80211: refactor STA CSA parsing flows
In reply to Michael-CY LeeThe new Wi-Fi Standard (IEEE Std 802.11-2020 9.4.2.160) specifies that the Wide Bandwidth Channel Switch (WBCS) Element subfields have the same definitions as VHT operation information if the operating band is not S1G.
The problem comes when the BSS is in 6 GHz band, the STA parses the WBCS Element by ieee80211_chandef_vht_oper(), which checks the capabilities for HT/VHT mode, not HE/EHT mode.
This patch refactors STA CSA parsing flow so that the corresponding capabilities can be checked. Also, it adds the way to use op_class in ECSA Element to build a new chandef.
In summary, the new steps for STA to handle CSA event are:
1. build the new chandef from one of the CSA-related (Sub)Elements in following order,
- Bandwidth Indication (Sub)Element
- Wide Bandwidth Channel Switch (Sub)Element
- Operating class in Extended Channel Switch Announcement Element
- Channel Switch Announcement Element
2. convert the new chandef into operation information according to the operating band in order to check if the new chandef fits STA's capabilities.
3. downgrade the bandwidth until current bandwidth is not disabled.
---
v4: The biggest difference in this version is that the WBCS Element has higher priority than op_class when STA handling CSA event. Other changes most come from your suggestions. (ex. coding style, static allocation in functions)
About the 'strict mode' you mentioned, we agree to making it a future work, and let this patch handle the original problem we faced.
--- net/mac80211/spectmgmt.c | 302 ++++++++++++++++++++++++++++++++------- 1 file changed, 249 insertions(+), 53 deletions(-)
net/mac80211/spectmgmt.c +249 -53
@@ -19,6 +19,203 @@#include "sta_info.h" #include "wme.h" +static bool +wbcs_elem_to_chandef (const struct ieee80211_wide_bw_chansw_ie *wbcs_elem, +struct cfg80211_chan_def *chandef) +{ +u8 ccfs0 = wbcs_elem->new_center_freq_seg0; +u8 ccfs1 = wbcs_elem->new_center_freq_seg1; +u32 cf0 =ieee80211_channel_to_frequency (ccfs0, chandef->chan->band); +u32 cf1 =ieee80211_channel_to_frequency (ccfs1, chandef->chan->band); + +switch (wbcs_elem->new_channel_width) { +case IEEE80211_VHT_CHANWIDTH_160MHZ : +/* deprecated encoding */ + chandef->width =NL80211_CHAN_WIDTH_160 ; + chandef->center_freq1 = cf0; +break ; +case IEEE80211_VHT_CHANWIDTH_80P80MHZ : +/* deprecated encoding */ + chandef->width =NL80211_CHAN_WIDTH_80P80 ; + chandef->center_freq1 = cf0; + chandef->center_freq2 = cf1; +break ; +case IEEE80211_VHT_CHANWIDTH_80MHZ : + chandef->width =NL80211_CHAN_WIDTH_80 ; + chandef->center_freq1 = cf0; + +if (ccfs1) { +u8 diff =abs (ccfs0 - ccfs1); + +if (diff ==8 ) { + chandef->width =NL80211_CHAN_WIDTH_160 ; + chandef->center_freq1 = cf1; + }else if (diff >8 ) { + chandef->width =NL80211_CHAN_WIDTH_80P80 ; + chandef->center_freq2 = cf1; + } + } +break ; +case IEEE80211_VHT_CHANWIDTH_USE_HT : +default : +/* If the WBCS Element is present, new channel bandwidth is +* at least 40 MHz. +*/ + chandef->width =NL80211_CHAN_WIDTH_40 ; + chandef->center_freq1 = cf0; +break ; + } + +return cfg80211_chandef_valid (chandef); +} + +static void +validate_chandef_by_ht_vht_oper (struct ieee80211_sub_if_data *sdata, +ieee80211_conn_flags_t conn_flags, +u32 vht_cap_info, +struct cfg80211_chan_def *chandef) +{ +u32 control_freq, center_freq1, center_freq2; +enum nl80211_chan_width chan_width; +struct ieee80211_ht_operation ht_oper; +struct ieee80211_vht_operation vht_oper; + +if (conn_flags & (IEEE80211_CONN_DISABLE_HT | +IEEE80211_CONN_DISABLE_40MHZ )) { + chandef->chan =NULL ; +return ; + } + + control_freq = chandef->chan->center_freq; + center_freq1 = chandef->center_freq1; + center_freq2 = chandef->center_freq2; + chan_width = chandef->width; + + ht_oper.primary_chan =ieee80211_frequency_to_channel (control_freq); +if (control_freq != center_freq1) + ht_oper.ht_param = control_freq > center_freq1 ? +IEEE80211_HT_PARAM_CHA_SEC_BELOW : +IEEE80211_HT_PARAM_CHA_SEC_ABOVE ; +else + ht_oper.ht_param =IEEE80211_HT_PARAM_CHA_SEC_NONE ; + +ieee80211_chandef_ht_oper (&ht_oper, chandef); + +if (conn_flags &IEEE80211_CONN_DISABLE_VHT ) +return ; + + vht_oper.center_freq_seg0_idx = +ieee80211_frequency_to_channel (center_freq1); + vht_oper.center_freq_seg1_idx = center_freq2 ? +ieee80211_frequency_to_channel (center_freq2) :0 ; + +switch (chan_width) { +case NL80211_CHAN_WIDTH_320 : +WARN_ON (1 ); +break ; +case NL80211_CHAN_WIDTH_160 : + vht_oper.chan_width =IEEE80211_VHT_CHANWIDTH_80MHZ ; + vht_oper.center_freq_seg1_idx = vht_oper.center_freq_seg0_idx; + vht_oper.center_freq_seg0_idx += + control_freq < center_freq1 ?-8 :8 ; +break ; +case NL80211_CHAN_WIDTH_80P80 : + vht_oper.chan_width =IEEE80211_VHT_CHANWIDTH_80MHZ ; +break ; +case NL80211_CHAN_WIDTH_80 : + vht_oper.chan_width =IEEE80211_VHT_CHANWIDTH_80MHZ ; +break ; +default : + vht_oper.chan_width =IEEE80211_VHT_CHANWIDTH_USE_HT ; +break ; + } + + ht_oper.operation_mode = +cpu_to_le16 (vht_oper.center_freq_seg1_idx << +IEEE80211_HT_OP_MODE_CCFS2_SHIFT ); + +if (!ieee80211_chandef_vht_oper (&sdata->local->hw, vht_cap_info, + &vht_oper, &ht_oper, chandef)) + chandef->chan =NULL ; +} + +static void +validate_chandef_by_6ghz_he_eht_oper (struct ieee80211_sub_if_data *sdata, +ieee80211_conn_flags_t conn_flags, +struct cfg80211_chan_def *chandef) +{ +u32 control_freq, center_freq1, center_freq2; +enum nl80211_chan_width chan_width; +struct { +struct ieee80211_he_operation _oper; +struct ieee80211_he_6ghz_oper _6ghz_oper; + } __packed he; +struct { +struct ieee80211_eht_operation _oper; +struct ieee80211_eht_operation_info _oper_info; + } __packed eht; + +if (conn_flags & (IEEE80211_CONN_DISABLE_HE )) { + chandef->chan =NULL ; +return ; + } + + control_freq = chandef->chan->center_freq; + center_freq1 = chandef->center_freq1; + center_freq2 = chandef->center_freq2; + chan_width = chandef->width; + + he._oper.he_oper_params =cpu_to_le32 (u32_encode_bits (1 , +IEEE80211_HE_OPERATION_6GHZ_OP_INFO )); + he._6ghz_oper.primary = +ieee80211_frequency_to_channel (control_freq); + he._6ghz_oper.ccfs0 =ieee80211_frequency_to_channel (center_freq1); + he._6ghz_oper.ccfs1 = center_freq2 ? +ieee80211_frequency_to_channel (center_freq2) :0 ; + +switch (chan_width) { +case NL80211_CHAN_WIDTH_320 : + he._6ghz_oper.ccfs1 = he._6ghz_oper.ccfs0; + he._6ghz_oper.ccfs0 += control_freq < center_freq1 ?-16 :16 ; + he._6ghz_oper.control =IEEE80211_EHT_OPER_CHAN_WIDTH_320MHZ ; +break ; +case NL80211_CHAN_WIDTH_160 : + he._6ghz_oper.ccfs1 = he._6ghz_oper.ccfs0; + he._6ghz_oper.ccfs0 += control_freq < center_freq1 ?-8 :8 ; + fallthrough; +case NL80211_CHAN_WIDTH_80P80 : + he._6ghz_oper.control = +IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ ; +break ; +case NL80211_CHAN_WIDTH_80 : + he._6ghz_oper.control = +IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_80MHZ ; +break ; +case NL80211_CHAN_WIDTH_40 : + he._6ghz_oper.control = +IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_40MHZ ; +break ; +default : + he._6ghz_oper.control = +IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_20MHZ ; +break ; + } + +if (!(conn_flags &IEEE80211_CONN_DISABLE_EHT )) { + eht._oper.params =IEEE80211_EHT_OPER_INFO_PRESENT ; + eht._oper_info.control = he._6ghz_oper.control; + eht._oper_info.ccfs0 = he._6ghz_oper.ccfs0; + eht._oper_info.ccfs1 = he._6ghz_oper.ccfs1; + +if (!ieee80211_chandef_he_6ghz_oper (sdata, &he._oper, &eht._oper, + chandef)) + chandef->chan =NULL ; + }else { +if (!ieee80211_chandef_he_6ghz_oper (sdata, &he._oper,NULL , chandef)) + chandef->chan =NULL ; + } +} + int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, struct ieee802_11_elems *elems, enum nl80211_band current_band,
@@ -28,12 +225,13 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, {enum nl80211_band new_band = current_band;int new_freq; -u8 new_chan_no; +u8 new_chan_no =0 , new_op_class =0 ;struct ieee80211_channel *new_chan; -struct cfg80211_chan_def new_vht_chandef = {}; +struct cfg80211_chan_def new_chandef = {};const struct ieee80211_sec_chan_offs_ie *sec_chan_offs;const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie;const struct ieee80211_bandwidth_indication *bwi; +const struct ieee80211_ext_chansw_ie *ext_chansw_elem;int secondary_channel_offset =-1 ;memset (csa_ie,0 ,sizeof (*csa_ie));
@@ -41,6 +239,7 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, sec_chan_offs = elems->sec_chan_offs; wide_bw_chansw_ie = elems->wide_bw_chansw_ie; bwi = elems->bandwidth_indication; + ext_chansw_elem = elems->ext_chansw_ie;if (conn_flags & (IEEE80211_CONN_DISABLE_HT |IEEE80211_CONN_DISABLE_40MHZ )) {
@@ -51,26 +250,29 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,if (conn_flags &IEEE80211_CONN_DISABLE_VHT ) wide_bw_chansw_ie =NULL ; -if (elems->ext_chansw_ie) { -if (!ieee80211_operating_class_to_band ( - elems->ext_chansw_ie->new_operating_class, - &new_band)) { -sdata_info (sdata, -"cannot understand ECSA IE operating class, %d, ignoring\n" , - elems->ext_chansw_ie->new_operating_class); +if (ext_chansw_elem) { + new_op_class = ext_chansw_elem->new_operating_class; +if (!ieee80211_operating_class_to_band (new_op_class, &new_band)) { + new_op_class =0 ; +sdata_info (sdata,"cannot understand ECSA IE operating class, %d, ignoring\n" , + ext_chansw_elem->new_operating_class); + }else { + new_chan_no = ext_chansw_elem->new_ch_num; + csa_ie->count = ext_chansw_elem->count; + csa_ie->mode = ext_chansw_elem->mode; } - new_chan_no = elems->ext_chansw_ie->new_ch_num; - csa_ie->count = elems->ext_chansw_ie->count; - csa_ie->mode = elems->ext_chansw_ie->mode; - }else if (elems->ch_switch_ie) { + } + +if (!new_op_class && elems->ch_switch_ie) { new_chan_no = elems->ch_switch_ie->new_ch_num; csa_ie->count = elems->ch_switch_ie->count; csa_ie->mode = elems->ch_switch_ie->mode; - }else { -/* nothing here we understand */ -return 1 ; } +/* nothing here we understand */ +if (!new_chan_no) +return 1 ; +/* Mesh Channel Switch Parameters Element */ if (elems->mesh_chansw_params_ie) { csa_ie->ttl = elems->mesh_chansw_params_ie->mesh_ttl;
@@ -134,59 +336,53 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,break ; } +/* parse one of the Elements to build a new chandef */ +memset (&new_chandef,0 ,sizeof (new_chandef)); + new_chandef.chan = new_chan;if (bwi) {/* start with the CSA one */ - new_vht_chandef = csa_ie->chandef; + new_chandef = csa_ie->chandef;/* and update the width accordingly */ /* FIXME: support 160/320 */ ieee80211_chandef_eht_oper (&bwi->info, true, true, - &new_vht_chandef); - }else if (wide_bw_chansw_ie) { -u8 new_seg1 = wide_bw_chansw_ie->new_center_freq_seg1; -struct ieee80211_vht_operation vht_oper = { - .chan_width = - wide_bw_chansw_ie->new_channel_width, - .center_freq_seg0_idx = - wide_bw_chansw_ie->new_center_freq_seg0, - .center_freq_seg1_idx = new_seg1, -/* .basic_mcs_set doesn't matter */ - }; -struct ieee80211_ht_operation ht_oper = { - .operation_mode = -cpu_to_le16 (new_seg1 << -IEEE80211_HT_OP_MODE_CCFS2_SHIFT ), - }; - -/* default, for the case of IEEE80211_VHT_CHANWIDTH_USE_HT, -* to the previously parsed chandef -*/ - new_vht_chandef = csa_ie->chandef; + &new_chandef); + }else if (!wide_bw_chansw_ie || !wbcs_elem_to_chandef (wide_bw_chansw_ie, + &new_chandef)) { +if (!ieee80211_operating_class_to_chandef (new_op_class, new_chan, + &new_chandef)) + new_chandef = csa_ie->chandef; + } + +/* check if the new chandef fits the capabilities */ +if (new_band ==NL80211_BAND_6GHZ ) +validate_chandef_by_6ghz_he_eht_oper (sdata, conn_flags, + &new_chandef); +else +validate_chandef_by_ht_vht_oper (sdata, conn_flags, vht_cap_info, + &new_chandef); -/* ignore if parsing fails */ -if (!ieee80211_chandef_vht_oper (&sdata->local->hw, - vht_cap_info, - &vht_oper, &ht_oper, - &new_vht_chandef)) - new_vht_chandef.chan =NULL ; +/* if data is there validate the bandwidth & use it */ +if (new_chandef.chan) { +if (conn_flags &IEEE80211_CONN_DISABLE_320MHZ && + new_chandef.width ==NL80211_CHAN_WIDTH_320 ) +ieee80211_chandef_downgrade (&new_chandef);if (conn_flags &IEEE80211_CONN_DISABLE_80P80MHZ && - new_vht_chandef.width ==NL80211_CHAN_WIDTH_80P80 ) -ieee80211_chandef_downgrade (&new_vht_chandef); + new_chandef.width ==NL80211_CHAN_WIDTH_80P80 ) +ieee80211_chandef_downgrade (&new_chandef); +if (conn_flags &IEEE80211_CONN_DISABLE_160MHZ && - new_vht_chandef.width ==NL80211_CHAN_WIDTH_160 ) -ieee80211_chandef_downgrade (&new_vht_chandef); - } + new_chandef.width ==NL80211_CHAN_WIDTH_160 ) +ieee80211_chandef_downgrade (&new_chandef); -/* if VHT data is there validate & use it */ -if (new_vht_chandef.chan) { -if (!cfg80211_chandef_compatible (&new_vht_chandef, +if (!cfg80211_chandef_compatible (&new_chandef, &csa_ie->chandef)) {sdata_info (sdata,"BSS %pM: CSA has inconsistent channel data, disconnecting\n" , bssid);return -EINVAL ; } - csa_ie->chandef = new_vht_chandef; + csa_ie->chandef = new_chandef; }if (elems->max_channel_switch_time)
Signature · 1 line
2.25.1
Johannes Berg
maintainerHi,
So ... I foolishly applied my other changes first, so I had to rebase this - please do check.
Couple of questions/notes, if anything needs changing please send another patch.
net/mac80211/spectmgmt.c line 169
Quoted 2 lines
net/mac80211/spectmgmt.c +2
-0+ he._oper.he_oper_params =cpu_to_le32 (u32_encode_bits (1 , +IEEE80211_HE_OPERATION_6GHZ_OP_INFO ));
(I changed this to le32_encode_bits, FWIW)
Quoted 9 lines
net/mac80211/spectmgmt.c +5
-1+/* if data is there validate the bandwidth & use it */ +if (new_chandef.chan) { +if (conn_flags &IEEE80211_CONN_DISABLE_320MHZ && + new_chandef.width ==NL80211_CHAN_WIDTH_320 ) +ieee80211_chandef_downgrade (&new_chandef); if (conn_flags & IEEE80211_CONN_DISABLE_80P80MHZ && - new_vht_chandef.width ==NL80211_CHAN_WIDTH_80P80 )
net/mac80211/spectmgmt.c int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, · line 376
Quoted 10 lines
net/mac80211/spectmgmt.c +5
-4-ieee80211_chandef_downgrade (&new_vht_chandef); + new_chandef.width == NL80211_CHAN_WIDTH_80P80) +ieee80211_chandef_downgrade (&new_chandef); +if (conn_flags &IEEE80211_CONN_DISABLE_160MHZ && - new_vht_chandef.width ==NL80211_CHAN_WIDTH_160 ) -ieee80211_chandef_downgrade (&new_vht_chandef); - } + new_chandef.width ==NL80211_CHAN_WIDTH_160 ) +ieee80211_chandef_downgrade (&new_chandef);
Shouldn't that have (had!) an 80 MHz handling case? Or maybe a loop a la the one in ieee80211_config_bw():
/*
* Downgrade the new channel if we associated with restricted
* bandwidth capabilities. For example, if we associated as a
* 20 MHz STA to a 40 MHz AP (due to regulatory, capabilities
* or config reasons) then switching to a 40 MHz channel now
* won't do us any good -- we couldn't use it with the AP. */
while (link->u.mgd.conn.bw_limit <
ieee80211_min_bw_limit_from_chandef(&chanreq.oper))
ieee80211_chandef_downgrade(&chanreq.oper, NULL);
Feels like this should be the same here.
Also note how this uses ieee80211_chandef_downgrade() - we really need to track the "chanreq.oper" vs. "chanreq.ap" in this code as well for puncturing - can I ask you to take a brief look at that? I'll anyway probably have to look at that soon though.
johannes
Johannes Berg
maintainerQuoted 5 lines · Johannes Berg
Hi,
So ... I foolishly applied my other changes first, so I had to rebase this - please do check.
Oh, also: some tests for this in the hwsim tests in hostap would be really nice, though I don't know if that would require extending hostapd's implementation of CSA first ...
johannes
Hi Johannes,
Please see the inlines.
Quoted 6 lines · Johannes Berg
So ... I foolishly applied my other changes first, so I had to rebase this - please do check.
Couple of questions/notes, if anything needs changing please send another patch.
The rebase seems good. We will conduct a full channel-switch test, including hwsim tests in hostap. If there are any problems, we will send another patch to fix them.
Quoted 41 lines
net/mac80211/spectmgmt.c line 169
Quoted 3 lines
net/mac80211/spectmgmt.c +2
-0+he._oper.he_oper_params =cpu_to_le32 (u32_encode_bits (1 , +IEEE80211_HE_OPERATION_6GHZ_OP_INFO ));(I changed this to
le32_encode_bits, FWIW)Quoted 9 lines
net/mac80211/spectmgmt.c +5
-1+/* if data is there validate the bandwidth & use it */ +if (new_chandef.chan) { +if (conn_flags &IEEE80211_CONN_DISABLE_320MHZ && + new_chandef.width ==NL80211_CHAN_WIDTH_320 ) +ieee80211_chandef_downgrade (&new_chandef); if (conn_flags & IEEE80211_CONN_DISABLE_80P80MHZ && - new_vht_chandef.width ==NL80211_CHAN_WIDTH_80P80 )net/mac80211/spectmgmt.c int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, · line 376
Quoted 10 lines
net/mac80211/spectmgmt.c +5
-4-ieee80211_chandef_downgrade (&new_vht_chandef); + new_chandef.width == NL80211_CHAN_WIDTH_80P80) +ieee80211_chandef_downgrade (&new_chandef); +if (conn_flags &IEEE80211_CONN_DISABLE_160MHZ && - new_vht_chandef.width ==NL80211_CHAN_WIDTH_160 ) -ieee80211_chandef_downgrade (&new_vht_chandef); -} + new_chandef.width ==NL80211_CHAN_WIDTH_160 ) +ieee80211_chandef_downgrade (&new_chandef);Shouldn't that have (had!) an 80 MHz handling case? Or maybe a loop a la
the one inieee80211_config_bw():/*
* Downgrade the new channel if we associated with restricted
* bandwidth capabilities. For example, if we associated as a
* 20 MHz STA to a 40 MHz AP (due to regulatory, capabilities
* or config reasons) then switching to a 40 MHz channel now
* won't do us any good -- we couldn't use it with the AP. */
while (link->u.mgd.conn.bw_limit<
ieee80211_min_bw_limit_from_chandef(&chanreq.
oper))
Quoted 4 lines
ieee80211_chandef_downgrade(&chanreq.oper, NULL);Feels like this should be the same here.
Yes, a loop to validate the operating bandwidth is necessary. We'll send another patch that makes this change.
Quoted 6 lines
Also note how this uses
ieee80211_chandef_downgrade()- we really need
to track the "chanreq.oper" vs. "chanreq.ap" in this code as well for puncturing - can I ask you to take a brief look at that? I'll anyway probably have to look at that soon though.
Of course.
In fact, we have plans to study and implement puncturing on our MT76 driver. We're currently working on the AP side, and we expect to start the STA side maybe three months later.
Quoted 2 lines
johannes
Best,
Michael
Johannes Berg
maintainerHi,
Quoted 3 lines
The rebase seems good. We will conduct a full channel-switch test, including hwsim tests in hostap. If there are any problems, we will send another patch to fix them.
OK, thanks for checking. The tests from hostap are passing, I make sure of that anyway, but ... who knows what they miss :)
Quoted 17 lines
Quoted 17 lines
Shouldn't that have (had!) an 80 MHz handling case? Or maybe a loop a la
the one inieee80211_config_bw():/*
* Downgrade the new channel if we associated with restricted
* bandwidth capabilities. For example, if we associated as a
* 20 MHz STA to a 40 MHz AP (due to regulatory, capabilities
* or config reasons) then switching to a 40 MHz channel now
* won't do us any good -- we couldn't use it with the AP. */
while (link->u.mgd.conn.bw_limit< ieee80211_min_bw_limit_from_chandef(&chanreq. oper))
ieee80211_chandef_downgrade(&chanreq.oper, NULL);
Quoted 4 lines
Quoted 1 line
Feels like this should be the same here.
Yes, a loop to validate the operating bandwidth is necessary. We'll send another patch that makes this change.
Sounds good, thanks!
Quoted 10 lines
Quoted 5 lines
Also note how this uses
ieee80211_chandef_downgrade()- we really need
to track the "chanreq.oper" vs. "chanreq.ap" in this code as well for puncturing - can I ask you to take a brief look at that? I'll anyway probably have to look at that soon though.Of course.
In fact, we have plans to study and implement puncturing on our MT76 driver. We're currently working on the AP side, and we expect to start the STA side maybe three months later.
OK, let's see. I probably have plans earlier than 3 months from now for this, but not sure yet. Let me know when/if you start working on it so we can sync up again then?
johannes
Johannes Berg
maintainerHi again,
Quoted 4 lines
In fact, we have plans to study and implement puncturing on our MT76 driver. We're currently working on the AP side, and we expect to start the STA side maybe three months later.
Unrelated to puncturing, but if you're working on the AP side now - also perhaps on the AP side wrt. partner/other link on MLD, i.e. one link doing CSA another advertising it in the MLE per-STA profile?
I'd really love to have your input on that in this thread:
https://lore.kernel.org/linux-wireless/[email protected]/
But also - if you're working on AP side for this, I have some changes I'm working on for mac80211 to parse the per-STA profile for CSA on the other links, to e.g. track CSA on currently disabled links, or if one link just didn't have beacons received for a few beacons, or so...
Would you be willing/interested in testing any of this code? I'm currently not really able to test it, so not sure if I should push it out.
johannes
Hi Johannes,
Please see the inlines.
Quoted 10 lines · Johannes Berg
External email : Please do not click links or open attachments until you have verified the sender or the content.
Hi again,Quoted 2 lines
In fact, we have plans to study and implement puncturing on our
MT76
Quoted 1 line
driver. We're currently working on the AP side, and we expect to
start
Quoted 10 lines
Quoted 1 line
the STA side maybe three months later.
Unrelated to puncturing, but if you're working on the AP side now - also
perhaps on the AP side wrt. partner/other link on MLD, i.e. one link doing CSA another advertising it in the MLE per-STA profile?I'd really love to have your input on that in this thread:
https://lore.kernel.org/linux-wireless/[email protected]/
We’re reading this discussion and will give our rely as soon as possible.
Quoted 10 lines
But also - if you're working on AP side for this, I have some changes I'm working on for mac80211 to parse the per-STA profile for CSA on the
other links, to e.g. track CSA on currently disabled links, or if one link just didn't have beacons received for a few beacons, or so...Would you be willing/interested in testing any of this code? I'm currently not really able to test it, so not sure if I should push it out.
Of course we’re willing to do the test.
But we’re still working on MLD AP right now, and the critical update will be the next.
In other word, to test MLD STA’s behavior we need to first get the MLD AP ready.
If it’s OK, could you give us your changes? Maybe we can test it during the development.
Best,
Michael
Johannes Berg
maintainerHi,
Quoted 5 lines
https://lore.kernel.org/linux-wireless/[email protected]/
We’re reading this discussion and will give our rely as soon as possible.
Great, thanks.
Quoted 4 lines
Quoted 3 lines
Would you be willing/interested in testing any of this code? I'm currently not really able to test it, so not sure if I should push it out.
Quoted 8 lines
Of course we’re willing to do the test.
But we’re still working on MLD AP right now, and the critical update will be the next.
In other word, to test MLD STA’s behavior we need to first get the MLD AP ready.
If it’s OK, could you give us your changes? Maybe we can test it during the development.
I actually posted it to the list yesterday, but it's probably more useful to have it in combined form, so I've now pushed this branch:
johannes