[wpa_supplicant] cumilative patch from commit 4b755c967
Bug: 329004037
Test: Connect to open, WPA2, WPA3 and OWE
Test: Establish P2P connection
Test: Basic SoftAp tests
Test: Ran above tests on Pixel6
Test: Regression test (b/329003970)
BYPASS_INCLUSIVE_LANGUAGE_REASON=Merged from open source
4b755c967 build: De-duplicate _DIRS before calling mkdir
9a4423645 hostapd: Only attempt to set QoS map if supported by the driver
dec6fccf1 Support qos_map_set without CONFIG_INTERWORKING
8634e7343 mesh: Allow processing authentication frames in blocked state
a210fdb1c nl80211: Rewrite neigh code to not depend on libnl3-route
3ef057901 ndisc_snoop: Call dl_list_del() before freeing IPv6 addresses
e1cd3fe3c Cancel channel_list_update_timeout() in hostapd_cleanup_iface_partial()
47d7f3169 nl80211: Update drv->ifindex on removing the first BSS
1be706e86 hostapd: Add RRM link measurement request support
92fdb49b2 AP MLD: Set DTIM information properly in per-STA profile
36bd75dfd hostapd: Fix channel switch to a DFS channel
f4b84ecaf AP MLD: Track radar detection in offloaded DFS case
aaf879ef2 AP MLD: Do not update other links' RNR element if not enabled yet
32261721e nl80211: AP MLD: Parse link ID to determine the BSS for radar event
216cfd708 AP MLD: Fix missing check for legacy client case
d5e6f7998 AP MLD: Request Handle OBSS scan for a specific link
c9ad16870 AP MLD: Allow scan processing link to match the request
9b682e72d AP MLD: Find the link that is waiting for scan events
147f83692 PASN: Add set and get API for PASN data context
ab37a5731 Replace PMKSA cache inline stubs with wrapper function stubs
ba55088a7 Replace PTKSA cache inline stubs with wrapper function stubs
1f230a497 MBSSID: Include Extended Capabilities element in non-TX BSSID profile
37c00c3c5 AP MLD: Provide link addresses for non-AP MLDs in control interface
b818a1be1 Add a QCA vendor attribute to set avoid frequencies per netdev
9ac0e785c Revert "nl80211: Skip interface down/up when setting MAC address"
94506e8ed Use the latest updated BSS entry for sending ANQP requests
a9bc6e89d OpenSSL: Fix a memory leak in CMAC
4bc61b657 AP MLD: Remove restriction of having to disable the first link BSS last
a6d92da9a AP MLD: Support removal of link station from AP
1f88b3daf nl80211: Add callback function for removing link STAs
19e50f862 Export hostapd_sta_is_link_sta()
df34c2ced AP MLD: De-initialize/disable link BSS properly
63982fd09 nl80211: Print the MLD capabilities in debug
9fdbaf2ed AP MLD: Fix advertisement of MLD capabilities
7a0501d20 AP MLD: Refresh beacons for other links when one gets disabled/enabled
d2b62b3fe AP MLD: Support link removal before removing interface
55c30e8ab nl80211: Remove AP MLD links while removing the interface
a576180cd nl80211: Use per-BSS command for remove link
b162886fd nl80211: Re-factor nl80211_remove_links() function
b810426ea nl80211: Remove redundant put_freq call in set_ap() for AP MLD
420065733 nl80211: Fix set_ap() to add frequency without CONFIG_IEEE80211AX
f2f0dd354 nl80211: Cache hostapd_data context in per link BSS struct for AP MLD
60e1dca1e AP MLD: Clean up MLD when not required any further
fac34688a AP MLD: Assign link ID during BSS creation
b19aa9c42 AP MLD: Use MLD struct for MLD level information
2f0e5303e AP MLD: Add a separate MLD level structure
259b43a31 hostapd: MLO: Avoid use of mld_id as user configuration
69d53b8b6 nl80211: Fix potential NULL pointer dereference in set_ap()
666e954ca Remove unused wpa_drv_set_ap()
9be122d2e nl80211: Fix AP MLD frequency update on channel switch
9144f876a nl80211: Fix sending NL80211_CMD_DEL_BEACON command to wrong interface
ec4b755b0 wpa_cli: Don't select interface when using global socket
c24453dd9 Add a vendor attribute per MLO link ratemask bitmap configuration
77f39ed23 Document vendor command ratemask bitmap for EHT case
58017de69 Add QCA vendor sub-command and attribute for spectral scan completion
8f9da72d2 Add QCA vendor attribute indicating the spectral transport mode
5b4a78b1f Optimize internal BSS table updates based on a specific BSSID
8d0bd7f9c Update BSS entry on roaming only for actual BSS frequency change
024d4bca1 Multi-AP: WPS support for different Multi-AP profiles
69d086298 Multi-AP: Add support for VLAN related information
210c2b4bd Multi-AP: Add hostapd config option to disallow certain profiles
9a1512532 Multi-AP: Reject non-Multi-AP STA association on backhaul-only BSS
420afbdbd Multi-AP: Allow supported profile to be configured
c3e528653 Multi-AP: Parse Profile subelement
003411242 Multi-AP: Generation of Multi-AP Profile subelement
364cb7c94 Multi-AP: Parse the Multi-AP element using a shared helper function
0e2ca2e4e Multi-AP: Use proper length for remaining buffer for the element
61e46f860 Multi-AP: Move IE parameters into a struct for extensibility
2ae1e6f18 DBus: Add ANQP fields to BSS properties
2ea04435e DBus: Signal ANQP query done
d71c83851 DBus: Add a method to get ANQP fields
5eb409c4b DBus: Add dict helper for uint16 arrays
a438e5293 OpenSSL: Fix a memory leak on hpke_labeled_expand() error path
b35b1036f OpenSSL: Fix a memory leak on openssl_evp_pkey_ec_prime_len() error path
35df7ee09 DPP: Emit a DPP PB_STATUS event when push button starts
69dd408fb EHT: More accurate no-second-channel-offset checks when puncturing
131ee5926 EHT: Support punct_bitmap overriding in HE element generation
c96c3adc3 Move punct_update_legacy_bw() into src/common
9f43c1e26 Provide punct_bitmap to hostapd_set_freq_params()
47dad1ed1 EHT: Move puncturing bitmap determination into a helper function
010d8d10e EHT: Use eht_oper_puncturing_override when constructing VHT elements
c00abc69f Handle 6 GHz channels in Supported Operating Classes with freq_list
9e90486bc 2-octet operating classes in Support Operating Classes element
5dabc1018 Extend support for the 6 GHz operating class 137 (320 MHz)
e74d95e0a nl80211: Process 6 GHz regulatory rules to accurate channel flags
59951ebf0 Use a helper function to free neighbor DB entries
96f0af07e Clear all neighbor entry items explicitly
6f285fbaf Update own report in nr_db if SSID is changed
b653420a2 AP MLD: Set link address only when non-AP MLD is not added to driver
16abdac80 Fix INTERFACES command buffer size to allow more data
b483ceafc hostapd: Dump VHT/HE/EHT full capabilities in STA command output
040ba112a Use os_snprintf_error() more consistently in STA output generation
31bbc9391 Do not change out-of-range configuration parameters
fd24ed949 Fix valid range for disable_ht40
b1a880f38 Enforce valid range check for SET mbo_cell_capa and oce
e5b7e5b90 wpa_supplicant: Fix ignoring boundary 0 in config parser
10122e951 P2P: Fix pri/sec channel switch skipping for GO
e508c070c WNM: Keep BTM information until connection completes
17a2aa822 WNM: Follow BTM procedure if the last link is dropped
770f3cb30 WNM: Remove dialog_token parameter
c7cafef8a WNM: Set wnm_reply to 0 when sending it
261f7f9e5 WNM: Do not store coloc_intf_elems
033adbf83 WNM: Drop explicit wpa_is_bss_tmp_disallowed() check
8b51310f4 WNM: Drop explicit SSID check
939cd294b WNM: Drop check for current_ssid
436f07d02 WNM: Define a stub wnm_is_bss_excluded if WNM is disabled
e164943f4 WNM: Wait for BTM response TX status before roaming
40ef706e5 WNM: Don't scan frequencies of neighbors that should be ignored
20ed289a7 WNM: Clean up old scan data processing
4750a4f62 DPP: Wait for TX wait expiration on moving to neg_freq for Auth Resp
963dbad7d nl80211: Indicate EVENT_TX_WAIT_EXPIRE on match-saved
451d29952 DPP: Wait for ROC cancelled event on Auth Resp TX on another channel
45fffac0f BSS: Switch struct wpa_bss to use valid_links bitmask
e90f6678f nl80211: Remnove unused struct i802_link ctx
0d4288a00 nl80211: Use valid_links bitmask for bss->links array
9ed51186e Use a single define MAX_NUM_MLD_LINKS for the maximum number of links
11f26fed6 Use for_each_link() where possible
dbdf7ef67 Use for_each_link() in most cases
c9f8fe066 common: Introduce for_each_link() macro
6cb421c1f nl80211: Fix link indexing in nl80211_connect_common()
408a399aa nl80211: Explicitly differentiate between 5 GHz and 6 GHz modes
dbcf9ff15 P2P: Notify the IP address of the connected P2P Client
b18d95759 P2P: Disable pri/sec channel switch for GO with forced frequency
0e4aa28da hostapd_cli: Indentation cleanup
a01972a06 Add "stop_ap" command for hostapd_cli
8cdb0d3f2 AP MLD: Stop AP per link
d084ef36b AP MLD: Clean up disassoc handling for non-AP MLD link validity check
7ceafb6e9 AP MLD: Handle disassociation notification with SME offload to driver
95a825bc4 RADIUS: Preliminary support RADIUS/TLS as an alternative to RADIUS/UDP
87f33c26b RADIUS: Simplify IPv4/IPv6 socket handling in client
971b78147 RADIUS: Simplify radius_change_server() parameters
3386e1327 l2_packet_freebsd: Fix macOS build
86c242171 TDLS: Defer the start request until the discovery response RX for MLO
352ad5f1a Apply CHAN_SWITCH in all BSS for MBSSID case
87120a5b6 Add QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER command
fe82a61ef Add QCA vendor attribute for BTM support configuration
Change-Id: I11d4eeb2e4ab44630e3359a2886361b3fccd7ead
diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
index f45d2e9..2c47bf8 100644
--- a/src/common/hw_features_common.c
+++ b/src/common/hw_features_common.c
@@ -381,6 +381,75 @@
}
+static void punct_update_legacy_bw_80(u8 bitmap, u8 pri_chan, u8 *seg0)
+{
+ u8 first_chan = *seg0 - 6, sec_chan;
+
+ switch (bitmap) {
+ case 0x6:
+ *seg0 = 0;
+ return;
+ case 0x8:
+ case 0x4:
+ case 0x2:
+ case 0x1:
+ case 0xC:
+ case 0x3:
+ if (pri_chan < *seg0)
+ *seg0 -= 4;
+ else
+ *seg0 += 4;
+ break;
+ }
+
+ if (pri_chan < *seg0)
+ sec_chan = pri_chan + 4;
+ else
+ sec_chan = pri_chan - 4;
+
+ if (bitmap & BIT((sec_chan - first_chan) / 4))
+ *seg0 = 0;
+}
+
+
+static void punct_update_legacy_bw_160(u8 bitmap, u8 pri,
+ enum oper_chan_width *width, u8 *seg0)
+{
+ if (pri < *seg0) {
+ *seg0 -= 8;
+ if (bitmap & 0x0F) {
+ *width = 0;
+ punct_update_legacy_bw_80(bitmap & 0xF, pri, seg0);
+ }
+ } else {
+ *seg0 += 8;
+ if (bitmap & 0xF0) {
+ *width = 0;
+ punct_update_legacy_bw_80((bitmap & 0xF0) >> 4, pri,
+ seg0);
+ }
+ }
+}
+
+
+void punct_update_legacy_bw(u16 bitmap, u8 pri, enum oper_chan_width *width,
+ u8 *seg0, u8 *seg1)
+{
+ if (*width == CONF_OPER_CHWIDTH_80MHZ && (bitmap & 0xF)) {
+ *width = CONF_OPER_CHWIDTH_USE_HT;
+ punct_update_legacy_bw_80(bitmap & 0xF, pri, seg0);
+ }
+
+ if (*width == CONF_OPER_CHWIDTH_160MHZ && (bitmap & 0xFF)) {
+ *width = CONF_OPER_CHWIDTH_80MHZ;
+ *seg1 = 0;
+ punct_update_legacy_bw_160(bitmap & 0xFF, pri, width, seg0);
+ }
+
+ /* TODO: 320 MHz */
+}
+
+
int hostapd_set_freq_params(struct hostapd_freq_params *data,
enum hostapd_hw_mode mode,
int freq, int channel, int enable_edmg,
@@ -391,8 +460,12 @@
int center_segment0,
int center_segment1, u32 vht_caps,
struct he_capabilities *he_cap,
- struct eht_capabilities *eht_cap)
+ struct eht_capabilities *eht_cap,
+ u16 punct_bitmap)
{
+ enum oper_chan_width oper_chwidth_legacy;
+ u8 seg0_legacy, seg1_legacy;
+
if (!he_cap || !he_cap->he_supported)
he_enabled = 0;
if (!eht_cap || !eht_cap->eht_supported)
@@ -578,6 +651,14 @@
break;
}
+ oper_chwidth_legacy = oper_chwidth;
+ seg0_legacy = center_segment0;
+ seg1_legacy = center_segment1;
+ if (punct_bitmap)
+ punct_update_legacy_bw(punct_bitmap, channel,
+ &oper_chwidth_legacy,
+ &seg0_legacy, &seg1_legacy);
+
if (data->eht_enabled || data->he_enabled ||
data->vht_enabled) switch (oper_chwidth) {
case CONF_OPER_CHWIDTH_USE_HT:
@@ -602,7 +683,8 @@
/* fall through */
case CONF_OPER_CHWIDTH_80MHZ:
data->bandwidth = 80;
- if (!sec_channel_offset) {
+ if (!sec_channel_offset &&
+ oper_chwidth_legacy != CONF_OPER_CHWIDTH_USE_HT) {
wpa_printf(MSG_ERROR,
"80/80+80 MHz: no second channel offset");
return -1;
@@ -660,7 +742,8 @@
"160 MHz: center segment 1 should not be set");
return -1;
}
- if (!sec_channel_offset) {
+ if (!sec_channel_offset &&
+ oper_chwidth_legacy != CONF_OPER_CHWIDTH_USE_HT) {
wpa_printf(MSG_ERROR,
"160 MHz: second channel offset not set");
return -1;
diff --git a/src/common/hw_features_common.h b/src/common/hw_features_common.h
index 82e0282..e791c33 100644
--- a/src/common/hw_features_common.h
+++ b/src/common/hw_features_common.h
@@ -35,6 +35,8 @@
int check_40mhz_2g4(struct hostapd_hw_modes *mode,
struct wpa_scan_results *scan_res, int pri_chan,
int sec_chan);
+void punct_update_legacy_bw(u16 bitmap, u8 pri_chan,
+ enum oper_chan_width *width, u8 *seg0, u8 *seg1);
int hostapd_set_freq_params(struct hostapd_freq_params *data,
enum hostapd_hw_mode mode,
int freq, int channel, int edmg, u8 edmg_channel,
@@ -45,7 +47,8 @@
int center_segment0,
int center_segment1, u32 vht_caps,
struct he_capabilities *he_caps,
- struct eht_capabilities *eht_cap);
+ struct eht_capabilities *eht_cap,
+ u16 punct_bitmap);
void set_disable_ht40(struct ieee80211_ht_capabilities *htcaps,
int disabled);
int ieee80211ac_cap_check(u32 hw, u32 conf);
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index 08ba45b..4de88d1 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -2050,6 +2050,13 @@
}
+bool is_80plus_op_class(u8 op_class)
+{
+ /* Operating classes with "80+" behavior indication in Table E-4 */
+ return op_class == 130 || op_class == 135;
+}
+
+
static int is_11b(u8 rate)
{
return rate == 0x02 || rate == 0x04 || rate == 0x0b || rate == 0x16
@@ -2417,9 +2424,17 @@
* channel center frequency index value, but it happens to be a 20 MHz
* channel and the channel number in the channel set would match the
* value in for the frequency center.
+ *
+ * Operating class value pair 128 and 130 is used to describe a 80+80
+ * MHz channel on the 5 GHz band. 130 is identified with "80+", so this
+ * is encoded with two octets 130 and 128. Similarly, operating class
+ * value pair 133 and 135 is used to describe a 80+80 MHz channel on
+ * the 6 GHz band (135 being the one with "80+" indication). All other
+ * operating classes listed here are used as 1-octet values.
*/
{ HOSTAPD_MODE_IEEE80211A, 128, 36, 177, 4, BW80, P2P_SUPP },
{ HOSTAPD_MODE_IEEE80211A, 129, 36, 177, 4, BW160, P2P_SUPP },
+ { HOSTAPD_MODE_IEEE80211A, 130, 36, 177, 4, BW80P80, P2P_SUPP },
{ HOSTAPD_MODE_IEEE80211A, 131, 1, 233, 4, BW20, P2P_SUPP },
{ HOSTAPD_MODE_IEEE80211A, 132, 1, 233, 8, BW40, P2P_SUPP },
{ HOSTAPD_MODE_IEEE80211A, 133, 1, 233, 16, BW80, P2P_SUPP },
@@ -2427,6 +2442,9 @@
{ HOSTAPD_MODE_IEEE80211A, 135, 1, 233, 16, BW80P80, NO_P2P_SUPP },
{ HOSTAPD_MODE_IEEE80211A, 136, 2, 2, 4, BW20, NO_P2P_SUPP },
+ /* IEEE P802.11be/D5.0, Table E-4 (Global operating classes) */
+ { HOSTAPD_MODE_IEEE80211A, 137, 31, 191, 32, BW320, NO_P2P_SUPP },
+
/*
* IEEE Std 802.11ad-2012 and P802.ay/D5.0 60 GHz operating classes.
* Class 180 has the legacy channels 1-6. Classes 181-183 include
@@ -2437,11 +2455,6 @@
{ HOSTAPD_MODE_IEEE80211AD, 182, 17, 20, 1, BW6480, P2P_SUPP },
{ HOSTAPD_MODE_IEEE80211AD, 183, 25, 27, 1, BW8640, P2P_SUPP },
- /* Keep the operating class 130 as the last entry as a workaround for
- * the OneHundredAndThirty Delimiter value used in the Supported
- * Operating Classes element to indicate the end of the Operating
- * Classes field. */
- { HOSTAPD_MODE_IEEE80211A, 130, 36, 177, 4, BW80P80, P2P_SUPP },
{ -1, 0, 0, 0, 0, BW20, NO_P2P_SUPP }
};
@@ -2569,21 +2582,141 @@
}
-size_t add_multi_ap_ie(u8 *buf, size_t len, u8 value)
+u16 check_multi_ap_ie(const u8 *multi_ap_ie, size_t multi_ap_len,
+ struct multi_ap_params *multi_ap)
+{
+ const struct element *elem;
+ bool ext_present = false;
+ unsigned int vlan_id;
+
+ os_memset(multi_ap, 0, sizeof(*multi_ap));
+
+ /* Default profile is 1, when Multi-AP profile subelement is not
+ * present in the element. */
+ multi_ap->profile = 1;
+
+ for_each_element(elem, multi_ap_ie, multi_ap_len) {
+ u8 id = elem->id, elen = elem->datalen;
+ const u8 *pos = elem->data;
+
+ switch (id) {
+ case MULTI_AP_SUB_ELEM_TYPE:
+ if (elen >= 1) {
+ multi_ap->capability = *pos;
+ ext_present = true;
+ } else {
+ wpa_printf(MSG_DEBUG,
+ "Multi-AP invalid Multi-AP subelement");
+ return WLAN_STATUS_INVALID_IE;
+ }
+ break;
+ case MULTI_AP_PROFILE_SUB_ELEM_TYPE:
+ if (elen < 1) {
+ wpa_printf(MSG_DEBUG,
+ "Multi-AP IE invalid Multi-AP profile subelement");
+ return WLAN_STATUS_INVALID_IE;
+ }
+
+ multi_ap->profile = *pos;
+ if (multi_ap->profile > MULTI_AP_PROFILE_MAX) {
+ wpa_printf(MSG_DEBUG,
+ "Multi-AP IE with invalid profile 0x%02x",
+ multi_ap->profile);
+ return WLAN_STATUS_ASSOC_DENIED_UNSPEC;
+ }
+ break;
+ case MULTI_AP_VLAN_SUB_ELEM_TYPE:
+ if (multi_ap->profile < MULTI_AP_PROFILE_2) {
+ wpa_printf(MSG_DEBUG,
+ "Multi-AP IE invalid profile to read VLAN IE");
+ return WLAN_STATUS_INVALID_IE;
+ }
+ if (elen < 2) {
+ wpa_printf(MSG_DEBUG,
+ "Multi-AP IE invalid Multi-AP VLAN subelement");
+ return WLAN_STATUS_INVALID_IE;
+ }
+
+ vlan_id = WPA_GET_LE16(pos);
+ if (vlan_id < 1 || vlan_id > 4094) {
+ wpa_printf(MSG_INFO,
+ "Multi-AP IE invalid Multi-AP VLAN ID %d",
+ vlan_id);
+ return WLAN_STATUS_INVALID_IE;
+ }
+ multi_ap->vlanid = vlan_id;
+ break;
+ default:
+ wpa_printf(MSG_DEBUG,
+ "Ignore unknown subelement %u in Multi-AP IE",
+ id);
+ break;
+ }
+ }
+
+ if (!for_each_element_completed(elem, multi_ap_ie, multi_ap_len)) {
+ wpa_printf(MSG_DEBUG, "Multi AP IE parse failed @%d",
+ (int) (multi_ap_ie + multi_ap_len -
+ (const u8 *) elem));
+ wpa_hexdump(MSG_MSGDUMP, "IEs", multi_ap_ie, multi_ap_len);
+ }
+
+ if (!ext_present) {
+ wpa_printf(MSG_DEBUG,
+ "Multi-AP element without Multi-AP Extension subelement");
+ return WLAN_STATUS_INVALID_IE;
+ }
+
+ return WLAN_STATUS_SUCCESS;
+}
+
+
+size_t add_multi_ap_ie(u8 *buf, size_t len,
+ const struct multi_ap_params *multi_ap)
{
u8 *pos = buf;
+ u8 *len_ptr;
- if (len < 9)
+ if (len < 6)
return 0;
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
- *pos++ = 7; /* len */
+ len_ptr = pos; /* Length field to be set at the end */
+ pos++;
WPA_PUT_BE24(pos, OUI_WFA);
pos += 3;
*pos++ = MULTI_AP_OUI_TYPE;
+
+ /* Multi-AP Extension subelement */
+ if (buf + len - pos < 3)
+ return 0;
*pos++ = MULTI_AP_SUB_ELEM_TYPE;
*pos++ = 1; /* len */
- *pos++ = value;
+ *pos++ = multi_ap->capability;
+
+ /* Add Multi-AP Profile subelement only for R2 or newer configuration */
+ if (multi_ap->profile >= MULTI_AP_PROFILE_2) {
+ if (buf + len - pos < 3)
+ return 0;
+ *pos++ = MULTI_AP_PROFILE_SUB_ELEM_TYPE;
+ *pos++ = 1;
+ *pos++ = multi_ap->profile;
+ }
+
+ /* Add Multi-AP Default 802.1Q Setting subelement only for backhaul BSS
+ */
+ if (multi_ap->vlanid &&
+ multi_ap->profile >= MULTI_AP_PROFILE_2 &&
+ (multi_ap->capability & MULTI_AP_BACKHAUL_BSS)) {
+ if (buf + len - pos < 4)
+ return 0;
+ *pos++ = MULTI_AP_VLAN_SUB_ELEM_TYPE;
+ *pos++ = 2;
+ WPA_PUT_LE16(pos, multi_ap->vlanid);
+ pos += 2;
+ }
+
+ *len_ptr = pos - len_ptr - 1;
return pos - buf;
}
@@ -2748,6 +2881,8 @@
case BW80P80:
case BW160:
return 160;
+ case BW320:
+ return 320;
case BW2160:
return 2160;
default:
diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h
index 60260e5..56eb0df 100644
--- a/src/common/ieee802_11_common.h
+++ b/src/common/ieee802_11_common.h
@@ -30,6 +30,12 @@
u8 nof_ies;
};
+struct multi_ap_params {
+ u8 capability;
+ u8 profile;
+ u16 vlanid;
+};
+
/* Parsed Information Elements */
struct ieee802_11_elems {
const u8 *ssid;
@@ -235,6 +241,7 @@
int ieee80211_is_dfs(int freq, const struct hostapd_hw_modes *modes,
u16 num_modes);
int is_dfs_global_op_class(u8 op_class);
+bool is_80plus_op_class(u8 op_class);
enum phy_type ieee80211_get_phy_type(int freq, int ht, int vht);
int supp_rates_11b_only(struct ieee802_11_elems *elems);
@@ -253,7 +260,7 @@
u8 max_chan;
u8 inc;
enum { BW20, BW40PLUS, BW40MINUS, BW40, BW80, BW2160, BW160, BW80P80,
- BW4320, BW6480, BW8640} bw;
+ BW320, BW4320, BW6480, BW8640} bw;
enum { P2P_SUPP, NO_P2P_SUPP } p2p;
};
@@ -266,7 +273,10 @@
size_t mbo_add_ie(u8 *buf, size_t len, const u8 *attr, size_t attr_len);
-size_t add_multi_ap_ie(u8 *buf, size_t len, u8 value);
+u16 check_multi_ap_ie(const u8 *multi_ap_ie, size_t multi_ap_len,
+ struct multi_ap_params *multi_ap);
+size_t add_multi_ap_ie(u8 *buf, size_t len,
+ const struct multi_ap_params *multi_ap);
struct country_op_class {
u8 country_op_class;
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 619aa19..644bebd 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -1453,11 +1453,20 @@
#define WFA_CAPA_OUI_TYPE 0x23
#define MULTI_AP_SUB_ELEM_TYPE 0x06
+#define MULTI_AP_PROFILE_SUB_ELEM_TYPE 0x07
+#define MULTI_AP_VLAN_SUB_ELEM_TYPE 0x08
+
+#define MULTI_AP_PROFILE2_BACKHAUL_STA_DISALLOWED BIT(2)
+#define MULTI_AP_PROFILE1_BACKHAUL_STA_DISALLOWED BIT(3)
#define MULTI_AP_TEAR_DOWN BIT(4)
#define MULTI_AP_FRONTHAUL_BSS BIT(5)
#define MULTI_AP_BACKHAUL_BSS BIT(6)
#define MULTI_AP_BACKHAUL_STA BIT(7)
+#define MULTI_AP_PROFILE_1 1
+#define MULTI_AP_PROFILE_2 2
+#define MULTI_AP_PROFILE_MAX 6
+
#define WMM_OUI_TYPE 2
#define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
#define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
diff --git a/src/common/ptksa_cache.c b/src/common/ptksa_cache.c
index c00f288..918a1cc 100644
--- a/src/common/ptksa_cache.c
+++ b/src/common/ptksa_cache.c
@@ -19,6 +19,8 @@
unsigned int n_ptksa;
};
+#ifdef CONFIG_PTKSA_CACHE
+
static void ptksa_cache_set_expiration(struct ptksa_cache *ptksa);
@@ -342,3 +344,44 @@
return entry;
}
+
+#else /* CONFIG_PTKSA_CACHE */
+
+struct ptksa_cache * ptksa_cache_init(void)
+{
+ return (struct ptksa_cache *) 1;
+}
+
+
+void ptksa_cache_deinit(struct ptksa_cache *ptksa)
+{
+}
+
+
+struct ptksa_cache_entry *
+ptksa_cache_get(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher)
+{
+ return NULL;
+}
+
+
+int ptksa_cache_list(struct ptksa_cache *ptksa, char *buf, size_t len)
+{
+ return -1;
+}
+
+
+struct ptksa_cache_entry *
+ptksa_cache_add(struct ptksa_cache *ptksa, const u8 *own_addr, const u8 *addr,
+ u32 cipher, u32 life_time, const struct wpa_ptk *ptk,
+ void (*cb)(struct ptksa_cache_entry *e), void *ctx, u32 akmp)
+{
+ return NULL;
+}
+
+
+void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher)
+{
+}
+
+#endif /* CONFIG_PTKSA_CACHE */
diff --git a/src/common/ptksa_cache.h b/src/common/ptksa_cache.h
index 6182215..dd5e7db 100644
--- a/src/common/ptksa_cache.h
+++ b/src/common/ptksa_cache.h
@@ -29,7 +29,6 @@
u32 akmp;
};
-#ifdef CONFIG_PTKSA_CACHE
struct ptksa_cache;
@@ -48,41 +47,4 @@
void *ctx, u32 akmp);
void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher);
-#else /* CONFIG_PTKSA_CACHE */
-
-static inline struct ptksa_cache * ptksa_cache_init(void)
-{
- return (struct ptksa_cache *) 1;
-}
-
-static inline void ptksa_cache_deinit(struct ptksa_cache *ptksa)
-{
-}
-
-static inline struct ptksa_cache_entry *
-ptksa_cache_get(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher)
-{
- return NULL;
-}
-
-static inline int ptksa_cache_list(struct ptksa_cache *ptksa,
- char *buf, size_t len)
-{
- return -1;
-}
-
-static inline struct ptksa_cache_entry *
-ptksa_cache_add(struct ptksa_cache *ptksa, const u8 *own_addr, const u8 *addr,
- u32 cipher, u32 life_time, const struct wpa_ptk *ptk,
- void (*cb)(struct ptksa_cache_entry *e), void *ctx, u32 akmp)
-{
- return NULL;
-}
-
-static inline void ptksa_cache_flush(struct ptksa_cache *ptksa,
- const u8 *addr, u32 cipher)
-{
-}
-
-#endif /* CONFIG_PTKSA_CACHE */
#endif /* PTKSA_CACHE_H */
diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h
index a5bbc78..2a4086b 100644
--- a/src/common/qca-vendor.h
+++ b/src/common/qca-vendor.h
@@ -1048,6 +1048,15 @@
* to user space to disassociate with a peer based on the peer MAC address
* provided. Specify the peer MAC address in
* QCA_WLAN_VENDOR_ATTR_MAC_ADDR. For MLO, MLD MAC address is provided.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER: This vendor command is used to
+ * adjust transmit power. The attributes used with this subcommand are
+ * defined in enum qca_wlan_vendor_attr_adjust_tx_power.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_COMPLETE: Event indication from the
+ * driver to notify user application about the spectral scan completion.
+ * The attributes used with this subcommand are defined in
+ * enum qca_wlan_vendor_attr_spectral_scan_complete.
*/
enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
@@ -1272,6 +1281,8 @@
QCA_NL80211_VENDOR_SUBCMD_FW_PAGE_FAULT_REPORT = 238,
QCA_NL80211_VENDOR_SUBCMD_FLOW_POLICY = 239,
QCA_NL80211_VENDOR_SUBCMD_DISASSOC_PEER = 240,
+ QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER = 241,
+ QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_COMPLETE = 242,
};
/* Compatibility defines for previously used subcmd names.
@@ -3361,6 +3372,14 @@
*/
QCA_WLAN_VENDOR_ATTR_CONFIG_QCA_PEER = 106,
+ /* 8-bit unsigned value to configure BTM support.
+ *
+ * The attribute is applicable only for STA interface. Uses enum
+ * qca_wlan_btm_support values. This configuration is not allowed in
+ * connected state.
+ */
+ QCA_WLAN_VENDOR_ATTR_CONFIG_BTM_SUPPORT = 107,
+
/* keep last */
QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_CONFIG_MAX =
@@ -7749,6 +7768,20 @@
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_FFT_RECAPTURE = 31,
/* Attribute used for padding for 64-bit alignment */
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_PAD = 32,
+ /* Spectral data transport mode. u32 attribute. It uses values
+ * defined in enum qca_wlan_vendor_spectral_data_transport_mode.
+ * This is an optional attribute. If this attribute is not populated,
+ * the driver should configure the default transport mode to netlink.
+ */
+ QCA_WLAN_VENDOR_ATTR_SPECTRAL_DATA_TRANSPORT_MODE = 33,
+ /* Spectral scan completion timeout. u32 attribute. This
+ * attribute is used to configure a timeout value (in us). The
+ * timeout value would be from the beginning of a spectral
+ * scan. This is an optional attribute. If this attribute is
+ * not populated, the driver would internally derive the
+ * timeout value.
+ */
+ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETION_TIMEOUT = 34,
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_MAX =
@@ -12055,6 +12088,14 @@
* %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_POWER_CAP_DBM or based on
* regulatory/SAE limits if %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_POWER_CAP_DBM
* is not provided.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFINDEX: u32 attribute, optional.
+ * This specifies the interface index (netdev) for which the corresponding
+ * configurations are applied. If the interface index is not specified, the
+ * configurations are applied based on
+ * %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFACES_BITMASK.
+ * %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFACES_BITMASK along with this
+ * attribute shall have the matching nl80211_iftype.
*/
enum qca_wlan_vendor_attr_avoid_frequency_ext {
QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_INVALID = 0,
@@ -12063,6 +12104,7 @@
QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_END = 3,
QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_POWER_CAP_DBM = 4,
QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFACES_BITMASK = 5,
+ QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFINDEX = 6,
QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_MAX =
@@ -14263,7 +14305,11 @@
* @QCA_WLAN_VENDOR_ATTR_RATEMASK_PARAMS_BITMAP: binary, rate mask bitmap.
* A bit value of 1 represents rate is enabled and a value of 0
* represents rate is disabled.
- * For HE targets, 12 bits correspond to one NSS setting.
+ * For EHT targets,
+ * b0-1 => NSS1, MCS 14-15
+ * b2-15 => NSS1, MCS 0-13
+ * b16-29 => NSS2, MCS 0-13
+ * For HE targets, 14 bits correspond to one NSS setting.
* b0-13 => NSS1, MCS 0-13
* b14-27 => NSS2, MCS 0-13 and so on for other NSS.
* For VHT targets, 10 bits correspond to one NSS setting.
@@ -14273,12 +14319,18 @@
* b0-7 => NSS1, MCS 0-7
* b8-15 => NSS2, MCS 0-7 and so on for other NSS.
* For OFDM/CCK targets, 8 bits correspond to one NSS setting.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_RATEMASK_PARAMS_LINK_ID: u8, used to specify the
+ * MLO link ID of a link to be configured. Optional attribute.
+ * No need of this attribute in non-MLO cases. If the attribute is
+ * not provided, ratemask will be applied for setup link.
*/
enum qca_wlan_vendor_attr_ratemask_params {
QCA_WLAN_VENDOR_ATTR_RATEMASK_PARAMS_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_RATEMASK_PARAMS_LIST = 1,
QCA_WLAN_VENDOR_ATTR_RATEMASK_PARAMS_TYPE = 2,
QCA_WLAN_VENDOR_ATTR_RATEMASK_PARAMS_BITMAP = 3,
+ QCA_WLAN_VENDOR_ATTR_RATEMASK_PARAMS_LINK_ID = 4,
/* keep last */
QCA_WLAN_VENDOR_ATTR_RATEMASK_PARAMS_AFTER_LAST,
@@ -16794,4 +16846,200 @@
QCA_WLAN_VENDOR_ATTR_FW_PAGE_FAULT_REPORT_LAST - 1,
};
+/**
+ * enum qca_wlan_btm_support: BTM support configuration
+ *
+ * @QCA_WLAN_BTM_SUPPORT_DEFAULT: Restore default BTM support policy. The driver
+ * follows the BSS Transition bit in the Extended Capabilities element from the
+ * connect request IEs with the default BTM support policy.
+ *
+ * @QCA_WLAN_BTM_SUPPORT_DISABLE: Disable BTM support for the subsequent
+ * (re)association attempts. The driver shall restore the default BTM support
+ * policy during the first disconnection after successful association. When this
+ * configuration is enabled, the driver shall overwrite the BSS Transition bit
+ * as zero in the Extended Capabilities element while sending (Re)Association
+ * Request frames. Also, the driver shall drop the BTM frames from userspace and
+ * the connected AP when this configuration is enabled.
+ */
+enum qca_wlan_btm_support {
+ QCA_WLAN_BTM_SUPPORT_DEFAULT = 0,
+ QCA_WLAN_BTM_SUPPORT_DISABLE = 1,
+};
+
+/**
+ * enum qca_wlan_vendor_data_rate_type - Represents the possible values for
+ * attribute %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_TYPE.
+ *
+ * @QCA_WLAN_VENDOR_DATA_RATE_TYPE_LEGACY: Data rate type is a legacy rate code
+ * used in OFDM/CCK.
+ *
+ * @QCA_WLAN_VENDOR_DATA_RATE_TYPE_MCS: Data rate type is an MCS index.
+ *
+ */
+enum qca_wlan_vendor_data_rate_type {
+ QCA_WLAN_VENDOR_DATA_RATE_TYPE_LEGACY = 0,
+ QCA_WLAN_VENDOR_DATA_RATE_TYPE_MCS = 1,
+};
+
+/**
+ * enum qca_wlan_vendor_attr_adjust_tx_power_rate - Definition
+ * of data rate related attributes which is used inside nested attribute
+ * %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_RATE_CONFIG.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_TYPE: u8 data rate type.
+ * For this attribute, valid values are enumerated in enum
+ * %qca_wlan_vendor_data_rate_type.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_VALUE: u8 value.
+ * This attribute value is interpreted according to the value of attribute
+ * %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_TYPE. For legacy config
+ * type, this attribute value is defined in the units of 0.5 Mbps.
+ * For non legacy config type, this attribute carries the MCS index number.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_POWER_VALUE: u8 value in dBm.
+ * Usually the target computes a final transmit power that is the maximum
+ * power level that doesn't exceed the limits enforced by various sources
+ * like chip-specific conformance test limits (CTL), Specific Absorption
+ * Rate (SAR), Transmit Power Control (TPC), wiphy-specific limits, STA-specific
+ * limits, channel avoidance limits, Automated Frequency Coordination (AFC),
+ * and others. In some cases it may be desirable to use a power level that is
+ * lower than the maximum power level allowed by all of these limits, so this
+ * attribute provides an additional limit that can be used to reduce the
+ * transmit power level.
+ *
+ */
+enum qca_wlan_vendor_attr_adjust_tx_power_rate {
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_TYPE = 1,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_VALUE = 2,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_POWER_VALUE = 3,
+
+ /* keep last */
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CONFIG_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CONFIG_MAX =
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CONFIG_AFTER_LAST - 1,
+};
+
+/**
+ * enum qca_wlan_vendor_attr_adjust_tx_power_chain_config - Definition
+ * of chain related attributes which is used inside nested attribute
+ * %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CHAIN_CONFIG.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_INDEX: u8 value.
+ * Represents a particular chain for which transmit power adjustment needed.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_RATE_CONFIG: A nested
+ * attribute containing data rate related information to adjust transmit
+ * power. The attributes used inside this nested attributes are defined in
+ * enum qca_wlan_vendor_attr_adjust_tx_power_rate.
+ */
+enum qca_wlan_vendor_attr_adjust_tx_power_chain_config {
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_INDEX = 1,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_RATE_CONFIG = 2,
+
+ /* keep last */
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_MAX =
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_AFTER_LAST - 1,
+};
+
+/**
+ * enum qca_wlan_vendor_attr_adjust_tx_power_band_config - Definition
+ * of band related attributes which is used inside nested attribute
+ * %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CONFIG.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_INDEX: u8 value to
+ * indicate band for which configuration applies. Valid values are enumerated
+ * in enum %nl80211_band.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CHAIN_CONFIG: A nested
+ * attribute containing per chain related information to adjust transmit
+ * power. The attributes used inside this nested attribute are defined in
+ * enum qca_wlan_vendor_attr_adjust_tx_power_chain_config.
+ *
+ */
+enum qca_wlan_vendor_attr_adjust_tx_power_band_config {
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_INDEX = 1,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CHAIN_CONFIG = 2,
+
+ /* keep last */
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_MAX =
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_AFTER_LAST - 1,
+};
+
+/**
+ * enum qca_wlan_vendor_attr_adjust_tx_power - Definition of attributes
+ * for %QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER subcommand.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CONFIG: A nested attribute
+ * containing per band related information to adjust transmit power.
+ * The attributes used inside this nested attributes are defined in
+ * enum qca_wlan_vendor_attr_adjust_tx_power_band_config.
+ */
+enum qca_wlan_vendor_attr_adjust_tx_power {
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CONFIG = 1,
+
+ /* keep last */
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_MAX =
+ QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_AFTER_LAST - 1,
+};
+
+/**
+ * enum qca_wlan_vendor_spectral_data_transport_mode - Attribute
+ * values for QCA_WLAN_VENDOR_ATTR_SPECTRAL_DATA_TRANSPORT_MODE.
+ *
+ * @QCA_WLAN_VENDOR_SPECTRAL_DATA_TRANSPORT_NETLINK: Use netlink to
+ * send spectral data to userspace applications.
+ * @QCA_WLAN_VENDOR_SPECTRAL_DATA_TRANSPORT_RELAY: Use relay interface
+ * to send spectral data to userspace applications.
+ */
+enum qca_wlan_vendor_spectral_data_transport_mode {
+ QCA_WLAN_VENDOR_SPECTRAL_DATA_TRANSPORT_NETLINK = 0,
+ QCA_WLAN_VENDOR_SPECTRAL_DATA_TRANSPORT_RELAY = 1,
+};
+
+/* enum qca_wlan_vendor_spectral_scan_complete_status - Attribute
+ * values for QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_STATUS to
+ * indicate the completion status for a spectral scan.
+ *
+ * @QCA_WLAN_VENDOR_SPECTRAL_SCAN_COMPLETE_STATUS_SUCCESSFUL:
+ * Indicates a successful completion of the scan.
+ *
+ * @QCA_WLAN_VENDOR_SPECTRAL_SCAN_COMPLETE_STATUS_TIMEOUT: Indicates
+ * a timeout has occured while processing the spectral reports.
+ */
+enum qca_wlan_vendor_spectral_scan_complete_status {
+ QCA_WLAN_VENDOR_SPECTRAL_SCAN_COMPLETE_STATUS_SUCCESSFUL = 0,
+ QCA_WLAN_VENDOR_SPECTRAL_SCAN_COMPLETE_STATUS_TIMEOUT = 1,
+};
+
+/* enum qca_wlan_vendor_attr_spectral_scan_complete - Definition of
+ * attributes for @QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_COMPLETE
+ * to indicate scan status and samples received from hardware.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_INVALID: Invalid attribute
+ *
+ * @QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_STATUS: u32 attribute.
+ * Indicates completion status, either the scan is successful or a timeout
+ * is issued by the driver.
+ * See enum qca_wlan_vendor_spectral_scan_complete_status.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_RECEIVED_SAMPLES: u32
+ * attribute. Number of spectral samples received after the scan has started.
+ */
+enum qca_wlan_vendor_attr_spectral_scan_complete {
+ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_STATUS = 1,
+ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_RECEIVED_SAMPLES = 2,
+
+ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_MAX =
+ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_COMPLETE_AFTER_LAST - 1,
+};
+
#endif /* QCA_VENDOR_H */
diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
index c82fd0e..6ea3311 100644
--- a/src/common/wpa_common.c
+++ b/src/common/wpa_common.c
@@ -1104,7 +1104,7 @@
link_id = pos[2] & 0x0f;
wpa_printf(MSG_DEBUG, "FT: MLO GTK (Link ID %u)",
link_id);
- if (link_id >= MAX_NUM_MLO_LINKS)
+ if (link_id >= MAX_NUM_MLD_LINKS)
break;
parse->valid_mlo_gtks |= BIT(link_id);
parse->mlo_gtk[link_id] = pos;
@@ -1119,7 +1119,7 @@
link_id = pos[2 + 6] & 0x0f;
wpa_printf(MSG_DEBUG, "FT: MLO IGTK (Link ID %u)",
link_id);
- if (link_id >= MAX_NUM_MLO_LINKS)
+ if (link_id >= MAX_NUM_MLD_LINKS)
break;
parse->valid_mlo_igtks |= BIT(link_id);
parse->mlo_igtk[link_id] = pos;
@@ -1134,7 +1134,7 @@
link_id = pos[2 + 6] & 0x0f;
wpa_printf(MSG_DEBUG, "FT: MLO BIGTK (Link ID %u)",
link_id);
- if (link_id >= MAX_NUM_MLO_LINKS)
+ if (link_id >= MAX_NUM_MLD_LINKS)
break;
parse->valid_mlo_bigtks |= BIT(link_id);
parse->mlo_bigtk[link_id] = pos;
@@ -1353,7 +1353,7 @@
/* TODO: This count should be done based on all _requested_,
* not _accepted_ links. */
- for (link_id = 0; link_id < MAX_NUM_MLO_LINKS; link_id++) {
+ for (link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) {
if (parse->mlo_gtk[link_id]) {
if (parse->rsn)
prot_ie_count--;
@@ -3551,7 +3551,7 @@
selector == RSN_KEY_DATA_MLO_GTK) {
link_id = (p[0] & RSN_MLO_GTK_KDE_PREFIX0_LINK_ID_MASK) >>
RSN_MLO_GTK_KDE_PREFIX0_LINK_ID_SHIFT;
- if (link_id >= MAX_NUM_MLO_LINKS)
+ if (link_id >= MAX_NUM_MLD_LINKS)
return 2;
ie->valid_mlo_gtks |= BIT(link_id);
@@ -3569,7 +3569,7 @@
selector == RSN_KEY_DATA_MLO_IGTK) {
link_id = (p[8] & RSN_MLO_IGTK_KDE_PREFIX8_LINK_ID_MASK) >>
RSN_MLO_IGTK_KDE_PREFIX8_LINK_ID_SHIFT;
- if (link_id >= MAX_NUM_MLO_LINKS)
+ if (link_id >= MAX_NUM_MLD_LINKS)
return 2;
ie->valid_mlo_igtks |= BIT(link_id);
@@ -3587,7 +3587,7 @@
selector == RSN_KEY_DATA_MLO_BIGTK) {
link_id = (p[8] & RSN_MLO_BIGTK_KDE_PREFIX8_LINK_ID_MASK) >>
RSN_MLO_BIGTK_KDE_PREFIX8_LINK_ID_SHIFT;
- if (link_id >= MAX_NUM_MLO_LINKS)
+ if (link_id >= MAX_NUM_MLD_LINKS)
return 2;
ie->valid_mlo_bigtks |= BIT(link_id);
@@ -3605,7 +3605,7 @@
selector == RSN_KEY_DATA_MLO_LINK) {
link_id = (p[0] & RSN_MLO_LINK_KDE_LI_LINK_ID_MASK) >>
RSN_MLO_LINK_KDE_LI_LINK_ID_SHIFT;
- if (link_id >= MAX_NUM_MLO_LINKS)
+ if (link_id >= MAX_NUM_MLD_LINKS)
return 2;
ie->valid_mlo_links |= BIT(link_id);
diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
index a2c7033..01efeea 100644
--- a/src/common/wpa_common.h
+++ b/src/common/wpa_common.h
@@ -9,6 +9,8 @@
#ifndef WPA_COMMON_H
#define WPA_COMMON_H
+#include "common/defs.h"
+
/* IEEE 802.11i */
#define PMKID_LEN 16
#define PMK_LEN 32
@@ -557,8 +559,6 @@
const u8 *ie2, size_t ie2len);
int wpa_insert_pmkid(u8 *ies, size_t *ies_len, const u8 *pmkid, bool replace);
-#define MAX_NUM_MLO_LINKS 15
-
struct wpa_ft_ies {
const u8 *mdie;
size_t mdie_len;
@@ -596,14 +596,14 @@
const u8 *rsnxe;
size_t rsnxe_len;
u16 valid_mlo_gtks; /* bitmap of valid link GTK subelements */
- const u8 *mlo_gtk[MAX_NUM_MLO_LINKS];
- size_t mlo_gtk_len[MAX_NUM_MLO_LINKS];
+ const u8 *mlo_gtk[MAX_NUM_MLD_LINKS];
+ size_t mlo_gtk_len[MAX_NUM_MLD_LINKS];
u16 valid_mlo_igtks; /* bitmap of valid link IGTK subelements */
- const u8 *mlo_igtk[MAX_NUM_MLO_LINKS];
- size_t mlo_igtk_len[MAX_NUM_MLO_LINKS];
+ const u8 *mlo_igtk[MAX_NUM_MLD_LINKS];
+ size_t mlo_igtk_len[MAX_NUM_MLD_LINKS];
u16 valid_mlo_bigtks; /* bitmap of valid link BIGTK subelements */
- const u8 *mlo_bigtk[MAX_NUM_MLO_LINKS];
- size_t mlo_bigtk_len[MAX_NUM_MLO_LINKS];
+ const u8 *mlo_bigtk[MAX_NUM_MLD_LINKS];
+ size_t mlo_bigtk_len[MAX_NUM_MLD_LINKS];
struct wpabuf *fte_buf;
};
@@ -700,17 +700,17 @@
const u8 *wmm;
size_t wmm_len;
u16 valid_mlo_gtks; /* bitmap of valid link GTK KDEs */
- const u8 *mlo_gtk[MAX_NUM_MLO_LINKS];
- size_t mlo_gtk_len[MAX_NUM_MLO_LINKS];
+ const u8 *mlo_gtk[MAX_NUM_MLD_LINKS];
+ size_t mlo_gtk_len[MAX_NUM_MLD_LINKS];
u16 valid_mlo_igtks; /* bitmap of valid link IGTK KDEs */
- const u8 *mlo_igtk[MAX_NUM_MLO_LINKS];
- size_t mlo_igtk_len[MAX_NUM_MLO_LINKS];
+ const u8 *mlo_igtk[MAX_NUM_MLD_LINKS];
+ size_t mlo_igtk_len[MAX_NUM_MLD_LINKS];
u16 valid_mlo_bigtks; /* bitmap of valid link BIGTK KDEs */
- const u8 *mlo_bigtk[MAX_NUM_MLO_LINKS];
- size_t mlo_bigtk_len[MAX_NUM_MLO_LINKS];
+ const u8 *mlo_bigtk[MAX_NUM_MLD_LINKS];
+ size_t mlo_bigtk_len[MAX_NUM_MLD_LINKS];
u16 valid_mlo_links; /* bitmap of valid MLO link KDEs */
- const u8 *mlo_link[MAX_NUM_MLO_LINKS];
- size_t mlo_link_len[MAX_NUM_MLO_LINKS];
+ const u8 *mlo_link[MAX_NUM_MLD_LINKS];
+ size_t mlo_link_len[MAX_NUM_MLD_LINKS];
};
int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie);
diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index c5bb9ab..f614250 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -413,6 +413,9 @@
/* parameters: <STA address> <dialog token> <report mode> <beacon report> */
#define BEACON_RESP_RX "BEACON-RESP-RX "
+/* parameters: <STA address> <dialog token> <link measurement report> */
+#define LINK_MSR_RESP_RX "LINK-MSR-RESP-RX "
+
/* PMKSA cache entry added; parameters: <BSSID> <network_id> */
#define PMKSA_CACHE_ADDED "PMKSA-CACHE-ADDED "
/* PMKSA cache entry removed; parameters: <BSSID> <network_id> */