[PATCH 3/8] AP: Add spp_amsdu conf option

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

 



From: Daniel Gabay <daniel.gabay@xxxxxxxxx>

Add spp_amsdu (Signaling and Payload Protected A-MSDU) conf option.
This option is enabled by default and depends on:
1. driver support
2. CCMP/GCMP cipher suite being used

Signed-off-by: Daniel Gabay <daniel.gabay@xxxxxxxxx>
---
 hostapd/config_file.c | 2 ++
 hostapd/hostapd.conf  | 6 ++++++
 src/ap/ap_config.c    | 9 +++++++++
 src/ap/ap_config.h    | 2 ++
 4 files changed, 19 insertions(+)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 12d1d9fb0d..ee45156dfb 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3707,6 +3707,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
 		bss->rsn_override_mfp = atoi(pos);
 	} else if (os_strcmp(buf, "rsn_override_mfp_2") == 0) {
 		bss->rsn_override_mfp_2 = atoi(pos);
+	} else if (os_strcmp(buf, "spp_amsdu") == 0) {
+		bss->spp_amsdu = !!atoi(pos);
 	} else if (os_strcmp(buf, "group_mgmt_cipher") == 0) {
 		if (os_strcmp(pos, "AES-128-CMAC") == 0) {
 			bss->group_mgmt_cipher = WPA_CIPHER_AES_128_CMAC;
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index b1e8ac5bba..11756f17c6 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -2033,6 +2033,12 @@ own_ip_addr=127.0.0.1
 # 1 = enabled
 #beacon_prot=0
 
+# SPP (Signaling and Payload Protected) A-MSDU.
+# This depends on driver support and CCMP/GCMP cipher suite being used.
+# 0 = disabled
+# 1 = enabled (default)
+#spp_amsdu=1
+
 # Association SA Query maximum timeout (in TU = 1.024 ms; for MFP)
 # (maximum time to wait for a SA Query response)
 # dot11AssociationSAQueryMaximumTimeout, 1...4294967295
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index 160809a27e..ab8f407cae 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -177,6 +177,8 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
 	bss->pasn_comeback_after = 10;
 	bss->pasn_noauth = 1;
 #endif /* CONFIG_PASN */
+
+	bss->spp_amsdu = true;
 }
 
 
@@ -1519,6 +1521,13 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
 		return -1;
 	}
 
+	/* don't advertise SPP A-MSDU support if not using CCMP/GCMP */
+	if (full_config && bss->spp_amsdu &&
+	    !(bss->wpa &&
+	      bss->rsn_pairwise & (WPA_CIPHER_CCMP_256 | WPA_CIPHER_CCMP |
+				   WPA_CIPHER_GCMP_256 | WPA_CIPHER_GCMP)))
+		bss->spp_amsdu = false;
+
 	return 0;
 }
 
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 2f9ed3af88..dba57e7e6b 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -995,6 +995,8 @@ struct hostapd_bss_config {
 #endif /* CONFIG_TESTING_OPTIONS */
 #endif /* CONFIG_IEEE80211BE */
 	int mbssid_index;
+
+	bool spp_amsdu;
 };
 
 /**
-- 
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