mac80211: Allow STA to connect in AX mode to MLD AP.
PATCH 1/1 mac80211: Allow STA to connect in AX mode to MLD AP.
From: Ben Greear <[email protected]>
Check if user has configured STA to be AX mode, and if so, skip the check for MLD elements (as they would not be needed in AX mode).
--- net/mac80211/mlme.c | 51 +++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 23 deletions(-)
net/mac80211/mlme.c +28 -23
@@ -5550,34 +5550,39 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, }if (ieee80211_vif_is_mld (&sdata->vif)) { -if (!elems->ml_basic) { -sdata_info (sdata, -"MLO association with %pM but no multi-link element in response!\n" , - assoc_data->ap_addr); - goto abandon_assoc; - } - -if (le16_get_bits (elems->ml_basic->control, -IEEE80211_ML_CONTROL_TYPE ) != -IEEE80211_ML_CONTROL_TYPE_BASIC ) { -sdata_info (sdata, -"bad multi-link element (control=0x%x)\n" , -le16_to_cpu (elems->ml_basic->control)); - goto abandon_assoc; - }else { -struct ieee80211_mle_basic_common_info *common; - - common = (void *)elems->ml_basic->variable; +struct ieee80211_link_data *link; -if (memcmp (assoc_data->ap_addr, - common->mld_mac_addr,ETH_ALEN )) { + link =sdata_dereference (sdata->link[0 ], sdata); +if (!(link && (link->u.mgd.conn_flags &IEEE80211_CONN_DISABLE_EHT ))) { +if (!elems->ml_basic) {sdata_info (sdata, -"AP MLD MAC address mismatch: got %pM expected %pM\n" , - common->mld_mac_addr, +"MLO association with %pM but no multi-link element in response!\n" , assoc_data->ap_addr); goto abandon_assoc; } - } + +if (le16_get_bits (elems->ml_basic->control, +IEEE80211_ML_CONTROL_TYPE ) != +IEEE80211_ML_CONTROL_TYPE_BASIC ) { +sdata_info (sdata, +"bad multi-link element (control=0x%x)\n" , +le16_to_cpu (elems->ml_basic->control)); + goto abandon_assoc; + }else { +struct ieee80211_mle_basic_common_info *common; + + common = (void *)elems->ml_basic->variable; + +if (memcmp (assoc_data->ap_addr, + common->mld_mac_addr,ETH_ALEN )) { +sdata_info (sdata, +"AP MLD MAC address mismatch: got %pM expected %pM\n" , + common->mld_mac_addr, + assoc_data->ap_addr); + goto abandon_assoc; + } + } + }/* if we are not configured to disable EHT */ } sdata->vif.cfg.aid = aid;
Signature · 1 line
2.40.0
Johannes Berg
maintainerQuoted 5 lines · On Tue, 2023-10-03 at 09:43 -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
Check if user has configured STA to be AX mode, and if so, skip the check for MLD elements (as they would not be needed in AX mode).
Eh, no, I think this is wrong.
Quoted 2 lines
if (
ieee80211_vif_is_mld(&sdata->vif)) {
If you get past this if, you've (locally) committed to doing EHT already, not just HE (née 11ax), so should have an EHT connection?
Though the change is hard to read - but why are you telling the supplicant to connect with MLO if you wanted to not use EHT?
johannes
Quoted 10 lines · Johannes Berg
Quoted 5 lines · On Tue, 2023-10-03 at 09:43 -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
Check if user has configured STA to be AX mode, and if so, skip the check for MLD elements (as they would not be needed in AX mode).
Eh, no, I think this is wrong.
Quoted 1 line
Quoted 7 lines
Quoted 1 line
if (ieee80211_vif_is_mld(&sdata->vif)) {If you get past this if, you've (locally) committed to doing EHT already, not just HE (née 11ax), so should have an EHT connection?
Though the change is hard to read - but why are you telling the supplicant to connect with MLO if you wanted to not use EHT?
It is mostly white-space changes, but the diff is ugly.
I caused the DISABLE_EHT flag to be set in mac80211, and that generally seems to work in my kernel, but something is still trying to do MLO I guess.
I did not specifically tell supplicant to do MLO, and in fact I told it to disable_be, but maybe that is not fully implemented. My supplicant is a few months old vs upstream at this point.
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 19 lines · Ben Greear
Quoted 10 lines · Johannes Berg
Quoted 5 lines · On Tue, 2023-10-03 at 09:43 -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
Check if user has configured STA to be AX mode, and if so, skip the check for MLD elements (as they would not be needed in AX mode).
Eh, no, I think this is wrong.
Quoted 1 line
Quoted 7 lines
Quoted 1 line
if (
ieee80211_vif_is_mld(&sdata->vif)) {If you get past this if, you've (locally) committed to doing EHT already, not just HE (née 11ax), so should have an EHT connection?
Though the change is hard to read - but why are you telling the supplicant to connect with MLO if you wanted to not use EHT?
Quoted 8 lines
It is mostly white-space changes, but the diff is ugly.
I caused the
DISABLE_EHTflag to be set in mac80211, and that generally seems to work in my kernel, but something is still trying to do MLO I guess.I did not specifically tell supplicant to do MLO, and in fact I told it to
disable_be, but maybe that is not fully implemented. My supplicant is a few months old vs upstream at this point.
I created a patch to supplicant where it will disable MLO if disable_eht is true, and that seems to have properly associated a non-MLO station in AX mode.
So I agree that my patch to the kernel is not needed.
Thanks for the patch review and comments.
Thanks,
Ben