From k.velayutham at samsung.com  Tue Jul  4 07:20:19 2023
From: k.velayutham at samsung.com (Kavitha Velayutham)
Date: Tue,  4 Jul 2023 19:50:19 +0530
Subject: [PATCH 1/1] Patch [1/1] Changes for FILS External Authentication
References: <CGME20230704061838epcas5p2d56b04612af73c01545bc7acb4400cab@epcas5p2.samsung.com>
Message-ID: <20230704142019.1020183-1-k.velayutham@samsung.com>

Changes for Authentication to be done in supplicant where sme is in driver
for FILS Authentication.

Signed-off-by: Kavitha Velayutham <k.velayutham at samsung.com>
---
 src/drivers/driver.h               |  14 ++
 src/drivers/driver_nl80211.c       |  57 +++++
 src/drivers/driver_nl80211_capa.c  |   6 +-
 src/drivers/driver_nl80211_event.c |   1 +
 src/drivers/nl80211_copy.h         |   6 +
 src/rsn_supp/wpa.c                 | 365 ++++++++++++++++++++---------
 src/rsn_supp/wpa.h                 |  11 +
 wpa_supplicant/driver_i.h          |  11 +
 wpa_supplicant/events.c            |  36 ++-
 wpa_supplicant/sme.c               | 253 ++++++++++++++++++--
 wpa_supplicant/sme.h               |   6 +
 wpa_supplicant/wpa_supplicant.c    |   9 +-
 12 files changed, 632 insertions(+), 143 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 101f98a72..2463c7baa 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1294,6 +1294,16 @@ struct wpa_driver_associate_params {
 	 */
 	enum sae_pwe sae_pwe;
 
+	/**
+	 * fils_key_auth_sta - Length of Key Auth STA
+	 */
+	u8 *fils_key_auth_sta;
+
+	/**
+	 * fils_key_auth_sta_len - Length of fils_key_auth_sta in bytes
+	 */
+	size_t fils_key_auth_sta_len;
+
 	/**
 	 * disable_eht - Disable EHT for this connection
 	 */
@@ -2226,6 +2236,7 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_STA	0x0000000000002000ULL
 /** Driver supports MLO in station/AP mode */
 #define WPA_DRIVER_FLAGS2_MLO			0x0000000000004000ULL
+#define WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH	0x0000000000008000ULL
 	u64 flags2;
 
 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
@@ -4948,6 +4959,9 @@ struct wpa_driver_ops {
 	int (*send_external_auth_status)(void *priv,
 					 struct external_auth *params);
 
+	int (*send_assoc_fils_ie)(void *priv,
+				  struct wpa_driver_associate_params *params);
+
 	/**
 	 * set_4addr_mode - Set 4-address mode
 	 * @priv: Private driver interface data
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index eb25730c5..41a0db06b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2446,6 +2446,10 @@ static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss)
 		nl80211_register_frame(bss, bss->nl_mgmt, type,
 				       (u8 *) "\x03\x00", 2, false);
 	}
+	if (drv->capa.flags2 & WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH) {
+		nl80211_register_frame(bss, bss->nl_mgmt, type,
+                                       (u8 *) "\x04\x00", 2, false);
+	}
 
 #ifdef CONFIG_PASN
 	/* register for PASN Authentication frames */
@@ -6850,6 +6854,10 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
 		return -1;
 
 	if ((wpa_key_mgmt_sae(params->key_mgmt_suite) ||
+	     params->key_mgmt_suite == WPA_KEY_MGMT_FILS_SHA256 ||
+	     params->key_mgmt_suite == WPA_KEY_MGMT_FILS_SHA384 ||
+	     params->key_mgmt_suite == WPA_KEY_MGMT_FT_FILS_SHA256 ||
+	     params->key_mgmt_suite == WPA_KEY_MGMT_FT_FILS_SHA384 ||
 	     wpa_key_mgmt_sae(params->allowed_key_mgmts)) &&
 	    (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME)) &&
 	    nla_put_flag(msg, NL80211_ATTR_EXTERNAL_AUTH_SUPPORT))
@@ -7013,6 +7021,10 @@ static int wpa_driver_nl80211_associate(
 		if (wpa_driver_nl80211_set_mode(priv, nlmode) < 0)
 			return -1;
 		if (wpa_key_mgmt_sae(params->key_mgmt_suite) ||
+		    params->key_mgmt_suite == WPA_KEY_MGMT_FILS_SHA256 ||
+		    params->key_mgmt_suite == WPA_KEY_MGMT_FILS_SHA384 ||
+		    params->key_mgmt_suite == WPA_KEY_MGMT_FT_FILS_SHA256 ||
+		    params->key_mgmt_suite == WPA_KEY_MGMT_FT_FILS_SHA384 ||
 		    wpa_key_mgmt_sae(params->allowed_key_mgmts))
 			bss->use_nl_connect = 1;
 		else
@@ -13269,6 +13281,50 @@ fail:
 	return ret;
 }
 
+static int nl80211_send_assoc_fils_ie(void *priv,
+				      struct wpa_driver_associate_params *params)
+{
+	struct i802_bss *bss = priv;
+	struct wpa_driver_nl80211_data *drv = bss->drv;
+	struct nl_msg *msg = NULL;
+	int ret = -1;
+
+	if (!(drv->capa.flags2 & WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH))
+		return -1;
+
+	wpa_dbg(drv->ctx, MSG_DEBUG,
+		"nl80211: External Assoc Fils key auth sta Len: %zu", params->fils_key_auth_sta_len);
+
+	msg = nl80211_drv_msg(drv, 0, NL80211_CMD_FILS_ASSOC_REQ_INFO);
+	if (!msg ||
+	     nla_put(msg, NL80211_ATTR_FILS_ASSOC_IE, params->fils_key_auth_sta_len, params->fils_key_auth_sta))
+		goto fail;
+	if (params->fils_kek) {
+		wpa_printf(MSG_DEBUG, "  * FILS KEK (len=%u)",
+			   (unsigned int) params->fils_kek_len);
+		if (nla_put(msg, NL80211_ATTR_FILS_KEK, params->fils_kek_len,
+			    params->fils_kek))
+			goto fail;
+	}
+	if (params->fils_nonces) {
+		wpa_printf(MSG_DEBUG, "  * FILS NONCE (len=%u)",
+			   (unsigned int) params->fils_nonces_len);
+		if (nla_put(msg, NL80211_ATTR_FILS_NONCES, params->fils_nonces_len,
+			    params->fils_nonces))
+			goto fail;
+	}
+	ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
+	msg = NULL;
+
+	if (ret) {
+		wpa_printf(MSG_DEBUG,
+			   "nl80211: Send Assoc Fils IE Failed: ret=%d (%s)",
+			   ret, strerror(-ret));
+	}
+fail:
+	nlmsg_free(msg);
+	return ret;
+}
 
 static int nl80211_set_4addr_mode(void *priv, const char *bridge_ifname,
 				  int val)
@@ -13599,6 +13655,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
 	.update_connect_params = nl80211_update_connection_params,
 	.send_external_auth_status = nl80211_send_external_auth_status,
 	.set_4addr_mode = nl80211_set_4addr_mode,
+	.send_assoc_fils_ie = nl80211_send_assoc_fils_ie,
 #ifdef CONFIG_DPP
 	.dpp_listen = nl80211_dpp_listen,
 #endif /* CONFIG_DPP */
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index b904398ca..b33c3ab0e 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -592,6 +592,9 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
 	if (ext_feature_isset(ext_features, len,
 			      NL80211_EXT_FEATURE_FILS_SK_OFFLOAD))
 		capa->flags |= WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD;
+	if (ext_feature_isset(ext_features, len,
+			      NL80211_EXT_FEATURE_EXTERNAL_AUTH_FILS))
+		capa->flags2 |= WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH;
 
 	if (ext_feature_isset(ext_features, len,
 			      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK))
@@ -1451,7 +1454,8 @@ int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
 				WPA_DRIVER_CAPA_KEY_MGMT_FT_FILS_SHA256 |
 				WPA_DRIVER_CAPA_KEY_MGMT_FT_FILS_SHA384 |
 				WPA_DRIVER_CAPA_KEY_MGMT_SAE;
-		else if (drv->capa.flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD)
+		else if (drv->capa.flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD ||
+			 drv->capa.flags2 & WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH)
 			drv->capa.key_mgmt |=
 				WPA_DRIVER_CAPA_KEY_MGMT_FILS_SHA256 |
 				WPA_DRIVER_CAPA_KEY_MGMT_FILS_SHA384;
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index a6f8c97ca..2037261a0 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -185,6 +185,7 @@ static const char * nl80211_command_to_string(enum nl80211_commands cmd)
 	C2S(NL80211_CMD_MODIFY_LINK_STA)
 	C2S(NL80211_CMD_REMOVE_LINK_STA)
 	C2S(NL80211_CMD_SET_HW_TIMESTAMP)
+	C2S(NL80211_CMD_FILS_ASSOC_REQ_INFO)
 	C2S(__NL80211_CMD_AFTER_LAST)
 	}
 #undef C2S
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
index c59fec406..4a31127b6 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -1562,6 +1562,8 @@ enum nl80211_commands {
 
 	NL80211_CMD_SET_HW_TIMESTAMP,
 
+	NL80211_CMD_FILS_ASSOC_REQ_INFO,
+
 	/* add new commands above here */
 
 	/* used to define NL80211_CMD_MAX below */
@@ -1583,6 +1585,7 @@ enum nl80211_commands {
 #define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT
 
 #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
+#define NL80211_CMD_FILS_ASSOC_REQ_INFO NL80211_CMD_FILS_ASSOC_REQ_INFO
 
 /* source-level API compatibility */
 #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
@@ -3341,6 +3344,8 @@ enum nl80211_attrs {
 
 	NL80211_ATTR_EMA_RNR_ELEMS,
 
+	NL80211_ATTR_FILS_ASSOC_IE,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
@@ -6443,6 +6448,7 @@ enum nl80211_ext_feature_index {
 	NL80211_EXT_FEATURE_PUNCT,
 	NL80211_EXT_FEATURE_SECURE_NAN,
 	NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA,
+	NL80211_EXT_FEATURE_EXTERNAL_AUTH_FILS,
 
 	/* add new features before the definition below */
 	NUM_NL80211_EXT_FEATURES,
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 9c7c526fc..2806fb327 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -5225,6 +5225,259 @@ const u8 * wpa_sm_get_auth_addr(struct wpa_sm *sm)
 
 #ifdef CONFIG_FILS
 
+#ifdef CONFIG_IEEE80211R
+static int fils_ft_build_assoc_req_rsne(struct wpa_sm *sm, struct wpabuf *buf)
+{
+	struct rsn_ie_hdr *rsnie;
+	u16 capab;
+	u8 *pos;
+	int use_sha384 = wpa_key_mgmt_sha384(sm->key_mgmt);
+
+	/* RSNIE[PMKR0Name/PMKR1Name] */
+	rsnie = wpabuf_put(buf, sizeof(*rsnie));
+	rsnie->elem_id = WLAN_EID_RSN;
+	WPA_PUT_LE16(rsnie->version, RSN_VERSION);
+
+	/* Group Suite Selector */
+	if (!wpa_cipher_valid_group(sm->group_cipher)) {
+		wpa_printf(MSG_WARNING, "FT: Invalid group cipher (%d)",
+			   sm->group_cipher);
+		return -1;
+	}
+	pos = wpabuf_put(buf, RSN_SELECTOR_LEN);
+	RSN_SELECTOR_PUT(pos, wpa_cipher_to_suite(WPA_PROTO_RSN,
+						  sm->group_cipher));
+
+	/* Pairwise Suite Count */
+	wpabuf_put_le16(buf, 1);
+
+	/* Pairwise Suite List */
+	if (!wpa_cipher_valid_pairwise(sm->pairwise_cipher)) {
+		wpa_printf(MSG_WARNING, "FT: Invalid pairwise cipher (%d)",
+			   sm->pairwise_cipher);
+		return -1;
+	}
+	pos = wpabuf_put(buf, RSN_SELECTOR_LEN);
+	RSN_SELECTOR_PUT(pos, wpa_cipher_to_suite(WPA_PROTO_RSN,
+						  sm->pairwise_cipher));
+
+	/* Authenticated Key Management Suite Count */
+	wpabuf_put_le16(buf, 1);
+
+	/* Authenticated Key Management Suite List */
+	pos = wpabuf_put(buf, RSN_SELECTOR_LEN);
+	if (sm->key_mgmt == WPA_KEY_MGMT_FT_FILS_SHA256)
+		RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_FILS_SHA256);
+	else if (sm->key_mgmt == WPA_KEY_MGMT_FT_FILS_SHA384)
+		RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_FILS_SHA384);
+	else {
+		wpa_printf(MSG_WARNING,
+			   "FILS+FT: Invalid key management type (%d)",
+			   sm->key_mgmt);
+		return -1;
+	}
+
+	/* RSN Capabilities */
+	capab = 0;
+	if (sm->mfp)
+		capab |= WPA_CAPABILITY_MFPC;
+	if (sm->mfp == 2)
+		capab |= WPA_CAPABILITY_MFPR;
+	if (sm->ocv)
+		capab |= WPA_CAPABILITY_OCVC;
+	if (sm->ext_key_id)
+		capab |= WPA_CAPABILITY_EXT_KEY_ID_FOR_UNICAST;
+	wpabuf_put_le16(buf, capab);
+
+	/* PMKID Count */
+	wpabuf_put_le16(buf, 1);
+
+	/* PMKID List [PMKR1Name] */
+	wpa_hexdump_key(MSG_DEBUG, "FILS+FT: XXKey (FILS-FT)",
+			sm->fils_ft, sm->fils_ft_len);
+	wpa_hexdump_ascii(MSG_DEBUG, "FILS+FT: SSID", sm->ssid, sm->ssid_len);
+	wpa_hexdump(MSG_DEBUG, "FILS+FT: MDID",
+		    sm->mobility_domain, MOBILITY_DOMAIN_ID_LEN);
+	wpa_hexdump_ascii(MSG_DEBUG, "FILS+FT: R0KH-ID",
+			  sm->r0kh_id, sm->r0kh_id_len);
+	if (wpa_derive_pmk_r0(sm->fils_ft, sm->fils_ft_len, sm->ssid,
+			      sm->ssid_len, sm->mobility_domain,
+			      sm->r0kh_id, sm->r0kh_id_len, sm->own_addr,
+			      sm->pmk_r0, sm->pmk_r0_name, use_sha384) < 0) {
+		wpa_printf(MSG_WARNING, "FILS+FT: Could not derive PMK-R0");
+		return -1;
+	}
+	sm->pmk_r0_len = use_sha384 ? SHA384_MAC_LEN : PMK_LEN;
+	wpa_printf(MSG_DEBUG, "FILS+FT: R1KH-ID: " MACSTR,
+		   MAC2STR(sm->r1kh_id));
+	pos = wpabuf_put(buf, WPA_PMK_NAME_LEN);
+	if (wpa_derive_pmk_r1_name(sm->pmk_r0_name, sm->r1kh_id, sm->own_addr,
+				   sm->pmk_r1_name, use_sha384) < 0) {
+		wpa_printf(MSG_WARNING, "FILS+FT: Could not derive PMKR1Name");
+		return -1;
+	}
+	os_memcpy(pos, sm->pmk_r1_name, WPA_PMK_NAME_LEN);
+
+	if (sm->mgmt_group_cipher == WPA_CIPHER_AES_128_CMAC) {
+		/* Management Group Cipher Suite */
+		pos = wpabuf_put(buf, RSN_SELECTOR_LEN);
+		RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_AES_128_CMAC);
+	}
+
+	rsnie->len = ((u8 *) wpabuf_put(buf, 0) - (u8 *) rsnie) - 2;
+	return 0;
+}
+#endif /* CONFIG_IEEE80211R */
+
+struct wpabuf * fils_build_assoc_req_plain_external(struct wpa_sm *sm, const u8 **kek,
+						    size_t *kek_len, const u8 **snonce,
+						    const u8 **anonce,
+						    const struct wpabuf **hlp,
+						    unsigned int num_hlp)
+{
+	struct wpabuf *buf;
+	size_t len = 0;
+	unsigned int i;
+
+	for (i = 0; hlp && i < num_hlp; i++)
+		len += 10 + wpabuf_len(hlp[i]);
+	buf = wpabuf_alloc(len + 1000);
+	if (!buf)
+		return NULL;
+	/* FILS Key Confirm */
+	wpabuf_put_u8(buf, WLAN_EID_EXTENSION); /* Element ID */
+	wpabuf_put_u8(buf, 1 + sm->fils_key_auth_len); /* Length */
+	/* Element ID Extension */
+	wpabuf_put_u8(buf, WLAN_EID_EXT_FILS_KEY_CONFIRM);
+	wpabuf_put_data(buf, sm->fils_key_auth_sta, sm->fils_key_auth_len);
+
+	/* FILS HLP Container */
+	for (i = 0; hlp && i < num_hlp; i++) {
+		const u8 *pos = wpabuf_head(hlp[i]);
+		size_t left = wpabuf_len(hlp[i]);
+
+		wpabuf_put_u8(buf, WLAN_EID_EXTENSION); /* Element ID */
+		if (left <= 254)
+			len = 1 + left;
+		else
+			len = 255;
+		wpabuf_put_u8(buf, len); /* Length */
+		/* Element ID Extension */
+		wpabuf_put_u8(buf, WLAN_EID_EXT_FILS_HLP_CONTAINER);
+		/* Destination MAC Address, Source MAC Address, HLP Packet.
+		 * HLP Packet is in MSDU format (i.e., included the LLC/SNAP
+		 * header when LPD is used). */
+		wpabuf_put_data(buf, pos, len - 1);
+		pos += len - 1;
+		left -= len - 1;
+		while (left) {
+			wpabuf_put_u8(buf, WLAN_EID_FRAGMENT);
+			len = left > 255 ? 255 : left;
+			wpabuf_put_u8(buf, len);
+			wpabuf_put_data(buf, pos, len);
+			pos += len;
+			left -= len;
+		}
+	}
+
+	/* TODO: FILS IP Address Assignment */
+
+#ifdef CONFIG_OCV
+	if (wpa_sm_ocv_enabled(sm)) {
+		struct wpa_channel_info ci;
+		u8 *pos;
+
+		if (wpa_sm_channel_info(sm, &ci) != 0) {
+			wpa_printf(MSG_WARNING,
+				   "FILS: Failed to get channel info for OCI element");
+			wpabuf_free(buf);
+			return NULL;
+		}
+
+		pos = wpabuf_put(buf, OCV_OCI_EXTENDED_LEN);
+		if (ocv_insert_extended_oci(&ci, pos) < 0) {
+			wpabuf_free(buf);
+			return NULL;
+		}
+	}
+#endif /* CONFIG_OCV */
+
+	wpa_hexdump_buf(MSG_DEBUG, "FILS: Association Request plaintext", buf);
+
+	*kek = sm->ptk.kek;
+	*kek_len = sm->ptk.kek_len;
+	wpa_hexdump_key(MSG_DEBUG, "FILS: KEK for AEAD", *kek, *kek_len);
+	*snonce = sm->fils_nonce;
+	wpa_hexdump(MSG_DEBUG, "FILS: SNonce for AEAD AAD",
+		    *snonce, FILS_NONCE_LEN);
+	*anonce = sm->fils_anonce;
+	wpa_hexdump(MSG_DEBUG, "FILS: ANonce for AEAD AAD",
+		    *anonce, FILS_NONCE_LEN);
+
+	return buf;
+}
+
+struct wpabuf * fils_build_assoc_req_external(struct wpa_sm *sm, const u8 **kek,
+					      size_t *kek_len, const u8 **snonce,
+					      const u8 **anonce,
+					      const struct wpabuf **hlp,
+					      unsigned int num_hlp, u8 *sa, const u8 *bssid,
+					      int *len_encr_start)
+{
+	struct wpabuf *buf , *plain;
+	size_t len;
+	unsigned int i, pos;
+	const u8 *aad[5];
+	size_t aad_len[5];
+	le16 capab_info = 0x0000;
+
+	len = 10000;
+#ifdef CONFIG_IEEE80211R
+	if (sm->fils_ft_ies)
+		len += wpabuf_len(sm->fils_ft_ies);
+	if (wpa_key_mgmt_ft(sm->key_mgmt))
+		len += 256;
+#endif /* CONFIG_IEEE80211R */
+	for (i = 0; hlp && i < num_hlp; i++)
+		len += 10 + wpabuf_len(hlp[i]);
+	len += AES_BLOCK_SIZE;
+
+	buf = wpabuf_alloc(len);
+	if (!buf)
+		return NULL;
+
+#ifdef CONFIG_IEEE80211R
+	if (wpa_key_mgmt_ft(sm->key_mgmt) && sm->fils_ft_ies) {
+		/* MDE and FTE when using FILS+FT */
+		wpabuf_put_buf(buf, sm->fils_ft_ies);
+		/* RSNE with PMKR1Name in PMKID field */
+		if (fils_ft_build_assoc_req_rsne(sm, buf) < 0) {
+			wpabuf_free(buf);
+			return NULL;
+		}
+	}
+#endif /* CONFIG_IEEE80211R */
+	/* FILS Session */
+	wpabuf_put_u8(buf, WLAN_EID_EXTENSION); /* Element ID */
+	wpabuf_put_u8(buf, 1 + FILS_SESSION_LEN); /* Length */
+	/* Element ID Extension */
+	wpabuf_put_u8(buf, WLAN_EID_EXT_FILS_SESSION);
+	wpabuf_put_data(buf, sm->fils_session, FILS_SESSION_LEN);
+
+	*len_encr_start = buf->used;
+
+	/* TODO: FILS Public Key */
+	plain = fils_build_assoc_req_plain_external(sm, kek,
+						    kek_len, snonce,
+						    anonce,
+						    (const struct wpabuf **) hlp,
+						    num_hlp);
+
+	wpabuf_put_data(buf, wpabuf_head(plain), wpabuf_len(plain));
+
+	return buf;
+}
+
 struct wpabuf * fils_build_auth(struct wpa_sm *sm, int dh_group, const u8 *md)
 {
 	struct wpabuf *buf = NULL;
@@ -5669,118 +5922,6 @@ fail:
 	return -1;
 }
 
-
-#ifdef CONFIG_IEEE80211R
-static int fils_ft_build_assoc_req_rsne(struct wpa_sm *sm, struct wpabuf *buf)
-{
-	struct rsn_ie_hdr *rsnie;
-	u16 capab;
-	u8 *pos;
-	int use_sha384 = wpa_key_mgmt_sha384(sm->key_mgmt);
-
-	/* RSNIE[PMKR0Name/PMKR1Name] */
-	rsnie = wpabuf_put(buf, sizeof(*rsnie));
-	rsnie->elem_id = WLAN_EID_RSN;
-	WPA_PUT_LE16(rsnie->version, RSN_VERSION);
-
-	/* Group Suite Selector */
-	if (!wpa_cipher_valid_group(sm->group_cipher)) {
-		wpa_printf(MSG_WARNING, "FT: Invalid group cipher (%d)",
-			   sm->group_cipher);
-		return -1;
-	}
-	pos = wpabuf_put(buf, RSN_SELECTOR_LEN);
-	RSN_SELECTOR_PUT(pos, wpa_cipher_to_suite(WPA_PROTO_RSN,
-						  sm->group_cipher));
-
-	/* Pairwise Suite Count */
-	wpabuf_put_le16(buf, 1);
-
-	/* Pairwise Suite List */
-	if (!wpa_cipher_valid_pairwise(sm->pairwise_cipher)) {
-		wpa_printf(MSG_WARNING, "FT: Invalid pairwise cipher (%d)",
-			   sm->pairwise_cipher);
-		return -1;
-	}
-	pos = wpabuf_put(buf, RSN_SELECTOR_LEN);
-	RSN_SELECTOR_PUT(pos, wpa_cipher_to_suite(WPA_PROTO_RSN,
-						  sm->pairwise_cipher));
-
-	/* Authenticated Key Management Suite Count */
-	wpabuf_put_le16(buf, 1);
-
-	/* Authenticated Key Management Suite List */
-	pos = wpabuf_put(buf, RSN_SELECTOR_LEN);
-	if (sm->key_mgmt == WPA_KEY_MGMT_FT_FILS_SHA256)
-		RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_FILS_SHA256);
-	else if (sm->key_mgmt == WPA_KEY_MGMT_FT_FILS_SHA384)
-		RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_FILS_SHA384);
-	else {
-		wpa_printf(MSG_WARNING,
-			   "FILS+FT: Invalid key management type (%d)",
-			   sm->key_mgmt);
-		return -1;
-	}
-
-	/* RSN Capabilities */
-	capab = 0;
-	if (sm->mfp)
-		capab |= WPA_CAPABILITY_MFPC;
-	if (sm->mfp == 2)
-		capab |= WPA_CAPABILITY_MFPR;
-	if (sm->ocv)
-		capab |= WPA_CAPABILITY_OCVC;
-	if (sm->ext_key_id)
-		capab |= WPA_CAPABILITY_EXT_KEY_ID_FOR_UNICAST;
-	wpabuf_put_le16(buf, capab);
-
-	/* PMKID Count */
-	wpabuf_put_le16(buf, 1);
-
-	/* PMKID List [PMKR1Name] */
-	wpa_hexdump_key(MSG_DEBUG, "FILS+FT: XXKey (FILS-FT)",
-			sm->fils_ft, sm->fils_ft_len);
-	wpa_hexdump_ascii(MSG_DEBUG, "FILS+FT: SSID", sm->ssid, sm->ssid_len);
-	wpa_hexdump(MSG_DEBUG, "FILS+FT: MDID",
-		    sm->mobility_domain, MOBILITY_DOMAIN_ID_LEN);
-	wpa_hexdump_ascii(MSG_DEBUG, "FILS+FT: R0KH-ID",
-			  sm->r0kh_id, sm->r0kh_id_len);
-	if (wpa_derive_pmk_r0(sm->fils_ft, sm->fils_ft_len, sm->ssid,
-			      sm->ssid_len, sm->mobility_domain,
-			      sm->r0kh_id, sm->r0kh_id_len, sm->own_addr,
-			      sm->pmk_r0, sm->pmk_r0_name, sm->key_mgmt) < 0) {
-		wpa_printf(MSG_WARNING, "FILS+FT: Could not derive PMK-R0");
-		return -1;
-	}
-	if (wpa_key_mgmt_sae_ext_key(sm->key_mgmt))
-		sm->pmk_r0_len = sm->fils_ft_len;
-	else
-		sm->pmk_r0_len = use_sha384 ? SHA384_MAC_LEN : PMK_LEN;
-	wpa_printf(MSG_DEBUG, "FILS+FT: R1KH-ID: " MACSTR,
-		   MAC2STR(sm->r1kh_id));
-	pos = wpabuf_put(buf, WPA_PMK_NAME_LEN);
-	if (wpa_derive_pmk_r1_name(sm->pmk_r0_name, sm->r1kh_id, sm->own_addr,
-				   sm->pmk_r1_name, sm->fils_ft_len) < 0) {
-		wpa_printf(MSG_WARNING, "FILS+FT: Could not derive PMKR1Name");
-		return -1;
-	}
-	os_memcpy(pos, sm->pmk_r1_name, WPA_PMK_NAME_LEN);
-
-	os_memcpy(sm->key_mobility_domain, sm->mobility_domain,
-		  MOBILITY_DOMAIN_ID_LEN);
-
-	if (sm->mgmt_group_cipher == WPA_CIPHER_AES_128_CMAC) {
-		/* Management Group Cipher Suite */
-		pos = wpabuf_put(buf, RSN_SELECTOR_LEN);
-		RSN_SELECTOR_PUT(pos, RSN_CIPHER_SUITE_AES_128_CMAC);
-	}
-
-	rsnie->len = ((u8 *) wpabuf_put(buf, 0) - (u8 *) rsnie) - 2;
-	return 0;
-}
-#endif /* CONFIG_IEEE80211R */
-
-
 struct wpabuf * fils_build_assoc_req(struct wpa_sm *sm, const u8 **kek,
 				     size_t *kek_len, const u8 **snonce,
 				     const u8 **anonce,
diff --git a/src/rsn_supp/wpa.h b/src/rsn_supp/wpa.h
index b3c8b6a7d..03d15a84b 100644
--- a/src/rsn_supp/wpa.h
+++ b/src/rsn_supp/wpa.h
@@ -490,6 +490,17 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
 				 size_t ies_len, const u8 *src_addr);
 int wpa_ft_start_over_ds(struct wpa_sm *sm, const u8 *target_ap,
 			 const u8 *mdie, bool force);
+struct wpabuf * fils_build_assoc_req_external(struct wpa_sm *sm, const u8 **kek,
+					      size_t *kek_len, const u8 **snonce,
+					      const u8 **anonce,
+					      const struct wpabuf **hlp,
+					      unsigned int num_hlp, u8 *sa, const u8 *bssid,
+					      int *len_encr_start);
+struct wpabuf * fils_build_assoc_req_plain_external(struct wpa_sm *sm, const u8 **kek,
+						    size_t *kek_len, const u8 **snonce,
+						    const u8 **anonce,
+						    const struct wpabuf **hlp,
+						    unsigned int num_hlp);
 
 #ifdef CONFIG_PASN
 
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index d707cf556..747197954 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -1112,6 +1112,17 @@ wpa_drv_send_external_auth_status(struct wpa_supplicant *wpa_s,
 							params);
 }
 
