From patchwork Wed Dec 5 10:23:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1008147 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kjXGFjFG"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind-be.20150623.gappssmtp.com header.i=@mind-be.20150623.gappssmtp.com header.b="LPlrYfCI"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 438vzp0cdSz9s8J for ; Wed, 5 Dec 2018 21:27:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+BWEifQ6kX25/evGTcC4twEckqr7wfYHEhR0rRAkqxY=; b=kjXGFjFGHZSTzK o9rlDNsRrvALTbFXQsKyNtp8cQfsf5oeq1P2uDHSn9VLucl0lmNdGJ73ty23V2esniuj0KJYE+x/6 vLU76WnqnlN0ygUhcUfR/quWWxKr99EPA+AyVk7QKXjGLkJ5km+VrzGhs5Zhtp/zSwFsEHbIsAzjA qsgupYSWNFvRW34eoWkeeAkrsEuF2OB3fCmnYnkw8UvbrxbSB4F5GHME8NMf+4ziuBzY5xwdSa368 +5l/4qhUBh2k2/89BBwFntbZFj7br2Rqclxum9fvWt20thy6lePb6GhJby+xB7LHLEpui22Q5UScQ H3Sie52ppXo+BVfcsuGg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUUOD-00065S-GG; Wed, 05 Dec 2018 10:26:45 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUUO7-0005tv-6x for hostap@lists.infradead.org; Wed, 05 Dec 2018 10:26:43 +0000 Received: by mail-ed1-x542.google.com with SMTP id f23so16569033edb.3 for ; Wed, 05 Dec 2018 02:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind-be.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=02KwwF3AXb6unI1DH1OPr5tqNg3z/OSYea59lPlqUwI=; b=LPlrYfCID0zjpzsPJ/hH1j6yNky/nUmRF7MFJLGF0BbSs4Ad6IeBqrjjauU7RZAreO o9iqJd2rtrKFJYZo5bhJfqDbl39oJZ1Se15txG7qPxLzvG+87DdIssKsknbGhL11AYDr Vhdsvh4lm2/0xo8coazxhj7/eEtHIN66G0j4T1r9tH2iU37R2izfLWwd7YMDUGZqIbhC 8ArR25BJ3UdXsjHLHh3Jh9u+hxC78zZI3OZ3/ab2mjIbwjxJ10oKRQvKFzjwbs+tnNQ+ bchumB94eLnvVFewFU/AyneWnqWLkks9YS5VukQvj0xsanzUGuldF4s7InuaNaQYzxcJ 3BLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=02KwwF3AXb6unI1DH1OPr5tqNg3z/OSYea59lPlqUwI=; b=CnPenXJUmG/5kVX3rveMqb6HmxY9hryWvOsi5RNd9EHLtBLzQvrwPS9mqBYn0FwQVg h43EGW0XwbrZbImoP2kRJwDLNWlv8KUsXhwi+zz7WW7Sbsm7tpVbinaZQoIpURaIFUPY D7NCDq0uAa9g4TsJAKiqCKm+d3c/iy25dTONQ2kmTyw9en8anvFxVo9ejJi/UFpwEEL0 1e2o8pdcRQTlWxorBXyW74FcYuloZ6Y0AGHyxBW1dvoiJvB0rBx8Nak1afaSk2BhNC5X NTz9TpJ3fVkH2gj1IXhel1FSjQgw/+oS1FqJobSoTbqSOPi5VGztZubxp/jQLfbl50uR aOyQ== X-Gm-Message-State: AA+aEWbkw9F8G/blutAjVBxzmkXZ4ZrjbWzRXGsmBrOf7t1OwBrfC1Yb dQSJ05kHTcTPWQaa2Jy7VnW17xd7jDk= X-Google-Smtp-Source: AFSGD/X2fJ1X9N5qkqsPAdZYgtjqJkzZPgnXct9ZcIVmZIMCrPq4bHRB0pFcmVZ6YGq9GE857f2GSw== X-Received: by 2002:a17:906:94c3:: with SMTP id d3-v6mr18619761ejy.104.1544005590603; Wed, 05 Dec 2018 02:26:30 -0800 (PST) Received: from localhost.localdomain (ip-188-118-3-185.reverse.destiny.be. [188.118.3.185]) by smtp.gmail.com with ESMTPSA id z2sm5438020edd.4.2018.12.05.02.26.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 02:26:30 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: hostap@lists.infradead.org Subject: [PATCH v3 04/12] wpa_supplicant: Remove CONFIG_MULTI_AP Date: Wed, 5 Dec 2018 11:23:54 +0100 Message-Id: <20181205102401.17810-5-arnout@mind.be> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181205102401.17810-1-arnout@mind.be> References: <20181205102401.17810-1-arnout@mind.be> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181205_022639_454063_E40B7FEF X-CRM114-Status: GOOD ( 13.08 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:542 listed in] [list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Venkateswara Naralasetty , "Arnout Vandecappelle \(Essensium/Mind\)" Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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) Cc: Venkateswara Naralasetty --- src/drivers/driver.h | 2 -- src/drivers/driver_nl80211.c | 4 ---- wpa_supplicant/Makefile | 4 ---- wpa_supplicant/config.c | 2 -- wpa_supplicant/config_ssid.h | 2 -- wpa_supplicant/defconfig | 3 --- wpa_supplicant/driver_i.h | 2 -- wpa_supplicant/events.c | 4 ---- wpa_supplicant/sme.c | 2 -- wpa_supplicant/wpa_supplicant.c | 6 ------ wpa_supplicant/wpa_supplicant_i.h | 4 ---- 11 files changed, 35 deletions(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 3ae52d43f..7bca70952 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -4093,7 +4093,6 @@ struct wpa_driver_ops { int (*send_external_auth_status)(void *priv, struct external_auth *params); -#ifdef CONFIG_MULTI_AP /** * set_4addr_mode - Set 4address mode * @priv: Private driver interface data @@ -4102,7 +4101,6 @@ struct wpa_driver_ops { * @brige_ifname - Bridge interface name */ int (*set_4addr_mode)(void *priv, const char *dridge_ifname, int val); -#endif /* CONFIG_MULTI_AP */ }; /** diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 0b2e79653..e5baa4e34 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -10647,7 +10647,6 @@ fail: return ret; } -#ifdef CONFIG_MULTI_AP static int nl80211_set_4addr_mode(void *priv, const char *bridge_ifname, int val) { @@ -10688,7 +10687,6 @@ fail: return ret; } -#endif /* CONFIG_MULTI_AP */ const struct wpa_driver_ops wpa_driver_nl80211_ops = { .name = "nl80211", @@ -10818,7 +10816,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = { .get_ext_capab = nl80211_get_ext_capab, .update_connect_params = nl80211_update_connection_params, .send_external_auth_status = nl80211_send_external_auth_status, -#ifdef CONFIG_MULTI_AP .set_4addr_mode = nl80211_set_4addr_mode, -#endif /* CONFIG_MULTI_AP */ }; diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 52892eaaf..c2e93e20b 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -96,10 +96,6 @@ CONFIG_NO_RANDOM_POOL= CONFIG_OPENSSL_CMAC=y endif -ifdef CONFIG_MULTI_AP -CFLAGS += -DCONFIG_MULTI_AP -endif - OBJS = config.o OBJS += notify.o OBJS += bss.o diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index bd73bcfc8..d536f8a2e 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -2320,9 +2320,7 @@ static const struct parse_data ssid_fields[] = { #endif /* CONFIG_DPP */ { INT_RANGE(owe_group, 0, 65535) }, { INT_RANGE(owe_only, 0, 1) }, -#ifdef CONFIG_MULTI_AP { INT_RANGE(multiap_backhaul_sta, 0, 1) }, -#endif }; #undef OFFSET diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h index 2dc3fbff3..f5d01328e 100644 --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h @@ -938,13 +938,11 @@ struct wpa_ssid { */ int owe_transition_bss_select_count; -#ifdef CONFIG_MULTI_AP /* * 0 = normal station * 1 = backhaul station */ int multiap_backhaul_sta; -#endif /* CONFIG_MULTI_AP */ }; #endif /* CONFIG_SSID_H */ diff --git a/wpa_supplicant/defconfig b/wpa_supplicant/defconfig index 3c3081c95..08f585779 100644 --- a/wpa_supplicant/defconfig +++ b/wpa_supplicant/defconfig @@ -593,6 +593,3 @@ CONFIG_BACKEND=file # Opportunistic Wireless Encryption (OWE) # Experimental implementation of draft-harkins-owe-07.txt #CONFIG_OWE=y - -#Multi-AP protocol support -#CONFIG_MULTI_AP=y diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index 9c1a26d8b..918094025 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -30,7 +30,6 @@ static inline void wpa_drv_deinit(struct wpa_supplicant *wpa_s) wpa_s->driver->deinit(wpa_s->drv_priv); } -#ifdef CONFIG_MULTI_AP static inline int wpa_drv_set_4addr_mode(struct wpa_supplicant *wpa_s, int val) { if (wpa_s->driver->set_4addr_mode) @@ -38,7 +37,6 @@ static inline int wpa_drv_set_4addr_mode(struct wpa_supplicant *wpa_s, int val) wpa_s->bridge_ifname, val); return -1; } -#endif /* CONFIG_MULTI_AP */ static inline int wpa_drv_set_param(struct wpa_supplicant *wpa_s, const char *param) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 62100e7b4..9c1a50b34 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2266,7 +2266,6 @@ static void interworking_process_assoc_resp(struct wpa_supplicant *wpa_s, #endif /* CONFIG_INTERWORKING */ -#ifdef CONFIG_MULTI_AP static void multi_ap_process_assoc_resp(struct wpa_supplicant *wpa_s, const u8 *ies, size_t ies_len) { @@ -2314,7 +2313,6 @@ fail: wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING); return; } -#endif /* CONFIG_MULTI_AP */ #ifdef CONFIG_FST static int wpas_fst_update_mbie(struct wpa_supplicant *wpa_s, @@ -2392,10 +2390,8 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s, get_ie(data->assoc_info.resp_ies, data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP)) wpa_s->ieee80211ac = 1; -#ifdef CONFIG_MULTI_AP multi_ap_process_assoc_resp(wpa_s, data->assoc_info.resp_ies, data->assoc_info.resp_ies_len); -#endif /* CONFIG_MULTI_AP */ } if (data->assoc_info.beacon_ies) wpa_hexdump(MSG_DEBUG, "beacon_ies", diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 1c444ff86..650b93559 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -1547,7 +1547,6 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode, } #endif /* CONFIG_OWE */ -#ifdef CONFIG_MULTI_AP if (wpa_s->conf->ssid->multiap_backhaul_sta) { if (wpa_s->sme.assoc_req_ie_len + 9 > sizeof(wpa_s->sme.assoc_req_ie)) { @@ -1558,7 +1557,6 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode, u8 *pos = wpa_s->sme.assoc_req_ie + wpa_s->sme.assoc_req_ie_len; wpa_add_multi_ap_info_ie(pos, &wpa_s->sme.assoc_req_ie_len); } -#endif /* CONFIG_MULTI_AP */ params.bssid = bssid; params.ssid = wpa_s->sme.ssid; diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 357a4e193..d54638d49 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -285,7 +285,6 @@ void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s) wpa_s->last_con_fail_realm_len = 0; } -#ifdef CONFIG_MULTI_AP void wpa_add_multi_ap_info_ie(u8 *pos, size_t *len) { u8 *buf = pos; @@ -301,7 +300,6 @@ void wpa_add_multi_ap_info_ie(u8 *pos, size_t *len) *len += (buf - pos); } -#endif /* CONFIG_MULTI_AP */ /** * wpa_supplicant_initiate_eapol - Configure EAPOL state machine @@ -2825,10 +2823,8 @@ static u8 * wpas_populate_assoc_ies( } #endif /* CONFIG_IEEE80211R */ -#ifdef CONFIG_MULTI_AP if (ssid->multiap_backhaul_sta && ((max_wpa_ie_len - wpa_ie_len) > 9)) wpa_add_multi_ap_info_ie(wpa_ie, &wpa_ie_len); -#endif /* CONFIG_MULTI_AP */ params->wpa_ie = wpa_ie; params->wpa_ie_len = wpa_ie_len; @@ -3308,12 +3304,10 @@ void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s, zero_addr = 1; } -#ifdef CONFIG_MULTI_AP if (wpa_s->enabled_4addr_mode) { if (wpa_drv_set_4addr_mode(wpa_s, 0)) wpa_s->enabled_4addr_mode = 0; } -#endif #ifdef CONFIG_TDLS wpa_tdls_teardown_peers(wpa_s->wpa); diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 0687182bc..4973fb882 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -1234,9 +1234,7 @@ struct wpa_supplicant { unsigned int disable_fils:1; #endif /* CONFIG_FILS */ unsigned int ieee80211ac:1; -#ifdef CONFIG_MULTI_AP char enabled_4addr_mode; -#endif }; @@ -1496,7 +1494,5 @@ int wpas_ctrl_iface_get_pref_freq_list_override(struct wpa_supplicant *wpa_s, int wpa_is_fils_supported(struct wpa_supplicant *wpa_s); int wpa_is_fils_sk_pfs_supported(struct wpa_supplicant *wpa_s); -#ifdef CONFIG_MULTI_AP void wpa_add_multi_ap_info_ie(u8 *pos, size_t *len); -#endif #endif /* WPA_SUPPLICANT_I_H */