[PATCH] FT: Add FT over-the-DS selection for SME based drivers

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

 



Allows the supplicant to select and use FT over-the-DS automatically for
SME base drivers, if specified in the network block config.
If the option is not specified, FT over-the-air is used.

Signed-off-by: Jasraj Randhawa <jasraj@xxxxxxxxxxxxxxxxx>
---
 wpa_supplicant/config.c            |  3 +++
 wpa_supplicant/config_file.c       |  3 +++
 wpa_supplicant/config_ssid.h       | 10 ++++++++++
 wpa_supplicant/wpa_cli.c           |  5 ++++-
 wpa_supplicant/wpa_supplicant.c    | 10 ++++++++++
 wpa_supplicant/wpa_supplicant.conf |  5 +++++
 6 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 2058175..3934e10 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2407,6 +2407,9 @@ static const struct parse_data ssid_fields[] = {
 	{ INT_RANGE(owe_group, 0, 65535) },
 	{ INT_RANGE(owe_only, 0, 1) },
 	{ INT_RANGE(multi_ap_backhaul_sta, 0, 1) },
+#ifdef CONFIG_IEEE80211R
+	{ INT_RANGE(ft_over_ds, 0, 1) },
+#endif /* CONFIG_IEEE80211R */
 };

 #undef OFFSET
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 26f6ee1..3f7281f 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -928,6 +928,9 @@ static void wpa_config_write_network(FILE *f, struct
wpa_ssid *ssid)
 	INT_DEF(vht_tx_mcs_nss_7, -1);
 	INT_DEF(vht_tx_mcs_nss_8, -1);
 #endif /* CONFIG_VHT_OVERRIDES */
+#ifdef CONFIG_IEEE80211R
+	INT(ft_over_ds);
+#endif /* CONFIG_IEEE80211R */

 #undef STR
 #undef INT
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index 1b2b1f1..33ad1f3 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -1005,6 +1005,16 @@ struct wpa_ssid {
 	 * 1 = Multi-AP backhaul station
 	 */
 	int multi_ap_backhaul_sta;
+
+#ifdef CONFIG_IEEE80211R
+	/**
+	 * ft_over_ds - FT over-DS preference
+	 *
+	 * 0 = Don't use FT over-DS (default)
+	 * 1 = Use FT over-DS, if available
+	 */
+	int ft_over_ds;
+#endif /* CONFIG_IEEE80211R */
 };

 #endif /* CONFIG_SSID_H */
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 695fcbe..eef8795 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1471,7 +1471,10 @@ 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_IEEE80211R
+	"ft_over_ds",
+#endif /* CONFIG_IEEE80211R */
 };


diff --git a/wpa_supplicant/wpa_supplicant.c
b/wpa_supplicant/wpa_supplicant.c
index 7c9f581..6733fe0 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2063,6 +2063,16 @@ void wpa_supplicant_associate(struct wpa_supplicant
*wpa_s,

 	if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
 	    ssid->mode == IEEE80211_MODE_INFRA) {
+#ifdef CONFIG_IEEE80211R
+		const u8 *ie = NULL;
+		if (bss && wpa_s->reassoc_same_ess &&
+		    (wpa_s->wpa_state >= WPA_ASSOCIATED))
+			ie = wpa_bss_get_ie(bss,
WLAN_EID_MOBILITY_DOMAIN);
+		if (ie && (ie[1] >= MOBILITY_DOMAIN_ID_LEN) &&
+		    ssid->ft_over_ds && (ie[4] & RSN_FT_CAPAB_FT_OVER_DS))
{
+			wpa_ft_start_over_ds(wpa_s->wpa, bss->bssid, ie);
+		} else
+#endif /* CONFIG_IEEE80211R */
 		sme_authenticate(wpa_s, bss, ssid);
 		return;
 	}
diff --git a/wpa_supplicant/wpa_supplicant.conf
b/wpa_supplicant/wpa_supplicant.conf
index 9a472a5..073a7e9 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -1461,6 +1461,11 @@ fast_reauth=1
 # support Multi-AP, and sets 4-address mode if it does. Thus, the netdev
can be
 # added to a bridge to allow forwarding frames over this backhaul link.

+# ft_over_ds: Sets preference for FT-over-DS
+# 0 = FT over-the-air preferred (default)
+# 1 = FT over-DS preferred
+# ft_over_ds=0
+
 ##### Fast Session Transfer (FST) support
#####################################
 #
 # The options in this section are only available when the build
configuration
-- 
2.7.4

_______________________________________________
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