+static inline int
+wpa_drv_send_external_assoc_fils_ie(struct wpa_supplicant *wpa_s,
+				    struct wpa_driver_associate_params *params)
+{
+	if (!wpa_s->driver->send_assoc_fils_ie)
+		return -1;
+	return wpa_s->driver->send_assoc_fils_ie(wpa_s->drv_priv,
+						 params);
+}
+
+
 static inline int wpa_drv_set_4addr_mode(struct wpa_supplicant *wpa_s, int val)
 {
 	if (!wpa_s->driver->set_4addr_mode)
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 896c53841..aedacdc0a 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -4989,7 +4989,8 @@ static void wpa_supplicant_event_assoc_auth(struct wpa_supplicant *wpa_s,
 			       data->assoc_info.ptk_kek,
 			       data->assoc_info.ptk_kek_len);
 #ifdef CONFIG_FILS
-	if (wpa_s->auth_alg == WPA_AUTH_ALG_FILS) {
+	if (wpa_s->auth_alg == WPA_AUTH_ALG_FILS &&
+	    !(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH)) {
 		struct wpa_bss *bss = wpa_bss_get_bssid(wpa_s, wpa_s->bssid);
 		const u8 *fils_cache_id = wpa_bss_get_fils_cache_id(bss);
 
@@ -5314,6 +5315,15 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 				   "Ignore unexpected EVENT_ASSOC in disconnected state");
 			break;
 		}
+		if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+		    wpa_auth_alg_fils(wpa_s->auth_alg)) {
+			if (fils_process_assoc_resp(wpa_s->wpa,
+						    data->assoc_info.resp_ies,
+						    data->assoc_info.resp_ies_len) < 0) {
+				wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_UNSPECIFIED);
+				return;
+			}
+		}
 		wpa_supplicant_event_assoc(wpa_s, data);
 		wpa_s->assoc_status_code = WLAN_STATUS_SUCCESS;
 		if (data &&
@@ -5752,11 +5762,19 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 #ifdef CONFIG_SAE
 			if (stype == WLAN_FC_STYPE_AUTH &&
 			    !(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
-			    (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SAE)) {
-				sme_external_auth_mgmt_rx(
-					wpa_s, data->rx_mgmt.frame,
-					data->rx_mgmt.frame_len);
-				break;
+			    (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SAE ||
+			    wpa_s->drv_flags2 & WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH)) {
+				if (le_to_host16(mgmt->u.auth.auth_alg) == WLAN_AUTH_SAE) {
+					sme_external_auth_mgmt_rx(wpa_s, data->rx_mgmt.frame,
+								  data->rx_mgmt.frame_len);
+					break;
+				}
+				if (le_to_host16(mgmt->u.auth.auth_alg) == WLAN_AUTH_FILS_SK) {
+					sme_external_auth_mgmt_rx_fils(wpa_s, data->rx_mgmt.frame,
+								       data->rx_mgmt.frame_len);
+					break;
+
+				}
 			}
 #endif /* CONFIG_SAE */
 			wpa_dbg(wpa_s, MSG_DEBUG, "AP: ignore received "
@@ -6108,13 +6126,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 		bgscan_notify_beacon_loss(wpa_s);
 		break;
 	case EVENT_EXTERNAL_AUTH:
-#ifdef CONFIG_SAE
+#if defined(CONFIG_SAE) || defined(CONFIG_FILS)
 		if (!wpa_s->current_ssid) {
-			wpa_printf(MSG_DEBUG, "SAE: current_ssid is NULL");
+			wpa_printf(MSG_DEBUG, "Auth: Current_ssid is NULL");
 			break;
 		}
 		sme_external_auth_trigger(wpa_s, data);
-#endif /* CONFIG_SAE */
+#endif /* CONFIG_SAE CONFIG_FILS*/
 		break;
 #ifdef CONFIG_PASN
 	case EVENT_PASN_AUTH:
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 51bc44246..38f02d22c 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1321,6 +1321,219 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
 		wpas_connect_work_free(cwork);
 }
 
+static void sme_send_external_auth_status(struct wpa_supplicant *wpa_s,
+					  u16 status)
+{
+	struct external_auth params;
+
+	os_memset(&params, 0, sizeof(params));
+	params.status = status;
+	params.ssid = wpa_s->sme.ext_auth_ssid;
+	params.ssid_len = wpa_s->sme.ext_auth_ssid_len;
+	params.bssid = wpa_s->sme.ext_auth_bssid;
+	if (wpa_s->conf->sae_pmkid_in_assoc && status == WLAN_STATUS_SUCCESS)
+		params.pmkid = wpa_s->sme.sae.pmkid;
+	wpa_drv_send_external_auth_status(wpa_s, &params);
+}
+
+#ifdef CONFIG_FILS
+
+static void sme_external_send_fils_kek_key_auth_sta(struct wpa_supplicant *wpa_s, struct wpabuf *buf)
+{
+	struct wpa_driver_associate_params params;
+	u8 nonces[2 * FILS_NONCE_LEN];
+
+	params.fils_kek = wpa_s->wpa->ptk.kek;
+	params.fils_kek_len = wpa_s->wpa->ptk.kek_len;
+	params.fils_key_auth_sta = buf->buf;
+	params.fils_key_auth_sta_len = wpabuf_len(buf);
+	os_memcpy(nonces, wpa_s->wpa->fils_nonce, FILS_NONCE_LEN);
+	os_memcpy(nonces + FILS_NONCE_LEN, wpa_s->wpa->fils_anonce, FILS_NONCE_LEN);
+	params.fils_nonces = nonces;
+	params.fils_nonces_len = sizeof(nonces);
+
+	wpa_drv_send_external_assoc_fils_ie(wpa_s, &params);
+}
+
+
+static struct wpabuf * sme_assoc_build_external_fils(struct wpa_supplicant *wpa_s,
+						     enum wpas_mode mode,
+						     const u8 *bssid, u16 auth_type)
+{
+	struct wpa_driver_associate_params params;
+	struct ieee802_11_elems elems;
+	struct wpabuf *resp;
+	struct wpabuf *buf = NULL,*fils_plain = NULL;
+	int len_encr_start;
+	int len;
+
+#ifdef CONFIG_FILS
+	u8 nonces[2 * FILS_NONCE_LEN];
+#endif /* CONFIG_FILS */
+	os_memset(&params, 0, sizeof(params));
+
+	if (auth_type == WLAN_AUTH_FILS_SK ||
+	    auth_type == WLAN_AUTH_FILS_SK_PFS) {
+		const u8 *snonce, *anonce;
+		const unsigned int max_hlp = 20;
+		struct wpabuf *hlp[max_hlp];
+		unsigned int i, num_hlp = 0;
+		struct fils_hlp_req *req;
+
+		dl_list_for_each(req, &wpa_s->fils_hlp_req, struct fils_hlp_req,
+				 list) {
+			hlp[num_hlp] = wpabuf_alloc(2 * ETH_ALEN + 6 +
+					      wpabuf_len(req->pkt));
+			if (!hlp[num_hlp])
+				break;
+			wpabuf_put_data(hlp[num_hlp], req->dst, ETH_ALEN);
+			wpabuf_put_data(hlp[num_hlp], wpa_s->own_addr,
+					ETH_ALEN);
+			wpabuf_put_data(hlp[num_hlp],
+					"\xaa\xaa\x03\x00\x00\x00", 6);
+			wpabuf_put_buf(hlp[num_hlp], req->pkt);
+			num_hlp++;
+			if (num_hlp >= max_hlp)
+				break;
+		}
+
+		fils_plain = fils_build_assoc_req_external(wpa_s->wpa, &params.fils_kek,
+							   &params.fils_kek_len, &snonce,
+							   &anonce,
+							   (const struct wpabuf **) hlp,
+							   num_hlp, wpa_s->own_addr, bssid,
+							   &len_encr_start);
+		for (i = 0; i < num_hlp; i++)
+			wpabuf_free(hlp[i]);
+		if (!fils_plain) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "Fils plain ie is Null");
+			return NULL;
+		}
+	}
+	return fils_plain;
+}
+
+static int sme_external_auth_send_fils(struct wpa_supplicant *wpa_s,
+				       const u8 *bssid,
+				       const u8 *ssid_authframe)
+{
+	struct wpabuf *resp, *buf;
+	struct ieee80211_mgmt *authframe;
+	int use_pt;
+	int auth_alg;
+	const u8 *md = NULL;
+	struct wpa_bss *bss;
+	struct wpa_ssid *ssid = wpa_s->current_ssid;
+
+	resp = fils_build_auth(wpa_s->wpa, ssid->fils_dh_group, md);
+
+	if (!resp) {
+		wpa_printf(MSG_DEBUG, "SAE: Failed to build FILS Auth");
+		return -1;
+	}
+	wpa_s->sme.seq_num++;
+	buf = wpabuf_alloc(sizeof(struct ieee80211_hdr) + 6 + wpabuf_len(resp));
+	if (!buf) {
+		wpabuf_free(resp);
+		return -1;
+	}
+
+	authframe = wpabuf_put(buf, offsetof(struct ieee80211_mgmt,
+					     u.auth.auth_transaction));
+
+	authframe->frame_control = host_to_le16((WLAN_FC_TYPE_MGMT << 2) |
+						(WLAN_FC_STYPE_AUTH << 4));
+	os_memcpy(authframe->da, bssid, ETH_ALEN);
+	os_memcpy(authframe->sa, wpa_s->own_addr, ETH_ALEN);
+	os_memcpy(authframe->bssid, bssid, ETH_ALEN);
+
+	if (ssid->fils_dh_group)
+		wpa_printf(MSG_DEBUG,
+			   "SME: Try to use FILS SK authentication with PFS (DH Group %u)",
+			   ssid->fils_dh_group);
+	else
+		wpa_printf(MSG_DEBUG,
+			   "SME: Try to use FILS SK authentication without PFS");
+	auth_alg = ssid->fils_dh_group ?
+		WLAN_AUTH_FILS_SK_PFS : WLAN_AUTH_FILS_SK;
+
+	authframe->seq_ctrl = host_to_le16(wpa_s->sme.seq_num << 4);
+	authframe->u.auth.auth_alg = host_to_le16(0x0004);
+
+	if (resp)
+		wpabuf_put_buf(buf, resp);
+
+	wpa_drv_send_mlme(wpa_s, wpabuf_head(buf), wpabuf_len(buf), 1, 0, 0);
+	wpabuf_free(resp);
+	wpabuf_free(buf);
+
+	return 0;
+}
+
+void sme_external_auth_mgmt_rx_fils(struct wpa_supplicant *wpa_s,
+				    const u8 *auth_frame, size_t len)
+{
+	const struct ieee80211_mgmt *header;
+	size_t auth_length;
+	struct wpabuf *buf = NULL;
+
+	header = (const struct ieee80211_mgmt *) auth_frame;
+	auth_length = IEEE80211_HDRLEN + sizeof(header->u.auth);
+
+	if (len < auth_length) {
+		sme_send_external_auth_status(wpa_s,
+					      WLAN_STATUS_UNSPECIFIED_FAILURE);
+		return;
+	}
+
+	if (header->u.auth.status_code != WLAN_STATUS_SUCCESS) {
+		sme_send_external_auth_status(wpa_s,
+					      WLAN_STATUS_UNSPECIFIED_FAILURE);
+
+		wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_AUTH_REJECT MACSTR
+			" auth_alg=%u auth_transaction=%u status_code=%u",
+			MAC2STR(header->sa), header->u.auth.auth_alg,
+			header->u.auth.auth_transaction, header->u.auth.status_code);
+
+		if (wpa_s->auth_alg == WPA_AUTH_ALG_FILS ||
+		    wpa_s->auth_alg == WPA_AUTH_ALG_FILS_SK_PFS)
+			fils_connection_failure(wpa_s);
+
+		if (header->u.auth.status_code !=
+		    WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG ||
+		    wpa_s->auth_alg == header->u.auth.auth_alg||
+		    wpa_s->current_ssid->auth_alg == WPA_AUTH_ALG_LEAP) {
+			wpas_connection_failed(wpa_s, wpa_s->pending_bssid);
+			wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
+			return;
+		}
+
+		wpas_connect_work_done(wpa_s);
+	}
+
+	if (le_to_host16(header->u.auth.auth_alg) == WLAN_AUTH_FILS_SK ||
+	    le_to_host16(header->u.auth.auth_alg) == WLAN_AUTH_FILS_SK_PFS ||
+	    le_to_host16(header->u.auth.auth_alg) == WLAN_AUTH_FILS_PK) {
+
+		if (fils_process_auth(wpa_s->wpa, header->bssid,
+		    header->u.auth.variable, len - (IEEE80211_HDRLEN + 6)) < 0) {
+			sme_send_external_auth_status(wpa_s, WLAN_STATUS_UNSPECIFIED_FAILURE);
+		} else {
+
+			buf = sme_assoc_build_external_fils(wpa_s, wpa_s->current_ssid->mode, header->bssid,
+							    header->u.auth.auth_alg);
+
+			sme_external_send_fils_kek_key_auth_sta(wpa_s, buf);
+
+			//This needs to be sent after sending the KEK and Fils element
+
+			if (le_to_host16(header->u.auth.status_code) == WLAN_STATUS_SUCCESS)
+				sme_send_external_auth_status(wpa_s, WLAN_STATUS_SUCCESS);
+		}
+	}
+}
+
+#endif
 
 #ifdef CONFIG_SAE
 
@@ -1420,24 +1633,6 @@ static int sme_external_auth_send_sae_commit(struct wpa_supplicant *wpa_s,
 	return 0;
 }
 
-
-static void sme_send_external_auth_status(struct wpa_supplicant *wpa_s,
-					  u16 status)
-{
-	struct external_auth params;
-
-	wpa_s->sme.ext_auth_wpa_ssid = NULL;
-	os_memset(&params, 0, sizeof(params));
-	params.status = status;
-	params.ssid = wpa_s->sme.ext_auth_ssid;
-	params.ssid_len = wpa_s->sme.ext_auth_ssid_len;
-	params.bssid = wpa_s->sme.ext_auth_bssid;
-	if (wpa_s->conf->sae_pmkid_in_assoc && status == WLAN_STATUS_SUCCESS)
-		params.pmkid = wpa_s->sme.sae.pmkid;
-	wpa_drv_send_external_auth_status(wpa_s, &params);
-}
-
-
 static int sme_handle_external_auth_start(struct wpa_supplicant *wpa_s,
 					  union wpa_event_data *data)
 {
@@ -1534,6 +1729,28 @@ static bool is_sae_key_mgmt_suite(struct wpa_supplicant *wpa_s, u32 suite)
 void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
 			       union wpa_event_data *data)
 {
+	if (RSN_SELECTOR_GET(&data->external_auth.key_mgmt_suite) ==
+	    RSN_AUTH_KEY_MGMT_FILS_SHA256 ||
+	    RSN_SELECTOR_GET(&data->external_auth.key_mgmt_suite) ==
+	    RSN_AUTH_KEY_MGMT_FILS_SHA384 ||
+	    RSN_SELECTOR_GET(&data->external_auth.key_mgmt_suite) ==
+	    RSN_AUTH_KEY_MGMT_FT_FILS_SHA256  ||
+	    RSN_SELECTOR_GET(&data->external_auth.key_mgmt_suite) ==
+	    RSN_AUTH_KEY_MGMT_FT_FILS_SHA384) {
+		if (data->external_auth.action == EXT_AUTH_START) {
+			os_memcpy(wpa_s->sme.ext_auth_bssid, data->external_auth.bssid, ETH_ALEN);
+			os_memcpy(wpa_s->sme.ext_auth_ssid, data->external_auth.ssid,
+				  data->external_auth.ssid_len);
+			wpa_s->sme.ext_auth_ssid_len = data->external_auth.ssid_len;
+			sme_external_auth_send_fils(wpa_s, data->external_auth.bssid,
+						    data->external_auth.ssid);
+			return;
+		} else if (data->external_auth.action == EXT_AUTH_ABORT) {
+			/* Report failure to driver for the wrong trigger */
+			sme_send_external_auth_status(wpa_s,
+						      WLAN_STATUS_UNSPECIFIED_FAILURE);
+		}
+	}
 	if (!is_sae_key_mgmt_suite(wpa_s, data->external_auth.key_mgmt_suite))
 		return;
 
diff --git a/wpa_supplicant/sme.h b/wpa_supplicant/sme.h
index c797d2e9e..680ffa088 100644
--- a/wpa_supplicant/sme.h
+++ b/wpa_supplicant/sme.h
@@ -43,6 +43,8 @@ void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
 			       union wpa_event_data *data);
 void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s,
 			       const u8 *auth_frame, size_t len);
+void sme_external_auth_mgmt_rx_fils(struct wpa_supplicant *wpa_s,
+				    const u8 *auth_frame, size_t len);
 
 #else /* CONFIG_SME */
 
@@ -131,6 +133,10 @@ static inline void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s,
 					     const u8 *auth_frame, size_t len)
 {
 }
+static inline void sme_external_auth_mgmt_rx_fils(struct wpa_supplicant *wpa_s,
+						  const u8 *auth_frame, size_t len)
+{
+}
 
 #endif /* CONFIG_SME */
 
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 909a4bcfe..320eb3ecc 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -3156,7 +3156,8 @@ int wpa_is_fils_supported(struct wpa_supplicant *wpa_s)
 	return (((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
 		 (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SUPPORT_FILS)) ||
 		(!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
-		 (wpa_s->drv_flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD)));
+		 (wpa_s->drv_flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD ||
+		 wpa_s->drv_flags2 & WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH)));
 }
 
 
