[PATCH 1/4] MLD: Add support for disabled APs

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

 



From: Ilan Peer <ilan.peer@xxxxxxxxx>

An AP part of an MLD AP can temporarily be disabled. Others AP,
which are part of the MLD AP, indicate so in the Reduced Neighbor
Report (RNR) elements added to their beacons and probe responses.

When an AP is disabled, it should be included in the association
exchange, but can be activated only after it is enabled.

Add support identifying disabled APs and propagate the information
to the driver within the associate() callback.

Signed-off-by: Ilan Peer <ilan.peer@xxxxxxxxx>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@xxxxxxxxx>
---
 src/common/ieee802_11_defs.h      | 3 +++
 src/drivers/driver.h              | 1 +
 wpa_supplicant/bss.c              | 2 ++
 wpa_supplicant/bss.h              | 3 +++
 wpa_supplicant/sme.c              | 7 ++++++-
 wpa_supplicant/wpa_supplicant_i.h | 1 +
 6 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 9bf98518e3..4b5b99544a 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -2970,6 +2970,9 @@ enum dscp_policy_request_type {
 #define WFA_CAPA_QM_UNSOLIC_DSCP BIT(1)
 #define WFA_CAPA_QM_NON_EHT_SCS_TRAFFIC_DESC BIT(2)
 
+#define RNR_TBTT_INFO_MLD_PARAM2_ALL_UPDATE_INC 0x10
+#define RNR_TBTT_INFO_MLD_PARAM2_LINK_DISABLED  0x20
+
 struct ieee80211_neighbor_ap_info {
 	u8 tbtt_info_hdr;
 	u8 tbtt_info_len;
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 5c0e4b15cf..477b7786ee 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -950,6 +950,7 @@ struct wpa_driver_mld_params {
 		const u8 *ies;
 		size_t ies_len;
 		int error;
+		u8 disabled;
 	} mld_links[MAX_NUM_MLD_LINKS];
 };
 
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index e07061abb5..eed22bb4f1 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -1553,6 +1553,8 @@ wpa_bss_parse_ml_rnr_ap_info(struct wpa_supplicant *wpa_s,
 				os_memcpy(l->bssid, ap_info->data + 1,
 					  ETH_ALEN);
 				l->freq = neigh_bss->freq;
+				l->disabled = !!((*(mld_params + 2)) &
+					RNR_TBTT_INFO_MLD_PARAM2_LINK_DISABLED);
 				bss->n_mld_links++;
 			}
 		}
diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h
index 7b13ef96b8..3e018c5835 100644
--- a/wpa_supplicant/bss.h
+++ b/wpa_supplicant/bss.h
@@ -133,6 +133,9 @@ struct wpa_bss {
 		u8 link_id;
 		u8 bssid[ETH_ALEN];
 		int freq;
+
+		/* The link is valid but currently disabled */
+		u8 disabled;
 	} mld_links[MAX_NUM_MLD_LINKS];
 
 	/* followed by ie_len octets of IEs */
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 648d08549d..ccc8d18b80 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -536,6 +536,7 @@ static void wpas_sme_set_mlo_links(struct wpa_supplicant *wpa_s,
 		os_memcpy(wpa_s->links[link_id].bssid, bssid, ETH_ALEN);
 		wpa_s->links[link_id].freq = bss->mld_links[i].freq;
 		wpa_s->links[link_id].bss = wpa_bss_get_bssid(wpa_s, bssid);
+		wpa_s->links[link_id].disabled = bss->mld_links[i].disabled;
 	}
 }
 
@@ -2591,9 +2592,13 @@ mscs_fail:
 				wpa_s->links[i].bssid;
 			params.mld_params.mld_links[i].freq =
 				wpa_s->links[i].freq;
+			params.mld_params.mld_links[i].disabled =
+				wpa_s->links[i].disabled;
 
-			wpa_printf(MSG_DEBUG, "MLD: id=%u, freq=%d, " MACSTR,
+			wpa_printf(MSG_DEBUG,
+				   "MLD: id=%u, freq=%d, dis=%u, " MACSTR,
 				   i, wpa_s->links[i].freq,
+				   wpa_s->links[i].disabled,
 				   MAC2STR(wpa_s->links[i].bssid));
 		}
 	}
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index b3f1cd1b4e..f746ada348 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -735,6 +735,7 @@ struct wpa_supplicant {
 		u8 bssid[ETH_ALEN];
 		unsigned int freq;
 		struct wpa_bss *bss;
+		u8 disabled;
 	} links[MAX_NUM_MLD_LINKS];
 	u8 *last_con_fail_realm;
 	size_t last_con_fail_realm_len;
-- 
2.43.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux