[v3,02/12] hostapd: Remove CONFIG_MULTI_AP

Message ID 20181205102401.17810-3-arnout@mind.be
State New
Headers show
Series
  • [v3,01/12] hostapd: Add Multi-AP protocol support
Related show

Commit Message

Arnout Vandecappelle Dec. 5, 2018, 10:23 a.m.
The difference in code size is less than 1KB (tested on arm64) and the
runtime overhead seems neglible as well.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Venkateswara Naralasetty <vnaralas@codeaurora.org>
---
 hostapd/Makefile             | 4 ----
 hostapd/config_file.c        | 2 --
 hostapd/defconfig            | 3 ---
 src/ap/ap_config.h           | 2 --
 src/ap/ieee802_11.c          | 6 ------
 src/common/ieee802_11_defs.h | 2 --
 6 files changed, 19 deletions(-)

Patch

diff --git a/hostapd/Makefile b/hostapd/Makefile
index 4db3d3491..2ce8b7ded 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -61,10 +61,6 @@  CFLAGS += -DCONFIG_NATIVE_WINDOWS
 LIBS += -lws2_32
 endif
 
-ifdef CONFIG_MULTI_AP
-CFLAGS += -DCONFIG_MULTI_AP
-endif
-
 OBJS += main.o
 OBJS += config_file.o
 
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 744c4feb0..249b3e4d9 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -4111,7 +4111,6 @@  static int hostapd_config_fill(struct hostapd_config *conf,
 	} else if (os_strcmp(buf, "coloc_intf_reporting") == 0) {
 		bss->coloc_intf_reporting = atoi(pos);
 #endif /* CONFIG_OWE */
-#ifdef CONFIG_MULTI_AP
 	} else if (os_strcmp(buf, "multi_ap") == 0) {
 		int val = atoi(pos);
 
@@ -4123,7 +4122,6 @@  static int hostapd_config_fill(struct hostapd_config *conf,
 		}
 
 		bss->multi_ap = val;
-#endif /*CONFIG_MULTI_AP */
 	} else {
 		wpa_printf(MSG_ERROR,
 			   "Line %d: unknown configuration item '%s'",
diff --git a/hostapd/defconfig b/hostapd/defconfig
index 123b060ba..c67c6622d 100644
--- a/hostapd/defconfig
+++ b/hostapd/defconfig
@@ -373,6 +373,3 @@  CONFIG_IPV6=y
 # Override default value for the wpa_disable_eapol_key_retries configuration
 # parameter. See that parameter in hostapd.conf for more details.
 #CFLAGS += -DDEFAULT_WPA_DISABLE_EAPOL_KEY_RETRIES=1
-
-#Multi-AP protocol support
-CONFIG_MULTI_AP=y
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 797212e4e..d35e0f580 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -687,9 +687,7 @@  struct hostapd_bss_config {
 
 	int coloc_intf_reporting;
 
-#ifdef CONFIG_MULTI_AP
 	int multi_ap;
-#endif /*CONFIG_MULTI_AP */
 };
 
 /**
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 8a73be507..14a83304f 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -64,7 +64,6 @@  prepare_auth_resp_fils(struct hostapd_data *hapd,
 
 u8 * hostapd_eid_multi_ap(struct hostapd_data *hapd, u8 *eid)
 {
-#ifdef CONFIG_MULTI_AP
 	u8 sub_elem_val = 0;
 
 	*eid++ = WLAN_EID_VENDOR_SPECIFIC;
@@ -81,7 +80,6 @@  u8 * hostapd_eid_multi_ap(struct hostapd_data *hapd, u8 *eid)
 		sub_elem_val |= MULTI_AP_FRONTHAUL_BSS;
 	*eid++ = sub_elem_val;
 
-#endif /* CONFIG_MULTI_AP */
 
 	return eid;
 }
@@ -2234,7 +2232,6 @@  static u16 check_wmm(struct hostapd_data *hapd, struct sta_info *sta,
 	return WLAN_STATUS_SUCCESS;
 }
 
-#ifdef CONFIG_MULTI_AP
 static u16 hostapd_validate_multi_ap_ie(struct hostapd_data *hapd,
 					struct sta_info *sta,
 					struct ieee802_11_elems *elems)
@@ -2261,7 +2258,6 @@  static u16 hostapd_validate_multi_ap_ie(struct hostapd_data *hapd,
 
 	return WLAN_STATUS_SUCCESS;
 }
-#endif /* CONFIG_MULTI_AP */
 
 static u16 copy_supp_rates(struct hostapd_data *hapd, struct sta_info *sta,
 			   struct ieee802_11_elems *elems)
@@ -2519,11 +2515,9 @@  static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
 	if (resp != WLAN_STATUS_SUCCESS)
 		return resp;
 
-#ifdef CONFIG_MULTI_AP
 	resp = hostapd_validate_multi_ap_ie(hapd, sta, &elems);
 	if (resp != WLAN_STATUS_SUCCESS)
 		return resp;
-#endif /* CONFIG_MULTI_AP */
 
 #ifdef CONFIG_IEEE80211N
 	resp = copy_sta_ht_capab(hapd, sta, elems.ht_capabilities);
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index b340cc8da..a612710a9 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -1212,14 +1212,12 @@  struct ieee80211_ampe_ie {
 #define OWE_OUI_TYPE 28
 #define MULTI_AP_OUI_TYPE 0x1B
 
-#ifdef CONFIG_MULTI_AP
 #define MULTI_AP_SUB_ELEM_TYPE 0x06
 #define MULTI_AP_BACKHAUL_BSS 0x40
 #define MULTI_AP_FRONTHAUL_BSS 0x20
 #define MULTI_AP_BACKHAUL_STA 0x80
 #define BACKHAUL_BSS 1
 #define FRONTHAUL_BSS 2
-#endif /* CONFIG_MULTI_AP */
 
 #define WMM_OUI_TYPE 2
 #define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0