@@ -3368,7 +3369,8 @@ static u8 * wpas_populate_assoc_ies(
 	/* Clear FILS association */
 	wpa_sm_set_reset_fils_completed(wpa_s->wpa, 0);
 
-	if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD) &&
+	if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD||
+	    wpa_s->drv_flags2 & WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH) &&
 	    ssid->eap.erp && wpa_key_mgmt_fils(wpa_s->key_mgmt) &&
 	    eapol_sm_get_erp_info(wpa_s->eapol, &ssid->eap, &username,
 				  &username_len, &realm, &realm_len,
@@ -3387,7 +3389,8 @@ static u8 * wpas_populate_assoc_ies(
 
 		if (mask)
 			*mask |= WPA_DRV_UPDATE_FILS_ERP_INFO;
-	} else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD) &&
+	} else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD ||
+		   wpa_s->drv_flags2 & WPA_DRIVER_FLAGS_FILS_EXTERNAL_AUTH) &&
 		   ssid->eap.erp && wpa_key_mgmt_fils(wpa_s->key_mgmt) &&
 		   pmksa_cached) {
 		algs = WPA_AUTH_ALG_FILS;
-- 
2.34.1



From nico.escande at gmail.com  Fri Jul  7 06:37:18 2023
From: nico.escande at gmail.com (Nicolas Escande)
Date: Fri,  7 Jul 2023 15:37:18 +0200
Subject: [PATCH] wpa_supplicant: fix MESH-PEER-DISCONNECTED message logic on ctrl iface
Message-ID: <20230707133717.1480776-2-nico.escande@gmail.com>

When using mesh we have incoherent MESH-PEER-CONNECTED/MESH-PEER-DISCONNECTED
messages when we restart one of the devices without disconnecting it first.
Sometime we have the right behaviour, a peer disconnect and then a peer connect,
sometimes we only have a a peer connected without a peer disconnected first, and
sometimes we have nothing at all.

As the plink count seem to be correctly tracked & because we only send the
connected event on plink count increase, lets only send the peer disconnected
event on plink count decrease.

Signed-off-by: Nicolas Escande <nico.escande at gmail.com>
---
 wpa_supplicant/mesh_mpm.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index c9e14d5c2..643796672 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -561,8 +561,11 @@ static int mesh_mpm_plink_close(struct hostapd_data *hapd, struct sta_info *sta,
 	int reason = WLAN_REASON_MESH_PEERING_CANCELLED;
 
 	if (sta) {
-		if (sta->plink_state == PLINK_ESTAB)
+		if (sta->plink_state == PLINK_ESTAB) {
 			hapd->num_plinks--;
+			wpa_msg(wpa_s, MSG_INFO, MESH_PEER_DISCONNECTED MACSTR,
+				MAC2STR(sta->addr));
+		}
 		wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
 		mesh_mpm_send_plink_action(wpa_s, sta, PLINK_CLOSE, reason);
 		wpa_printf(MSG_DEBUG, "MPM closing plink sta=" MACSTR,
@@ -1428,8 +1431,13 @@ void mesh_mpm_action_rx(struct wpa_supplicant *wpa_s,
 /* called by ap_free_sta */
 void mesh_mpm_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
 {
-	if (sta->plink_state == PLINK_ESTAB)
+	struct wpa_supplicant *wpa_s = hapd->iface->owner;
+
+	if (sta->plink_state == PLINK_ESTAB) {
 		hapd->num_plinks--;
+		wpa_msg(wpa_s, MSG_INFO, MESH_PEER_DISCONNECTED MACSTR,
+			MAC2STR(sta->addr));
+	}
 	eloop_cancel_timeout(plink_timer, ELOOP_ALL_CTX, sta);
 	eloop_cancel_timeout(mesh_auth_timer, ELOOP_ALL_CTX, sta);
 }
-- 
2.41.0



From henry at e78com.com  Thu Jul 13 06:29:32 2023
From: henry at e78com.com (Henry Ptasinski)
Date: Thu, 13 Jul 2023 15:29:32 +0200
Subject: [PATCH] Fix test vector issues
Message-ID: <49847b72-0544-e4ae-271b-104436f300c9@e78com.com>

- Commit b20991da6936a1baae9f2239ee127610a6f5335d introduced errors in
   the order of arguments to the calls of ccmp_decrypt() and
   ccmp_256_decrypt().  Corrected the order of arguments.

. Includeed the PTID in the PV1 nonce construction.

- Made minor formatting changes.

Signed-off-by: Henry Ptasinski <henry at e78com.com>
---
  wlantest/ccmp.c         | 13 +++++++++----
  wlantest/test_vectors.c | 12 ++++++------
  2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/wlantest/ccmp.c b/wlantest/ccmp.c
index 894aa743b..d6594b9ca 100644
--- a/wlantest/ccmp.c
+++ b/wlantest/ccmp.c
@@ -91,7 +91,7 @@ static void ccmp_aad_nonce_pv1(const u8 *hdr, const u8 *a1, const u8 *a2,
  			       const u8 *a3, const u8 *pn,
  			       u8 *aad, size_t *aad_len, u8 *nonce)
  {
-	u16 fc, type;
+	u16 fc, type, ptid;
  	u8 *pos;
  
  	nonce[0] = BIT(5); /* PV1 */
@@ -102,6 +102,11 @@ static void ccmp_aad_nonce_pv1(const u8 *hdr, const u8 *a1, const u8 *a2,
  
  	if (type == 1)
  		nonce[0] |= 0x10; /* Management */
+	else if ((type == 0) || (type == 3)) {
+		/* QoS Data */
+		ptid = (fc & (BIT(5) | BIT(6) | BIT(7))) >> 5;
+		nonce[0] |= ptid;
+	}
  
  	fc &= ~(BIT(10) | BIT(11) | BIT(13) | BIT(14) | BIT(15));
  	fc |= BIT(12);
@@ -167,7 +172,7 @@ u8 * ccmp_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr,
  	os_memset(aad, 0, sizeof(aad));
  	ccmp_aad_nonce(hdr, data, a1, a2, a3, aad, &aad_len, nonce);
  	wpa_hexdump(MSG_EXCESSIVE, "CCMP AAD", aad, aad_len);
-	wpa_hexdump(MSG_EXCESSIVE, "CCMP nonce", nonce, 13);
+	wpa_hexdump(MSG_EXCESSIVE, "CCM Nonce", nonce, 13);
  
  	if (aes_ccm_ad(tk, 16, nonce, 8, data + 8, mlen, aad, aad_len,
  		       data + 8 + mlen, plain) < 0) {
@@ -232,7 +237,7 @@ u8 * ccmp_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen,
  	os_memset(aad, 0, sizeof(aad));
  	ccmp_aad_nonce(hdr, crypt + hdrlen, a1, a2, a3, aad, &aad_len, nonce);
  	wpa_hexdump(MSG_EXCESSIVE, "CCMP AAD", aad, aad_len);
-	wpa_hexdump(MSG_EXCESSIVE, "CCMP nonce", nonce, 13);
+	wpa_hexdump(MSG_EXCESSIVE, "CCM Nonce", nonce, 13);
  
  	if (aes_ccm_ae(tk, 16, nonce, 8, frame + hdrlen, plen, aad, aad_len,
  		       pos, pos + plen) < 0) {
@@ -274,7 +279,7 @@ u8 * ccmp_encrypt_pv1(const u8 *tk, const u8 *a1, const u8 *a2, const u8 *a3,
  	os_memset(aad, 0, sizeof(aad));
  	ccmp_aad_nonce_pv1(crypt, a1, a2, a3, pn, aad, &aad_len, nonce);
  	wpa_hexdump(MSG_EXCESSIVE, "CCMP AAD", aad, aad_len);
-	wpa_hexdump(MSG_EXCESSIVE, "CCMP nonce", nonce, sizeof(nonce));
+	wpa_hexdump(MSG_EXCESSIVE, "CCM Nonce", nonce, sizeof(nonce));
  
  	if (aes_ccm_ae(tk, 16, nonce, 8, frame + hdrlen, plen, aad, aad_len,
  		       pos, pos + plen) < 0) {
diff --git a/wlantest/test_vectors.c b/wlantest/test_vectors.c
index 3638f67b6..f2517cb8c 100644
--- a/wlantest/test_vectors.c
+++ b/wlantest/test_vectors.c
@@ -120,7 +120,7 @@ static void test_vector_ccmp(void)
  
  	wpa_debug_level = MSG_INFO;
  	plain = ccmp_decrypt(tk, (const struct ieee80211_hdr *) enc,
-			     enc + 24, NULL, NULL, NULL, enc_len - 24,
+			     NULL, NULL, NULL, enc + 24, enc_len - 24,
  			     &plain_len);
  	wpa_debug_level = MSG_EXCESSIVE;
  	os_free(enc);
@@ -200,7 +200,7 @@ static void test_vector_ccmp_pv1(void)
  	wpa_hexdump(MSG_INFO, "PN (PN0..PN5)", pn, sizeof(pn));
  
  	wpa_printf(MSG_INFO,
-		   "\nPV1 test vector #1:\nHeader compression used and A3 was previously stored at the receiver\n");
+		   "\nPV1 test vector #1:\nHeader compression used and A3 was previously stored at the receiver");
  	fc = WPA_GET_LE16(frame1);
  	wpa_printf(MSG_INFO,
  		   "FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)",
@@ -249,7 +249,7 @@ static void test_vector_ccmp_pv1(void)
  	wpa_hexdump(MSG_INFO, "Encrypted Frame FCS", fcs, sizeof(fcs));
  
  	wpa_printf(MSG_INFO,
-		   "\nPV1 test vector #2:\nHeader compression used and A3 was not previously stored at the receiver\n");
+		   "\nPV1 test vector #2:\nHeader compression used and A3 was not previously stored at the receiver");
  	fc = WPA_GET_LE16(frame2);
  	wpa_printf(MSG_INFO,
  		   "FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)",
@@ -299,7 +299,7 @@ static void test_vector_ccmp_pv1(void)
  	wpa_hexdump(MSG_INFO, "Encrypted Frame FCS", fcs, sizeof(fcs));
  
  	wpa_printf(MSG_INFO,
-		   "\nPV1 test vector #3:\nType 3 frame from SA to DA(=BSSID) (i.e., no separate DA in this example)\n");
+		   "\nPV1 test vector #3:\nType 3 frame from SA to DA(=BSSID) (i.e., no separate DA in this example)");
  	fc = WPA_GET_LE16(frame3);
  	wpa_printf(MSG_INFO,
  		   "FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)",
@@ -414,7 +414,7 @@ static void test_vector_ccmp_mgmt(void)
  
  	wpa_debug_level = MSG_INFO;
  	plain = ccmp_decrypt(tk, (const struct ieee80211_hdr *) enc,
-			     enc + 24, NULL, NULL, NULL, enc_len - 24,
+			     NULL, NULL, NULL, enc + 24, enc_len - 24,
  			     &plain_len);
  	wpa_debug_level = MSG_EXCESSIVE;
  	os_free(enc);
@@ -789,7 +789,7 @@ static int test_vector_ccmp_256(void)
  
  	wpa_debug_level = MSG_INFO;
  	plain = ccmp_256_decrypt(tk, (const struct ieee80211_hdr *) enc,
-				 enc + 24, NULL, NULL, NULL, enc_len - 24,
+				 NULL, NULL, NULL, enc + 24, enc_len - 24,
  				 &plain_len);
  	wpa_debug_level = MSG_EXCESSIVE;
  	os_free(enc);
-- 
2.39.2



From antonio.prcela at gmail.com  Mon Jul 17 00:53:32 2023
From: antonio.prcela at gmail.com (Antonio Prcela)
Date: Mon, 17 Jul 2023 09:53:32 +0200
Subject: [PATCH] hostapd: output ap_isolate for each bss when using STATUS
Message-ID: <03665670-d3fe-3bdb-f22f-52c9c930dd28@gmail.com>

>From 1091cc150031f34a4ae4a9ad227118706136c2e1 Mon Sep 17 00:00:00 2001
From: Antonio Prcela <antonio.prcela at gmail.com>
Date: Mon, 17 Jul 2023 09:51:32 +0200
Subject: [PATCH] hostapd: output ap_isolate for each bss when using STATUS

---
 src/ap/ctrl_iface_ap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
index c7504ad2b..034d791aa 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -928,13 +928,15 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
 				  "bss[%d]=%s\n"
 				  "bssid[%d]=" MACSTR "\n"
 				  "ssid[%d]=%s\n"
-				  "num_sta[%d]=%d\n",
+				  "num_sta[%d]=%d\n"
+				  "ap_isolate[%d]=%d\n",
 				  (int) i, bss->conf->iface,
 				  (int) i, MAC2STR(bss->own_addr),
 				  (int) i,
 				  wpa_ssid_txt(bss->conf->ssid.ssid,
 					       bss->conf->ssid.ssid_len),
-				  (int) i, bss->num_sta);
+				  (int) i, bss->num_sta,
+				  (int) i, bss->conf->isolate);
 		if (os_snprintf_error(buflen - len, ret))
 			return len;
 		len += ret;
-- 
2.41.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hostapd-output-ap_isolate-for-each-bss-when-using-ST.patch
Type: text/x-patch
Size: 1083 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20230717/05d30972/attachment.bin>

From chaitanya.mgit at gmail.com  Tue Jul 18 12:17:46 2023
From: chaitanya.mgit at gmail.com (Chaitanya Tata)
Date: Wed, 19 Jul 2023 00:47:46 +0530
Subject: [PATCH] Abort ongoing scan
Message-ID: <20230718191746.55060-1-Chaitanya.Tata@nordicsemi.no>

From: Chaitanya Tata <chaitanya.mgit at gmail.com>

From: Chaitanya Tata <Chaitanya.Tata at nordicsemi.no>

Along with canceling queued scan, abort ongoing scan if any, this
ensures Wi-Fi interface is in usable state after disconnect is issued,
else subsequent scan after disconnect might fail with EBUSY.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata at nordicsemi.no>
---
 wpa_supplicant/wpa_supplicant.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e0f3240e8..4dd89f829 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -8682,6 +8682,7 @@ void wpas_request_disconnection(struct wpa_supplicant *wpa_s)
 	wpa_s->disconnected = 1;
 	wpa_supplicant_cancel_sched_scan(wpa_s);
 	wpa_supplicant_cancel_scan(wpa_s);
+	wpas_abort_ongoing_scan(wpa_s);
 	wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
 	eloop_cancel_timeout(wpas_network_reenabled, wpa_s, NULL);
 	radio_remove_works(wpa_s, "connect", 0);
-- 
2.34.1



From mizo at atmark-techno.com  Tue Jul 18 22:22:26 2023
From: mizo at atmark-techno.com (Daisuke Mizobuchi)
Date: Wed, 19 Jul 2023 14:22:26 +0900
Subject: [PATCH 1/2] nl80211: Check SAE authentication offload support
In-Reply-To: <20230719052227.614859-1-mizo@atmark-techno.com>
References: <20230719052227.614859-1-mizo@atmark-techno.com>
Message-ID: <20230719052227.614859-2-mizo@atmark-techno.com>

From: Chung-Hsien Hsu <stanley.hsu at cypress.com>

Set WPA_DRIVER_FLAGS2_SAE_OFFLOAD flag if driver indicates SAE
authentication offload support.

Signed-off-by: Chung-Hsien Hsu <chung-hsien.hsu at infineon.com>
Signed-off-by: Daisuke Mizobuchi <mizo at atmark-techno.com>
---
 src/drivers/driver.h              | 2 ++
 src/drivers/driver_nl80211_capa.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 8e462c8b7..265e442bf 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2253,6 +2253,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_STA	0x0000000000002000ULL
 /** Driver supports MLO in station/AP mode */
 #define WPA_DRIVER_FLAGS2_MLO			0x0000000000004000ULL
+/** Driver supports SAE authentication offload */
+#define WPA_DRIVER_FLAGS2_SAE_OFFLOAD		0x0000000000008000ULL
 	u64 flags2;
 
 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 5e6406885..c41445599 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -600,6 +600,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
 			      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X))
 		capa->flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X;
 
+	if (ext_feature_isset(ext_features, len,
+			      NL80211_EXT_FEATURE_SAE_OFFLOAD))
+		capa->flags2 |= WPA_DRIVER_FLAGS2_SAE_OFFLOAD;
+
 	if (ext_feature_isset(ext_features, len,
 			      NL80211_EXT_FEATURE_MFP_OPTIONAL))
 		capa->flags |= WPA_DRIVER_FLAGS_MFP_OPTIONAL;
-- 
2.30.2



From mizo at atmark-techno.com  Tue Jul 18 22:22:25 2023
From: mizo at atmark-techno.com (Daisuke Mizobuchi)
Date: Wed, 19 Jul 2023 14:22:25 +0900
Subject: [PATCH 0/2] Add WPA3 support for Broadcom device
Message-ID: <20230719052227.614859-1-mizo@atmark-techno.com>

I use a Broadcom device. However, I cannot connect to the WPA3 AP.

Applying the following patch to hostap_2_10 allowed me to connect to a
WPA3 AP.
  https://community.infineon.com/t5/Wi-Fi-Bluetooth-for-Linux/Cypress-Linux-WiFi-Driver-Release-FMAC-2023-05-23/td-p/445808

Only two patches are required to use WPA3. I sent you that patch.

I have confirmed that it works as follows:
  # cat wpa_supplicant.conf 
  ctrl_interface=/var/run/wpa_supplicant
  network={
          ssid="test-ssid"
          key_mgmt=SAE
          sae_password="test-password"
          ieee80211w=2
  # wpa_supplicant -B -i wlan0 -c wpa_supplicant.conf

Chung-Hsien Hsu (2):
  nl80211: Check SAE authentication offload support
  SAE: Pass SAE password on connect for SAE authentication offload
    support

 src/drivers/driver.h              | 10 ++++++++++
 src/drivers/driver_nl80211.c      | 26 ++++++++++++++++++++++++--
 src/drivers/driver_nl80211_capa.c |  4 ++++
 wpa_supplicant/wpa_supplicant.c   | 15 ++++++++++++++-
 4 files changed, 52 insertions(+), 3 deletions(-)

-- 
2.30.2



From mizo at atmark-techno.com  Tue Jul 18 22:22:27 2023
From: mizo at atmark-techno.com (Daisuke Mizobuchi)
Date: Wed, 19 Jul 2023 14:22:27 +0900
Subject: [PATCH 2/2] SAE: Pass SAE password on connect for SAE authentication offload support
In-Reply-To: <20230719052227.614859-1-mizo@atmark-techno.com>
References: <20230719052227.614859-1-mizo@atmark-techno.com>
Message-ID: <20230719052227.614859-3-mizo@atmark-techno.com>

From: Chung-Hsien Hsu <stanley.hsu at cypress.com>

Pass SAE password on connect if driver advertises SAE authentication
offload support.

Signed-off-by: Chung-Hsien Hsu <chung-hsien.hsu at infineon.com>
Signed-off-by: Daisuke Mizobuchi <mizo at atmark-techno.com>
---
 src/drivers/driver.h            |  8 ++++++++
 src/drivers/driver_nl80211.c    | 26 ++++++++++++++++++++++++--
 wpa_supplicant/wpa_supplicant.c | 15 ++++++++++++++-
 3 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 265e442bf..76e0ca5af 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1121,6 +1121,14 @@ struct wpa_driver_associate_params {
 	 */
 	const u8 *psk;
 
+	/**
+	 * sae_password - Password for SAE authentication
+	 *
+	 * This value is made available only for WPA3-Personal (SAE) and only
+	 * for drivers that set WPA_DRIVER_FLAGS2_SAE_OFFLOAD.
+	 */
+	const char *sae_password;
+
 	/**
 	 * drop_unencrypted - Enable/disable unencrypted frame filtering
 	 *
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e4180daed..a83bfb136 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6753,8 +6753,12 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
 
 		if (params->wpa_proto & WPA_PROTO_WPA)
 			ver |= NL80211_WPA_VERSION_1;
-		if (params->wpa_proto & WPA_PROTO_RSN)
-			ver |= NL80211_WPA_VERSION_2;
+		if (params->wpa_proto & WPA_PROTO_RSN) {
+			if (params->key_mgmt_suite == WPA_KEY_MGMT_SAE)
+				ver |= NL80211_WPA_VERSION_3;
+			else
+				ver |= NL80211_WPA_VERSION_2;
+		}
 
 		wpa_printf(MSG_DEBUG, "  * WPA Versions 0x%x", ver);
 		if (nla_put_u32(msg, NL80211_ATTR_WPA_VERSIONS, ver))
@@ -6926,6 +6930,22 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
 			return -1;
 	}
 
+	/* add SAE password in case of SAE authentication offload */
+	if ((params->sae_password || params->passphrase) &&
+	    (drv->capa.flags2 & WPA_DRIVER_FLAGS2_SAE_OFFLOAD)) {
+		const char *password;
+		size_t pwd_len;
+
+		password = params->sae_password;
+		if (!password)
+			password = params->passphrase;
+		pwd_len = os_strlen(password);
+		wpa_hexdump_ascii_key(MSG_DEBUG, "  * SAE password",
+				      (u8 *) password, pwd_len);
+		if (nla_put(msg, NL80211_ATTR_SAE_PASSWORD, pwd_len, password))
+			return -1;
+	}
+
 	if (nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT))
 		return -1;
 
@@ -7044,6 +7064,8 @@ static int wpa_driver_nl80211_try_connect(
 		algs++;
 	if (params->auth_alg & WPA_AUTH_ALG_FT)
 		algs++;
+	if (params->auth_alg & WPA_AUTH_ALG_SAE)
+		algs++;
 	if (algs > 1) {
 		wpa_printf(MSG_DEBUG, "  * Leave out Auth Type for automatic "
 			   "selection");
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e0f3240e8..271cb2205 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1761,7 +1761,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
 
 	sel = ie.key_mgmt & ssid->key_mgmt;
 #ifdef CONFIG_SAE
-	if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SAE) ||
+	if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SAE) &&
+	    !(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SAE_OFFLOAD) ||
 	    wpas_is_sae_avoided(wpa_s, ssid, &ie))
 		sel &= ~(WPA_KEY_MGMT_SAE | WPA_KEY_MGMT_SAE_EXT_KEY |
 			 WPA_KEY_MGMT_FT_SAE | WPA_KEY_MGMT_FT_SAE_EXT_KEY);
@@ -4260,6 +4261,18 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
 			params.psk = psk;
 	}
 
+	if ((wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SAE_OFFLOAD) &&
+	    wpa_key_mgmt_sae(params.key_mgmt_suite)) {
+		params.auth_alg = WPA_AUTH_ALG_SAE;
+		if (ssid->sae_password)
+			params.sae_password = ssid->sae_password;
+		else if (ssid->passphrase)
+			params.passphrase = ssid->passphrase;
+
+		if (ssid->psk_set)
+			params.psk = ssid->psk;
+	}
+
 	params.drop_unencrypted = use_crypt;
 
 	params.mgmt_frame_protection = wpas_get_ssid_pmf(wpa_s, ssid);
-- 
2.30.2



From chaitanya.mgit at gmail.com  Mon Jul 17 12:51:37 2023
From: chaitanya.mgit at gmail.com (Chaitanya Tata)
Date: Tue, 18 Jul 2023 01:21:37 +0530
Subject: [PATCH] Abort ongoing scan
Message-ID: <20230717195137.145136-1-Chaitanya.Tata@nordicsemi.no>

Along with canceling queued scan, abort ongoing scan if any, this
ensures Wi-Fi interface is in usable state after disconnect is issued,
else subsequent scan after disconnect might fail with EBUSY.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata at nordicsemi.no>
---
 wpa_supplicant/wpa_supplicant.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e0f3240e8..4dd89f829 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -8682,6 +8682,7 @@ void wpas_request_disconnection(struct wpa_supplicant *wpa_s)
 	wpa_s->disconnected = 1;
 	wpa_supplicant_cancel_sched_scan(wpa_s);
 	wpa_supplicant_cancel_scan(wpa_s);
+	wpas_abort_ongoing_scan(wpa_s);
 	wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
 	eloop_cancel_timeout(wpas_network_reenabled, wpa_s, NULL);
 	radio_remove_works(wpa_s, "connect", 0);
-- 
2.34.1



From taavieomae at gmail.com  Tue Jul  4 11:42:44 2023
From: taavieomae at gmail.com (Taavi E)
Date: Tue, 4 Jul 2023 21:42:44 +0300
Subject: [PATCH] S1G: Add support for freq_khz
In-Reply-To: <20230504020031.1916556-1-gilad.itzkovitch () morsemicro ! com>
References: <20230504020031.1916556-1-gilad.itzkovitch () morsemicro ! com>
Message-ID: <7579A540-2ABB-4031-ADB5-AB7F5114116F@gmail.com>

Hi,

I?ve rebased your patch on top of latest master and went over some
of the whitespace changes. I also incorporated the very small changes made
by JUN-KYU SHIN in "[PATCH v2, 2/2] Add hw mode config for 80211ah?
which makes it a bit more complete. (But it?s definitely not yet fully complete.)

After this patch I hope that I can get hostap working with Newracom?s
NRC7292 (without the driver faking other standards/channels like it does now)
and that might result in future patches to improve 802.11ah AP(/STA) support.

Side-note, I?m not too familiar with git-email, so apologies for any mistakes.

---

This commit adds support for specifying a channel frequency in kHz
and a 802.11ah (S1G) mode

The predominate use case is S1G. Many S1G channels are centered on
frequencies which a MHz value does not support. Additional freq_khz
parameters have been added as required to the key structures that
maintain the operating parameters of a hostapd AP. These freq_khz
params have been added to key functions alongside the traditional freq
parameter as an alternative.

The extent of this commit is the support of core BSS functionality using
freq_khz. It is intended that several follow up commits will make use of
this concept to support more advanced features.

Because this commit has introduced an alternative parameter that is used
instead of the traditional freq param we needed to introduce logic that
would support this change. We opted for logic that checks if freq_khz is
set, and if so, uses that parameter going forward, otherwise if freq_khz
is not set, freq is used as per the existing use case.
This approach prevents regression for existing code.

The kernel maintains frequencies by using a combination of freq and
freq_offset parameters. This patch includes a number of changes to support
this concept.

Signed-off-by: Taavi Eom?e <taavi.eomae at gmail.com>
Signed-off-by: Gilad Itzkovitch <gilad.itzkovitch at morsemicro.com>
Signed-off-by: JUN-KYU SHIN <jk.shin at newratek.com>
---
 hostapd/config_file.c              |  2 ++
 src/ap/ap_drv_ops.c                |  9 ++++--
 src/ap/ap_drv_ops.h                |  3 +-
 src/ap/beacon.c                    |  1 +
 src/ap/ctrl_iface_ap.c             |  2 ++
 src/ap/dfs.c                       |  9 ++++--
 src/ap/drv_callbacks.c             | 10 ++++---
 src/ap/hostapd.c                   | 12 ++++----
 src/ap/hostapd.h                   | 10 +++++--
 src/ap/hw_features.c               | 46 ++++++++++++++++++------------
 src/ap/hw_features.h               |  2 +-
 src/common/defs.h                  |  7 +++++
 src/common/hw_features_common.c    | 25 ++++++++++------
 src/common/hw_features_common.h    | 13 +++++----
 src/common/ieee802_11_common.c     | 12 ++++++++
 src/common/ieee802_11_common.h     |  1 +
 src/drivers/driver.h               | 14 +++++++++
 src/drivers/driver_nl80211.c       | 23 +++++++++++++--
 src/drivers/driver_nl80211_capa.c  | 12 +++++++-
 src/drivers/driver_nl80211_event.c | 17 ++++++++---
 wpa_supplicant/ap.c                | 13 +++++----
 wpa_supplicant/ap.h                |  4 +--
 wpa_supplicant/config_ssid.h       |  5 ++++
 wpa_supplicant/events.c            |  1 +
 wpa_supplicant/mesh.c              |  1 +
 wpa_supplicant/wpa_supplicant.c    |  3 +-
 wpa_supplicant/wpa_supplicant_i.h  |  1 +
 27 files changed, 193 insertions(+), 65 deletions(-)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 412ca8a9f..5b87643c7 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3101,6 +3101,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
 			conf->hw_mode = HOSTAPD_MODE_IEEE80211G;
 		else if (os_strcmp(pos, "ad") == 0)
 			conf->hw_mode = HOSTAPD_MODE_IEEE80211AD;
+		else if (os_strcmp(pos, "ah") == 0)
+			conf->hw_mode = HOSTAPD_MODE_IEEE80211AH;
 		else if (os_strcmp(pos, "any") == 0)
 			conf->hw_mode = HOSTAPD_MODE_IEEE80211ANY;
 		else {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 8f9cc5b36..09dd6daca 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -571,7 +571,8 @@ int hostapd_flush(struct hostapd_data *hapd)
 
 
 int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode,
-		     int freq, int channel, int edmg, u8 edmg_channel,
+		     int freq, int freq_khz, int channel,
+		     int edmg, u8 edmg_channel,
 		     int ht_enabled, int vht_enabled,
 		     int he_enabled, bool eht_enabled,
 		     int sec_channel_offset, int oper_chwidth,
@@ -580,7 +581,9 @@ int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode,
 	struct hostapd_freq_params data;
 	struct hostapd_hw_modes *cmode = hapd->iface->current_mode;
 
-	if (hostapd_set_freq_params(&data, mode, freq, channel, edmg,
+
+	if (hostapd_set_freq_params(&data, mode, freq, freq_khz,
+				    channel, edmg,
 				    edmg_channel, ht_enabled,
 				    vht_enabled, he_enabled, eht_enabled,
 				    sec_channel_offset, oper_chwidth,
@@ -899,7 +902,7 @@ int hostapd_start_dfs_cac(struct hostapd_iface *iface,
 		return -1;
 	}
 
-	if (hostapd_set_freq_params(&data, mode, freq, channel, 0, 0,
+	if (hostapd_set_freq_params(&data, mode, freq, 0, channel, 0, 0,
 				    ht_enabled,
 				    vht_enabled, he_enabled, eht_enabled,
 				    sec_channel_offset,
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
index 331b0eaf4..11efa5fbf 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -65,7 +65,8 @@ int hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd,
 		       const u8 *addr, int idx, int link_id, u8 *seq);
 int hostapd_flush(struct hostapd_data *hapd);
 int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode,
-		     int freq, int channel, int edmg, u8 edmg_channel,
+		     int freq, int freq_khz, int channel,
+		     int edmg, u8 edmg_channel,
 		     int ht_enabled, int vht_enabled, int he_enabled,
 		     bool eht_enabled, int sec_channel_offset, int oper_chwidth,
 		     int center_segment0, int center_segment1);
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 32c143a2b..6b15eb1ef 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -2163,6 +2163,7 @@ static int __ieee802_11_set_beacon(struct hostapd_data *hapd)
 
 	if (cmode &&
 	    hostapd_set_freq_params(&freq, iconf->hw_mode, iface->freq,
+				    iface->freq_khz,
 				    iconf->channel, iconf->enable_edmg,
 				    iconf->edmg_channel, iconf->ieee80211n,
 				    iconf->ieee80211ac, iconf->ieee80211ax,
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
index c7504ad2b..df7bc99e9 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -223,6 +223,8 @@ static const char * hw_mode_str(enum hostapd_hw_mode mode)
 		return "a";
 	case HOSTAPD_MODE_IEEE80211AD:
 		return "ad";
+	case HOSTAPD_MODE_IEEE80211AH:
+		return "ah";
 	case HOSTAPD_MODE_IEEE80211ANY:
 		return "any";
 	case NUM_HOSTAPD_MODES:
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index e8c5ec9ac..2e275de7e 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -826,6 +826,9 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
 	if (is_6ghz_freq(iface->freq))
 		return 1;
 
+	if (is_s1g_freq(iface->freq_khz))
+		return 1;
+
 	if (!iface->current_mode) {
 		/*
 		 * This can happen with drivers that do not provide mode
@@ -955,6 +958,7 @@ int hostapd_is_dfs_chan_available(struct hostapd_iface *iface)
 
 static int hostapd_dfs_request_channel_switch(struct hostapd_iface *iface,
 					      int channel, int freq,
+					      int freq_khz,
 					      int secondary_channel,
 					      u8 current_vht_oper_chwidth,
 					      u8 oper_centr_freq_seg0_idx,
@@ -984,7 +988,7 @@ static int hostapd_dfs_request_channel_switch(struct hostapd_iface *iface,
 #endif /* CONFIG_MESH */
 	err = hostapd_set_freq_params(&csa_settings.freq_params,
 				      iface->conf->hw_mode,
-				      freq, channel,
+				      freq, freq_khz, channel,
 				      iface->conf->enable_edmg,
 				      iface->conf->edmg_channel,
 				      iface->conf->ieee80211n,
@@ -1117,7 +1121,7 @@ hostapd_dfs_start_channel_switch_background(struct hostapd_iface *iface)
 	hostpad_dfs_update_background_chain(iface);
 
 	return hostapd_dfs_request_channel_switch(
-		iface, iface->conf->channel, iface->freq,
+		iface, iface->conf->channel, iface->freq, 0,
 		iface->conf->secondary_channel, current_vht_oper_chwidth,
 		hostapd_get_oper_centr_freq_seg0_idx(iface->conf),
 		hostapd_get_oper_centr_freq_seg1_idx(iface->conf));
@@ -1409,6 +1413,7 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
 
 	return hostapd_dfs_request_channel_switch(iface, channel->chan,
 						  channel->freq,
+						  channel->freq_khz,
 						  secondary_channel,
 						  current_vht_oper_chwidth,
 						  oper_centr_freq_seg0_idx,
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 4d765dcb1..3a2e44031 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -857,8 +857,8 @@ void hostapd_event_sta_opmode_changed(struct hostapd_data *hapd, const u8 *addr,
 }
 
 
-void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
-			     int offset, int width, int cf1, int cf2,
+void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int freq_khz,
+			     int ht, int offset, int width, int cf1, int cf2,
 			     u16 punct_bitmap, int finished)
 {
 #ifdef NEED_AP_MLME
@@ -888,7 +888,7 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
 	is_dfs0 = hostapd_is_dfs_required(hapd->iface);
 	hapd->iface->freq = freq;
 
-	channel = hostapd_hw_get_channel(hapd, freq);
+	channel = hostapd_hw_get_channel(hapd, freq, freq_khz);
 	if (!channel) {
 		hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
 			       HOSTAPD_LEVEL_WARNING,
@@ -1111,6 +1111,7 @@ void hostapd_acs_channel_selected(struct hostapd_data *hapd,
 				if (hapd->iface->freq > 0 &&
 				    !hw_get_chan(mode->mode,
 						 hapd->iface->freq,
+						 hapd->iface->freq_khz,
 						 hapd->iface->hw_features,
 						 hapd->iface->num_hw_features))
 					continue;
@@ -1135,7 +1136,7 @@ void hostapd_acs_channel_selected(struct hostapd_data *hapd,
 		goto out;
 	}
 	pri_chan = hw_get_channel_freq(hapd->iface->current_mode->mode,
-				       acs_res->pri_freq, NULL,
+				       acs_res->pri_freq, 0, NULL,
 				       hapd->iface->hw_features,
 				       hapd->iface->num_hw_features);
 	if (!pri_chan) {
@@ -2133,6 +2134,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 		if (!data)
 			break;
 		hostapd_event_ch_switch(hapd, data->ch_switch.freq,
+					data->ch_switch.freq_khz,
 					data->ch_switch.ht_enabled,
 					data->ch_switch.ch_offset,
 					data->ch_switch.ch_width,
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 99d10bea9..8702d0716 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -1672,7 +1672,7 @@ static int hostapd_no_ir_channel_list_updated(struct hostapd_iface *iface,
 
 		if (mode->mode == iface->conf->hw_mode) {
 			if (iface->freq > 0 &&
-			    !hw_mode_get_channel(mode, iface->freq, NULL)) {
+			    !hw_mode_get_channel(mode, iface->freq, 0, NULL)) {
 				mode = NULL;
 				continue;
 			}
@@ -1698,7 +1698,7 @@ static int hostapd_no_ir_channel_list_updated(struct hostapd_iface *iface,
 			struct hostapd_channel_data *chan;
 
 			chan = hw_get_channel_freq(iface->current_mode->mode,
-						   iface->freq, NULL,
+						   iface->freq, 0, NULL,
 						   iface->hw_features,
 						   iface->num_hw_features);
 
@@ -1733,7 +1733,7 @@ static int hostapd_no_ir_channel_list_updated(struct hostapd_iface *iface,
 			struct hostapd_channel_data *chan;
 
 			chan = hw_get_channel_freq(iface->current_mode->mode,
-						   iface->freq, NULL,
+						   iface->freq, 0, NULL,
 						   iface->hw_features,
 						   iface->num_hw_features);
 			if (!chan) {
@@ -2326,7 +2326,8 @@ static int hostapd_setup_interface_complete_sync(struct hostapd_iface *iface,
 #endif /* CONFIG_MESH */
 
 		if (!delay_apply_cfg &&
-		    hostapd_set_freq(hapd, hapd->iconf->hw_mode, iface->freq,
+		    hostapd_set_freq(hapd, hapd->iconf->hw_mode,
+				     iface->freq, iface->freq_khz,
 				     hapd->iconf->channel,
 				     hapd->iconf->enable_edmg,
 				     hapd->iconf->edmg_channel,
@@ -3769,7 +3770,7 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
 
 	if (!params->channel) {
 		/* check if the new channel is supported by hw */
-		params->channel = hostapd_hw_get_channel(hapd, params->freq);
+		params->channel = hostapd_hw_get_channel(hapd, params->freq, 0);
 	}
 
 	channel = params->channel;
@@ -3783,6 +3784,7 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
 	if (old_params &&
 	    hostapd_set_freq_params(old_params, conf->hw_mode,
 				    hostapd_hw_get_freq(hapd, conf->channel),
+				    0,
 				    conf->channel, conf->enable_edmg,
 				    conf->edmg_channel, conf->ieee80211n,
 				    conf->ieee80211ac, conf->ieee80211ax,
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index 6e0ce3dea..aadfc704f 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -561,6 +561,12 @@ struct hostapd_iface {
 	struct hostapd_rate_data *current_rates;
 	int *basic_rates;
 	int freq;
+	/*
+	 * freq_khz was added to support S1G frequencies.
+	 * This variable could be use in other modes of operation.
+	 * However, this is not currently supported.
+	 */
+	int freq_khz;
 
 	/* Background radar configuration */
 	struct {
@@ -738,8 +744,8 @@ void hostapd_event_connect_failed_reason(struct hostapd_data *hapd,
 int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
 			 const u8 *bssid, const u8 *ie, size_t ie_len,
 			 int ssi_signal);
-void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
-			     int offset, int width, int cf1, int cf2,
+void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int freq_khz,
+			     int ht, int offset, int width, int cf1, int cf2,
 			     u16 punct_bitmap, int finished);
 struct survey_results;
 void hostapd_event_get_survey(struct hostapd_iface *iface,
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 7d899f50d..7726b6afe 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -235,11 +235,11 @@ static int ieee80211n_allowed_ht40_channel_pair(struct hostapd_iface *iface)
 	if (!iface->current_mode)
 		return 0;
 
-	p_chan = hw_get_channel_freq(iface->current_mode->mode, pri_freq, NULL,
+	p_chan = hw_get_channel_freq(iface->current_mode->mode, pri_freq, 0, NULL,
 				     iface->hw_features,
 				     iface->num_hw_features);
 
-	s_chan = hw_get_channel_freq(iface->current_mode->mode, sec_freq, NULL,
+	s_chan = hw_get_channel_freq(iface->current_mode->mode, sec_freq, 0, NULL,
 				     iface->hw_features,
 				     iface->num_hw_features);
 
@@ -274,10 +274,10 @@ static int ieee80211n_check_40mhz_5g(struct hostapd_iface *iface,
 
 	if (!iface->current_mode)
 		return 0;
-	pri_chan = hw_get_channel_freq(iface->current_mode->mode, pri_freq,
+	pri_chan = hw_get_channel_freq(iface->current_mode->mode, pri_freq, 0,
 				       NULL, iface->hw_features,
 				       iface->num_hw_features);
-	sec_chan = hw_get_channel_freq(iface->current_mode->mode, sec_freq,
+	sec_chan = hw_get_channel_freq(iface->current_mode->mode, sec_freq, 0,
 				       NULL, iface->hw_features,
 				       iface->num_hw_features);
 
@@ -800,15 +800,16 @@ int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface)
  * -1 = not currently usable due to 6 GHz NO-IR
  */
 static int hostapd_is_usable_chan(struct hostapd_iface *iface,
-				  int frequency, int primary)
+				  int frequency, int frequency_khz, int primary)
 {
 	struct hostapd_channel_data *chan;
 
 	if (!iface->current_mode)
 		return 0;
 
-	chan = hw_get_channel_freq(iface->current_mode->mode, frequency, NULL,
-				   iface->hw_features, iface->num_hw_features);
+	chan = hw_get_channel_freq(iface->current_mode->mode, frequency,
+				   frequency_khz, NULL, iface->hw_features,
+				   iface->num_hw_features);
 	if (!chan)
 		return 0;
 
@@ -818,7 +819,8 @@ static int hostapd_is_usable_chan(struct hostapd_iface *iface,
 
 	wpa_printf(MSG_INFO,
 		   "Frequency %d (%s) not allowed for AP mode, flags: 0x%x%s%s",
-		   frequency, primary ? "primary" : "secondary",
+		   frequency_khz ? frequency_khz : frequency,
+		   primary ? "primary" : "secondary",
 		   chan->flag,
 		   chan->flag & HOSTAPD_CHAN_NO_IR ? " NO-IR" : "",
 		   chan->flag & HOSTAPD_CHAN_RADAR ? " RADAR" : "");
@@ -845,7 +847,7 @@ static int hostapd_is_usable_edmg(struct hostapd_iface *iface)
 	if (!iface->current_mode)
 		return 0;
 	pri_chan = hw_get_channel_freq(iface->current_mode->mode,
-				       iface->freq, NULL,
+				       iface->freq, iface->freq_khz, NULL,
 				       iface->hw_features,
 				       iface->num_hw_features);
 	if (!pri_chan)
@@ -875,7 +877,7 @@ static int hostapd_is_usable_edmg(struct hostapd_iface *iface)
 		if (num_of_enabled > 4)
 			return 0;
 
-		err = hostapd_is_usable_chan(iface, freq, 1);
+		err = hostapd_is_usable_chan(iface, freq, 0, 1);
 		if (err <= 0)
 			return err;
 
@@ -967,7 +969,8 @@ static int hostapd_is_usable_chans(struct hostapd_iface *iface)
 	if (!iface->current_mode)
 		return 0;
 	pri_chan = hw_get_channel_freq(iface->current_mode->mode,
-				       iface->freq, NULL,
+				       iface->freq,
+				       iface->freq_khz, NULL,
 				       iface->hw_features,
 				       iface->num_hw_features);
 	if (!pri_chan) {
@@ -975,7 +978,9 @@ static int hostapd_is_usable_chans(struct hostapd_iface *iface)
 		return 0;
 	}
 
-	err = hostapd_is_usable_chan(iface, pri_chan->freq, 1);
+	err = hostapd_is_usable_chan(iface, pri_chan->freq,
+				       pri_chan->freq_khz,
+				       pri_chan->freq_khz ? 0 : 1);
 	if (err <= 0) {
 		wpa_printf(MSG_ERROR, "Primary frequency not allowed");
 		return err;
@@ -991,7 +996,7 @@ static int hostapd_is_usable_chans(struct hostapd_iface *iface)
 		return 1;
 
 	err = hostapd_is_usable_chan(iface, iface->freq +
-				     iface->conf->secondary_channel * 20, 0);
+				     iface->conf->secondary_channel * 20, 0, 0);
 	if (err > 0) {
 		if (iface->conf->secondary_channel == 1 &&
 		    (pri_chan->allowed_bw & HOSTAPD_CHAN_WIDTH_40P))
@@ -1005,14 +1010,14 @@ static int hostapd_is_usable_chans(struct hostapd_iface *iface)
 
 	/* Both HT40+ and HT40- are set, pick a valid secondary channel */
 	secondary_freq = iface->freq + 20;
-	err = hostapd_is_usable_chan(iface, secondary_freq, 0);
+	err = hostapd_is_usable_chan(iface, secondary_freq, 0, 0);
 	if (err > 0 && (pri_chan->allowed_bw & HOSTAPD_CHAN_WIDTH_40P)) {
 		iface->conf->secondary_channel = 1;
 		return 1;
 	}
 
 	secondary_freq = iface->freq - 20;
-	err = hostapd_is_usable_chan(iface, secondary_freq, 0);
+	err = hostapd_is_usable_chan(iface, secondary_freq, 0, 0);
 	if (err > 0 && (pri_chan->allowed_bw & HOSTAPD_CHAN_WIDTH_40M)) {
 		iface->conf->secondary_channel = -1;
 		return 1;
@@ -1027,7 +1032,8 @@ static bool skip_mode(struct hostapd_iface *iface,
 {
 	int chan;
 
-	if (iface->freq > 0 && !hw_mode_get_channel(mode, iface->freq, &chan))
+	if ((iface->freq > 0 || iface->freq_khz > 0) &&
+	     !hw_mode_get_channel(mode, iface->freq, iface->freq_khz, &chan))
 		return true;
 
 	if (is_6ghz_op_class(iface->conf->op_class) && iface->freq == 0 &&
@@ -1078,7 +1084,7 @@ void hostapd_determine_mode(struct hostapd_iface *iface)
 static enum hostapd_chan_status
 hostapd_check_chans(struct hostapd_iface *iface)
 {
-	if (iface->freq) {
+	if (iface->freq || iface->freq_khz) {
 		int err;
 
 		hostapd_determine_mode(iface);
@@ -1194,6 +1200,7 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface)
 	if ((iface->conf->hw_mode == HOSTAPD_MODE_IEEE80211G ||
 	     iface->conf->ieee80211n || iface->conf->ieee80211ac ||
 	     iface->conf->ieee80211ax || iface->conf->ieee80211be) &&
+	     iface->conf->hw_mode != HOSTAPD_MODE_IEEE80211AH &&
 	    iface->conf->channel == 14) {
 		wpa_printf(MSG_INFO, "Disable OFDM/HT/VHT/HE/EHT on channel 14");
 		iface->conf->hw_mode = HOSTAPD_MODE_IEEE80211B;
@@ -1277,13 +1284,14 @@ int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
 }
 
 
-int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq)
+int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq, int freq_khz)
 {
 	int i, channel;
 	struct hostapd_hw_modes *mode;
 
 	if (hapd->iface->current_mode) {
 		channel = hw_get_chan(hapd->iface->current_mode->mode, freq,
+				      freq_khz,
 				      hapd->iface->hw_features,
 				      hapd->iface->num_hw_features);
 		if (channel)
@@ -1296,7 +1304,7 @@ int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq)
 		return 0;
 	for (i = 0; i < hapd->iface->num_hw_features; i++) {
 		mode = &hapd->iface->hw_features[i];
-		channel = hw_get_chan(mode->mode, freq,
+		channel = hw_get_chan(mode->mode, freq, freq_khz,
 				      hapd->iface->hw_features,
 				      hapd->iface->num_hw_features);
 		if (channel)
diff --git a/src/ap/hw_features.h b/src/ap/hw_features.h
index 092941f77..b5fc3d5d2 100644
--- a/src/ap/hw_features.h
+++ b/src/ap/hw_features.h
@@ -19,7 +19,7 @@ int hostapd_acs_completed(struct hostapd_iface *iface, int err);
 int hostapd_select_hw_mode(struct hostapd_iface *iface);
 const char * hostapd_hw_mode_txt(int mode);
 int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
-int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
+int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq, int freq_khz);
 int hostapd_check_ht_capab(struct hostapd_iface *iface);
 int hostapd_check_edmg_capab(struct hostapd_iface *iface);
 int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface);
diff --git a/src/common/defs.h b/src/common/defs.h
index c0c6dbe84..78d9e60e2 100644
--- a/src/common/defs.h
+++ b/src/common/defs.h
@@ -376,6 +376,7 @@ enum hostapd_hw_mode {
 	HOSTAPD_MODE_IEEE80211G,
 	HOSTAPD_MODE_IEEE80211A,
 	HOSTAPD_MODE_IEEE80211AD,
+	HOSTAPD_MODE_IEEE80211AH,
 	HOSTAPD_MODE_IEEE80211ANY,
 	NUM_HOSTAPD_MODES
 };
@@ -529,4 +530,10 @@ enum sae_pwe {
 	SAE_PWE_NOT_SET = 4,
 };
 
+#define MHZ_TO_KHZ(x) ((x) * 1000)
+#define KHZ_TO_MHZ(x) ((x) / 1000)
+#define KHZ_TO_S1G_OFFSET(x) ((x) % 1000)
+/* If x (freq_khz) is 0 then print "MHz" else print "kHz" */
+#define KHZ_PRINT_FREQ_UNITS(x) (x) == 0 ? "MHz" : "kHz"
+
 #endif /* DEFS_H */
diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
index 584c6d275..3f2255a3d 100644
--- a/src/common/hw_features_common.c
+++ b/src/common/hw_features_common.c
@@ -41,14 +41,18 @@ struct hostapd_channel_data * hw_get_channel_chan(struct hostapd_hw_modes *mode,
 
 
 struct hostapd_channel_data *
-hw_mode_get_channel(struct hostapd_hw_modes *mode, int freq, int *chan)
+hw_mode_get_channel(struct hostapd_hw_modes *mode, int freq,
+						  int freq_khz, int *chan)
 {
 	int i;
 
 	for (i = 0; i < mode->num_channels; i++) {
 		struct hostapd_channel_data *ch = &mode->channels[i];
 
-		if (ch->freq == freq) {
+		if (freq_khz && (ch->freq_khz == freq_khz)) {
+			return ch;
+		}
+		if (freq && (ch->freq == freq)) {
 			if (chan)
 				*chan = ch->chan;
 			return ch;
@@ -60,8 +64,9 @@ hw_mode_get_channel(struct hostapd_hw_modes *mode, int freq, int *chan)
 
 
 struct hostapd_channel_data *
-hw_get_channel_freq(enum hostapd_hw_mode mode, int freq, int *chan,
-		    struct hostapd_hw_modes *hw_features, int num_hw_features)
+hw_get_channel_freq(enum hostapd_hw_mode mode, int freq, int freq_khz,
+		    int *chan, struct hostapd_hw_modes *hw_features,
+		    int num_hw_features)
 {
 	struct hostapd_channel_data *chan_data;
 	int i;
@@ -78,7 +83,8 @@ hw_get_channel_freq(enum hostapd_hw_mode mode, int freq, int *chan,
 		if (curr_mode->mode != mode)
 			continue;
 
-		chan_data = hw_mode_get_channel(curr_mode, freq, chan);
+		chan_data = hw_mode_get_channel(curr_mode, freq,
+			   freq_khz, chan);
 		if (chan_data)
 			return chan_data;
 	}
@@ -97,12 +103,13 @@ int hw_get_freq(struct hostapd_hw_modes *mode, int chan)
 }
 
 
-int hw_get_chan(enum hostapd_hw_mode mode, int freq,
+int hw_get_chan(enum hostapd_hw_mode mode, int freq, int freq_khz,
 		struct hostapd_hw_modes *hw_features, int num_hw_features)
 {
 	int chan;
 
-	hw_get_channel_freq(mode, freq, &chan, hw_features, num_hw_features);
+	hw_get_channel_freq(mode, freq, freq_khz, &chan, hw_features,
+			   num_hw_features);
 
 	return chan;
 }
@@ -380,7 +387,8 @@ int check_40mhz_2g4(struct hostapd_hw_modes *mode,
 
 int hostapd_set_freq_params(struct hostapd_freq_params *data,
 			    enum hostapd_hw_mode mode,
-			    int freq, int channel, int enable_edmg,
+			    int freq, int freq_khz,
+			    int channel, int enable_edmg,
 			    u8 edmg_channel, int ht_enabled,
 			    int vht_enabled, int he_enabled,
 			    bool eht_enabled, int sec_channel_offset,
@@ -397,6 +405,7 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
 	os_memset(data, 0, sizeof(*data));
 	data->mode = mode;
 	data->freq = freq;
+	data->freq_khz = freq_khz;
 	data->channel = channel;
 	data->ht_enabled = ht_enabled;
 	data->vht_enabled = vht_enabled;
diff --git a/src/common/hw_features_common.h b/src/common/hw_features_common.h
index 82e028238..5402fd970 100644
--- a/src/common/hw_features_common.h
+++ b/src/common/hw_features_common.h
@@ -15,14 +15,16 @@
 struct hostapd_channel_data * hw_get_channel_chan(struct hostapd_hw_modes *mode,
 						  int chan, int *freq);
 struct hostapd_channel_data *
-hw_mode_get_channel(struct hostapd_hw_modes *mode, int freq, int *chan);
+hw_mode_get_channel(struct hostapd_hw_modes *mode, int freq,
+		    int freq_khz, int *chan);
 
 struct hostapd_channel_data *
-hw_get_channel_freq(enum hostapd_hw_mode mode, int freq, int *chan,
-		    struct hostapd_hw_modes *hw_features, int num_hw_features);
+hw_get_channel_freq(enum hostapd_hw_mode mode, int freq, int freq_khz,
+		    int *chan, struct hostapd_hw_modes *hw_features,
+		    int num_hw_features);
 
 int hw_get_freq(struct hostapd_hw_modes *mode, int chan);
-int hw_get_chan(enum hostapd_hw_mode mode, int freq,
+int hw_get_chan(enum hostapd_hw_mode mode, int freq, int freq_khz,
 		struct hostapd_hw_modes *hw_features, int num_hw_features);
 
 int allowed_ht40_channel_pair(enum hostapd_hw_mode mode,
@@ -37,7 +39,8 @@ int check_40mhz_2g4(struct hostapd_hw_modes *mode,
 		    int sec_chan);
 int hostapd_set_freq_params(struct hostapd_freq_params *data,
 			    enum hostapd_hw_mode mode,
-			    int freq, int channel, int edmg, u8 edmg_channel,
+			    int freq, int freq_khz,
+			    int channel, int edmg, u8 edmg_channel,
 			    int ht_enabled,
 			    int vht_enabled, int he_enabled,
 			    bool eht_enabled, int sec_channel_offset,
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index a8f16b3d1..4f064e2dc 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -1372,6 +1372,9 @@ ieee80211_freq_to_channel_ext(unsigned int freq, int sec_channel,
 
 	/* TODO: more operating classes */
 
+	if (is_s1g_freq(MHZ_TO_KHZ(freq)))
+		return HOSTAPD_MODE_IEEE80211AH;
+
 	if (sec_channel > 1 || sec_channel < -1)
 		return NUM_HOSTAPD_MODES;
 
@@ -2433,6 +2436,7 @@ static enum phy_type ieee80211_phy_type_by_freq(int freq)
 
 	switch (hw_mode) {
 	case HOSTAPD_MODE_IEEE80211A:
+	case HOSTAPD_MODE_IEEE80211AH:
 		return PHY_TYPE_OFDM;
 	case HOSTAPD_MODE_IEEE80211B:
 		return PHY_TYPE_HRDSSS;
@@ -2823,6 +2827,14 @@ int get_6ghz_sec_channel(int channel)
 	return 1;
 }
 
+bool is_s1g_freq(int freq_khz)
+{
+	if (freq_khz < 1000000 && freq_khz > 0)
+		return true;
+
+	return false;
+}
+
 
 int ieee802_11_parse_candidate_list(const char *pos, u8 *nei_rep,
 				    size_t nei_rep_len)
diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h
index 785fe608a..811ae3699 100644
--- a/src/common/ieee802_11_common.h
+++ b/src/common/ieee802_11_common.h
@@ -280,6 +280,7 @@ bool is_6ghz_freq(int freq);
 bool is_6ghz_op_class(u8 op_class);
 bool is_6ghz_psc_frequency(int freq);
 int get_6ghz_sec_channel(int channel);
+bool is_s1g_freq(int freq_khz);
 
 int ieee802_11_parse_candidate_list(const char *pos, u8 *nei_rep,
 				    size_t nei_rep_len);
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 8e462c8b7..8236f4ebd 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -119,6 +119,11 @@ struct hostapd_channel_data {
 	 */
 	int freq;
 
+	/**
+	 * freq_khz - Frequency in kHz
+	 */
+	int freq_khz;
+
 	/**
 	 * flag - Channel flags (HOSTAPD_CHAN_*)
 	 */
@@ -778,6 +783,11 @@ struct hostapd_freq_params {
 	 */
 	int freq;
 
+	/**
+	 * freq_khz - Primary channel center frequency in kHz
+	 */
+	int freq_khz;
+
 	/**
 	 * channel - Channel number
 	 */
@@ -6422,6 +6432,7 @@ union wpa_event_data {
 	/**
 	 * struct ch_switch
 	 * @freq: Frequency of new channel in MHz
+	 * @freq_khz: Frequency of new channel in kHz
 	 * @ht_enabled: Whether this is an HT channel
 	 * @ch_offset: Secondary channel offset
 	 * @ch_width: Channel width
@@ -6432,6 +6443,7 @@ union wpa_event_data {
 	 */
 	struct ch_switch {
 		int freq;
+		int freq_khz;
 		int ht_enabled;
 		int ch_offset;
 		enum chan_width ch_width;
@@ -6515,6 +6527,7 @@ union wpa_event_data {
 	/**
 	 * struct acs_selected_channels - Data for EVENT_ACS_CHANNEL_SELECTED
 	 * @pri_freq: Selected primary frequency
+	 * @pri_freq_khz: Selected primary frequency in kHz
 	 * @sec_freq: Selected secondary frequency
 	 * @edmg_channel: Selected EDMG channel
 	 * @vht_seg0_center_ch: VHT mode Segment0 center channel
@@ -6534,6 +6547,7 @@ union wpa_event_data {
 	 */
 	struct acs_selected_channels {
 		unsigned int pri_freq;
+		unsigned int pri_freq_khz;
 		unsigned int sec_freq;
 		u8 edmg_channel;
 		u8 vht_seg0_center_ch;
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e4180daed..f99af8747 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4862,8 +4862,19 @@ static int nl80211_put_freq_params(struct nl_msg *msg,
 	u8 channel;
 
 	wpa_printf(MSG_DEBUG, "  * freq=%d", freq->freq);
-	if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq->freq))
-		return -ENOBUFS;
+	if (is_s1g_freq(freq->freq_khz)) {
+		if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ,
+			KHZ_TO_MHZ(freq->freq_khz)))
+				return -ENOBUFS;
+		wpa_printf(MSG_DEBUG, "  * freq_offset=%d",
+		KHZ_TO_S1G_OFFSET(freq->freq_khz));
+		if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ_OFFSET,
+			KHZ_TO_S1G_OFFSET(freq->freq_khz)))
+			return -ENOBUFS;
+		} else {
+			if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq->freq))
+				return -ENOBUFS;
+	}
 
 	wpa_printf(MSG_DEBUG, "  * eht_enabled=%d", freq->eht_enabled);
 	wpa_printf(MSG_DEBUG, "  * he_enabled=%d", freq->he_enabled);
@@ -5027,6 +5038,14 @@ static int wpa_driver_nl80211_set_ap(void *priv,
 	    nla_put(msg, NL80211_ATTR_SSID, params->ssid_len, params->ssid))
 		goto fail;
 
+	if (is_s1g_freq(params->freq->freq_khz)) {
+		if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ,
+			       KHZ_TO_MHZ(params->freq->freq_khz)) ||
+			       nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ_OFFSET,
+			       KHZ_TO_S1G_OFFSET(params->freq->freq_khz)))
+			goto fail;
+	}
+
 	if (params->mld_ap) {
 		wpa_printf(MSG_DEBUG, "nl80211: link_id=%u",
 			   params->mld_link_id);
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 5e6406885..d974c8c27 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1652,6 +1652,8 @@ static void phy_info_freq(struct hostapd_hw_modes *mode,
 
 	os_memset(chan, 0, sizeof(*chan));
 	chan->freq = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_FREQ]);
+	chan->freq_khz = MHZ_TO_KHZ(chan->freq) +
+	nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_OFFSET]);
 	chan->flag = 0;
 	chan->allowed_bw = ~0;
 	chan->dfs_cac_ms = 0;
@@ -2134,7 +2136,10 @@ wpa_driver_nl80211_postprocess_modes(struct hostapd_hw_modes *modes,
 	for (m = 0; m < *num_modes; m++) {
 		if (!modes[m].num_channels)
 			continue;
-		if (modes[m].channels[0].freq < 2000) {
+		if (modes[m].channels[0].freq_khz < 1000000 &&
+			modes[m].channels[0].freq_khz > 0){
+			modes[m].mode = HOSTAPD_MODE_IEEE80211AH;
+		} else if (modes[m].channels[0].freq < 2000) {
 			modes[m].num_channels = 0;
 			continue;
 		} else if (modes[m].channels[0].freq < 4000) {
@@ -2177,6 +2182,9 @@ wpa_driver_nl80211_postprocess_modes(struct hostapd_hw_modes *modes,
 			return modes; /* 802.11b already included */
 		if (modes[m].mode == HOSTAPD_MODE_IEEE80211G)
 			mode11g_idx = m;
+		if (modes[m].mode == HOSTAPD_MODE_IEEE80211AH) {
+			return modes;
+		}
 	}
 
 	if (mode11g_idx < 0)
@@ -2531,6 +2539,8 @@ static const char * modestr(enum hostapd_hw_mode mode)
 		return "802.11a";
 	case HOSTAPD_MODE_IEEE80211AD:
 		return "802.11ad";
+	case HOSTAPD_MODE_IEEE80211AH:
+		return "802.11ah";
 	default:
 		return "?";
 	}
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index e7aff260d..346bc461c 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -1198,7 +1198,8 @@ static int calculate_chan_offset(int width, int freq, int cf1, int cf2)
 
 static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
 				 struct nlattr *ifindex, struct nlattr *link,
-				 struct nlattr *freq, struct nlattr *type,
+				 struct nlattr *freq, struct nlattr *freq_off,
+				 struct nlattr *type,
 				 struct nlattr *bw, struct nlattr *cf1,
 				 struct nlattr *cf2,
 				 struct nlattr *punct_bitmap,
@@ -1255,6 +1256,8 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
 
 	os_memset(&data, 0, sizeof(data));
 	data.ch_switch.freq = nla_get_u32(freq);
+	data.ch_switch.freq_khz = MHZ_TO_KHZ(data.ch_switch.freq) +
+		nla_get_u32(freq_off);
 	data.ch_switch.ht_enabled = ht_enabled;
 	data.ch_switch.ch_offset = chan_offset;
 	if (punct_bitmap)
@@ -1631,7 +1634,8 @@ nl80211_get_mld_link_by_freq(struct i802_bss *bss, unsigned int freq)
 static void mlme_event(struct i802_bss *bss,
 		       enum nl80211_commands cmd, struct nlattr *frame,
 		       struct nlattr *addr, struct nlattr *timed_out,
-		       struct nlattr *freq, struct nlattr *ack,
+		       struct nlattr *freq, struct nlattr *freq_offset,
+		       struct nlattr *ack,
 		       struct nlattr *cookie, struct nlattr *sig,
 		       struct nlattr *wmm, struct nlattr *req_ie,
 		       struct nlattr *link)
@@ -3814,7 +3818,9 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
 	case NL80211_CMD_UNPROT_DISASSOCIATE:
 		mlme_event(bss, cmd, tb[NL80211_ATTR_FRAME],
 			   tb[NL80211_ATTR_MAC], tb[NL80211_ATTR_TIMED_OUT],
-			   tb[NL80211_ATTR_WIPHY_FREQ], tb[NL80211_ATTR_ACK],
+			   tb[NL80211_ATTR_WIPHY_FREQ],
+			   tb[NL80211_ATTR_WIPHY_FREQ_OFFSET],
+			   tb[NL80211_ATTR_ACK],
 			   tb[NL80211_ATTR_COOKIE],
 			   tb[NL80211_ATTR_RX_SIGNAL_DBM],
 			   tb[NL80211_ATTR_STA_WME],
@@ -3843,6 +3849,7 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
 				     tb[NL80211_ATTR_IFINDEX],
 				     tb[NL80211_ATTR_MLO_LINK_ID],
 				     tb[NL80211_ATTR_WIPHY_FREQ],
+				     tb[NL80211_ATTR_WIPHY_FREQ_OFFSET],
 				     tb[NL80211_ATTR_WIPHY_CHANNEL_TYPE],
 				     tb[NL80211_ATTR_CHANNEL_WIDTH],
 				     tb[NL80211_ATTR_CENTER_FREQ1],
@@ -3855,6 +3862,7 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
 				     tb[NL80211_ATTR_IFINDEX],
 				     tb[NL80211_ATTR_MLO_LINK_ID],
 				     tb[NL80211_ATTR_WIPHY_FREQ],
+				     tb[NL80211_ATTR_WIPHY_FREQ_OFFSET],
 				     tb[NL80211_ATTR_WIPHY_CHANNEL_TYPE],
 				     tb[NL80211_ATTR_CHANNEL_WIDTH],
 				     tb[NL80211_ATTR_CENTER_FREQ1],
@@ -4044,7 +4052,8 @@ int process_bss_event(struct nl_msg *msg, void *arg)
 	case NL80211_CMD_FRAME_TX_STATUS:
 		mlme_event(bss, gnlh->cmd, tb[NL80211_ATTR_FRAME],
 			   tb[NL80211_ATTR_MAC], tb[NL80211_ATTR_TIMED_OUT],
-			   tb[NL80211_ATTR_WIPHY_FREQ], tb[NL80211_ATTR_ACK],
+			   tb[NL80211_ATTR_WIPHY_FREQ], tb[NL80211_ATTR_WIPHY_FREQ_OFFSET],
+			   tb[NL80211_ATTR_ACK],
 			   tb[NL80211_ATTR_COOKIE],
 			   tb[NL80211_ATTR_RX_SIGNAL_DBM],
 			   tb[NL80211_ATTR_STA_WME], NULL,
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index ff7c75644..fa5757b71 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -1838,9 +1838,9 @@ int ap_ctrl_iface_chanswitch(struct wpa_supplicant *wpa_s, const char *pos)
 #endif /* CONFIG_CTRL_IFACE */
 
 
-void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
-		       int offset, int width, int cf1, int cf2,
-		       u16 punct_bitmap, int finished)
+void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int freq_khz,
+				int ht, int offset, int width, int cf1, int cf2,
+				u16 punct_bitmap, int finished)
 {
 	struct hostapd_iface *iface = wpa_s->ap_iface;
 
@@ -1849,9 +1849,12 @@ void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
 	if (!iface)
 		return;
 	wpa_s->assoc_freq = freq;
-	if (wpa_s->current_ssid)
+	wpa_s->assoc_freq_khz = freq_khz;
+	if (wpa_s->current_ssid) {
 		wpa_s->current_ssid->frequency = freq;
-	hostapd_event_ch_switch(iface->bss[0], freq, ht,
+		wpa_s->current_ssid->frequency_khz = freq_khz;
+	}
+	hostapd_event_ch_switch(iface->bss[0], freq, freq_khz, ht,
 				offset, width, cf1, cf2, punct_bitmap,
 				finished);
 }
diff --git a/wpa_supplicant/ap.h b/wpa_supplicant/ap.h
index 5835ecd87..612999fe8 100644
--- a/wpa_supplicant/ap.h
+++ b/wpa_supplicant/ap.h
@@ -72,8 +72,8 @@ void wpa_supplicant_ap_pwd_auth_fail(struct wpa_supplicant *wpa_s);
 int ap_switch_channel(struct wpa_supplicant *wpa_s,
 		      struct csa_settings *settings);
 int ap_ctrl_iface_chanswitch(struct wpa_supplicant *wpa_s, const char *txtaddr);
-void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
-		       int offset, int width, int cf1, int cf2,
+void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int freq_khz,
+		       int ht, int offset, int width, int cf1, int cf2,
 		       u16 punct_bitmap, int finished);
 struct wpabuf * wpas_ap_wps_nfc_config_token(struct wpa_supplicant *wpa_s,
 					     int ndef);
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index ff045380e..7ee8d1d1a 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -524,6 +524,11 @@ struct wpa_ssid {
 	 */
 	int frequency;
 
+	/**
+	 * frequency_khz - Channel frequency in kilohertz (kHz)
+	 */
+	int frequency_khz;
+
 	/**
 	 * enable_edmg - Enable EDMG feature in STA/AP mode
 	 *
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index e7aaa1a12..291bbd40b 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -5730,6 +5730,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 		    wpa_s->current_ssid->mode ==
 		    WPAS_MODE_P2P_GROUP_FORMATION) {
 			wpas_ap_ch_switch(wpa_s, data->ch_switch.freq,
+					  data->ch_switch.freq_khz,
 					  data->ch_switch.ht_enabled,
 					  data->ch_switch.ch_offset,
 					  data->ch_switch.ch_width,
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 486fc6a09..90771e2d9 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -219,6 +219,7 @@ static int wpas_mesh_update_freq_params(struct wpa_supplicant *wpa_s)
 		    &params->freq,
 		    ifmsh->conf->hw_mode,
 		    ifmsh->freq,
+		    ifmsh->freq_khz,
 		    ifmsh->conf->channel,
 		    ifmsh->conf->enable_edmg,
 		    ifmsh->conf->edmg_channel,
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e0f3240e8..52cd5eb9e 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -3027,6 +3027,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
 	bool is_6ghz;
 
 	freq->freq = ssid->frequency;
+	freq->freq_khz = ssid->frequency_khz;
 
 	if (ssid->mode == WPAS_MODE_IBSS && !ssid->fixed_freq) {
 		struct wpa_bss *bss = ibss_find_existing_bss(wpa_s, ssid);
@@ -3043,7 +3044,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
 	hw_mode = ieee80211_freq_to_chan(freq->freq, &channel);
 	for (i = 0; wpa_s->hw.modes && i < wpa_s->hw.num_modes; i++) {
 		if (wpa_s->hw.modes[i].mode == hw_mode &&
-		    hw_mode_get_channel(&wpa_s->hw.modes[i], freq->freq,
+		    hw_mode_get_channel(&wpa_s->hw.modes[i], freq->freq, freq->freq_khz,
 					NULL) != NULL) {
 			mode = &wpa_s->hw.modes[i];
 			break;
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index d5b3dab67..d333f9cbe 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -685,6 +685,7 @@ struct wpa_supplicant {
 	struct wpa_bss *current_bss;
 	int ap_ies_from_associnfo;
 	unsigned int assoc_freq;
+	unsigned int assoc_freq_khz;
 	u8 ap_mld_addr[ETH_ALEN];
 	u8 mlo_assoc_link_id;
 	u16 valid_links; /* bitmap of valid MLO link IDs */
-- 
2.34.1



From chaitanya.mgit at gmail.com  Wed Jul 19 09:47:52 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Wed, 19 Jul 2023 22:17:52 +0530
Subject: [PATCH] Abort ongoing scan
In-Reply-To: <20230718191746.55060-1-Chaitanya.Tata@nordicsemi.no>
References: <20230718191746.55060-1-Chaitanya.Tata@nordicsemi.no>
Message-ID: <CABPxzYJX6TQHpcGkXs-NEnh_ONWE-C9v5-fjiqNbfaHc7vKVow@mail.gmail.com>

On Wed, Jul 19, 2023 at 12:47?AM Chaitanya Tata
<chaitanya.mgit at gmail.com> wrote:
>
> From: Chaitanya Tata <chaitanya.mgit at gmail.com>
>
> From: Chaitanya Tata <Chaitanya.Tata at nordicsemi.no>
>
> Along with canceling queued scan, abort ongoing scan if any, this
> ensures Wi-Fi interface is in usable state after disconnect is issued,
> else subsequent scan after disconnect might fail with EBUSY.
>
> Signed-off-by: Chaitanya Tata <Chaitanya.Tata at nordicsemi.no>
> ---
>  wpa_supplicant/wpa_supplicant.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
> index e0f3240e8..4dd89f829 100644
> --- a/wpa_supplicant/wpa_supplicant.c
> +++ b/wpa_supplicant/wpa_supplicant.c
> @@ -8682,6 +8682,7 @@ void wpas_request_disconnection(struct wpa_supplicant *wpa_s)
>         wpa_s->disconnected = 1;
>         wpa_supplicant_cancel_sched_scan(wpa_s);
>         wpa_supplicant_cancel_scan(wpa_s);
> +       wpas_abort_ongoing_scan(wpa_s);
>         wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
>         eloop_cancel_timeout(wpas_network_reenabled, wpa_s, NULL);
>         radio_remove_works(wpa_s, "connect", 0);
> --
> 2.34.1
>
 Please ignore this, first patch wasn't showing up in patchwork, so,
re-sent it with different from,
now both are showing up :).


From chaitanya.mgit at gmail.com  Wed Jul 19 09:50:05 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Wed, 19 Jul 2023 22:20:05 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <20230611202351.3997794-1-festevam@gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com>
Message-ID: <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>

On Thu, Jun 15, 2023 at 9:49?PM Fabio Estevam <festevam at gmail.com> wrote:
>
> This reverts commit 144314eaa7e09374b7f9a3708263a298e05cbfd6.
>
> Since commit 144314eaa7e0 ("wpa_supplicant: Send EAPOL frames over nl80211
> where available"), Wifi is no longer functional on an imx6dl-pico board
> running 6.1 LTS kernel with a QCA9377 Wifi chip (ath10k SDIO driver):
>
> wlan0: authenticate with xx:xx:xx:xx:xx:xx
> wlan0: 80 MHz not supported, disabling VHT
> wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
> wlan0: authenticated
> wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
> wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=3)
> wlan0: associated
> wlan0: deauthenticating from xx:xx:xx:xx:xx:xx by local choice
> (Reason: 3=DEAUTH_LEAVING)
> Error: Connection activation failed: Secrets were required, but not provided.
>
> Revert it for now to avoid such a regression.
>
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> ---
> Hi Jouni and Brendan,
>
> This revert is the result of me running git bisect between 2.9 and 2.10
> to identify the cause of the regression.
>
> I am merely a wpa_supplicant user and do not have the knowledge of its
> internals.
>
> If there is a better way to fix the regression I reported, as well as
> keeping Brendan's use-case working, please let me know.
>
> Thanks
>
>  wpa_supplicant/ibss_rsn.c  | 4 ----
>  wpa_supplicant/wpas_glue.c | 8 --------
>  2 files changed, 12 deletions(-)
>
> diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
> index 5b31f7bb0e3d..1b867e1c6491 100644
> --- a/wpa_supplicant/ibss_rsn.c
> +++ b/wpa_supplicant/ibss_rsn.c
> @@ -71,10 +71,6 @@ static int supp_ether_send(void *ctx, const u8 *dest, u16 proto, const u8 *buf,
>                    __func__, MAC2STR(dest), proto, (unsigned long) len,
>                    !encrypt);
>
> -       if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_CONTROL_PORT)
> -               return wpa_drv_tx_control_port(wpa_s, dest, proto, buf, len,
> -                                              !encrypt);
> -
>         if (wpa_s->l2)
>                 return l2_packet_send(wpa_s->l2, dest, proto, buf, len);
>
> diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
> index c4cfca50e62a..3aeb7cb45c47 100644
> --- a/wpa_supplicant/wpas_glue.c
> +++ b/wpa_supplicant/wpas_glue.c
> @@ -113,14 +113,6 @@ int wpa_ether_send(struct wpa_supplicant *wpa_s, const u8 *dest,
>         }
>  #endif /* CONFIG_TESTING_OPTIONS */
>
> -       if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_CONTROL_PORT) {
> -               int encrypt = wpa_s->wpa &&
> -                       wpa_sm_has_ptk_installed(wpa_s->wpa);
> -
> -               return wpa_drv_tx_control_port(wpa_s, dest, proto, buf, len,
> -                                              !encrypt);
> -       }
> -
>         if (wpa_s->l2) {
>                 return l2_packet_send(wpa_s->l2, dest, proto, buf, len);
>         }
> --
> 2.34.1
Looking at https://unix.stackexchange.com/a/542952 doesn't look like a WPA
supplicant issue, can you please try without the patch and with the
steps given in the answer?


From chaitanya.mgit at gmail.com  Wed Jul 19 09:51:08 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Wed, 19 Jul 2023 22:21:08 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
Message-ID: <CABPxzYJQCaKaFcRo4CXGnT93aeMgP1zCY-MrYactgOH2x4R3dw@mail.gmail.com>

On Wed, Jul 19, 2023 at 10:20?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:
>
> On Thu, Jun 15, 2023 at 9:49?PM Fabio Estevam <festevam at gmail.com> wrote:
> >
> > This reverts commit 144314eaa7e09374b7f9a3708263a298e05cbfd6.
> >
> > Since commit 144314eaa7e0 ("wpa_supplicant: Send EAPOL frames over nl80211
> > where available"), Wifi is no longer functional on an imx6dl-pico board
> > running 6.1 LTS kernel with a QCA9377 Wifi chip (ath10k SDIO driver):
> >
> > wlan0: authenticate with xx:xx:xx:xx:xx:xx
> > wlan0: 80 MHz not supported, disabling VHT
> > wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
> > wlan0: authenticated
> > wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
> > wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=3)
> > wlan0: associated
> > wlan0: deauthenticating from xx:xx:xx:xx:xx:xx by local choice
> > (Reason: 3=DEAUTH_LEAVING)
> > Error: Connection activation failed: Secrets were required, but not provided.
> >
> > Revert it for now to avoid such a regression.
> >
> > Signed-off-by: Fabio Estevam <festevam at gmail.com>
> > ---
> > Hi Jouni and Brendan,
> >
> > This revert is the result of me running git bisect between 2.9 and 2.10
> > to identify the cause of the regression.
> >
> > I am merely a wpa_supplicant user and do not have the knowledge of its
> > internals.
> >
> > If there is a better way to fix the regression I reported, as well as
> > keeping Brendan's use-case working, please let me know.
> >
> > Thanks
> >
> >  wpa_supplicant/ibss_rsn.c  | 4 ----
> >  wpa_supplicant/wpas_glue.c | 8 --------
> >  2 files changed, 12 deletions(-)
> >
> > diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
> > index 5b31f7bb0e3d..1b867e1c6491 100644
> > --- a/wpa_supplicant/ibss_rsn.c
> > +++ b/wpa_supplicant/ibss_rsn.c
> > @@ -71,10 +71,6 @@ static int supp_ether_send(void *ctx, const u8 *dest, u16 proto, const u8 *buf,
> >                    __func__, MAC2STR(dest), proto, (unsigned long) len,
> >                    !encrypt);
> >
> > -       if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_CONTROL_PORT)
> > -               return wpa_drv_tx_control_port(wpa_s, dest, proto, buf, len,
> > -                                              !encrypt);
> > -
> >         if (wpa_s->l2)
> >                 return l2_packet_send(wpa_s->l2, dest, proto, buf, len);
> >
> > diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
> > index c4cfca50e62a..3aeb7cb45c47 100644
> > --- a/wpa_supplicant/wpas_glue.c
> > +++ b/wpa_supplicant/wpas_glue.c
> > @@ -113,14 +113,6 @@ int wpa_ether_send(struct wpa_supplicant *wpa_s, const u8 *dest,
> >         }
> >  #endif /* CONFIG_TESTING_OPTIONS */
> >
> > -       if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_CONTROL_PORT) {
> > -               int encrypt = wpa_s->wpa &&
> > -                       wpa_sm_has_ptk_installed(wpa_s->wpa);
> > -
> > -               return wpa_drv_tx_control_port(wpa_s, dest, proto, buf, len,
> > -                                              !encrypt);
> > -       }
> > -
> >         if (wpa_s->l2) {
> >                 return l2_packet_send(wpa_s->l2, dest, proto, buf, len);
> >         }
> > --
> > 2.34.1
> Looking at https://unix.stackexchange.com/a/542952 doesn't look like a WPA
> supplicant issue, can you please try without the patch and with the
> steps given in the answer?
BTW, Brendan is no longer with BluWireless, so, the email would have bounced.


From j at w1.fi  Wed Jul 19 09:51:14 2023
From: j at w1.fi (Jouni Malinen)
Date: Wed, 19 Jul 2023 19:51:14 +0300
Subject: [PATCH] AP: Add configuration option to specify the desired MLD
 address
In-Reply-To: <20230618141504.155026-1-andrei.otcheretianski@intel.com>
References: <20230618141504.155026-1-andrei.otcheretianski@intel.com>
Message-ID: <ZLgUgt8rsJ6u2umr@w1.fi>

On Sun, Jun 18, 2023 at 05:15:04PM +0300, Andrei Otcheretianski wrote:
> Add mld_addr configuration option to set MLD address.
> The already existing bssid configuration option can be used to
> control the MLD link addresses.

> diff --git a/hostapd/config_file.c b/hostapd/config_file.c
> @@ -4776,6 +4776,12 @@ static int hostapd_config_fill(struct hostapd_config *conf,
>  		bss->mld_ap = !!atoi(pos);
>  	} else if (os_strcmp(buf, "mld_id") == 0) {
>  		bss->mld_id = atoi(pos);
> +	} else if (os_strcmp(buf, "mld_addr") == 0) {
> +		if (hwaddr_aton(pos, bss->mld_addr)) {
> +			wpa_printf(MSG_ERROR,
> +				   "Line %d: invalid mld_addr", line);
> +			return 1;
> +		}
>  #endif /* CONFIG_IEEE80211BE */

It would be good to document new hostapd configuration parameters in
hostapd/hostapd.conf.

> diff --git a/hostapd/main.c b/hostapd/main.c
>  	/* Initialize the driver interface */
> -	if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
> +	if (is_zero_ether_addr(b))
>  		b = NULL;

How is this related to the other changes in the patch or the commit
message? This feels like something completely independent that should be
in its own commit.

> @@ -241,7 +241,13 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
> +#ifndef CONFIG_IEEE80211BE
>  	params.bssid = b;
> +#else
> +	if (!is_zero_ether_addr(hapd->conf->mld_addr) &&
> +	    hapd->conf->mld_ap)
> +		params.bssid = hapd->conf->mld_addr;
> +#endif /* !CONFIG_IEEE80211BE */

Is this really correct for builds that define CONFIG_IEEE80211BE but do
not enable MLO? Why would params.bssid not be set in those cases?
Wouldn't this break capability of configuring the BSSID for non-MLO AP?
 
> @@ -278,6 +284,10 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
>  		random_mac_addr_keep_oui(hapd->own_addr);
>  		hapd->mld_next_link_id = 0;
>  		hapd->mld_link_id = hapd->mld_next_link_id++;
> +		if (!b)
> +			random_mac_addr_keep_oui(hapd->own_addr);
> +		else
> +			os_memcpy(hapd->own_addr, b, ETH_ALEN);

What is this trying to do and how is this related to the other changes?
random_mac_addr_keep_oui() would be called twice if b == NULL and that
does not sound correct. Why would hostapd_driver_init() modify
hapd->own_addr?

-- 
Jouni Malinen                                            PGP id EFC895FA


From chaitanya.mgit at gmail.com  Wed Jul 19 10:08:08 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Wed, 19 Jul 2023 22:38:08 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
Message-ID: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>

On Wed, Jul 19, 2023 at 10:29?PM Fabio Estevam <festevam at gmail.com> wrote:
>
> Hi Krishna,
>
> On Wed, Jul 19, 2023 at 1:50?PM Krishna Chaitanya
> <chaitanya.mgit at gmail.com> wrote:
>
> > Looking at https://unix.stackexchange.com/a/542952 doesn't look like a WPA
> > supplicant issue, can you please try without the patch and with the
> > steps given in the answer?
>
> Not sure why you state this is not a wpa_supplicant issue. I ran a
> long bisect and found a commit that caused regression.
>
> After reverting such a commit, the Wifi connection works again.
I am not saying it isn't, just based on a quick search it looked unlikely.
I had worked on the patch with Brendan, so, it could just be that not
using NL80211
for EAPoL might just be masking the issue somehow.
>
> Also, there are lots of replies in that thread, not sure which is one
> you want me to test.
The link points to a specific answer. Copying the commands that worked
for the OP below:

nmcli con delete <SSID>
nmcli dev wifi connect <SSID> password <password>

Basically, it says, if the network was added with open security and
then updated to security,
then the network manager might not have updated it causing the issue,
though if that was the case
I am not sure how reverting this patch might have helped. Anyways,
good to give it a try.


From druth at chromium.org  Wed Jul 19 10:29:15 2023
From: druth at chromium.org (David Ruth)
Date: Wed, 19 Jul 2023 17:29:15 +0000
Subject: [PATCH] dbus: Report guard interval and dual carrier modulation.
Message-ID: <20230719172918.1726145-1-druth@chromium.org>

Propagate guard interval as a double value and dual carrier modulation
as a boolean over D-Bus.

Signed-off-by: David Ruth <druth at chromium.org>
---

 wpa_supplicant/dbus/dbus_dict_helpers.c | 21 ++++++++++++++++++
 wpa_supplicant/dbus/dbus_dict_helpers.h |  4 ++++
 wpa_supplicant/dbus/dbus_new_helpers.c  | 29 +++++++++++++++++++++++++
 3 files changed, 54 insertions(+)

diff --git a/wpa_supplicant/dbus/dbus_dict_helpers.c b/wpa_supplicant/dbus/dbus_dict_helpers.c
index 0e4753450..22dda1578 100644
--- a/wpa_supplicant/dbus/dbus_dict_helpers.c
+++ b/wpa_supplicant/dbus/dbus_dict_helpers.c
@@ -361,6 +361,27 @@ dbus_bool_t wpa_dbus_dict_append_byte_array(DBusMessageIter *iter_dict,
 }
 
 
+/**
+ * Add a double entry to the dict.
+ *
+ * @param iter_dict A valid DBusMessageIter returned from
+ *    wpa_dbus_dict_open_write()
+ * @param key The key of the dict item
+ * @param value The double value
+ * @return TRUE on success, FALSE on failure
+ *
+ */
+dbus_bool_t wpa_dbus_dict_append_double(DBusMessageIter *iter_dict,
+					const char* key,
+					const double value)
+{
+	if (!key || !value)
+		return FALSE;
+	return _wpa_dbus_add_dict_entry_basic(iter_dict, key, DBUS_TYPE_DOUBLE,
+					      &value);
+}
+
+
 /**
  * Begin an array entry in the dict
  *
diff --git a/wpa_supplicant/dbus/dbus_dict_helpers.h b/wpa_supplicant/dbus/dbus_dict_helpers.h
index 44685ea4a..cc9e26fa9 100644
--- a/wpa_supplicant/dbus/dbus_dict_helpers.h
+++ b/wpa_supplicant/dbus/dbus_dict_helpers.h
@@ -59,6 +59,10 @@ dbus_bool_t wpa_dbus_dict_append_byte_array(DBusMessageIter *iter_dict,
 					    const char *value,
 					    const dbus_uint32_t value_len);
 
+dbus_bool_t wpa_dbus_dict_append_double(DBusMessageIter *iter_dict,
+					const char *key,
+					const double value);
+
 /* Manual construction and addition of array elements */
 dbus_bool_t wpa_dbus_dict_begin_array(DBusMessageIter *iter_dict,
 				      const char *key, const char *type,
diff --git a/wpa_supplicant/dbus/dbus_new_helpers.c b/wpa_supplicant/dbus/dbus_new_helpers.c
index 06f74ad3d..1ce566ce0 100644
--- a/wpa_supplicant/dbus/dbus_new_helpers.c
+++ b/wpa_supplicant/dbus/dbus_new_helpers.c
@@ -1026,6 +1026,23 @@ DBusMessage * wpas_dbus_reply_new_from_error(DBusMessage *message,
 }
 
 
+double _wpas_dbus_new_guard_interval_to_double(enum guard_interval value)
+{
+  switch(value) {
+    case GUARD_INTERVAL_0_4:
+      return 0.4;
+    case GUARD_INTERVAL_0_8:
+      return 0.8;
+    case GUARD_INTERVAL_1_6:
+      return 1.6;
+    case GUARD_INTERVAL_3_2:
+      return 3.2;
+    default:
+      return 0;
+  }
+}
+
+
 /**
  * wpas_dbus_new_from_signal_information - Adds a wpa_signal_info
  * to a DBusMessage.
@@ -1149,6 +1166,18 @@ int wpas_dbus_new_from_signal_information(DBusMessageIter *iter,
 	    (si->data.avg_ack_signal &&
 	     !wpa_dbus_dict_append_int32(&iter_dict, "avg-ack-rssi",
 					 si->data.avg_ack_signal)) ||
+	    (si->data.rx_guard_interval &&
+	     !wpa_dbus_dict_append_double(&iter_dict, "rx-guard-interval",
+					  _wpas_dbus_new_guard_interval_to_double(si->data.rx_guard_interval))) ||
+	    (si->data.tx_guard_interval &&
+	     !wpa_dbus_dict_append_double(&iter_dict, "tx-guard-interval",
+					  _wpas_dbus_new_guard_interval_to_double(si->data.tx_guard_interval))) ||
+	    (si->data.rx_dcm &&
+	     !wpa_dbus_dict_append_bool(&iter_dict, "rx-dcm",
+					si->data.rx_dcm)) ||
+	    (si->data.tx_dcm &&
+	     !wpa_dbus_dict_append_bool(&iter_dict, "tx-dcm",
+					si->data.tx_dcm)) ||
 	    !wpa_dbus_dict_close_write(&variant_iter, &iter_dict) ||
 	    !dbus_message_iter_close_container(iter, &variant_iter))
 		return -ENOMEM;
-- 
2.41.0.487.g6d72f3e995-goog



From chaitanya.mgit at gmail.com  Wed Jul 19 11:19:53 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Wed, 19 Jul 2023 23:49:53 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
 <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com> <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
Message-ID: <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>

On Wed, Jul 19, 2023 at 11:19?PM Fabio Estevam <festevam at gmail.com> wrote:
>
> Hi Krishna,
>
> On Wed, Jul 19, 2023 at 2:08?PM Krishna Chaitanya
> <chaitanya.mgit at gmail.com> wrote:
>
> > The link points to a specific answer. Copying the commands that worked
> > for the OP below:
> >
> > nmcli con delete <SSID>
> > nmcli dev wifi connect <SSID> password <password>
>
> In one of the systems where I reproduce the issue, there is no nmcli
> installed at all,
> so the commands above are not relevant to my use case.
I based it on the log you have shared: "Error: Connection activation
failed: Secrets were required, but not provided."
Almost all searches for that message point to network manager:
https://wiki.archlinux.org/title/NetworkManager#Secrets_were_required,_but_not_provided
>
> The commit log from 144314eaa7e0 ("wpa_supplicant: Send EAPOL frames
> over nl80211
> where available") states:
>
> "I have tested this on DMG (11ad/ay) devices with an out-of-tree Linux
>  driver that does not use mac80211."
Yes, it's tested using a cfg80211-based FullMAC driver.
> So it looks like this commit tried to fix an out-of-tree Linux driver,
> but broke ath10k.
mac80211 sets this flag by default and I just tested with
mac80211_hwsim and was successfully
able to establish the secure connection (WPA2 and WPA3).
> How do we proceed? Can you help me with this?


From chaitanya.mgit at gmail.com  Wed Jul 19 12:40:00 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Thu, 20 Jul 2023 01:10:00 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
 <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com> <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
Message-ID: <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>

On Thu, Jul 20, 2023 at 12:08?AM Fabio Estevam <festevam at gmail.com> wrote:
>
> On Wed, Jul 19, 2023 at 3:20?PM Krishna Chaitanya
> <chaitanya.mgit at gmail.com> wrote:
>
> > Almost all searches for that message point to network manager:
> > https://wiki.archlinux.org/title/NetworkManager#Secrets_were_required,_but_not_provided
>
> Again, not relevant to my use case.
I am confused, are you saying that the log from the network manager is
not applicable for all scenarios?
>
> Please accept the commit from you and Brendan caused a regression on
> my ath10k system.
>
> It is 100% reproducible.
>
> > > "I have tested this on DMG (11ad/ay) devices with an out-of-tree Linux
> > >  driver that does not use mac80211."
> > Yes, it's tested using a cfg80211-based FullMAC driver.
> > > So it looks like this commit tried to fix an out-of-tree Linux driver,
> > > but broke ath10k.
> > mac80211 sets this flag by default and I just tested with
> > mac80211_hwsim and was successfully
> > able to establish the secure connection (WPA2 and WPA3).
>
> Good, but how do we go about solving the regression?
To confirm the issue, can you try with mac80211_hwsim? You can
run hostapd + wpa_supplicant and see if the issue is reproducible?


From chaitanya.mgit at gmail.com  Wed Jul 19 12:42:11 2023
From: chaitanya.mgit at gmail.com (Chaitanya Tata)
Date: Thu, 20 Jul 2023 01:12:11 +0530
Subject: [PATCH] Include BSS max idle timeout in association request
Message-ID: <20230719194211.16534-1-Chaitanya.Tata@nordicsemi.no>

If WNM is enabled, then the station can send it preferred max IDLE timeout
in the association request that may or may not be honored by the AP, the
value sent in association response is the final to be used by the
station which is already supported.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata at nordicsemi.no>
---
Depends on kernel patch: https://patchwork.kernel.org/project/linux-wireless/patch/20230719194039.16179-1-Chaitanya.Tata at nordicsemi.no/
---
 src/drivers/driver.h            | 9 +++++++++
 src/drivers/driver_nl80211.c    | 8 ++++++++
 src/drivers/nl80211_copy.h      | 2 ++
 wpa_supplicant/config.c         | 1 +
 wpa_supplicant/config_ssid.h    | 8 ++++++++
 wpa_supplicant/sme.c            | 2 ++
 wpa_supplicant/wpa_cli.c        | 7 ++++++-
 wpa_supplicant/wpa_supplicant.c | 6 ++++++
 8 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 8e462c8b7..cb35dce60 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1320,6 +1320,15 @@ struct wpa_driver_associate_params {
 	 * mld_params - MLD association parameters
 	 */
 	struct wpa_driver_mld_params mld_params;
+
+#ifdef CONFIG_SME
+#ifdef CONFIG_WNM
+	/**
+	 * Preferred maximum IDLE period in TUs
+	 */
+	unsigned short bss_max_idle_period;
+#endif /* CONFIG_WNM */
+#endif /* CONFIG_SME */
 };
 
 enum hide_ssid {
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e4180daed..f579a9956 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6983,6 +6983,14 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
 	    nla_put_flag(msg, NL80211_ATTR_MLO_SUPPORT))
 		return -1;
 
+	if (params->bss_max_idle_period) {
+		wpa_printf(MSG_DEBUG, "  * BSS max idle period %u seconds",
+			   params->bss_max_idle_period);
+		if (nla_put_u16(msg, NL80211_ATTR_BSS_MAX_IDLE_PERIOD,
+				params->bss_max_idle_period))
+			return -1;
+	}
+
 	return 0;
 }
 
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
index c59fec406..b1608df96 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -3341,6 +3341,8 @@ enum nl80211_attrs {
 
 	NL80211_ATTR_EMA_RNR_ELEMS,
 
+	NL80211_ATTR_BSS_MAX_IDLE_PERIOD,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index de9b9b30f..6c95773aa 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2713,6 +2713,7 @@ static const struct parse_data ssid_fields[] = {
 	{ INT_RANGE(sae_pk, 0, 2) },
 	{ INT_RANGE(disable_eht, 0, 1)},
 	{ INT_RANGE(enable_4addr_mode, 0, 1)},
+	{ INT_RANGE(bss_max_idle_period, 0, 65535)}
 };
 
 #undef OFFSET
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index ff045380e..910720102 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -1265,6 +1265,14 @@ struct wpa_ssid {
 	 * to use the interface in a bridge.
 	 */
 	int enable_4addr_mode;
+#ifdef CONFIG_SME
+#ifdef CONFIG_WNM
+	/**
+	 * Preferred maximum IDLE period in TUs.
+	 */
+	unsigned short bss_max_idle_period;
+#endif /* CONFIG_WNM */
+#endif /* CONFIG_SME */
 };
 
 #endif /* CONFIG_SSID_H */
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 4ed0a3003..f8ace8ece 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -2624,6 +2624,8 @@ mscs_fail:
 		}
 	}
 
+	params.bss_max_idle_period = ssid->bss_max_idle_period;
+
 	if (wpa_drv_associate(wpa_s, &params) < 0) {
 		wpa_msg(wpa_s, MSG_INFO, "SME: Association request to the "
 			"driver failed");
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index effc7b3bc..9ce212738 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1494,7 +1494,12 @@ static const char *network_fields[] = {
 #ifdef CONFIG_HS20
 	"update_identifier",
 #endif /* CONFIG_HS20 */
-	"mac_addr", "pbss", "wps_disabled"
+	"mac_addr", "pbss", "wps_disabled",
+#ifdef CONFIG_SME
+#ifdef CONFIG_WNM
+	"bss_max_idle_period",
+#endif /* CONFIG_WNM */
+#endif /* CONFIG_SME */
 };
 
 
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e0f3240e8..f2c0d3d3c 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -4338,6 +4338,12 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
 	params.sae_pwe = wpa_s->conf->sae_pwe;
 #endif /* CONFIG_SAE */
 
+#ifdef CONFIG_SME
+#ifdef CONFIG_WNM
+	params.bss_max_idle_period = ssid->bss_max_idle_period;
+#endif /* CONFIG_WNM */
+#endif /* CONFIG_SME */
+
 	ret = wpa_drv_associate(wpa_s, &params);
 	forced_memzero(psk, sizeof(psk));
 	os_free(wpa_ie);
-- 
2.34.1



From chaitanya.mgit at gmail.com  Wed Jul 19 12:48:44 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Thu, 20 Jul 2023 01:18:44 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
 <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com> <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
Message-ID: <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>

On Thu, Jul 20, 2023 at 1:16?AM Fabio Estevam <festevam at gmail.com> wrote:
>
> On Wed, Jul 19, 2023 at 4:40?PM Krishna Chaitanya
> <chaitanya.mgit at gmail.com> wrote:
>
> > I am confused, are you saying that the log from the network manager is
> > not applicable for all scenarios?
>
> What I am saying is that I can reproduce the issue on a minimal roofs
> generated by Buildroot.
Ah, understood.
>
> In this rootfs, there is no Network Manager installed at all.
>
> > To confirm the issue, can you try with mac80211_hwsim? You can
> > run hostapd + wpa_supplicant and see if the issue is reproducible?
>
> Sorry, not sure how this can help us.
>
> I only see this issue with QCA9377, which uses the ath10k driver.
Well, then a good start would be to collect `-dd` supplicant logs and
full dmesg.


From chaitanya.mgit at gmail.com  Thu Jul 20 12:09:30 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Fri, 21 Jul 2023 00:39:30 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
 <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com> <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
Message-ID: <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>

On Thu, Jul 20, 2023 at 3:11?AM Fabio Estevam <festevam at gmail.com> wrote:
>
> On Wed, Jul 19, 2023 at 4:48?PM Krishna Chaitanya
> <chaitanya.mgit at gmail.com> wrote:
>
> > Well, then a good start would be to collect `-dd` supplicant logs and
> > full dmesg.
>
> Sure, here it goes:
>
> https://pastebin.com/raw/vaU9FCEt
>
> On this board, I am running a minimal rootfs with no Network Manager.
>
> In this case, the error shows as "reason=WRONG_KEY" and the IP address
> is never retrieved by wlan0.
>
> Reverting 144314eaa7e0 ("wpa_supplicant: Send EAPOL frames over
> nl80211 where available") makes Wifi work again.
>
> Thanks
Thanks for sharing logs. The only difference to the working logs I could see was
missing print "nl80211: Send over control port", so, I guess the M2 EAPoL frame
is never even sent out and is dropped. But don't quite see how it
could happen from
a quick look at the code.


From festevam at gmail.com  Wed Jul 19 09:59:30 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Wed, 19 Jul 2023 13:59:30 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
Message-ID: <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>

Hi Krishna,

On Wed, Jul 19, 2023 at 1:50?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:

> Looking at https://unix.stackexchange.com/a/542952 doesn't look like a WPA
> supplicant issue, can you please try without the patch and with the
> steps given in the answer?

Not sure why you state this is not a wpa_supplicant issue. I ran a
long bisect and found a commit that caused regression.

After reverting such a commit, the Wifi connection works again.

Also, there are lots of replies in that thread, not sure which is one
you want me to test.

Thanks


From festevam at gmail.com  Wed Jul 19 10:49:02 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Wed, 19 Jul 2023 14:49:02 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com> <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
Message-ID: <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>

Hi Krishna,

On Wed, Jul 19, 2023 at 2:08?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:

> The link points to a specific answer. Copying the commands that worked
> for the OP below:
>
> nmcli con delete <SSID>
> nmcli dev wifi connect <SSID> password <password>

In one of the systems where I reproduce the issue, there is no nmcli
installed at all,
so the commands above are not relevant to my use case.

The commit log from 144314eaa7e0 ("wpa_supplicant: Send EAPOL frames
over nl80211
where available") states:

"I have tested this on DMG (11ad/ay) devices with an out-of-tree Linux
 driver that does not use mac80211."

So it looks like this commit tried to fix an out-of-tree Linux driver,
but broke ath10k.

How do we proceed? Can you help me with this?

Thanks


From festevam at gmail.com  Wed Jul 19 11:38:27 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Wed, 19 Jul 2023 15:38:27 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
 <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com> <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
Message-ID: <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>

On Wed, Jul 19, 2023 at 3:20?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:

> Almost all searches for that message point to network manager:
> https://wiki.archlinux.org/title/NetworkManager#Secrets_were_required,_but_not_provided

Again, not relevant to my use case.

Please accept the commit from you and Brendan caused a regression on
my ath10k system.

It is 100% reproducible.

> > "I have tested this on DMG (11ad/ay) devices with an out-of-tree Linux
> >  driver that does not use mac80211."
> Yes, it's tested using a cfg80211-based FullMAC driver.
> > So it looks like this commit tried to fix an out-of-tree Linux driver,
> > but broke ath10k.
> mac80211 sets this flag by default and I just tested with
> mac80211_hwsim and was successfully
> able to establish the secure connection (WPA2 and WPA3).

Good, but how do we go about solving the regression?


From festevam at gmail.com  Wed Jul 19 12:46:24 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Wed, 19 Jul 2023 16:46:24 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
 <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com> <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
Message-ID: <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>

On Wed, Jul 19, 2023 at 4:40?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:

> I am confused, are you saying that the log from the network manager is
> not applicable for all scenarios?

What I am saying is that I can reproduce the issue on a minimal roofs
generated by Buildroot.

In this rootfs, there is no Network Manager installed at all.

> To confirm the issue, can you try with mac80211_hwsim? You can
> run hostapd + wpa_supplicant and see if the issue is reproducible?

Sorry, not sure how this can help us.

I only see this issue with QCA9377, which uses the ath10k driver.


From festevam at gmail.com  Wed Jul 19 14:40:52 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Wed, 19 Jul 2023 18:40:52 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
 <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com> <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
Message-ID: <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>

On Wed, Jul 19, 2023 at 4:48?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:

> Well, then a good start would be to collect `-dd` supplicant logs and
> full dmesg.

Sure, here it goes:

https://pastebin.com/raw/vaU9FCEt

On this board, I am running a minimal rootfs with no Network Manager.

In this case, the error shows as "reason=WRONG_KEY" and the IP address
is never retrieved by wlan0.

Reverting 144314eaa7e0 ("wpa_supplicant: Send EAPOL frames over
nl80211 where available") makes Wifi work again.

Thanks


From festevam at gmail.com  Thu Jul 20 12:21:45 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Thu, 20 Jul 2023 16:21:45 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
References: <20230611202351.3997794-1-festevam@gmail.com> <CABPxzYKKyp+N=GgTEM9bFGp8fnCGJLEADfgoMNFpug3YXC_RNA@mail.gmail.com>
 <CAOMZO5AiPMhkUinbNAB514xfZy+rk3VYqfw_QS-33Mp7UoE2rA@mail.gmail.com>
 <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com> <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
Message-ID: <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>

Hi Chaitanya,

On Thu, Jul 20, 2023 at 4:09?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:

> Thanks for sharing logs. The only difference to the working logs I could see was
> missing print "nl80211: Send over control port", so, I guess the M2 EAPoL frame
> is never even sent out and is dropped. But don't quite see how it
> could happen from
> a quick look at the code.

Let me ask you: what is the impact of reverting 144314eaa7e0
("wpa_supplicant: Send EAPOL frames over nl80211
where available")? What exactly will stop working (what is the
usecase, system, kernel version)?

Thanks


From j at w1.fi  Fri Jul 21 03:03:22 2023
From: j at w1.fi (Jouni Malinen)
Date: Fri, 21 Jul 2023 13:03:22 +0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
Message-ID: <ZLpX6vKw8oeWqkuo@w1.fi>

On Thu, Jul 20, 2023 at 04:21:45PM -0300, Fabio Estevam wrote:
> Let me ask you: what is the impact of reverting 144314eaa7e0
> ("wpa_supplicant: Send EAPOL frames over nl80211
> where available")? What exactly will stop working (what is the
> usecase, system, kernel version)?

The nl80211 control port mechanism is a more convenient approach for
sending and receiving EAPOL frames. It gives more control over the
transmission options and is a better fit for the special frames that are
used for key management and that have rules that do not apply to all
other Data frames. As such, there is significant desire to be able to
use the nl80211 path for EAPOL frames for all cases in the future and
the strongly preferred option here would be to fix the issue that seems
to prevent the TX path through the nl80211 control port in the setup
where you are seeing the issue.

I tried to reproduce this issue with ath10k without much success, i.e.,
the nl80211 control port TX works fine in all my tests. I'm using the
current hostap.git snapshot of wpa_supplicant, though, so it would be
helpful if you could check whether you can reproduce the problem with
the main branch snapshot from hostap.git instead of the v2.10 release.

I do not have an easily available ath10k test setup with an SDIO card,
so that part is different to your environment as well. I would have
hoped this type of a difference to not depend on the PCI vs. SDIO part,
though, but I guess it is possible there could be some other reasons for
seeing different behavior. In any case, I would have expected quite a
bit larger number of reports in this area if this actually were
generically affecting all ath10k-based devices.

-- 
Jouni Malinen                                            PGP id EFC895FA


From festevam at gmail.com  Fri Jul 21 05:37:34 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Fri, 21 Jul 2023 09:37:34 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <ZLpX6vKw8oeWqkuo@w1.fi>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com> <ZLpX6vKw8oeWqkuo@w1.fi>
Message-ID: <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>

Hi Jouni,

On Fri, Jul 21, 2023 at 7:04?AM Jouni Malinen <j at w1.fi> wrote:

> The nl80211 control port mechanism is a more convenient approach for
> sending and receiving EAPOL frames. It gives more control over the
> transmission options and is a better fit for the special frames that are
> used for key management and that have rules that do not apply to all
> other Data frames. As such, there is significant desire to be able to
> use the nl80211 path for EAPOL frames for all cases in the future and
> the strongly preferred option here would be to fix the issue that seems
> to prevent the TX path through the nl80211 control port in the setup
> where you are seeing the issue.

Thanks for the explanation.

> I tried to reproduce this issue with ath10k without much success, i.e.,
> the nl80211 control port TX works fine in all my tests. I'm using the
> current hostap.git snapshot of wpa_supplicant, though, so it would be
> helpful if you could check whether you can reproduce the problem with
> the main branch snapshot from hostap.git instead of the v2.10 release.

When I reported the issue last month, I also tried running the
main branch snapshot from hostap.git and it also failed.

Today I tried it again against top of head:
96deacf5d71022b263a27113de52c1f13efdd6ec
and Wifi is functional on QCA9377!

It looks like there is a recent commit in the main branch that fixed
the problem.

Do you have any suggestion as to what this commit could be?

I would like to get v2.10 fixed as well.

Thanks a lot


From festevam at gmail.com  Fri Jul 21 07:11:35 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Fri, 21 Jul 2023 11:11:35 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi> <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
Message-ID: <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>

On Fri, Jul 21, 2023 at 9:37?AM Fabio Estevam <festevam at gmail.com> wrote:

> Today I tried it again against top of head:
> 96deacf5d71022b263a27113de52c1f13efdd6ec
> and Wifi is functional on QCA9377!

Sorry, the revert patch got applied by mistake and that's why it worked.

I rebuilt a clean tree with no patch applied, hostap sha is
96deacf5d71022b263a27113de52c1f13efdd6ec.

The error still happens:

# wpa_supplicant -iwlan0 -c /etc/wpa.conf &
# Successfully initialized wpa_supplicant
wlan0: SME: Trying to authenticat[   54.014745] wlan0: authenticate
with xx:xx:xx:xx:xx:xx
e with xx:xx:xx:xx:xx:xx (SSID='FABIOHOUSE' freq=2412 MHz)
[   54.026846] wlan0: 80 MHz not supported, disabling VHT
[   54.076840] wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
[   54.090265] wlan0: authenticated
wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='FABIOHO[
54.100333] wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
USE' freq=2412 MHz)
[   54.120615] wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411
status=0 aid=4)
[   54.155201] wlan0: associated
wlan0: Associated with xx:xx:xx:xx:xx:xx
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: Unknown event 37
wlan0: Unknown event 37
wlan0: Unknown event 37
wlan0: Unknown event 37
wlan0: Authentication with 74:3a:[   64.169967] wlan0:
deauthenticating from xx:xx:xx:xx:xx:xx by local choice (Reason:
3=DEAUTH_LEAVING)
ef:af:a7:6a timed out.
wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3
locally_generated=1
wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="FABIOHOUSE"
auth_failures=1 duration=10 reason=WRONG_KEY
BSSID xx:xx:xx:xx:xx:xx ignore list count incremented to 2, ignoring
for 10 seconds
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD

Any suggestions?


From festevam at gmail.com  Fri Jul 21 07:42:56 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Fri, 21 Jul 2023 11:42:56 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi> <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
 <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>
Message-ID: <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com>

On Fri, Jul 21, 2023 at 11:11?AM Fabio Estevam <festevam at gmail.com> wrote:
>
> On Fri, Jul 21, 2023 at 9:37?AM Fabio Estevam <festevam at gmail.com> wrote:
>
> > Today I tried it again against top of head:
> > 96deacf5d71022b263a27113de52c1f13efdd6ec
> > and Wifi is functional on QCA9377!
>
> Sorry, the revert patch got applied by mistake and that's why it worked.
>
> I rebuilt a clean tree with no patch applied, hostap sha is
> 96deacf5d71022b263a27113de52c1f13efdd6ec.
>
> The error still happens:
>
> # wpa_supplicant -iwlan0 -c /etc/wpa.conf &
> # Successfully initialized wpa_supplicant
> wlan0: SME: Trying to authenticat[   54.014745] wlan0: authenticate
> with xx:xx:xx:xx:xx:xx
> e with xx:xx:xx:xx:xx:xx (SSID='FABIOHOUSE' freq=2412 MHz)
> [   54.026846] wlan0: 80 MHz not supported, disabling VHT
> [   54.076840] wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
> [   54.090265] wlan0: authenticated
> wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='FABIOHO[
> 54.100333] wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
> USE' freq=2412 MHz)
> [   54.120615] wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411
> status=0 aid=4)
> [   54.155201] wlan0: associated
> wlan0: Associated with xx:xx:xx:xx:xx:xx
> wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
> wlan0: Unknown event 37

Here is log of wpa_supplicant -dd.

If you have any debug patch, I would be glad to test it.

# wpa_supplicant -dd -iwlan0 -c /etc/wpa.conf &
# wpa_supplicant v2.11-devel
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa.conf' driver 'default'
ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa.conf' -> '/etc/wpa.conf'
Reading configuration file '/etc/wpa.conf'
Line: 1 - start of a new network block
ssid - hexdump_ascii(len=10):
     46 41 42 49 4f 48 4f 55 53 45                     FABIOHOUSE
PSK - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='FABIOHOUSE'
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported cipher 00-0f-ac:13
nl80211: Supported cipher 00-0f-ac:11
nl80211: Supported cipher 00-0f-ac:12
nl80211: Supports Probe Response offload in AP mode
nl80211: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) -
hexdump(len=8): 04 00 00 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) -
hexdump(len=8): 04 00 00 00 00 00 00 40
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: key_mgmt=0x1fd0f enc=0xf0f auth=0x7 flags=0x4000530fb7bfbe0
rrm_flags=0x30 probe_resp_offloads=0x7 max_stations=32
max_remain_on_chan=5000 max_scan_ssids=16
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 6 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x23a53d0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=0801 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 08 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=040e multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0e
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=06 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=0a07 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=0a11 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=1101 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 11 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=1102 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 11 02
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=0505 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 05 05
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=0500 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 05 00
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=1301 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 13 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=1305 multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=2): 13 05
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x23a53d0 match=7e506f9a1a multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=208): ret=-114 (Operation
already in progress)
nl80211: Register frame match - hexdump(len=5): 7e 50 6f 9a 1a
nl80211: Failed to register Action frame processing - ignore for now
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
netlink: Operstate: ifindex=6 linkmode=1 (userspace-control),
operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
nl80211: Mode IEEE 802.11g: 2412 2417 2422 2427 2432 2437 2442 2447
2452 2457 2462 2467[NO_IR] 2472[NO_IR] 2484[DISABLED]
nl80211: Mode IEEE 802.11a: 5180[NO_IR] 5200[NO_IR] 5220[NO_IR]
5240[NO_IR] 5260[NO_IR][RADAR] 5280[NO_IR][RADAR] 5300[NO_IR][RADAR]
5320[NO_IR][RADAR] 5500[NO_IR][RADAR] 5520[NO_IR][RADAR]
5540[NO_IR][RADAR] 5560[NO_IR][RADAR] 5580[NO_IR][RADAR]
5600[NO_IR][RADAR] 5620[NO_IR][RADAR] 5640[NO_IR][RADAR]
5660[NO_IR][RADAR] 5680[NO_IR][RADAR] 5700[NO_IR][RADAR] 5720[NO_IR]
5745[NO_IR] 5765[NO_IR] 5785[NO_IR] 5805[NO_IR] 5825[NO_IR]
5845[NO_IR] 5865[DISABLED]
nl80211: Mode IEEE 802.11b: 2412 2417 2422 2427 2432 2437 2442 2447
2452 2457 2462 2467[NO_IR] 2472[NO_IR] 2484[DISABLED]
wlan0: Own MAC address: 00:1f:7b:31:04:a0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
key_idx=0 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
key_idx=1 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
key_idx=2 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
key_idx=3 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
key_idx=4 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
key_idx=5 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
nl80211: DEL_KEY
   broadcast key
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: Setting scan request: 0.100000 sec
TDLS: TDLS operation supported by driver
TDLS: Driver uses external link setup
TDLS: Driver does not support TDLS channel switching
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
nl80211: Skip set_supp_port(unauthorized) while not associated
random: Got 20/20 bytes from /dev/random
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0x23a3fd8
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0x23a3fd8 after 0.000219 second wait
wlan0: nl80211: scan request
nl80211: Scan SSID
nl80211: Scan co-located APs on 6 GHz
nl80211: Scan extra IEs - hexdump(len=13): 7f 0b 04 00 00 00 00 00 40
40 00 00 20
Scan requested (ret=0) - scan timeout 10 seconds
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (47) received
wlan0: Own scan request started a scan in 0.000675 seconds
nl80211: Event message available
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl[  591.384490] wlan0: authenticate with xx:xx:xx:xx:xx:xx
80211: Scan included frequencies:[  591.392674] wlan0: 80 MHz not
supported, disabling VHT
 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 5180
5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620
5640 5660 5680 5700 5720 5745 5765 5785 5805 5825 5845
wlan0: Event SCAN_RESULTS (3) received
wlan0: Scan completed in 4.858982 seconds
nl80211: Received scan results (2 BSSes)
wlan0: BSS: Start scan result update 1
wlan0: BSS: Add new id 0 BSSID xx:xx:xx:xx:xx:xx SSID 'FABIOHOUSE' freq 2412
wlan0: BSS: Add new id 1 BS[  591.439095] wlan0: send auth to
xx:xx:xx:xx:xx:xx (try 1/3)
SID 74:3a:ef:af:a7:6b SSID 'FABIOHOUSE_5G' freq 5660
BSS: last_scan_res_used=2/32
wlan0: New sc[  591.452923] wlan0: authenticated
an results available (own=1 ext=0)
wlan0: Radio work 'scan'@0x23a3fd8 done in 4.875944 seconds
wlan0: radio_work_free('scan'@0x23a3fd8): num_active_works --> 0
wlan0: Selecting BSS from priority group 0
wlan0: 0: xx:xx:xx:xx:xx:xx ssid='FABIOHOUSE' wpa_ie_len=0
rsn_ie_len=20 caps=0x411 level=-70 freq=2412  wps
wlan0:    selected based on RSN IE
wlan0:    selected BSS xx:xx:xx:xx:xx:xx ssid='FABIOHOUSE'
wlan0: Considering connect request: reassociate: 0  selected:
xx:xx:xx:xx:xx:xx  bssid: 00:00:00:00:00:00  pending:
00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x23a2ac8
current_ssid=(nil)
wlan0: Request association with xx:xx:xx:xx:xx:xx
TDLS: TDLS is allowed in the target BSS
TDLS: TDLS channel switch allowed in the target BSS
wlan0: No ongoing scan/p2p-scan found to abort
wlan0: Add radio work 'sme-connect'@0x23ad6f8
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'sme-connect'@0x23ad6f8 after 0.000244 second wait
wlan0: WPA: clearing own WPA/RSN IE
wlan0: RSN: clearing own RSNXE
wlan0: Automatic auth_alg selection: 0x1
wlan0: RSN: using IEEE 802.11i/D9.0
wlan0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
wlan0: WPA: Selected mgmt group cipher 32
wlan0: WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00
0f ac 04 01 00 00 0f ac 02 0c 00
wlan0: WPA: clearing AP RSNXE
wlan0: WPA: AP group 0x10 network profile group 0x18; available group 0x10
wlan0: WPA: using GTK CCMP
wlan0: WPA: AP pairwise 0x10 network profile pairwise 0x18; available
pairwise 0x10
wlan0: WPA: using PTK CCMP
wlan0: WPA: AP key_mgmt 0x2 network profile key_mgmt 0x3; available key_mgmt 0x2
wlan0: WPA: using KEY_MGMT WPA-PSK
wlan0: WPA: AP mgmt_group_cipher 0x20 network profile
mgmt_group_cipher 0x0; available mgmt_group_cipher 0x0
wlan0: WPA: not using MGMT group cipher
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04
01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
RSN: Set own RSNXE default - hexdump(len=0):
PSK (set in config) - hexdump(len=32): [REMOVED]
WPA: Set PMK based on external data - hexdump(len=32): [REMOVED]
RRM: Determining whether RRM can be used - device support: 0x30
RRM: No RRM in network
Added supported operating classes IE - hexdump(len=22): 3b 14 51 51 53
54 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82
wlan0: Cancelling scan request
wlan0: SME: Trying to authenticate with xx:xx:xx:xx:xx:xx
(SSID='FABIOHOUSE' freq=2412 MHz)
wlan0: State: SCANNING -> AUTHENTICATING
nl80211: Authenticate (ifindex=6)
  * bssid=xx:xx:xx:xx:xx:xx
  * freq=2412
  * SSID=FABIOHOUSE
  * IEs - hexdump(len=0): [NULL]
  * Auth Type 0
nl80211: Authentication request send successfully
RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Event message available
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0
nl80211: New station xx:xx:xx:xx:xx:xx
nl80211: Event message available
nl80211: Drv Event 37 (NL80211_CMD_AUTHENTICATE) received for wlan0
nl80211: MLME event 37 (NL80211_CMD_AUTHENTICATE) on
wlan0(00:1f:7b:31:04:a0) A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx on
link_id=-1
nl80211: MLME event frame - hexdump(len=41): b0 00 3a 01 00 1f 7b 31
04 a0 74 3a ef af a7 6a 74 3a ef af a7 6a 40 2d 00 00 02 00 00 00 dd
09 00 10 18 02 03 00 1c 00 00
nl80211: Authenticate event
wlan0: Event AUTH (10) received
wlan0: SME: Authentication response: peer=xx:xx:xx:xx:xx:xx
auth_type=0 auth_transaction=2 status_code=0
SME: Authentication response IEs - hexdump(len=11): dd 09 00 10 18 02
03 00 1c 00 00
SME: Association Request IEs - hexdump(len=57): 30 14 01 00 00 0f ac
04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 7f 0b 04 00 00 00 00 00
40 40 00 00 20 3b 14 51 51 53 54 73 74 75 76 77 78 79 7a 7b 7c 7d 7e
7f 80 81 82
wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='FABIOHO[
591.799664] wlan0: 80 MHz not supported, disabling VHT
USE' freq=2412 MHz)
wlan0: State: AUTHENTICATING -> ASSOCIATING
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
nl80211: Skip set_supp_port(unauthorized) while not associated
WPA: set own WPA/RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
00 00 0f ac 04 01 00 00 0f ac 02 0c 00
wlan0: RSN: clearing own RSNXE
nl80211: Associate (ifindex=6)
  * bssid=xx:xx:xx:xx:xx:xx
  * freq=2412
  * SSID=FABIOHOUSE
[  591.848580] wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
  * IEs - hexdump(len=57): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04
01 00 00 0f ac 02 0c 00 7f 0b 04 00 00 00 00 00 40 40 00 00 20 3b 14
51 51 53 54 73 74 75 [  591.867519] wlan0: RX AssocResp from
xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=4)
76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82
  * WPA Versions 0x2
  * pairwise=0xfac04
  * group=0xfac04
  * akm[0]=0xfac02
nl80211: Association request send successfully
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATIO[  591.897633] wlan0: associated
N) received for wlan0
nl80211: Delete station xx:xx:xx:xx:xx:xx
nl80211: Event message available
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0
nl80211: New station xx:xx:xx:xx:xx:xx
nl80211: Event message available
nl80211: BSS Event 129 (NL80211_CMD_CONTROL_PORT_FRAME) received for wlan0
wlan0: Event EAPOL_RX (23) received
wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
00 00 00 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0: Not associated - Delay processing of received EAPOL frame
(state=ASSOCIATING connected_addr=00:00:00:00:00:00)
RTM_NEWLINK: ifi_index=6 ifname=wlan0 operstate=5 linkmode=1
ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])
nl80211: Event message available
nl80211: Drv Event 38 (NL80211_CMD_ASSOCIATE) received for wlan0
nl80211: MLME event 38 (NL80211_CMD_ASSOCIATE) on
wlan0(00:1f:7b:31:04:a0) A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx on
link_id=-1
nl80211: MLME event frame - hexdump(len=171): 10 00 3a 01 00 1f 7b 31
04 a0 74 3a ef af a7 6a 74 3a ef af a7 6a 90 2d 11 04 00 00 04 c0 01
08 82 84 8b 96 24 30 48 6c 32 04 0c 12 18 60 2d 1a ad 01 17 ff 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 01
00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08
04 00 08 00 00 00 00 40 dd 18 00 50 f2 04 10 4a 00 01 10 10 3b 00 01
03 10 49 00 06 00 37 2a 00 01 20 dd 09 00 10 18 02 03 00 1c 00 00 dd
18 00 50 f2 02 01 01 88 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32
2f 00
nl80211: Associate event
wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3
locally_generated=1
BSSID xx:xx:xx:xx:xx:xx ignore list count incremented to 5, ignoring
for 600 seconds
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
nl80211: Associated on 2412 MHz
nl80211: Associated with xx:xx:xx:xx:xx:xx
nl80211: Set drv->ssid based on scan res info to 'FABIOHOUSE'
wlan0: Event ASSOC (0) received
wlan0: Association info event
req_ies - hexdump(len=122): 00 0a 46 41 42 49 4f 48 4f 55 53 45 01 08
02 04 0b 16 0c 12 18 24 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01
00 00 0f ac 04 01 00 00 0f ac 02 0c 00 2d 1a 6f 19 1b ff 00 00 00 00
00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 7f 0b 04 00 00
00 00 00 40 40 00 00 20 3b 14 51 51 53 54 73 74 75 76 77 78 79 7a 7b
7c 7d 7e 7f 80 81 82 dd 07 00 50 f2 02 00 01 00
resp_ies - hexdump(len=141): 01 08 82 84 8b 96 24 30 48 6c 32 04 0c 12
18 60 2d 1a ad 01 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 3d 16 01 00 04 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 7f 08 04 00 08 00 00 00 00 40 dd 18 00 50 f2
04 10 4a 00 01 10 10 3b 00 01 03 10 49 00 06 00 37 2a 00 01 20 dd 09
00 10 18 02 03 00 1c 00 00 dd 18 00 50 f2 02 01 01 88 00 03 a4 00 00
27 a4 00 00 42 43 5e 00 62 32 2f 00
wlan0: freq=2412 MHz
WPA: set own WPA/RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
00 00 0f ac 04 01 00 00 0f ac 02 0c 00
wlan0: RSN: clearing own RSNXE
wlan0: State: ASSOCIATING -> ASSOCIATED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
nl80211: Set supplicant port unauthorized for xx:xx:xx:xx:xx:xx
wlan0: Associated to a new BSS: BSSID=xx:xx:xx:xx:xx:xx
wlan0: Associated with xx:xx:xx:xx:xx:xx
wlan0: WPA: Association event - clear replay counter
wlan0: WPA: Clear old PTK
TDLS: Remove peers on association
wlan0: Setting authentication timeout: 10 sec 0 usec
wlan0: Cancelling scan request
wlan0: Process pending EAPOL frame that was received just before
association notification
wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
00 00 00 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0: Setting authentication timeout: 10 sec 0 usec
wlan0: IEEE 802.1X RX: version=2 type=3 length=117
WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00
00 00 00 00 00 00 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2
a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f
ac 04 fe e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0:   EAPOL-Key type=2
wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
wlan0:   key_length=16 key_data_length=22
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_nonce - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
wlan0: WPA: RX message 1 of 4-Way Handshake from xx:xx:xx:xx:xx:xx (ver=2)
RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a 3c
f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a
3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
RSN: PMKID from Authenticator - hexdump(len=16): fe e1 4a 3c f8 09 e0
2e 78 f3 58 1c 07 73 b3 0a
wlan0: RSN: no matching PMKID found
wlan0: State: ASSOCIATED -> 4WAY_HANDSHAKE
Get randomness: len=32 entropy=3
WPA: Renewed SNonce - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc
b8 d8 26 20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
WPA: PTK derivation using PRF(SHA1)
WPA: PTK derivation - A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx
WPA: Nonce1 - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26
20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
WPA: Nonce2 - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: KEK - hexdump(len=16): [REMOVED]
WPA: TK - hexdump(len=16): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 00
wlan0: WPA: Sending EAPOL-Key 2/4
WPA: Send EAPOL-Key frame to xx:xx:xx:xx:xx:xx ver=2 mic_len=16 key_mgmt=0x2
WPA: EAPOL-Key MIC using HMAC-SHA1
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: Derived Key MIC - hexdump(len=16): ac 73 0a 8b 1b 3c 82 ac 95 40
84 fb 0b 8e 8c 2e
WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00
00 00 00 00 00 00 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26 20 6a 1f 26
3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 ac 73 0a 8b 1b 3c 82 ac 95 40 84 fb 0b 8e 8c 2e 00 16 30 14 01 00
00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
nl80211: Send over control port dest=xx:xx:xx:xx:xx:xx proto=0x888e
len=121 no_encrypt=1
wlan0: Unknown event 37
nl80211: tx_control_port cookie=0x19
WMM AC: AC mandatory: AC_BE=0 AC_BK=0 AC_VI=0 AC_VO=0
WMM AC: U-APSD queues=0x0
WMM AC: Valid WMM association, WMM AC is enabled
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0
ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0
ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0
ifi_flags=0x11003 ([UP][LOWER_UP])
nl80211: Event message available
nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
nl80211: Ignore connect event (cmd=46) when using userspace SME
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (47) received
wlan0: External program started a scan
nl80211: Event message available
nl80211: Drv Event 139 (NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS)
received for wlan0
nl80211: Control port TX status (ack=1), cookie=25
wlan0: Event EAPOL_TX_STATUS (37) received
wlan0: Unknown event 37
nl80211: Event message available
nl80211: BSS Event 129 (NL80211_CMD_CONTROL_PORT_FRAME) received for wlan0
wlan0: Event EAPOL_RX (23) received
wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
00 00 01 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0: IEEE 802.1X RX: version=2 type=3 length=117
WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00
00 00 00 00 00 01 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2
a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f
ac 04 fe e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0:   EAPOL-Key type=2
wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
wlan0:   key_length=16 key_data_length=22
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
  key_nonce - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
wlan0: WPA: RX message 1 of 4-Way Handshake from xx:xx:xx:xx:xx:xx (ver=2)
RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a 3c
f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a
3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
RSN: PMKID from Authenticator - hexdump(len=16): fe e1 4a 3c f8 09 e0
2e 78 f3 58 1c 07 73 b3 0a
wlan0: RSN: no matching PMKID found
wlan0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: PTK derivation using PRF(SHA1)
WPA: PTK derivation - A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx
WPA: Nonce1 - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26
20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
WPA: Nonce2 - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: KEK - hexdump(len=16): [REMOVED]
WPA: TK - hexdump(len=16): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
wlan0: WPA: Sending EAPOL-Key 2/4
WPA: Send EAPOL-Key frame to xx:xx:xx:xx:xx:xx ver=2 mic_len=16 key_mgmt=0x2
WPA: EAPOL-Key MIC using HMAC-SHA1
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: Derived Key MIC - hexdump(len=16): 9e ef 58 f5 9a 29 2e 81 a7 d8
86 08 3e f5 8d c8
WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00
00 00 00 00 00 01 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26 20 6a 1f 26
3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 9e ef 58 f5 9a 29 2e 81 a7 d8 86 08 3e f5 8d c8 00 16 30 14 01 00
00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
nl80211: Send over control port dest=xx:xx:xx:xx:xx:xx proto=0x888e
len=121 no_encrypt=1
wlan0: Unknown event 37
nl80211: tx_control_port cookie=0x1a
nl80211: Event message available
nl80211: Drv Event 139 (NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS)
received for wlan0
nl80211: Control port TX status (ack=1), cookie=26
wlan0: Event EAPOL_TX_STATUS (37) received
wlan0: Unknown event 37
nl80211: Event message available
nl80211: BSS Event 129 (NL80211_CMD_CONTROL_PORT_FRAME) received for wlan0
wlan0: Event EAPOL_RX (23) received
wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
00 00 02 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0: IEEE 802.1X RX: version=2 type=3 length=117
WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00
00 00 00 00 00 02 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2
a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f
ac 04 fe e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0:   EAPOL-Key type=2
wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
wlan0:   key_length=16 key_data_length=22
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
  key_nonce - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
wlan0: WPA: RX message 1 of 4-Way Handshake from xx:xx:xx:xx:xx:xx (ver=2)
RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a 3c
f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a
3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
RSN: PMKID from Authenticator - hexdump(len=16): fe e1 4a 3c f8 09 e0
2e 78 f3 58 1c 07 73 b3 0a
wlan0: RSN: no matching PMKID found
wlan0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: PTK derivation using PRF(SHA1)
WPA: PTK derivation - A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx
WPA: Nonce1 - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26
20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
WPA: Nonce2 - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: KEK - hexdump(len=16): [REMOVED]
WPA: TK - hexdump(len=16): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
wlan0: WPA: Sending EAPOL-Key 2/4
WPA: Send EAPOL-Key frame to xx:xx:xx:xx:xx:xx ver=2 mic_len=16 key_mgmt=0x2
WPA: EAPOL-Key MIC using HMAC-SHA1
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: Derived Key MIC - hexdump(len=16): 3a f3 f5 5e b9 b9 6e b7 c4 a3
73 12 bf b0 3b 4f
WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00
00 00 00 00 00 02 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26 20 6a 1f 26
3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 3a f3 f5 5e b9 b9 6e b7 c4 a3 73 12 bf b0 3b 4f 00 16 30 14 01 00
00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
nl80211: Send over control port dest=xx:xx:xx:xx:xx:xx proto=0x888e
len=121 no_encrypt=1
wlan0: Unknown event 37
nl80211: tx_control_port cookie=0x1b
nl80211: Event message available
nl80211: Drv Event 139 (NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS)
received for wlan0
nl80211: Control port TX status (ack=1), cookie=27
wlan0: Event EAPOL_TX_STATUS (37) received
wlan0: Unknown event 37
nl80211: Event message available
nl80211: BSS Event 129 (NL80211_CMD_CONTROL_PORT_FRAME) received for wlan0
wlan0: Event EAPOL_RX (23) received
wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
00 00 03 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0: IEEE 802.1X RX: version=2 type=3 length=117
WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00
00 00 00 00 00 03 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2
a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f
ac 04 fe e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
wlan0:   EAPOL-Key type=2
wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
wlan0:   key_length=16 key_data_length=22
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03
  key_nonce - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
wlan0: WPA: RX message 1 of 4-Way Handshake from xx:xx:xx:xx:xx:xx (ver=2)
RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a 3c
f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a
3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
RSN: PMKID from Authenticator - hexdump(len=16): fe e1 4a 3c f8 09 e0
2e 78 f3 58 1c 07 73 b3 0a
wlan0: RSN: no matching PMKID found
wlan0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: PTK derivation using PRF(SHA1)
WPA: PTK derivation - A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx
WPA: Nonce1 - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26
20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
WPA: Nonce2 - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: KEK - hexdump(len=16): [REMOVED]
WPA: TK - hexdump(len=16): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 03
wlan0: WPA: Sending EAPOL-Key 2/4
WPA: Send EAPOL-Key frame to xx:xx:xx:xx:xx:xx ver=2 mic_len=16 key_mgmt=0x2
WPA: EAPOL-Key MIC using HMAC-SHA1
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: Derived Key MIC - hexdump(len=16): 3c 9a b2 5e cf 8b 18 2f b0 4a
57 bc 45 e1 db 79
WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00
00 00 00 00 00 03 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26 20 6a 1f 26
3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 3c 9a b2 5e cf 8b 18 2f b0 4a 57 bc 45 e1 db 79 00 16 30 14 01 00
00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
nl80211: Send over control port dest=xx:xx:xx:xx:xx:xx proto=0x888e
len=121 no_encrypt=1
wlan0: Unknown event 37
nl80211: tx_control_port cookie=0x1c
nl80211: Event message available
nl80211: Drv Event 139 (NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS)
received for wlan0
nl80211: Control port TX status (ack=1), cookie=28
wlan0: Event EAPOL_TX_STATUS (37) received
wlan0: Unknown event 37
nl80211: Event message available
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442
2447 2452 2457 2462 2467 2472 5180 5200 5220 5240 5260 5280 5300 5320
5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5720 5745 5765
5785 5805 5825 5845
wlan0: Event SCAN_RESULTS (3) received
nl80211: Received scan results (2 BSSes)
nl80211: Scan results indicate BSS status with xx:xx:xx:xx:xx:xx as associated
wlan0: BSS: Start scan result update 2
BSS: last_scan_res_used=2/32
wlan0: New scan results available (own=0 ext=1)
wlan0: Do not use results from externally requested scan operation for
network selection
RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0
ifi_flags=0x11003 ([UP][LOWER_UP])
wlan0: Authentication with 74:3a:[  602.250924] wlan0:
deauthenticating from xx:xx:xx:xx:xx:xx by local choice (Reason:
3=DEAUTH_LEAVING)
ef:af:a7:6a timed out.
Added BSSID xx:xx:xx:xx:xx:xx into ignore list, ignoring for 10 seconds
TDLS: Remove peers on disassociation
wlan0: WPA: Clear old PMK and PTK
wlan0: Request to deauthenticate - bssid=xx:xx:xx:xx:xx:xx
pending_bssid=00:00:00:00:00:00 reason=3 (DEAUTH_LEAVING)
state=4WAY_HANDSHAKE
TDLS: Tear down peers
wpa_driver_nl80211_deauthenticate(addr=xx:xx:xx:xx:xx:xx reason_code=3)
wlan0: Event DEAUTH (11) received
wlan0: Deauthentication notification
wlan0:  * reason 3 (DEAUTH_LEAVING) locally_generated=1
Deauthentication frame IE(s) - hexdump(len=0): [NULL]
wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3
locally_generated=1
wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="FABIOHOUSE"
auth_failures=1 duration=10 reason=WRONG_KEY
wlan0: Auto connect enabled: try to reconnect (wps=0/0 wpa_state=7)
wlan0: Setting scan request: 0.100000 sec
wlan0: Radio work 'sme-connect'@0x23ad6f8 done in 10.999229 seconds
wlan0: radio_work_free('sme-connect'@0x23ad6f8): num_active_works --> 0
BSSID xx:xx:xx:xx:xx:xx ignore list count incremented to 2, ignoring
for 10 seconds
wlan0: Consecutive connection failures: 1 --> request scan in 100 ms
wlan0: Ignore new scan request for 0.100000 sec since an earlier
request is scheduled to trigger sooner
TDLS: Remove peers on disassociation
wlan0: WPA: Clear old PMK and PTK
wlan0: Disconnect event - remove keys
wlan0: State: 4WAY_HANDSHAKE -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
nl80211: Skip set_supp_port(unauthorized) while not associated
WMM AC: WMM AC is disabled
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
nl80211: Skip set_supp_port(unauthorized) while not associated
QM: Clear all active DSCP policies
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
wlan0: Ignore new scan request for 1.000000 sec since an earlier
request is scheduled to trigger sooner
RTM_NEWLINK: ifi_index=6 ifname=wlan0 operstate=2 linkmode=1
ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for wlan0
nl80211: Delete station xx:xx:xx:xx:xx:xx
nl80211: Event message available
nl80211: Drv Event 39 (NL80211_CMD_DEAUTHENTICATE) received for wlan0
nl80211: MLME event 39 (NL80211_CMD_DEAUTHENTICATE) on
wlan0(00:1f:7b:31:04:a0) A1=xx:xx:xx:xx:xx:xx A2=00:1f:7b:31:04:a0 on
link_id=-1
nl80211: MLME event frame - hexdump(len=26): c0 00 00 00 74 3a ef af
a7 6a 00 1f 7b 31 04 a0 74 3a ef af a7 6a 00 00 03 00
nl80211: Deauthenticate event
nl80211: Ignore deauth event triggered due to own deauth request
nl80211: Event message available
nl80211: Drv Event 48 (NL80211_CMD_DISCONNECT) received for wlan0
nl80211: Ignore disconnect event when using userspace SME
wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Event message available
nl80211: Drv Event 36 (NL80211_CMD_REG_CHANGE) received for wlan0
nl80211: Regulatory domain change
 * initiator=0
 * type=1
wlan0: Event CHANNEL_LIST_CHANGED (27) received
wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
wlan0: Updating hw mode
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
nl80211: Mode IEEE 802.11g: 2412 2417 2422 2427 2432 2437 2442 2447
2452 2457 2462 2467[NO_IR] 2472[NO_IR] 2484[DISABLED]
nl80211: Mode IEEE 802.11a: 5180[NO_IR] 5200[NO_IR] 5220[NO_IR]
5240[NO_IR] 5260[NO_IR][RADAR] 5280[NO_IR][RADAR] 5300[NO_IR][RADAR]
5320[NO_IR][RADAR] 5500[NO_IR][RADAR] 5520[NO_IR][RADAR]
5540[NO_IR][RADAR] 5560[NO_IR][RADAR] 5580[NO_IR][RADAR]
5600[NO_IR][RADAR] 5620[NO_IR][RADAR] 5640[NO_IR][RADAR]
5660[NO_IR][RADAR] 5680[NO_IR][RADAR] 5700[NO_IR][RADAR] 5720[NO_IR]
5745[NO_IR] 5765[NO_IR] 5785[NO_IR] 5805[NO_IR] 5825[NO_IR]
5845[NO_IR] 5865[DISABLED]
nl80211: Mode IEEE 802.11b: 2412 2417 2422 2427 2432 2437 2442 2447
2452 2457 2462 2467[NO_IR] 2472[NO_IR] 2484[DISABLED]
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0x23c3d70
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0x23c3d70 after 0.000212 second wait
wlan0: nl80211: scan request
nl80211: Scan SSID
nl80211: Scan co-located APs on 6 GHz
nl80211: Scan extra IEs - hexdump(len=13): 7f 0b 04 00 00 00 00 00 40
40 00 00 20
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (47) received
wlan0: Own scan request started a scan in 0.001161 seconds


From quic_mpaluri at quicinc.com  Tue Jul 25 00:16:57 2023
From: quic_mpaluri at quicinc.com (Manaswini Paluri)
Date: Tue, 25 Jul 2023 12:46:57 +0530
Subject: [PATCH v2 1/2] AP: Add configuration option to specify the desired MLD address
Message-ID: <20230725071658.15731-1-quic_mpaluri@quicinc.com>

From: Ilan Peer <ilan.peer at intel.com>

Add mld_addr configuration option to set MLD address.
The already existing bssid configuration option can be used to
control the MLD link addresses.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Signed-off-by: Manaswini Paluri <quic_mpaluri at quicinc.com>
---
v2:
- Add documentation for the new conf parameter mld_addr in hostapd.conf
- Update comments for the changes done in hostapd_driver_init()
- Move BSSID empty check to separate patch
- Remove duplicate link MAC address randomization
---
 hostapd/config_file.c |  6 ++++++
 hostapd/hostapd.conf  |  6 ++++++
 hostapd/main.c        | 20 +++++++++++++++++---
 src/ap/ap_config.h    |  3 +++
 4 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 412ca8a9f..d76a1a462 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -4776,6 +4776,12 @@ static int hostapd_config_fill(struct hostapd_config *conf,
 		bss->mld_ap = !!atoi(pos);
 	} else if (os_strcmp(buf, "mld_id") == 0) {
 		bss->mld_id = atoi(pos);
+	} else if (os_strcmp(buf, "mld_addr") == 0) {
+		if (hwaddr_aton(pos, bss->mld_addr)) {
+			wpa_printf(MSG_ERROR,
+				   "Line %d: invalid mld_addr", line);
+			return 1;
+		}
 #endif /* CONFIG_IEEE80211BE */
 	} else {
 		wpa_printf(MSG_ERROR,
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index 30fb06d1c..c4e5d58f2 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -1048,6 +1048,12 @@ wmm_ac_vo_acm=0
 # MLD ID - Affiliated MLD ID
 #mld_id=1
 
+# AP MLD ADDRESS - AP MLD MAC address of this AP
+# The configured address will be set as interface hardware address and used as
+# AP MLD MAC address. If not set current interface hardware address will be used
+# as AP MLD MAC address.
+#mld_addr=02:03:04:05:06:07
+
 ##### IEEE 802.1X-2004 related configuration ##################################
 
 # Require IEEE 802.1X authorization
diff --git a/hostapd/main.c b/hostapd/main.c
index aebdffd1f..ac9a47a48 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -242,6 +242,16 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
 		break;
 	}
 	params.bssid = b;
+#ifdef CONFIG_IEEE80211BE
+	/*
+	 * Use the configured MLD address as interface hardware address if this
+	 * AP is part of an AP MLD.
+	 */
+	if (!is_zero_ether_addr(hapd->conf->mld_addr) &&
+	    hapd->conf->mld_ap)
+		params.bssid = hapd->conf->mld_addr;
+#endif /* CONFIG_IEEE80211BE */
+
 	params.ifname = hapd->conf->iface;
 	params.driver_params = hapd->iconf->driver_params;
 	params.use_pae_group_addr = hapd->conf->use_pae_group_addr;
@@ -270,14 +280,18 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
 #ifdef CONFIG_IEEE80211BE
 	/*
 	 * This is the first interface added to the AP MLD, so have the
-	 * interface hardware address be the MLD address and set a link address
-	 * to this interface.
+	 * interface hardware address be the MLD address, while the link address
+	 * would be derived from the original interface address if BSSID is not
+	 * configured, and otherwise it would be the configured BSSID.
 	 */
 	if (hapd->conf->mld_ap) {
 		os_memcpy(hapd->mld_addr, hapd->own_addr, ETH_ALEN);
-		random_mac_addr_keep_oui(hapd->own_addr);
 		hapd->mld_next_link_id = 0;
 		hapd->mld_link_id = hapd->mld_next_link_id++;
+		if (!b)
+			random_mac_addr_keep_oui(hapd->own_addr);
+		else
+			os_memcpy(hapd->own_addr, b, ETH_ALEN);
 	}
 
 setup_mld:
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 777aa5af0..83fdbaad1 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -944,6 +944,9 @@ struct hostapd_bss_config {
 
 	/* The MLD ID to which the AP MLD is affiliated with */
 	u8 mld_id;
+
+	/* The AP's MLD address within the MLD AP */
+	u8 mld_addr[ETH_ALEN];
 #endif /* CONFIG_IEEE80211BE */
 };
 
-- 
2.17.1



From quic_mpaluri at quicinc.com  Tue Jul 25 00:16:58 2023
From: quic_mpaluri at quicinc.com (Manaswini Paluri)
Date: Tue, 25 Jul 2023 12:46:58 +0530
Subject: [PATCH v2 2/2] AP: Use is_zero_ether_addr() to check if BSSID is NULL
In-Reply-To: <20230725071658.15731-1-quic_mpaluri@quicinc.com>
References: <20230725071658.15731-1-quic_mpaluri@quicinc.com>
Message-ID: <20230725071658.15731-2-quic_mpaluri@quicinc.com>

From: Ilan Peer <ilan.peer at intel.com>

Use helper function is_zero_ether_addr() for checking empty bssid
value in hostapd_driver_init().

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Signed-off-by: Manaswini Paluri <quic_mpaluri at quicinc.com>
---
 hostapd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hostapd/main.c b/hostapd/main.c
index ac9a47a48..4b730b6ef 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -218,7 +218,7 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
 #endif /* CONFIG_IEEE80211BE */
 
 	/* Initialize the driver interface */
-	if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
+	if (is_zero_ether_addr(b))
 		b = NULL;
 
 	os_memset(&params, 0, sizeof(params));
-- 
2.17.1



From opty77 at gmail.com  Tue Jul 25 04:39:13 2023
From: opty77 at gmail.com (Opty)
Date: Tue, 25 Jul 2023 13:39:13 +0200
Subject: IEEE 802.11 management frames filtering with nftables
Message-ID: <CAERDJOFb8N3LoX4FsQddc6bD9Z6jGT7KnuuzPakiwDwqAczKXw@mail.gmail.com>

Hello,

can I filter IEEE 802.11 management frames with nftables?

I want to get rid off

root at tplink:~# logread -e 'hostapd: wlan0: STA d8:1f:12:33:9e:aa IEEE
802.11: did not acknowledge authentication response' |
wc -l
12982

flooding the log but I'd also like to know about it in an aggregated
form (like 1/hour). From what I've read so far I got an impression
that those frames won't get it to nftables unless hostapd
authenticates the STA.

Regards,
Opty


From mcr at sandelman.ca  Tue Jul 25 06:18:47 2023
From: mcr at sandelman.ca (Michael Richardson)
Date: Tue, 25 Jul 2023 09:18:47 -0400
Subject: IEEE 802.11 management frames filtering with nftables
In-Reply-To: <CAERDJOFb8N3LoX4FsQddc6bD9Z6jGT7KnuuzPakiwDwqAczKXw@mail.gmail.com>
References: <CAERDJOFb8N3LoX4FsQddc6bD9Z6jGT7KnuuzPakiwDwqAczKXw@mail.gmail.com>
Message-ID: <6611.1690291127@localhost>


Opty <opty77 at gmail.com> wrote:
    > can I filter IEEE 802.11 management frames with nftables?

    > I want to get rid off

    > root at tplink:~# logread -e 'hostapd: wlan0: STA d8:1f:12:33:9e:aa IEEE
    > 802.11: did not acknowledge authentication response' | wc -l 12982

I don't think that this is a message about a frame, so whatever nftables does
makes no difference.
It's a message from hostapd saying that it got no reply.

    > flooding the log but I'd also like to know about it in an aggregated
    > form (like 1/hour). From what I've read so far I got an impression that
    > those frames won't get it to nftables unless hostapd authenticates the
    > STA.

I think you'd have to change hostapd code.
If your goal is to limit that message to once/hour for all stations, that
probably easy.  If you want to limit it to once/hour/station, then that might
require more infrastructure to remember things.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 511 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20230725/d34cdc45/attachment.sig>

From oss at eons.net  Tue Jul 25 08:51:26 2023
From: oss at eons.net (Stefan Paetow (OpenSource))
Date: Tue, 25 Jul 2023 16:51:26 +0100
Subject: Possible feature(tte) for eapol_test
Message-ID: <CAGmwA8qCQ_Rfey7iwDXLR+WBfKZvKEwxSCX1AMKFKdauSypfMA@mail.gmail.com>

Hi,

I have a possible feature (an extension of existing behaviour, rather)
for eapol_test. Eapol_test has the -N attribute sending feature, but
at the moment it does not support vendor-specific attributes (VSAs) in
a simple format similar to the existing -N<attr_id>:<syntax>:<value>
format.

So, I'm thinking of adding it either as an extension (i.e. extending
syntax from s, d, and x, to s, d, x, and v) or as a separate switch
(-V) altogether. Given that the functionality would simply take the
value portion to dig out the vendor enterprise number, its attr_id,
syntax and the value and reuse most of the existing stuff, I'm
wondering which Jouni and the people at large in this group would
prefer.

For example, send the VSA of 'Cisco-AVPair="foo=bar"'.

Existing approach:

-N 26:x:000000090109666f6f3d626172

Approach 1:

-N 26:v:9:1:s:foo=bar

Approach 2:

-N 26.9.1:s:foo=bar

Approach 3:

-V 9.1:s:foo=bar

For me, personally, 1 or 2 make sense, more specifically, 1 does. If
we add the token 'v', we can then go over the remaining value with the
same parser again, but make sure we only use the dictionary for vendor
9 (Cisco).

Suggestions are welcome.

With kind regards

Stefan


From aland at deployingradius.com  Tue Jul 25 09:39:14 2023
From: aland at deployingradius.com (Alan DeKok)
Date: Tue, 25 Jul 2023 09:39:14 -0700
Subject: Possible feature(tte) for eapol_test
In-Reply-To: <CAGmwA8qCQ_Rfey7iwDXLR+WBfKZvKEwxSCX1AMKFKdauSypfMA@mail.gmail.com>
References: <CAGmwA8qCQ_Rfey7iwDXLR+WBfKZvKEwxSCX1AMKFKdauSypfMA@mail.gmail.com>
Message-ID: <33ECBDC2-0EED-4690-B5F5-C84BB42C9E90@deployingradius.com>

On Jul 25, 2023, at 8:51 AM, Stefan Paetow (OpenSource) <oss at eons.net> wrote:
> 
> 
> So, I'm thinking of adding it either as an extension (i.e. extending
> syntax from s, d, and x, to s, d, x, and v) or as a separate switch
> (-V) altogether. Given that the functionality would simply take the
> value portion to dig out the vendor enterprise number, its attr_id,
> syntax and the value and reuse most of the existing stuff, I'm
> wondering which Jouni and the people at large in this group would
> prefer.

  RFC 6929 defines an OID syntax for attributes.  https://www.rfc-editor.org/rfc/rfc6929.html#section-2.7.2

> For example, send the VSA of 'Cisco-AVPair="foo=bar"'.
> 
> Existing approach:
> 
> -N 26:x:000000090109666f6f3d626172

  I would suggest:

-N 26.9.1:s:foo=bar

  There needs to be special handling for 26, that the next field is a 32-bit vendor ID.

  But after that, the code could assume that "-N ...n.m..." is just a TLV "n" with sub-TLV "m", in 8-bit form.   That would cover the bulk of the VSAs.

  It should arguably still allow

	-N 26:x:...

  Alan DeKok.



From chaitanya.mgit at gmail.com  Tue Jul 25 09:47:18 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Tue, 25 Jul 2023 22:17:18 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi> <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
 <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com> <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com>
Message-ID: <CABPxzY+oYpJ3zwas0zGxQNrZYnaZUESAUVgEJLPPySmVspmpBg@mail.gmail.com>

On Fri, Jul 21, 2023 at 8:13?PM Fabio Estevam <festevam at gmail.com> wrote:
>
> On Fri, Jul 21, 2023 at 11:11?AM Fabio Estevam <festevam at gmail.com> wrote:
> >
> > On Fri, Jul 21, 2023 at 9:37?AM Fabio Estevam <festevam at gmail.com> wrote:
> >
> > > Today I tried it again against top of head:
> > > 96deacf5d71022b263a27113de52c1f13efdd6ec
> > > and Wifi is functional on QCA9377!
> >
> > Sorry, the revert patch got applied by mistake and that's why it worked.
> >
> > I rebuilt a clean tree with no patch applied, hostap sha is
> > 96deacf5d71022b263a27113de52c1f13efdd6ec.
> >
> > The error still happens:
> >
> > # wpa_supplicant -iwlan0 -c /etc/wpa.conf &
> > # Successfully initialized wpa_supplicant
> > wlan0: SME: Trying to authenticat[   54.014745] wlan0: authenticate
> > with xx:xx:xx:xx:xx:xx
> > e with xx:xx:xx:xx:xx:xx (SSID='FABIOHOUSE' freq=2412 MHz)
> > [   54.026846] wlan0: 80 MHz not supported, disabling VHT
> > [   54.076840] wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
> > [   54.090265] wlan0: authenticated
> > wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='FABIOHO[
> > 54.100333] wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
> > USE' freq=2412 MHz)
> > [   54.120615] wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411
> > status=0 aid=4)
> > [   54.155201] wlan0: associated
> > wlan0: Associated with xx:xx:xx:xx:xx:xx
> > wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
> > wlan0: Unknown event 37
>
> Here is log of wpa_supplicant -dd.
>
> If you have any debug patch, I would be glad to test it.
I will try and repro locally by mimicing ath11k in hwsim first before
attempting to fix.
> # wpa_supplicant -dd -iwlan0 -c /etc/wpa.conf &
> # wpa_supplicant v2.11-devel
> random: Trying to read entropy from /dev/random
> Successfully initialized wpa_supplicant
> Initializing interface 'wlan0' conf '/etc/wpa.conf' driver 'default'
> ctrl_interface 'N/A' bridge 'N/A'
> Configuration file '/etc/wpa.conf' -> '/etc/wpa.conf'
> Reading configuration file '/etc/wpa.conf'
> Line: 1 - start of a new network block
> ssid - hexdump_ascii(len=10):
>      46 41 42 49 4f 48 4f 55 53 45                     FABIOHOUSE
> PSK - hexdump(len=32): [REMOVED]
> Priority group 0
>    id=0 ssid='FABIOHOUSE'
> nl80211: TDLS supported
> nl80211: TDLS external setup
> nl80211: Supported cipher 00-0f-ac:1
> nl80211: Supported cipher 00-0f-ac:5
> nl80211: Supported cipher 00-0f-ac:2
> nl80211: Supported cipher 00-0f-ac:4
> nl80211: Supported cipher 00-0f-ac:6
> nl80211: Supported cipher 00-0f-ac:13
> nl80211: Supported cipher 00-0f-ac:11
> nl80211: Supported cipher 00-0f-ac:12
> nl80211: Supports Probe Response offload in AP mode
> nl80211: Using driver-based off-channel TX
> nl80211: Driver-advertised extended capabilities (default) -
> hexdump(len=8): 04 00 00 00 00 00 00 40
> nl80211: Driver-advertised extended capabilities mask (default) -
> hexdump(len=8): 04 00 00 00 00 00 00 40
> nl80211: Use separate P2P group interface (driver advertised support)
> nl80211: Enable multi-channel concurrent (driver advertised support)
> nl80211: use P2P_DEVICE support
> nl80211: key_mgmt=0x1fd0f enc=0xf0f auth=0x7 flags=0x4000530fb7bfbe0
> rrm_flags=0x30 probe_resp_offloads=0x7 max_stations=32
> max_remain_on_chan=5000 max_scan_ssids=16
> nl80211: interface wlan0 in phy phy0
> nl80211: Set mode ifindex 6 iftype 2 (STATION)
> nl80211: Subscribe to mgmt frames with non-AP handle 0x23a53d0
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=0801 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 08 01
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=040e multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 04 0e
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=06 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=1): 06
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=0a07 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 0a 07
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=0a11 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 0a 11
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=1101 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 11 01
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=1102 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 11 02
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=0505 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 05 05
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=0500 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 05 00
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=1301 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 13 01
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=1305 multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=2): 13 05
> nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
> nl_handle=0x23a53d0 match=7e506f9a1a multicast=0
> nl80211: kernel reports: Match already configured
> nl80211: Register frame command failed (type=208): ret=-114 (Operation
> already in progress)
> nl80211: Register frame match - hexdump(len=5): 7e 50 6f 9a 1a
> nl80211: Failed to register Action frame processing - ignore for now
> rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
> netlink: Operstate: ifindex=6 linkmode=1 (userspace-control),
> operstate=5 (IF_OPER_DORMANT)
> Add interface wlan0 to a new radio phy0
> nl80211: Regulatory information - country=00
> nl80211: 2402-2472 @ 40 MHz 20 mBm
> nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
> nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
> nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
> nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
> nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
> nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
> nl80211: 57240-63720 @ 2160 MHz 0 mBm
> nl80211: Added 802.11b mode based on 802.11g information
> nl80211: Mode IEEE 802.11g: 2412 2417 2422 2427 2432 2437 2442 2447
> 2452 2457 2462 2467[NO_IR] 2472[NO_IR] 2484[DISABLED]
> nl80211: Mode IEEE 802.11a: 5180[NO_IR] 5200[NO_IR] 5220[NO_IR]
> 5240[NO_IR] 5260[NO_IR][RADAR] 5280[NO_IR][RADAR] 5300[NO_IR][RADAR]
> 5320[NO_IR][RADAR] 5500[NO_IR][RADAR] 5520[NO_IR][RADAR]
> 5540[NO_IR][RADAR] 5560[NO_IR][RADAR] 5580[NO_IR][RADAR]
> 5600[NO_IR][RADAR] 5620[NO_IR][RADAR] 5640[NO_IR][RADAR]
> 5660[NO_IR][RADAR] 5680[NO_IR][RADAR] 5700[NO_IR][RADAR] 5720[NO_IR]
> 5745[NO_IR] 5765[NO_IR] 5785[NO_IR] 5805[NO_IR] 5825[NO_IR]
> 5845[NO_IR] 5865[DISABLED]
> nl80211: Mode IEEE 802.11b: 2412 2417 2422 2427 2432 2437 2442 2447
> 2452 2457 2462 2467[NO_IR] 2472[NO_IR] 2484[DISABLED]
> wlan0: Own MAC address: 00:1f:7b:31:04:a0
> wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
> key_idx=0 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
> nl80211: DEL_KEY
>    broadcast key
> wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
> key_idx=1 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
> nl80211: DEL_KEY
>    broadcast key
> wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
> key_idx=2 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
> nl80211: DEL_KEY
>    broadcast key
> wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
> key_idx=3 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
> nl80211: DEL_KEY
>    broadcast key
> wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
> key_idx=4 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
> nl80211: DEL_KEY
>    broadcast key
> wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil)
> key_idx=5 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 link_id=-1
> nl80211: DEL_KEY
>    broadcast key
> wlan0: RSN: flushing PMKID list in the driver
> nl80211: Flush PMKIDs
> wlan0: Setting scan request: 0.100000 sec
> TDLS: TDLS operation supported by driver
> TDLS: Driver uses external link setup
> TDLS: Driver does not support TDLS channel switching
> wlan0: Added interface wlan0
> wlan0: State: DISCONNECTED -> DISCONNECTED
> nl80211: Set wlan0 operstate 0->0 (DORMANT)
> netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
> (IF_OPER_DORMANT)
> nl80211: Skip set_supp_port(unauthorized) while not associated
> random: Got 20/20 bytes from /dev/random
> wlan0: State: DISCONNECTED -> SCANNING
> wlan0: Starting AP scan for wildcard SSID
> wlan0: Add radio work 'scan'@0x23a3fd8
> wlan0: First radio work item in the queue - schedule start immediately
> wlan0: Starting radio work 'scan'@0x23a3fd8 after 0.000219 second wait
> wlan0: nl80211: scan request
> nl80211: Scan SSID
> nl80211: Scan co-located APs on 6 GHz
> nl80211: Scan extra IEs - hexdump(len=13): 7f 0b 04 00 00 00 00 00 40
> 40 00 00 20
> Scan requested (ret=0) - scan timeout 10 seconds
> nl80211: Event message available
> nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
> wlan0: nl80211: Scan trigger
> wlan0: Event SCAN_STARTED (47) received
> wlan0: Own scan request started a scan in 0.000675 seconds
> nl80211: Event message available
> nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
> wlan0: nl80211: New scan results available
> nl80211: Scan probed for SSID ''
> nl[  591.384490] wlan0: authenticate with xx:xx:xx:xx:xx:xx
> 80211: Scan included frequencies:[  591.392674] wlan0: 80 MHz not
> supported, disabling VHT
>  2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 5180
> 5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620
> 5640 5660 5680 5700 5720 5745 5765 5785 5805 5825 5845
> wlan0: Event SCAN_RESULTS (3) received
> wlan0: Scan completed in 4.858982 seconds
> nl80211: Received scan results (2 BSSes)
> wlan0: BSS: Start scan result update 1
> wlan0: BSS: Add new id 0 BSSID xx:xx:xx:xx:xx:xx SSID 'FABIOHOUSE' freq 2412
> wlan0: BSS: Add new id 1 BS[  591.439095] wlan0: send auth to
> xx:xx:xx:xx:xx:xx (try 1/3)
> SID 74:3a:ef:af:a7:6b SSID 'FABIOHOUSE_5G' freq 5660
> BSS: last_scan_res_used=2/32
> wlan0: New sc[  591.452923] wlan0: authenticated
> an results available (own=1 ext=0)
> wlan0: Radio work 'scan'@0x23a3fd8 done in 4.875944 seconds
> wlan0: radio_work_free('scan'@0x23a3fd8): num_active_works --> 0
> wlan0: Selecting BSS from priority group 0
> wlan0: 0: xx:xx:xx:xx:xx:xx ssid='FABIOHOUSE' wpa_ie_len=0
> rsn_ie_len=20 caps=0x411 level=-70 freq=2412  wps
> wlan0:    selected based on RSN IE
> wlan0:    selected BSS xx:xx:xx:xx:xx:xx ssid='FABIOHOUSE'
> wlan0: Considering connect request: reassociate: 0  selected:
> xx:xx:xx:xx:xx:xx  bssid: 00:00:00:00:00:00  pending:
> 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x23a2ac8
> current_ssid=(nil)
> wlan0: Request association with xx:xx:xx:xx:xx:xx
> TDLS: TDLS is allowed in the target BSS
> TDLS: TDLS channel switch allowed in the target BSS
> wlan0: No ongoing scan/p2p-scan found to abort
> wlan0: Add radio work 'sme-connect'@0x23ad6f8
> wlan0: First radio work item in the queue - schedule start immediately
> wlan0: Starting radio work 'sme-connect'@0x23ad6f8 after 0.000244 second wait
> wlan0: WPA: clearing own WPA/RSN IE
> wlan0: RSN: clearing own RSNXE
> wlan0: Automatic auth_alg selection: 0x1
> wlan0: RSN: using IEEE 802.11i/D9.0
> wlan0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
> wlan0: WPA: Selected mgmt group cipher 32
> wlan0: WPA: clearing AP WPA IE
> WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00
> 0f ac 04 01 00 00 0f ac 02 0c 00
> wlan0: WPA: clearing AP RSNXE
> wlan0: WPA: AP group 0x10 network profile group 0x18; available group 0x10
> wlan0: WPA: using GTK CCMP
> wlan0: WPA: AP pairwise 0x10 network profile pairwise 0x18; available
> pairwise 0x10
> wlan0: WPA: using PTK CCMP
> wlan0: WPA: AP key_mgmt 0x2 network profile key_mgmt 0x3; available key_mgmt 0x2
> wlan0: WPA: using KEY_MGMT WPA-PSK
> wlan0: WPA: AP mgmt_group_cipher 0x20 network profile
> mgmt_group_cipher 0x0; available mgmt_group_cipher 0x0
> wlan0: WPA: not using MGMT group cipher
> WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04
> 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> RSN: Set own RSNXE default - hexdump(len=0):
> PSK (set in config) - hexdump(len=32): [REMOVED]
> WPA: Set PMK based on external data - hexdump(len=32): [REMOVED]
> RRM: Determining whether RRM can be used - device support: 0x30
> RRM: No RRM in network
> Added supported operating classes IE - hexdump(len=22): 3b 14 51 51 53
> 54 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82
> wlan0: Cancelling scan request
> wlan0: SME: Trying to authenticate with xx:xx:xx:xx:xx:xx
> (SSID='FABIOHOUSE' freq=2412 MHz)
> wlan0: State: SCANNING -> AUTHENTICATING
> nl80211: Authenticate (ifindex=6)
>   * bssid=xx:xx:xx:xx:xx:xx
>   * freq=2412
>   * SSID=FABIOHOUSE
>   * IEs - hexdump(len=0): [NULL]
>   * Auth Type 0
> nl80211: Authentication request send successfully
> RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
> nl80211: Event message available
> nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0
> nl80211: New station xx:xx:xx:xx:xx:xx
> nl80211: Event message available
> nl80211: Drv Event 37 (NL80211_CMD_AUTHENTICATE) received for wlan0
> nl80211: MLME event 37 (NL80211_CMD_AUTHENTICATE) on
> wlan0(00:1f:7b:31:04:a0) A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx on
> link_id=-1
> nl80211: MLME event frame - hexdump(len=41): b0 00 3a 01 00 1f 7b 31
> 04 a0 74 3a ef af a7 6a 74 3a ef af a7 6a 40 2d 00 00 02 00 00 00 dd
> 09 00 10 18 02 03 00 1c 00 00
> nl80211: Authenticate event
> wlan0: Event AUTH (10) received
> wlan0: SME: Authentication response: peer=xx:xx:xx:xx:xx:xx
> auth_type=0 auth_transaction=2 status_code=0
> SME: Authentication response IEs - hexdump(len=11): dd 09 00 10 18 02
> 03 00 1c 00 00
> SME: Association Request IEs - hexdump(len=57): 30 14 01 00 00 0f ac
> 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 7f 0b 04 00 00 00 00 00
> 40 40 00 00 20 3b 14 51 51 53 54 73 74 75 76 77 78 79 7a 7b 7c 7d 7e
> 7f 80 81 82
> wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='FABIOHO[
> 591.799664] wlan0: 80 MHz not supported, disabling VHT
> USE' freq=2412 MHz)
> wlan0: State: AUTHENTICATING -> ASSOCIATING
> nl80211: Set wlan0 operstate 0->0 (DORMANT)
> netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
> (IF_OPER_DORMANT)
> nl80211: Skip set_supp_port(unauthorized) while not associated
> WPA: set own WPA/RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
> 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> wlan0: RSN: clearing own RSNXE
> nl80211: Associate (ifindex=6)
>   * bssid=xx:xx:xx:xx:xx:xx
>   * freq=2412
>   * SSID=FABIOHOUSE
> [  591.848580] wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
>   * IEs - hexdump(len=57): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04
> 01 00 00 0f ac 02 0c 00 7f 0b 04 00 00 00 00 00 40 40 00 00 20 3b 14
> 51 51 53 54 73 74 75 [  591.867519] wlan0: RX AssocResp from
> xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=4)
> 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82
>   * WPA Versions 0x2
>   * pairwise=0xfac04
>   * group=0xfac04
>   * akm[0]=0xfac02
> nl80211: Association request send successfully
> nl80211: Event message available
> nl80211: Drv Event 20 (NL80211_CMD_DEL_STATIO[  591.897633] wlan0: associated
> N) received for wlan0
> nl80211: Delete station xx:xx:xx:xx:xx:xx
This is peculiar, not sure why DEL_STA is being triggered.
> nl80211: Event message available
> nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0
> nl80211: New station xx:xx:xx:xx:xx:xx
> nl80211: Event message available
> nl80211: BSS Event 129 (NL80211_CMD_CONTROL_PORT_FRAME) received for wlan0
> wlan0: Event EAPOL_RX (23) received
> wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
This is always received before the CMD_ASSOCIATE, though WPA supplicant seems
to handle it, but I suspect some kind of race here.
> RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
> 00 00 00 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
> fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
> e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: Not associated - Delay processing of received EAPOL frame
> (state=ASSOCIATING connected_addr=00:00:00:00:00:00)
> RTM_NEWLINK: ifi_index=6 ifname=wlan0 operstate=5 linkmode=1
> ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])
> nl80211: Event message available
> nl80211: Drv Event 38 (NL80211_CMD_ASSOCIATE) received for wlan0
> nl80211: MLME event 38 (NL80211_CMD_ASSOCIATE) on
> wlan0(00:1f:7b:31:04:a0) A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx on
> link_id=-1
> nl80211: MLME event frame - hexdump(len=171): 10 00 3a 01 00 1f 7b 31
> 04 a0 74 3a ef af a7 6a 74 3a ef af a7 6a 90 2d 11 04 00 00 04 c0 01
> 08 82 84 8b 96 24 30 48 6c 32 04 0c 12 18 60 2d 1a ad 01 17 ff 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 01
> 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08
> 04 00 08 00 00 00 00 40 dd 18 00 50 f2 04 10 4a 00 01 10 10 3b 00 01
> 03 10 49 00 06 00 37 2a 00 01 20 dd 09 00 10 18 02 03 00 1c 00 00 dd
> 18 00 50 f2 02 01 01 88 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32
> 2f 00
> nl80211: Associate event
> wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3
> locally_generated=1
> BSSID xx:xx:xx:xx:xx:xx ignore list count incremented to 5, ignoring
> for 600 seconds
> wlan0: CTRL-EVENT-DSCP-POLICY clear_all
> wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
> nl80211: Associated on 2412 MHz
> nl80211: Associated with xx:xx:xx:xx:xx:xx
> nl80211: Set drv->ssid based on scan res info to 'FABIOHOUSE'
> wlan0: Event ASSOC (0) received
> wlan0: Association info event
> req_ies - hexdump(len=122): 00 0a 46 41 42 49 4f 48 4f 55 53 45 01 08
> 02 04 0b 16 0c 12 18 24 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01
> 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 2d 1a 6f 19 1b ff 00 00 00 00
> 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 7f 0b 04 00 00
> 00 00 00 40 40 00 00 20 3b 14 51 51 53 54 73 74 75 76 77 78 79 7a 7b
> 7c 7d 7e 7f 80 81 82 dd 07 00 50 f2 02 00 01 00
> resp_ies - hexdump(len=141): 01 08 82 84 8b 96 24 30 48 6c 32 04 0c 12
> 18 60 2d 1a ad 01 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 3d 16 01 00 04 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 7f 08 04 00 08 00 00 00 00 40 dd 18 00 50 f2
> 04 10 4a 00 01 10 10 3b 00 01 03 10 49 00 06 00 37 2a 00 01 20 dd 09
> 00 10 18 02 03 00 1c 00 00 dd 18 00 50 f2 02 01 01 88 00 03 a4 00 00
> 27 a4 00 00 42 43 5e 00 62 32 2f 00
> wlan0: freq=2412 MHz
> WPA: set own WPA/RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
> 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> wlan0: RSN: clearing own RSNXE
> wlan0: State: ASSOCIATING -> ASSOCIATED
> nl80211: Set wlan0 operstate 0->0 (DORMANT)
> netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
> (IF_OPER_DORMANT)
> nl80211: Set supplicant port unauthorized for xx:xx:xx:xx:xx:xx
> wlan0: Associated to a new BSS: BSSID=xx:xx:xx:xx:xx:xx
> wlan0: Associated with xx:xx:xx:xx:xx:xx
> wlan0: WPA: Association event - clear replay counter
> wlan0: WPA: Clear old PTK
> TDLS: Remove peers on association
> wlan0: Setting authentication timeout: 10 sec 0 usec
> wlan0: Cancelling scan request
> wlan0: Process pending EAPOL frame that was received just before
> association notification
> wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
> RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
> 00 00 00 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
> fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
> e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: Setting authentication timeout: 10 sec 0 usec
> wlan0: IEEE 802.1X RX: version=2 type=3 length=117
> WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00
> 00 00 00 00 00 00 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2
> a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f
> ac 04 fe e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0:   EAPOL-Key type=2
> wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
> wlan0:   key_length=16 key_data_length=22
>   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_nonce - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
> ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
>   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> wlan0: WPA: RX message 1 of 4-Way Handshake from xx:xx:xx:xx:xx:xx (ver=2)
> RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a 3c
> f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a
> 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> RSN: PMKID from Authenticator - hexdump(len=16): fe e1 4a 3c f8 09 e0
> 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: RSN: no matching PMKID found
> wlan0: State: ASSOCIATED -> 4WAY_HANDSHAKE
> Get randomness: len=32 entropy=3
> WPA: Renewed SNonce - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc
> b8 d8 26 20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
> WPA: PTK derivation using PRF(SHA1)
> WPA: PTK derivation - A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx
> WPA: Nonce1 - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26
> 20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
> WPA: Nonce2 - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
> ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
> WPA: PMK - hexdump(len=32): [REMOVED]
> WPA: PTK - hexdump(len=48): [REMOVED]
> WPA: KCK - hexdump(len=16): [REMOVED]
> WPA: KEK - hexdump(len=16): [REMOVED]
> WPA: TK - hexdump(len=16): [REMOVED]
> WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
> 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 00
> wlan0: WPA: Sending EAPOL-Key 2/4
> WPA: Send EAPOL-Key frame to xx:xx:xx:xx:xx:xx ver=2 mic_len=16 key_mgmt=0x2
> WPA: EAPOL-Key MIC using HMAC-SHA1
> WPA: KCK - hexdump(len=16): [REMOVED]
> WPA: Derived Key MIC - hexdump(len=16): ac 73 0a 8b 1b 3c 82 ac 95 40
> 84 fb 0b 8e 8c 2e
> WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00
> 00 00 00 00 00 00 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26 20 6a 1f 26
> 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 ac 73 0a 8b 1b 3c 82 ac 95 40 84 fb 0b 8e 8c 2e 00 16 30 14 01 00
> 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> nl80211: Send over control port dest=xx:xx:xx:xx:xx:xx proto=0x888e
> len=121 no_encrypt=1
> wlan0: Unknown event 37
> nl80211: tx_control_port cookie=0x19
> WMM AC: AC mandatory: AC_BE=0 AC_BK=0 AC_VI=0 AC_VO=0
> WMM AC: U-APSD queues=0x0
> WMM AC: Valid WMM association, WMM AC is enabled
> wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
> RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0
> ifi_flags=0x11003 ([UP][LOWER_UP])
> RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0
> ifi_flags=0x11003 ([UP][LOWER_UP])
> RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0
> ifi_flags=0x11003 ([UP][LOWER_UP])
> nl80211: Event message available
> nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
> nl80211: Ignore connect event (cmd=46) when using userspace SME
> nl80211: Event message available
> nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
> wlan0: nl80211: Scan trigger
> wlan0: Event SCAN_STARTED (47) received
> wlan0: External program started a scan
> nl80211: Event message available
> nl80211: Drv Event 139 (NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS)
> received for wlan0
> nl80211: Control port TX status (ack=1), cookie=25
> wlan0: Event EAPOL_TX_STATUS (37) received
> wlan0: Unknown event 37
> nl80211: Event message available
> nl80211: BSS Event 129 (NL80211_CMD_CONTROL_PORT_FRAME) received for wlan0
> wlan0: Event EAPOL_RX (23) received
> wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
> RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
> 00 00 01 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
> fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
> e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: IEEE 802.1X RX: version=2 type=3 length=117
> WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00
> 00 00 00 00 00 01 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2
> a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f
> ac 04 fe e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0:   EAPOL-Key type=2
> wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
> wlan0:   key_length=16 key_data_length=22
>   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
>   key_nonce - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
> ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
>   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> wlan0: WPA: RX message 1 of 4-Way Handshake from xx:xx:xx:xx:xx:xx (ver=2)
> RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a 3c
> f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a
> 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> RSN: PMKID from Authenticator - hexdump(len=16): fe e1 4a 3c f8 09 e0
> 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: RSN: no matching PMKID found
> wlan0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
> WPA: PTK derivation using PRF(SHA1)
> WPA: PTK derivation - A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx
> WPA: Nonce1 - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26
> 20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
> WPA: Nonce2 - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
> ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
> WPA: PMK - hexdump(len=32): [REMOVED]
> WPA: PTK - hexdump(len=48): [REMOVED]
> WPA: KCK - hexdump(len=16): [REMOVED]
> WPA: KEK - hexdump(len=16): [REMOVED]
> WPA: TK - hexdump(len=16): [REMOVED]
> WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
> 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
> wlan0: WPA: Sending EAPOL-Key 2/4
> WPA: Send EAPOL-Key frame to xx:xx:xx:xx:xx:xx ver=2 mic_len=16 key_mgmt=0x2
> WPA: EAPOL-Key MIC using HMAC-SHA1
> WPA: KCK - hexdump(len=16): [REMOVED]
> WPA: Derived Key MIC - hexdump(len=16): 9e ef 58 f5 9a 29 2e 81 a7 d8
> 86 08 3e f5 8d c8
> WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00
> 00 00 00 00 00 01 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26 20 6a 1f 26
> 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 9e ef 58 f5 9a 29 2e 81 a7 d8 86 08 3e f5 8d c8 00 16 30 14 01 00
> 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> nl80211: Send over control port dest=xx:xx:xx:xx:xx:xx proto=0x888e
> len=121 no_encrypt=1
> wlan0: Unknown event 37
> nl80211: tx_control_port cookie=0x1a
> nl80211: Event message available
> nl80211: Drv Event 139 (NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS)
> received for wlan0
> nl80211: Control port TX status (ack=1), cookie=26
> wlan0: Event EAPOL_TX_STATUS (37) received
> wlan0: Unknown event 37
> nl80211: Event message available
> nl80211: BSS Event 129 (NL80211_CMD_CONTROL_PORT_FRAME) received for wlan0
> wlan0: Event EAPOL_RX (23) received
> wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
> RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
> 00 00 02 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
> fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
> e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: IEEE 802.1X RX: version=2 type=3 length=117
> WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00
> 00 00 00 00 00 02 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2
> a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f
> ac 04 fe e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0:   EAPOL-Key type=2
> wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
> wlan0:   key_length=16 key_data_length=22
>   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
>   key_nonce - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
> ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
>   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> wlan0: WPA: RX message 1 of 4-Way Handshake from xx:xx:xx:xx:xx:xx (ver=2)
> RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a 3c
> f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a
> 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> RSN: PMKID from Authenticator - hexdump(len=16): fe e1 4a 3c f8 09 e0
> 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: RSN: no matching PMKID found
> wlan0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
> WPA: PTK derivation using PRF(SHA1)
> WPA: PTK derivation - A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx
> WPA: Nonce1 - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26
> 20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
> WPA: Nonce2 - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
> ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
> WPA: PMK - hexdump(len=32): [REMOVED]
> WPA: PTK - hexdump(len=48): [REMOVED]
> WPA: KCK - hexdump(len=16): [REMOVED]
> WPA: KEK - hexdump(len=16): [REMOVED]
> WPA: TK - hexdump(len=16): [REMOVED]
> WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
> 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
> wlan0: WPA: Sending EAPOL-Key 2/4
> WPA: Send EAPOL-Key frame to xx:xx:xx:xx:xx:xx ver=2 mic_len=16 key_mgmt=0x2
> WPA: EAPOL-Key MIC using HMAC-SHA1
> WPA: KCK - hexdump(len=16): [REMOVED]
> WPA: Derived Key MIC - hexdump(len=16): 3a f3 f5 5e b9 b9 6e b7 c4 a3
> 73 12 bf b0 3b 4f
> WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00
> 00 00 00 00 00 02 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26 20 6a 1f 26
> 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 3a f3 f5 5e b9 b9 6e b7 c4 a3 73 12 bf b0 3b 4f 00 16 30 14 01 00
> 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> nl80211: Send over control port dest=xx:xx:xx:xx:xx:xx proto=0x888e
> len=121 no_encrypt=1
> wlan0: Unknown event 37
> nl80211: tx_control_port cookie=0x1b
> nl80211: Event message available
> nl80211: Drv Event 139 (NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS)
> received for wlan0
> nl80211: Control port TX status (ack=1), cookie=27
> wlan0: Event EAPOL_TX_STATUS (37) received
> wlan0: Unknown event 37
> nl80211: Event message available
> nl80211: BSS Event 129 (NL80211_CMD_CONTROL_PORT_FRAME) received for wlan0
> wlan0: Event EAPOL_RX (23) received
> wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx (encrypted=0)
> RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00
> 00 00 03 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2 a0 87 7d
> fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 fe
> e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: IEEE 802.1X RX: version=2 type=3 length=117
> WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00
> 00 00 00 00 00 03 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e ac 5b f6 b2
> a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f
> ac 04 fe e1 4a 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> wlan0:   EAPOL-Key type=2
> wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
> wlan0:   key_length=16 key_data_length=22
>   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03
>   key_nonce - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
> ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
>   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
>   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> wlan0: WPA: RX message 1 of 4-Way Handshake from xx:xx:xx:xx:xx:xx (ver=2)
> RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a 3c
> f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 fe e1 4a
> 3c f8 09 e0 2e 78 f3 58 1c 07 73 b3 0a
> RSN: PMKID from Authenticator - hexdump(len=16): fe e1 4a 3c f8 09 e0
> 2e 78 f3 58 1c 07 73 b3 0a
> wlan0: RSN: no matching PMKID found
> wlan0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
> WPA: PTK derivation using PRF(SHA1)
> WPA: PTK derivation - A1=00:1f:7b:31:04:a0 A2=xx:xx:xx:xx:xx:xx
> WPA: Nonce1 - hexdump(len=32): 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26
> 20 6a 1f 26 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c
> WPA: Nonce2 - hexdump(len=32): 9e 4b 0f 0b 7d 47 f7 f5 16 b6 07 30 2e
> ac 5b f6 b2 a0 87 7d fb 94 c1 96 d4 07 b2 71 41 a6 a9 17
> WPA: PMK - hexdump(len=32): [REMOVED]
> WPA: PTK - hexdump(len=48): [REMOVED]
> WPA: KCK - hexdump(len=16): [REMOVED]
> WPA: KEK - hexdump(len=16): [REMOVED]
> WPA: TK - hexdump(len=16): [REMOVED]
> WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01
> 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 03
> wlan0: WPA: Sending EAPOL-Key 2/4
> WPA: Send EAPOL-Key frame to xx:xx:xx:xx:xx:xx ver=2 mic_len=16 key_mgmt=0x2
> WPA: EAPOL-Key MIC using HMAC-SHA1
> WPA: KCK - hexdump(len=16): [REMOVED]
> WPA: Derived Key MIC - hexdump(len=16): 3c 9a b2 5e cf 8b 18 2f b0 4a
> 57 bc 45 e1 db 79
> WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00
> 00 00 00 00 00 03 06 d0 6b ac 57 7d 60 94 c0 bc b8 d8 26 20 6a 1f 26
> 3e 0a 42 5f c5 8a bb b5 14 4a d1 8a 61 9b 5c 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 3c 9a b2 5e cf 8b 18 2f b0 4a 57 bc 45 e1 db 79 00 16 30 14 01 00
> 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
> nl80211: Send over control port dest=xx:xx:xx:xx:xx:xx proto=0x888e
> len=121 no_encrypt=1
> wlan0: Unknown event 37
> nl80211: tx_control_port cookie=0x1c
> nl80211: Event message available
> nl80211: Drv Event 139 (NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS)
> received for wlan0
> nl80211: Control port TX status (ack=1), cookie=28
> wlan0: Event EAPOL_TX_STATUS (37) received
> wlan0: Unknown event 37
> nl80211: Event message available
> nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
> wlan0: nl80211: New scan results available
> nl80211: Scan probed for SSID ''
> nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442
> 2447 2452 2457 2462 2467 2472 5180 5200 5220 5240 5260 5280 5300 5320
> 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5720 5745 5765
> 5785 5805 5825 5845
> wlan0: Event SCAN_RESULTS (3) received
> nl80211: Received scan results (2 BSSes)
> nl80211: Scan results indicate BSS status with xx:xx:xx:xx:xx:xx as associated
> wlan0: BSS: Start scan result update 2
> BSS: last_scan_res_used=2/32
> wlan0: New scan results available (own=0 ext=1)
> wlan0: Do not use results from externally requested scan operation for
> network selection
> RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0
> ifi_flags=0x11003 ([UP][LOWER_UP])
> wlan0: Authentication with 74:3a:[  602.250924] wlan0:
> deauthenticating from xx:xx:xx:xx:xx:xx by local choice (Reason:
> 3=DEAUTH_LEAVING)
> ef:af:a7:6a timed out.
> Added BSSID xx:xx:xx:xx:xx:xx into ignore list, ignoring for 10 seconds
> TDLS: Remove peers on disassociation
> wlan0: WPA: Clear old PMK and PTK
> wlan0: Request to deauthenticate - bssid=xx:xx:xx:xx:xx:xx
> pending_bssid=00:00:00:00:00:00 reason=3 (DEAUTH_LEAVING)
> state=4WAY_HANDSHAKE
> TDLS: Tear down peers
> wpa_driver_nl80211_deauthenticate(addr=xx:xx:xx:xx:xx:xx reason_code=3)
> wlan0: Event DEAUTH (11) received
> wlan0: Deauthentication notification
> wlan0:  * reason 3 (DEAUTH_LEAVING) locally_generated=1
> Deauthentication frame IE(s) - hexdump(len=0): [NULL]
> wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3
> locally_generated=1
> wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
> wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="FABIOHOUSE"
> auth_failures=1 duration=10 reason=WRONG_KEY
> wlan0: Auto connect enabled: try to reconnect (wps=0/0 wpa_state=7)
> wlan0: Setting scan request: 0.100000 sec
> wlan0: Radio work 'sme-connect'@0x23ad6f8 done in 10.999229 seconds
> wlan0: radio_work_free('sme-connect'@0x23ad6f8): num_active_works --> 0
> BSSID xx:xx:xx:xx:xx:xx ignore list count incremented to 2, ignoring
> for 10 seconds
> wlan0: Consecutive connection failures: 1 --> request scan in 100 ms
> wlan0: Ignore new scan request for 0.100000 sec since an earlier
> request is scheduled to trigger sooner
> TDLS: Remove peers on disassociation
> wlan0: WPA: Clear old PMK and PTK
> wlan0: Disconnect event - remove keys
> wlan0: State: 4WAY_HANDSHAKE -> DISCONNECTED
> nl80211: Set wlan0 operstate 0->0 (DORMANT)
> netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
> (IF_OPER_DORMANT)
> nl80211: Skip set_supp_port(unauthorized) while not associated
> WMM AC: WMM AC is disabled
> wlan0: State: DISCONNECTED -> DISCONNECTED
> nl80211: Set wlan0 operstate 0->0 (DORMANT)
> netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5
> (IF_OPER_DORMANT)
> nl80211: Skip set_supp_port(unauthorized) while not associated
> QM: Clear all active DSCP policies
> wlan0: CTRL-EVENT-DSCP-POLICY clear_all
> wlan0: Ignore new scan request for 1.000000 sec since an earlier
> request is scheduled to trigger sooner
> RTM_NEWLINK: ifi_index=6 ifname=wlan0 operstate=2 linkmode=1
> ifi_family=0 ifi_flags=0x1003 ([UP])
> nl80211: Event message available
> nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for wlan0
> nl80211: Delete station xx:xx:xx:xx:xx:xx
> nl80211: Event message available
> nl80211: Drv Event 39 (NL80211_CMD_DEAUTHENTICATE) received for wlan0
> nl80211: MLME event 39 (NL80211_CMD_DEAUTHENTICATE) on
> wlan0(00:1f:7b:31:04:a0) A1=xx:xx:xx:xx:xx:xx A2=00:1f:7b:31:04:a0 on
> link_id=-1
> nl80211: MLME event frame - hexdump(len=26): c0 00 00 00 74 3a ef af
> a7 6a 00 1f 7b 31 04 a0 74 3a ef af a7 6a 00 00 03 00
> nl80211: Deauthenticate event
> nl80211: Ignore deauth event triggered due to own deauth request
> nl80211: Event message available
> nl80211: Drv Event 48 (NL80211_CMD_DISCONNECT) received for wlan0
> nl80211: Ignore disconnect event when using userspace SME
> wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
> RTM_NEWLINK: ifi_index=6 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
> nl80211: Event message available
> nl80211: Drv Event 36 (NL80211_CMD_REG_CHANGE) received for wlan0
> nl80211: Regulatory domain change
>  * initiator=0
>  * type=1
> wlan0: Event CHANNEL_LIST_CHANGED (27) received
> wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
> wlan0: Updating hw mode
> nl80211: Regulatory information - country=00
> nl80211: 2402-2472 @ 40 MHz 20 mBm
> nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
> nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
> nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
> nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
> nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
> nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
> nl80211: 57240-63720 @ 2160 MHz 0 mBm
> nl80211: Added 802.11b mode based on 802.11g information
> nl80211: Mode IEEE 802.11g: 2412 2417 2422 2427 2432 2437 2442 2447
> 2452 2457 2462 2467[NO_IR] 2472[NO_IR] 2484[DISABLED]
> nl80211: Mode IEEE 802.11a: 5180[NO_IR] 5200[NO_IR] 5220[NO_IR]
> 5240[NO_IR] 5260[NO_IR][RADAR] 5280[NO_IR][RADAR] 5300[NO_IR][RADAR]
> 5320[NO_IR][RADAR] 5500[NO_IR][RADAR] 5520[NO_IR][RADAR]
> 5540[NO_IR][RADAR] 5560[NO_IR][RADAR] 5580[NO_IR][RADAR]
> 5600[NO_IR][RADAR] 5620[NO_IR][RADAR] 5640[NO_IR][RADAR]
> 5660[NO_IR][RADAR] 5680[NO_IR][RADAR] 5700[NO_IR][RADAR] 5720[NO_IR]
> 5745[NO_IR] 5765[NO_IR] 5785[NO_IR] 5805[NO_IR] 5825[NO_IR]
> 5845[NO_IR] 5865[DISABLED]
> nl80211: Mode IEEE 802.11b: 2412 2417 2422 2427 2432 2437 2442 2447
> 2452 2457 2462 2467[NO_IR] 2472[NO_IR] 2484[DISABLED]
> wlan0: State: DISCONNECTED -> SCANNING
> wlan0: Starting AP scan for wildcard SSID
> wlan0: Add radio work 'scan'@0x23c3d70
> wlan0: First radio work item in the queue - schedule start immediately
> wlan0: Starting radio work 'scan'@0x23c3d70 after 0.000212 second wait
> wlan0: nl80211: scan request
> nl80211: Scan SSID
> nl80211: Scan co-located APs on 6 GHz
> nl80211: Scan extra IEs - hexdump(len=13): 7f 0b 04 00 00 00 00 00 40
> 40 00 00 20
> Scan requested (ret=0) - scan timeout 30 seconds
> nl80211: Event message available
> nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
> wlan0: nl80211: Scan trigger
> wlan0: Event SCAN_STARTED (47) received
> wlan0: Own scan request started a scan in 0.001161 seconds


From festevam at gmail.com  Tue Jul 25 10:03:17 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Tue, 25 Jul 2023 14:03:17 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzY+oYpJ3zwas0zGxQNrZYnaZUESAUVgEJLPPySmVspmpBg@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5C5Q-DeYua0n6TWheSQ8s68Po36CPF5FeQ3t2R=rdq7Ag@mail.gmail.com>
 <CABPxzYLaoY5-CJx6J_wTd81yadWKNnB0tEiJjtkTc1y5cacznA@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi> <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
 <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>
 <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com> <CABPxzY+oYpJ3zwas0zGxQNrZYnaZUESAUVgEJLPPySmVspmpBg@mail.gmail.com>
Message-ID: <CAOMZO5AnWmPALa1GWjNe+2DBMoo9SmqS04gj8txg4ukjJ3wtoA@mail.gmail.com>

Hi Chaitanya,

On Tue, Jul 25, 2023 at 1:47?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:

> I will try and repro locally by mimicing ath11k in hwsim first before
> attempting to fix.

Thanks, appreciate it. Just keep in mind that I am using ath10k, not ath11k.

Cheers


From shaarang.tyagi at gmail.com  Tue Jul 25 03:55:06 2023
From: shaarang.tyagi at gmail.com (shaarang tyagi)
Date: Tue, 25 Jul 2023 16:25:06 +0530
Subject: wpa_supplicant 802.1X fallback to unauthorized network access
Message-ID: <CAOAOcWsF_W8ugCpm4ga5kR7sfn4YviXOw+eXnnGQjN2ZhuHE=A@mail.gmail.com>

Hello,


I see a feature in windows 7? 802.1X settings where we can "Fallback
to unauthroized network access".


It means that if 802.1X is not enabled on the switch then it will
still be able to connect to network.


Can I acheieve something similar with wpa_supplicant, what config i need to do?


Can i specify a timeout for this..?



Best?regards,
Shaarang


From greearb at candelatech.com  Wed Jul 26 10:16:16 2023
From: greearb at candelatech.com (Ben Greear)
Date: Wed, 26 Jul 2023 10:16:16 -0700
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5AnWmPALa1GWjNe+2DBMoo9SmqS04gj8txg4ukjJ3wtoA@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi>
 <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
 <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>
 <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com>
 <CABPxzY+oYpJ3zwas0zGxQNrZYnaZUESAUVgEJLPPySmVspmpBg@mail.gmail.com>
 <CAOMZO5AnWmPALa1GWjNe+2DBMoo9SmqS04gj8txg4ukjJ3wtoA@mail.gmail.com>
Message-ID: <aad43d6d-aeb3-e636-3363-340b6e2316c5@candelatech.com>

On 7/25/23 10:03, Fabio Estevam wrote:
> Hi Chaitanya,
> 
> On Tue, Jul 25, 2023 at 1:47?PM Krishna Chaitanya
> <chaitanya.mgit at gmail.com> wrote:
> 
>> I will try and repro locally by mimicing ath11k in hwsim first before
>> attempting to fix.
> 
> Thanks, appreciate it. Just keep in mind that I am using ath10k, not ath11k.

At one time, ath10k firmware had some weird logic related to trying to coordinate
4-way handshake with setting keys.  I'm not sure that was ever changed in upstream
firmware, so possibly you are hitting that bug/race.

We use recent supplicant and ath10k and do not notice any problems, but we also use
our modified ath10k firmware that changes how the 4-way and key-setting is handled,
as well as plenty of patches to ath10k driver that may or may not have some affect
on this path.

We also run with this supplicant patch, among a pile of others, possibly one of these makes
a difference:

https://github.com/greearb/hostap-ct/commit/c614b56d0c9073b27f2d1dfdfd014a068ab2c65f

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com




From greearb at candelatech.com  Thu Jul 27 09:02:11 2023
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Thu, 27 Jul 2023 09:02:11 -0700
Subject: [PATCH] wnm:  Choose best available bss, not just first one.
Message-ID: <20230727160211.2549658-1-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

This should allow STA to make better choice about which
BSS to roam to.

Use estimated-throughput as comparison value.  Can improve
the est-tput measurement to improve this selection criteria
if wanted in the future.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 wpa_supplicant/wnm_sta.c | 55 +++++++++++++++++++++++++---------------
 1 file changed, 34 insertions(+), 21 deletions(-)

diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 8acc8fc88..de485b510 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -614,22 +614,6 @@ static void wnm_clear_acceptable(struct wpa_supplicant *wpa_s)
 		wpa_s->wnm_neighbor_report_elements[i].acceptable = 0;
 }
 
-
-static struct wpa_bss * get_first_acceptable(struct wpa_supplicant *wpa_s)
-{
-	unsigned int i;
-	struct neighbor_report *nei;
-
-	for (i = 0; i < wpa_s->wnm_num_neighbor_report; i++) {
-		nei = &wpa_s->wnm_neighbor_report_elements[i];
-		if (nei->acceptable)
-			return wpa_bss_get_bssid(wpa_s, nei->bssid);
-	}
-
-	return NULL;
-}
-
-
 #ifdef CONFIG_MBO
 static struct wpa_bss *
 get_mbo_transition_candidate(struct wpa_supplicant *wpa_s,
@@ -723,6 +707,19 @@ end:
 }
 #endif /* CONFIG_MBO */
 
+struct wpa_bss* find_best_target(struct wpa_bss* a, struct wpa_bss* b)
+{
+	if (a->est_throughput > b->est_throughput) {
+		wpa_printf(MSG_DEBUG, "WNM: A is best: " MACSTR " est-tput: %d  B: " MACSTR " est-tput: %d",
+			   MAC2STR(a->bssid), a->est_throughput,
+			   MAC2STR(b->bssid), b->est_throughput);
+		return a;
+	}
+	wpa_printf(MSG_DEBUG, "WNM: B is best, A: " MACSTR " est-tput: %d  B: " MACSTR " est-tput: %d",
+		   MAC2STR(a->bssid), a->est_throughput,
+		   MAC2STR(b->bssid), b->est_throughput);
+	return b;
+}
 
 static struct wpa_bss *
 compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs,
@@ -731,6 +728,9 @@ compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs,
 	u8 i;
 	struct wpa_bss *bss = wpa_s->current_bss;
 	struct wpa_bss *target;
+	struct wpa_bss *best_target = bss;
+	struct wpa_bss *bss_in_list = NULL;
+	long diff;
 
 	if (!bss)
 		return NULL;
@@ -817,25 +817,38 @@ compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs,
 		}
 
 		nei->acceptable = 1;
+
+		best_target = find_best_target(target, best_target);
+		if (target == bss)
+			bss_in_list = bss;
 	}
 
 #ifdef CONFIG_MBO
 	if (wpa_s->wnm_mbo_trans_reason_present)
 		target = get_mbo_transition_candidate(wpa_s, reason);
 	else
-		target = get_first_acceptable(wpa_s);
+		target = best_target;
 #else /* CONFIG_MBO */
-	target = get_first_acceptable(wpa_s);
+	target = best_target;
 #endif /* CONFIG_MBO */
 
 	if (target) {
 		wpa_printf(MSG_DEBUG,
 			   "WNM: Found an acceptable preferred transition candidate BSS "
-			   MACSTR " (RSSI %d)",
-			   MAC2STR(target->bssid), target->level);
+			   MACSTR " (RSSI %d, tput: %d  bss-tput: %d)",
+			   MAC2STR(target->bssid), target->level, target->est_throughput,
+			   bss->est_throughput);
 	}
 
-	return target;
+	if (!bss_in_list)
+		return target;
+
+	diff = target->est_throughput - bss_in_list->est_throughput;
+	if (diff > bss_in_list->est_throughput >> 4) {
+		/* It is more than 100/16 percent better, so switch. */
+		return target;
+	}
+	return bss_in_list; /* stay with our existing bss, not enough change in est rate to switch. */
 }
 
 
-- 
2.40.0



From ameydav at maxlinear.com  Sat Jul 29 23:46:01 2023
From: ameydav at maxlinear.com (Arnon Meydav)
Date: Sun, 30 Jul 2023 06:46:01 +0000
Subject: [PATCH] QOS MAP: Change configuration to be per bss, not radio
Message-ID: <CO6PR19MB5353007DDBD2619FA6101CC5BF04A@CO6PR19MB5353.namprd19.prod.outlook.com>

From: Eran Gonen <egonen at maxlinear.com>

Previously the NL80211_CMD_SET_QOS_MAP command was sent to the radio interface.
Send this command using nl80211_cmd_msg and the bss, instead of drv.

Signed-off-by: Arnon Meydav <ameydav at maxlinear.com>
---
 src/drivers/driver_nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e4180daed..76374f5bf 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -11300,7 +11300,7 @@ static int nl80211_set_qos_map(void *priv, const u8 *qos_map_set,
        wpa_hexdump(MSG_DEBUG, "nl80211: Setting QoS Map",
                    qos_map_set, qos_map_set_len);

-       if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_SET_QOS_MAP)) ||
+       if (!(msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_SET_QOS_MAP)) ||
            nla_put(msg, NL80211_ATTR_QOS_MAP, qos_map_set_len, qos_map_set)) {
                nlmsg_free(msg);
                return -ENOBUFS;
--
2.17.1

From chaitanya.mgit at gmail.com  Sun Jul 30 12:09:43 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Mon, 31 Jul 2023 00:39:43 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CAOMZO5DC-qkjgRohkQUPVvfN6NU+_omypSOxD5C7m6ww48PpoQ@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi> <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
 <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>
 <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com>
 <CABPxzY+oYpJ3zwas0zGxQNrZYnaZUESAUVgEJLPPySmVspmpBg@mail.gmail.com>
 <CAOMZO5AnWmPALa1GWjNe+2DBMoo9SmqS04gj8txg4ukjJ3wtoA@mail.gmail.com>
 <aad43d6d-aeb3-e636-3363-340b6e2316c5@candelatech.com> <CAOMZO5DC-qkjgRohkQUPVvfN6NU+_omypSOxD5C7m6ww48PpoQ@mail.gmail.com>
Message-ID: <CABPxzY+w4RCXx=UizLS-JW1a=Brh=gSs6gwZPhosawRt1qKHEQ@mail.gmail.com>

On Thu, Jul 27, 2023 at 12:12?AM Fabio Estevam <festevam at gmail.com> wrote:
>
> Hi Ben,
>
> On Wed, Jul 26, 2023 at 2:16?PM Ben Greear <greearb at candelatech.com> wrote:
>
> > At one time, ath10k firmware had some weird logic related to trying to coordinate
> > 4-way handshake with setting keys.  I'm not sure that was ever changed in upstream
> > firmware, so possibly you are hitting that bug/race.
>
> I only have access to the QCA9377 firmware from the upstream
> linux-firmware repo:
>
> ath10k_sdio mmc1:0001:1: qca9377 hw1.1 sdio target 0x05020001 chip_id
> 0x00000000 sub 0000:0000
> ath10k_sdio mmc1:0001:1: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
> ath10k_sdio mmc1:0001:1: firmware ver WLAN.TF.1.1.1-00061-QCATFSWPZ-1
> api 5 features ignore-otp crc32 7746e551
> ath10k_sdio mmc1:0001:1: failed to fetch board data for
> bus=sdio,vendor=0271,device=0701,subsystem-vendor=0000,subsystem-device=0000
> from ath10k/QCA9377/hw1.0/board-2.bin
> ath10k_sdio mmc1:0001:1: board_file api 1 bmi_id N/A crc32 544289f7
> ath10k_sdio mmc1:0001:1: htt-ver 3.32 wmi-op 4 htt-op 3 cal otp
> max-sta 32 raw 0 hwcrypto 1
>
> > We use recent supplicant and ath10k and do not notice any problems, but we also use
> > our modified ath10k firmware that changes how the 4-way and key-setting is handled,
> > as well as plenty of patches to ath10k driver that may or may not have some affect
> > on this path.
> >
> > We also run with this supplicant patch, among a pile of others, possibly one of these makes
> > a difference:
> >
> > https://github.com/greearb/hostap-ct/commit/c614b56d0c9073b27f2d1dfdfd014a068ab2c65f
>
mac80211 uses `7` priority for control port already.
> Tried this specific patch, but it did not help. Still get the 'wlan0:
> Unknown event 37' message and authentication fails.
>
I have spent some more time looking into this, but couldn't reproduce
the issue, but I have a
a couple of suggestions:

1. disable HW crypto in ath10k, cryptmode=1 + frame_mode=0
(noencrypt=1 for EAPoL, so,
    if ath10k doesn't handle well, it can cause packet drops)
2. disable WMM_AC (this shouldn't cause any drops at STA side as in
the worst case mac80211 fallbacks
    BK, but AP might reject, so, worth a try).


From chaitanya.mgit at gmail.com  Mon Jul 31 13:08:29 2023
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Tue, 1 Aug 2023 01:38:29 +0530
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzY+Eekctw9LHW2PB0a=6WOF5Ese94e+RG0CyBih18Gv21Q@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi> <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
 <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>
 <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com>
 <CABPxzY+oYpJ3zwas0zGxQNrZYnaZUESAUVgEJLPPySmVspmpBg@mail.gmail.com>
 <CAOMZO5AnWmPALa1GWjNe+2DBMoo9SmqS04gj8txg4ukjJ3wtoA@mail.gmail.com>
 <aad43d6d-aeb3-e636-3363-340b6e2316c5@candelatech.com> <CAOMZO5DC-qkjgRohkQUPVvfN6NU+_omypSOxD5C7m6ww48PpoQ@mail.gmail.com>
 <CABPxzY+w4RCXx=UizLS-JW1a=Brh=gSs6gwZPhosawRt1qKHEQ@mail.gmail.com>
 <CAOMZO5ASZSaPg6YSmJDhsb46owJL8GEoz-9F8h1GSZXMJXgvGQ@mail.gmail.com> <CABPxzY+Eekctw9LHW2PB0a=6WOF5Ese94e+RG0CyBih18Gv21Q@mail.gmail.com>
Message-ID: <CABPxzY+c3-VFvio3PCRvMYvQmEoE-HmmsipvhOhpg3zHsNpTcQ@mail.gmail.com>

> On Mon, 31 Jul 2023, 21:41 Fabio Estevam, <festevam at gmail.com> wrote:
>>
>> Hi Chaitanya,
>>
>> On Sun, Jul 30, 2023 at 4:09?PM Krishna Chaitanya
>> <chaitanya.mgit at gmail.com> wrote:
>>
>> > I have spent some more time looking into this, but couldn't reproduce
>> > the issue, but I have a
>> > a couple of suggestions:
>> >
>> > 1. disable HW crypto in ath10k, cryptmode=1 + frame_mode=0
>> > (noencrypt=1 for EAPoL, so,
>>
>> I passed the suggested parameters via the kernel command line:
>>
>> ath10k-core.cryptmode=1 ath10k-core.frame_mode=0
>>
>> , but the result was the same.
>
Okay, thanks, so, encryption might not be the problem.
>>
>>
>> >     if ath10k doesn't handle well, it can cause packet drops)
>> > 2. disable WMM_AC (this shouldn't cause any drops at STA side as in
>> > the worst case mac80211 fallbacks
>> >     BK, but AP might reject, so, worth a try).
>>
>> I am not sure how to disable WMM_AC. Care to explain?
>
Sorry, this would be a setting in the AP web UI.
>>
>>
>> Thanks


From festevam at gmail.com  Wed Jul 26 11:41:54 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Wed, 26 Jul 2023 15:41:54 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <aad43d6d-aeb3-e636-3363-340b6e2316c5@candelatech.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi> <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
 <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>
 <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com>
 <CABPxzY+oYpJ3zwas0zGxQNrZYnaZUESAUVgEJLPPySmVspmpBg@mail.gmail.com>
 <CAOMZO5AnWmPALa1GWjNe+2DBMoo9SmqS04gj8txg4ukjJ3wtoA@mail.gmail.com> <aad43d6d-aeb3-e636-3363-340b6e2316c5@candelatech.com>
Message-ID: <CAOMZO5DC-qkjgRohkQUPVvfN6NU+_omypSOxD5C7m6ww48PpoQ@mail.gmail.com>

Hi Ben,

On Wed, Jul 26, 2023 at 2:16?PM Ben Greear <greearb at candelatech.com> wrote:

> At one time, ath10k firmware had some weird logic related to trying to coordinate
> 4-way handshake with setting keys.  I'm not sure that was ever changed in upstream
> firmware, so possibly you are hitting that bug/race.

I only have access to the QCA9377 firmware from the upstream
linux-firmware repo:

ath10k_sdio mmc1:0001:1: qca9377 hw1.1 sdio target 0x05020001 chip_id
0x00000000 sub 0000:0000
ath10k_sdio mmc1:0001:1: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
ath10k_sdio mmc1:0001:1: firmware ver WLAN.TF.1.1.1-00061-QCATFSWPZ-1
api 5 features ignore-otp crc32 7746e551
ath10k_sdio mmc1:0001:1: failed to fetch board data for
bus=sdio,vendor=0271,device=0701,subsystem-vendor=0000,subsystem-device=0000
from ath10k/QCA9377/hw1.0/board-2.bin
ath10k_sdio mmc1:0001:1: board_file api 1 bmi_id N/A crc32 544289f7
ath10k_sdio mmc1:0001:1: htt-ver 3.32 wmi-op 4 htt-op 3 cal otp
max-sta 32 raw 0 hwcrypto 1

> We use recent supplicant and ath10k and do not notice any problems, but we also use
> our modified ath10k firmware that changes how the 4-way and key-setting is handled,
> as well as plenty of patches to ath10k driver that may or may not have some affect
> on this path.
>
> We also run with this supplicant patch, among a pile of others, possibly one of these makes
> a difference:
>
> https://github.com/greearb/hostap-ct/commit/c614b56d0c9073b27f2d1dfdfd014a068ab2c65f

Tried this specific patch, but it did not help. Still get the 'wlan0:
Unknown event 37' message and authentication fails.

Thanks,

Fabio Estevam


From festevam at gmail.com  Mon Jul 31 09:11:09 2023
From: festevam at gmail.com (Fabio Estevam)
Date: Mon, 31 Jul 2023 13:11:09 -0300
Subject: [PATCH] Revert "wpa_supplicant: Send EAPOL frames over nl80211
 where available"
In-Reply-To: <CABPxzY+w4RCXx=UizLS-JW1a=Brh=gSs6gwZPhosawRt1qKHEQ@mail.gmail.com>
References: <CABPxzYL7_s4OyX9UKqXzpwarcyD8Zn+7pEJ8m1YK6UW0ANfWOQ@mail.gmail.com>
 <CAOMZO5DVExkXgAgXhdSoQVPLJKt1HtAK9aABO1wPiFMWLSN-_A@mail.gmail.com>
 <CABPxzYJ4Cga+vacWCm=YCrXwT6rvH0_ry973KcQS8cCzxKQj4A@mail.gmail.com>
 <CAOMZO5D2N=hGwc3Jzr4Vh3zSk588MLVtSf2Aj1YPskaV+RiFgw@mail.gmail.com>
 <CABPxzY+-Ykbq0EnOwW3FBqjptK93nr0pHQCLoKOR-pe4ETmssw@mail.gmail.com>
 <CAOMZO5DV7CM2Yy0SkQJMhrQhxNNsMr7C3_+HR6waHdzOpHaZ4g@mail.gmail.com>
 <CABPxzYJrPT3+Dhk4qCJAmJhMo6sSrfohv+K9mqqTBOqYFhuemg@mail.gmail.com>
 <CAOMZO5AUxnTqYkLc8nnVAae1tuGcgft_it=5wdo7oTDz7dXA=w@mail.gmail.com>
 <ZLpX6vKw8oeWqkuo@w1.fi> <CAOMZO5AAm4WAQ2Agy-WftVeLN5CSsad46Xn8AVhzMocHn+=fZg@mail.gmail.com>
 <CAOMZO5DnBC2tNC6H4X37N=U5pJYdhoS8tcUJ+OUeBWEYXweizA@mail.gmail.com>
 <CAOMZO5DptqwfMFkwauzREeVnEcqH2=KZwPfcfPL+JTxG=wAi_Q@mail.gmail.com>
 <CABPxzY+oYpJ3zwas0zGxQNrZYnaZUESAUVgEJLPPySmVspmpBg@mail.gmail.com>
 <CAOMZO5AnWmPALa1GWjNe+2DBMoo9SmqS04gj8txg4ukjJ3wtoA@mail.gmail.com>
 <aad43d6d-aeb3-e636-3363-340b6e2316c5@candelatech.com> <CAOMZO5DC-qkjgRohkQUPVvfN6NU+_omypSOxD5C7m6ww48PpoQ@mail.gmail.com>
 <CABPxzY+w4RCXx=UizLS-JW1a=Brh=gSs6gwZPhosawRt1qKHEQ@mail.gmail.com>
Message-ID: <CAOMZO5ASZSaPg6YSmJDhsb46owJL8GEoz-9F8h1GSZXMJXgvGQ@mail.gmail.com>

Hi Chaitanya,

On Sun, Jul 30, 2023 at 4:09?PM Krishna Chaitanya
<chaitanya.mgit at gmail.com> wrote:

> I have spent some more time looking into this, but couldn't reproduce
> the issue, but I have a
> a couple of suggestions:
>
> 1. disable HW crypto in ath10k, cryptmode=1 + frame_mode=0
> (noencrypt=1 for EAPoL, so,

I passed the suggested parameters via the kernel command line:

ath10k-core.cryptmode=1 ath10k-core.frame_mode=0

, but the result was the same.

>     if ath10k doesn't handle well, it can cause packet drops)
> 2. disable WMM_AC (this shouldn't cause any drops at STA side as in
> the worst case mac80211 fallbacks
>     BK, but AP might reject, so, worth a try).

I am not sure how to disable WMM_AC. Care to explain?

Thanks


From michael-cy.lee at mediatek.com  Thu Jul 27 01:29:22 2023
From: michael-cy.lee at mediatek.com (Michael-CY Lee)
Date: Thu, 27 Jul 2023 16:29:22 +0800
Subject: wpa_supplicant: Fix wpa_supplicant configuration parsing error
Message-ID: <20230727082922.15745-1-michael-cy.lee@mediatek.com>

From: Michael Lee <michael-cy.lee at mediatek.com>

In the original flow, after hostapd_config_tx_queue successfully
parses a tx_queue variable, it would not return immediately. Then it
would print out "unknow global field" later and set return val to -1.

This patch returns immediately after hostapd_config_tx_queue
successfully parses a tx_queue variable.

Signed-off-by: Michael Lee <michael-cy.lee at mediatek.com>
---
 wpa_supplicant/config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 325ab8d..2652c8a 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -5715,6 +5715,7 @@ int wpa_config_process_global(struct wpa_config *config, char *pos, int line)
 					   line);
 				return -1;
 			}
+			return ret;
 		}
 
 		if (os_strncmp(pos, "wmm_ac_", 7) == 0) {
-- 
2.25.1



From stijn at linux-ipv6.be  Fri Jul 28 06:16:14 2023
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri, 28 Jul 2023 16:16:14 +0300
Subject: [BISECTED][BUG] roaming between 2 interfaces controlled by the same
 hostapd instance fails
Message-ID: <a90e3c83-d92a-da5a-1854-1fc94da21f69@linux-ipv6.be>

Hi,

After bumping hostapd in OpenWrt from 
bb945b98fefc64887dffb40773a19d77585cee42 to 
599d00be9de2846c6ea18c1487d8329522ade22b, we've received various reports 
of clients sometimes being unable to connect [1]. The problem occurs 
when clients roam from one radio to another radio controlled by the same 
hostapd instance. E.g. after rebooting the AP, clients connect to the 
2.4 GHz interface, as the 5 GHz interface is in state HT_SCAN->DFS. Once 
the 5GHz interface transitions to the DFS->ENABLED state, and clients 
try to roam to it, they fail to connect. Apple devices report the PSK as 
being wrong. My Android phone just disconnects and switches to 5G.

Bisecting lead to the following commit:

e978072baaca886943c391b9a99066771ddc01a8 is the first bad commit
commit e978072baaca886943c391b9a99066771ddc01a8
Author: Adil Saeed Musthafa <quic_adilm at quicinc.com>
Date:?? Thu May 11 11:43:02 2023 -0700

 ??? Do prune_association only after the STA is authorized

 ??? Prune-associations should be done only after the new station is
 ??? authorized. Otherwise any STA can cause denial of service to connected
 ??? stations in PMF case when more than a single interface is being
 ??? controlled by the same hostapd process.

 ??? Signed-off-by: Adil Saeed Musthafa <quic_adilm at quicinc.com>

 ?src/ap/hostapd.c? | 1 -
 ?src/ap/sta_info.c | 6 ++++--
 ?2 files changed, 4 insertions(+), 3 deletions(-)


[1] https://github.com/openwrt/openwrt/issues/13156



