mac80211: support S1G association
authorThomas Pedersen <thomas@adapt-ip.com>
Tue, 22 Sep 2020 02:28:15 +0000 (19:28 -0700)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 5 Feb 2021 10:39:41 +0000 (11:39 +0100)
The changes required for associating in S1G are:

- apply S1G BSS channel info before assoc
- mark all S1G STAs as QoS STAs
- include and parse AID request element
- handle new Association Response format
- don't fail assoc if supported rates element is missing

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
Link: https://lore.kernel.org/r/20200922022818.15855-15-thomas@adapt-ip.com
[pass skb to ieee80211_add_aid_request_ie(), remove unused variable 'bss']
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
include/linux/ieee80211.h

index 5001b5f57e881ef5be887e689be77452f8923240..abf0bce6c5143fae1386cebb100fe047eaf54677 100644 (file)
@@ -989,6 +989,25 @@ enum ieee80211_vht_opmode_bits {
        IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF   = 0x80,
 };
 
+/**
+ * enum ieee80211_s1g_chanwidth
+ * These are defined in IEEE802.11-2016ah Table 10-20
+ * as BSS Channel Width
+ *
+ * @IEEE80211_S1G_CHANWIDTH_1MHZ: 1MHz operating channel
+ * @IEEE80211_S1G_CHANWIDTH_2MHZ: 2MHz operating channel
+ * @IEEE80211_S1G_CHANWIDTH_4MHZ: 4MHz operating channel
+ * @IEEE80211_S1G_CHANWIDTH_8MHZ: 8MHz operating channel
+ * @IEEE80211_S1G_CHANWIDTH_16MHZ: 16MHz operating channel
+ */
+enum ieee80211_s1g_chanwidth {
+       IEEE80211_S1G_CHANWIDTH_1MHZ = 0,
+       IEEE80211_S1G_CHANWIDTH_2MHZ = 1,
+       IEEE80211_S1G_CHANWIDTH_4MHZ = 3,
+       IEEE80211_S1G_CHANWIDTH_8MHZ = 7,
+       IEEE80211_S1G_CHANWIDTH_16MHZ = 15,
+};
+
 #define WLAN_SA_QUERY_TR_ID_LEN 2
 #define WLAN_MEMBERSHIP_LEN 8
 #define WLAN_USER_POSITION_LEN 16
@@ -2873,6 +2892,8 @@ enum ieee80211_eid {
 
        WLAN_EID_REDUCED_NEIGHBOR_REPORT = 201,
 
+       WLAN_EID_AID_REQUEST = 210,
+       WLAN_EID_AID_RESPONSE = 211,
        WLAN_EID_S1G_BCN_COMPAT = 213,
        WLAN_EID_S1G_SHORT_BCN_INTERVAL = 214,
        WLAN_EID_S1G_CAPABILITIES = 217,