wifi: mac80211: handle indoor AFC/LPI AP on assoc success
authorAnjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Mon, 18 Mar 2024 16:53:23 +0000 (18:53 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 25 Mar 2024 14:38:13 +0000 (15:38 +0100)
Update power_type in bss_conf based on Indoor AFC and LPI power types
received in HE 6 GHz operation element on assoc success.

Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240318184907.89c25dae34ff.Ifd8b2983f400623ac03dc032fc9a20025c9ca365@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/linux/ieee80211.h
net/mac80211/mlme.c

index 4fd9735bb75e50117f1895095f0f0da20448b783..7f9b829dcb1efea6b28b22a6a33313c4dd09da7a 100644 (file)
@@ -2742,9 +2742,11 @@ static inline bool ieee80211_he_capa_size_ok(const u8 *data, u8 len)
 #define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR               0x40000000
 #define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED              0x80000000
 
-#define IEEE80211_6GHZ_CTRL_REG_LPI_AP 0
-#define IEEE80211_6GHZ_CTRL_REG_SP_AP  1
-#define IEEE80211_6GHZ_CTRL_REG_VLP_AP 2
+#define IEEE80211_6GHZ_CTRL_REG_LPI_AP         0
+#define IEEE80211_6GHZ_CTRL_REG_SP_AP          1
+#define IEEE80211_6GHZ_CTRL_REG_VLP_AP         2
+#define IEEE80211_6GHZ_CTRL_REG_INDOOR_LPI_AP  3
+#define IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP   4
 
 /**
  * struct ieee80211_he_6ghz_oper - HE 6 GHz operation Information field
index 47a2cba8313f04c3d86c6ce424395a0aca2b7cc1..8cd3253c6188b96553b4af4443944198a2ceda4a 100644 (file)
@@ -4429,9 +4429,11 @@ static bool ieee80211_assoc_config_link(struct ieee80211_link_data *link,
                        switch (u8_get_bits(he_6ghz_oper->control,
                                            IEEE80211_HE_6GHZ_OPER_CTRL_REG_INFO)) {
                        case IEEE80211_6GHZ_CTRL_REG_LPI_AP:
+                       case IEEE80211_6GHZ_CTRL_REG_INDOOR_LPI_AP:
                                bss_conf->power_type = IEEE80211_REG_LPI_AP;
                                break;
                        case IEEE80211_6GHZ_CTRL_REG_SP_AP:
+                       case IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP:
                                bss_conf->power_type = IEEE80211_REG_SP_AP;
                                break;
                        case IEEE80211_6GHZ_CTRL_REG_VLP_AP: