Search Linux Wireless

[PATCH] mac80211: Allow STA to connect in AX mode to MLD AP.

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

 



From: Ben Greear <greearb@xxxxxxxxxxxxxxx>

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).

Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
---
 net/mac80211/mlme.c | 51 +++++++++++++++++++++++++--------------------
 1 file changed, 28 insertions(+), 23 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index e7d42545851f..5fb0bdad88f4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -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;
-- 
2.40.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