From patchwork Mon Nov 27 19:03:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya X-Patchwork-Id: 1868939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=V1Y+eI8n; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=hdNcDxLk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SfFQr2cpBz1yRy for ; Tue, 28 Nov 2023 06:05:21 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=0a+NC24H+3t/1b5m/z97M+/XdgIMZzeGA7KlXukrWVw=; b=V1Y+eI8ns/aGIq AOJJXXM+mq1FnfeaVywI7a0/4s9XoyuJP7kQEVOccvzYDnVBmWYUfgOYBrHLKsPquGRKW+I3N3+DZ 15vKOlY9ZY/0jfeK+SZe+zimTMegVipd+xwQOCN3VS1CeNZCYyzo4v3bf0hhtNIscGXloQDs/SEaF fwS9WjMF8d0uVJJKRuU+oSy+KXmUDsM0Xgo8ox9wylYXG0pfUmSYb0kwSnDe0PE+Z6LakSdqXe6IP JXpTEA2ds7KCqZxgO+2vKQnd9ANF6HoWct/1oF6zazAb1J66FM37zBmI/3l+QyqCYDKkqJDseBFnD r6vLrMC7RigZZrp6Pl6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7gtu-003HSl-2u; Mon, 27 Nov 2023 19:04:10 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r7gto-003HR2-30 for hostap@lists.infradead.org; Mon, 27 Nov 2023 19:04:08 +0000 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-28598035301so2744532a91.0 for ; Mon, 27 Nov 2023 11:04:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701111843; x=1701716643; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=4r9k6PTVyKTelddFp2C5/9O/cdrU62afkIPkch31270=; b=hdNcDxLkZ0YXebrjYuD2AaBVDI4hv6fbVYoyZHzB67+CEid1BW7MVyVEBZkBQpNbqn +K4MAHRIgRiLwYKxk+UsQYK9WXZN07KIp+epUsrVHA1OAqClh/oAoL48F1SNi0p4Fqzr 6KYczIL1IA+sL+VFX1N8G72U1GQWCwT/FJ/OA9p0WaP9PNvHXz54IXM1e2D5g/1NefJ7 GOcBVmRm8rnX17mUoN+zx/BxA/IcWG6DkBJCfiS7/Qo/n5kS8SYNu+a0JitERUGp+/AM pk+5/pPf1R8JoU2J+veVf0t5JdddTmJNza+TD8U6mjIdvadnJQISZDlCHMqaJdE2rGIj LJ9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701111843; x=1701716643; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4r9k6PTVyKTelddFp2C5/9O/cdrU62afkIPkch31270=; b=MgcpejdFKoiOjnDwScaBHyqvYnk9p4LfnUs2YuNKbSkrlfriGY6O3dBUh1tcB6BUIw n/LRjQnboZemsFw/QM50fNFcAX2SeWIP33juvO710R14w0bAPT/bgYwAoAAdiXmJ/nj/ GKN22qjH9kGdlAExLaPbZNHRvfGU8rpxq/NdEQQHpTrdO3LAX1n8TpPwuQikwLgENNrC Wga44sN01ssoVwi55od8JmlZ/qaUR2canheMzNpbPm3YefmKzxdvctVtR3Vfn813IiMs MISYSZNKk61v1pobt/mQRLOY2CGQ6/MtjMQxQR45aoBiW8Z/oFsMNbDBOdfOZwdqBQAB qqgQ== X-Gm-Message-State: AOJu0YzDjeiB8K9W6jGucM8CqveTDiLlZYClZfPgWrCiv8EXp5X7teTW lGYcnNhHGxC99gOuVzBwVsjlYrA6Fvo= X-Google-Smtp-Source: AGHT+IFdufuhW34HpGQ7CzulSCrRwhfGY9aqQK2zZ0cqFg4lZo0jdJUgSW9gaPcoRBNGco6wH0Y5Ew== X-Received: by 2002:a17:90b:3b86:b0:285:a179:7174 with SMTP id pc6-20020a17090b3b8600b00285a1797174mr10619255pjb.29.1701111842325; Mon, 27 Nov 2023 11:04:02 -0800 (PST) Received: from smtp.gmail.com ([49.205.251.123]) by smtp.gmail.com with ESMTPSA id d17-20020a170902ced100b001cf89a66685sm8567851plg.272.2023.11.27.11.04.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 11:04:01 -0800 (PST) From: Chaitanya Tata X-Google-Original-From: Chaitanya Tata To: hostap@lists.infradead.org Subject: [PATCH v2] Add an option to remove advanced features Date: Tue, 28 Nov 2023 00:33:58 +0530 Message-Id: <20231127190358.121426-1-Chaitanya.Tata@nordicsemi.no> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231127_110404_981967_8CFEFF84 X-CRM114-Status: GOOD ( 20.36 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: For a memory constrained system, basic Wi-Fi is enough, so, add a configuration option to compile out advanced Wi-Fi features but seldom used as below: * RRM * Robust AV * WMM-AC By default these are enabled. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1034 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chaitanya.mgit[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org For a memory constrained system, basic Wi-Fi is enough, so, add a configuration option to compile out advanced Wi-Fi features but seldom used as below: * RRM * Robust AV * WMM-AC By default these are enabled. Signed-off-by: Chaitanya Tata --- v2: * Convert to NO_* macros * Include Android changes * Fix typos and missed cases --- hostapd/ctrl_iface.c | 2 + wpa_supplicant/Android.mk | 26 ++++- wpa_supplicant/Makefile | 26 ++++- wpa_supplicant/android.config | 8 ++ wpa_supplicant/ctrl_iface.c | 168 ++++++++++++++++-------------- wpa_supplicant/defconfig | 8 ++ wpa_supplicant/events.c | 18 +++- wpa_supplicant/scan.c | 3 +- wpa_supplicant/sme.c | 7 +- wpa_supplicant/wpa_cli.c | 3 +- wpa_supplicant/wpa_supplicant.c | 37 +++++-- wpa_supplicant/wpa_supplicant_i.h | 42 ++++---- 12 files changed, 230 insertions(+), 118 deletions(-) diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 9d42b60ae..02369dfcd 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -1307,12 +1307,14 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd) hostapd_disassoc_deny_mac(hapd); } else if (os_strcasecmp(cmd, "accept_mac_file") == 0) { hostapd_disassoc_accept_mac(hapd); +#ifndef CONFIG_NO_WMM_AC } else if (os_strncmp(cmd, "wme_ac_", 7) == 0 || os_strncmp(cmd, "wmm_ac_", 7) == 0) { hapd->parameter_set_count++; if (ieee802_11_update_beacons(hapd->iface)) wpa_printf(MSG_DEBUG, "Failed to update beacons with WMM parameters"); +#endif /* CONFIG_NO_WMM_AC */ } else if (os_strcmp(cmd, "wpa_passphrase") == 0 || os_strcmp(cmd, "sae_password") == 0 || os_strcmp(cmd, "sae_pwe") == 0) { diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk index 5b0ca2e3b..e0af817f5 100644 --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk @@ -100,11 +100,7 @@ OBJS += src/utils/wpabuf.c OBJS += src/utils/bitfield.c OBJS += src/utils/ip_addr.c OBJS += src/utils/crc32.c -OBJS += wmm_ac.c -OBJS += op_classes.c -OBJS += rrm.c OBJS += twt.c -OBJS += robust_av.c OBJS_p = wpa_passphrase.c OBJS_p += src/utils/common.c OBJS_p += src/utils/wpa_debug.c @@ -423,6 +419,28 @@ ifdef CONFIG_NO_TKIP L_CFLAGS += -DCONFIG_NO_TKIP endif +ifdef CONFIG_NO_RRM +L_CFLAGS += -DCONFIG_NO_RRM +else +OBJS += rrm.c +ifdef CONFIG_AP +OBJS += ../src/ap/rrm.c +endif +OBJS += op_classes.c +endif + +ifdef CONFIG_NO_WMM_AC +L_CFLAGS += -DCONFIG_NO_WMM_AC +else +OBJS += wmm_ac.c +endif + +ifdef CONFIG_NO_ROBUST_AV +L_CFLAGS += -DCONFIG_NO_ROBUST_AV +else +OBJS += robust_av.c +endif + include $(LOCAL_PATH)/src/drivers/drivers.mk diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 8adbc3b41..2d3d21dd4 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -111,10 +111,7 @@ OBJS += ../src/utils/wpabuf.o OBJS += ../src/utils/bitfield.o OBJS += ../src/utils/ip_addr.o OBJS += ../src/utils/crc32.o -OBJS += op_classes.o -OBJS += rrm.o OBJS += twt.o -OBJS += robust_av.o OBJS_p = wpa_passphrase.o OBJS_p += ../src/utils/common.o OBJS_p += ../src/utils/wpa_debug.o @@ -123,7 +120,6 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o OBJS_c += ../src/utils/wpa_debug.o OBJS_c += ../src/utils/common.o OBJS_c += ../src/common/cli.o -OBJS += wmm_ac.o ifndef CONFIG_OS ifdef CONFIG_NATIVE_WINDOWS @@ -471,6 +467,27 @@ endif ifdef CONFIG_NO_LOAD_DYNAMIC_EAP CFLAGS += -DCONFIG_NO_LOAD_DYNAMIC_EAP + +ifdef CONFIG_NO_RRM +CFLAGS += -DCONFIG_NO_RRM +else +OBJS += rrm.o +ifdef CONFIG_AP +OBJS += ../src/ap/rrm.o +endif +OBJS += op_classes.o +endif + +ifdef CONFIG_NO_WMM_AC +CFLAGS += -DCONFIG_NO_WMM_AC +else +OBJS += wmm_ac.o +endif + +ifdef CONFIG_NO_ROBUST_AV +CFLAGS += -DCONFIG_NO_ROBUST_AV +else +OBJS += robust_av.o endif include ../src/drivers/drivers.mak @@ -979,7 +996,6 @@ OBJS += ../src/ap/beacon.o OBJS += ../src/ap/bss_load.o OBJS += ../src/ap/eap_user_db.o OBJS += ../src/ap/neighbor_db.o -OBJS += ../src/ap/rrm.o OBJS += ../src/ap/ieee802_11_ht.o ifdef CONFIG_IEEE80211AC OBJS += ../src/ap/ieee802_11_vht.o diff --git a/wpa_supplicant/android.config b/wpa_supplicant/android.config index 283f8eb0a..ae57c5736 100644 --- a/wpa_supplicant/android.config +++ b/wpa_supplicant/android.config @@ -542,4 +542,12 @@ CONFIG_WIFI_DISPLAY=y # be completely removed in a future release. CONFIG_WEP=y +# Memory saving options: Disable support for rarely used features in the field +# Radio Measurement (IEEE 802.11k) +# CONFIG_NO_RRM=y +# WMM admission control +# CONFIG_NO_WMM_AC=y +# Robust AV streaming for consumer and enterprise Wi-Fi applications 802.11-202 (4.3.24) +# CONFIG_NO_ROBUST_AV=y + include $(wildcard $(LOCAL_PATH)/android_config_*.inc) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index b716fa774..0d703a5bf 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -833,10 +833,12 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s, wpa_s->sae_commit_override = wpabuf_parse_bin(value); } else if (os_strcasecmp(cmd, "driver_signal_override") == 0) { ret = wpas_ctrl_iface_set_dso(wpa_s, value); +#ifndef CONFIG_NO_ROBUST_AV } else if (os_strcasecmp(cmd, "disable_scs_support") == 0) { wpa_s->disable_scs_support = !!atoi(value); } else if (os_strcasecmp(cmd, "disable_mscs_support") == 0) { wpa_s->disable_mscs_support = !!atoi(value); +#endif /*CONFIG_NO_ROBUST_AV */ } else if (os_strcasecmp(cmd, "disable_eapol_g2_tx") == 0) { wpa_s->disable_eapol_g2_tx = !!atoi(value); /* Populate value to wpa_sm if already associated. */ @@ -932,8 +934,10 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s, return -1; wnm_set_coloc_intf_elems(wpa_s, elems); #endif /* CONFIG_WNM */ +#ifndef CONFIG_NO_ROBUST_AV } else if (os_strcasecmp(cmd, "enable_dscp_policy_capa") == 0) { wpa_s->enable_dscp_policy_capa = !!atoi(value); +#endif /* CONFIG_NO_ROBUST_AV */ } else { value[-1] = '='; ret = wpa_config_process_global(wpa_s->conf, cmd, -1); @@ -1260,6 +1264,7 @@ static int wpa_supplicant_ctrl_iface_tdls_link_status( #endif /* CONFIG_TDLS */ +#ifndef CONFIG_NO_WMM_AC static int wmm_ac_ctrl_addts(struct wpa_supplicant *wpa_s, char *cmd) { char *token, *context = NULL; @@ -1308,7 +1313,7 @@ static int wmm_ac_ctrl_delts(struct wpa_supplicant *wpa_s, char *cmd) return wpas_wmm_ac_delts(wpa_s, tsid); } - +#endif /* CONFIG_NO_WMM_AC */ #ifdef CONFIG_IEEE80211R static int wpa_supplicant_ctrl_iface_ft_ds( @@ -8911,7 +8916,9 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s) wpa_s->next_scan_bssid_wildcard_ssid = 0; os_free(wpa_s->select_network_scan_freqs); wpa_s->select_network_scan_freqs = NULL; +#ifndef CONFIG_NO_ROBUST_AV os_memset(&wpa_s->robust_av, 0, sizeof(struct robust_av_data)); +#endif /* CONFIG_NO_ROBUST_AV */ wpa_bss_flush(wpa_s); if (!dl_list_empty(&wpa_s->bss)) { @@ -8938,7 +8945,9 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s) free_bss_tmp_disallowed(wpa_s); +#ifndef CONFIG_NO_ROBUST_AV os_memset(&wpa_s->robust_av, 0, sizeof(struct robust_av_data)); +#endif /* CONFIG_NO_ROBUST_AV */ #ifdef CONFIG_PASN wpas_pasn_auth_stop(wpa_s); @@ -10504,7 +10513,7 @@ static int wpas_ctrl_vendor_elem_remove(struct wpa_supplicant *wpa_s, char *cmd) return res; } - +#ifndef CONFIG_NO_RRM static void wpas_ctrl_neighbor_rep_cb(void *ctx, struct wpabuf *neighbor_rep) { struct wpa_supplicant *wpa_s = ctx; @@ -10607,7 +10616,6 @@ out: wpabuf_free(neighbor_rep); } - static int wpas_ctrl_iface_send_neighbor_rep(struct wpa_supplicant *wpa_s, char *cmd) { @@ -10647,7 +10655,7 @@ static int wpas_ctrl_iface_send_neighbor_rep(struct wpa_supplicant *wpa_s, return ret; } - +#endif /* CONFIG_NO_RRM */ static int wpas_ctrl_iface_erp_flush(struct wpa_supplicant *wpa_s) { @@ -11001,76 +11009,6 @@ int wpas_ctrl_cmd_debug_level(const char *cmd) } -static int wpas_ctrl_iface_configure_mscs(struct wpa_supplicant *wpa_s, - const char *cmd) -{ - size_t frame_classifier_len; - const char *pos, *end; - struct robust_av_data *robust_av = &wpa_s->robust_av; - int val; - - /* - * format: - * [up_bitmap=] [up_limit=] - * [stream_timeout=] [frame_classifier=] - */ - os_memset(robust_av, 0, sizeof(struct robust_av_data)); - if (os_strncmp(cmd, "add ", 4) == 0) { - robust_av->request_type = SCS_REQ_ADD; - } else if (os_strcmp(cmd, "remove") == 0) { - robust_av->request_type = SCS_REQ_REMOVE; - robust_av->valid_config = false; - return wpas_send_mscs_req(wpa_s); - } else if (os_strncmp(cmd, "change ", 7) == 0) { - robust_av->request_type = SCS_REQ_CHANGE; - } else { - return -1; - } - - pos = os_strstr(cmd, "up_bitmap="); - if (!pos) - return -1; - - val = hex2byte(pos + 10); - if (val < 0) - return -1; - robust_av->up_bitmap = val; - - pos = os_strstr(cmd, "up_limit="); - if (!pos) - return -1; - - robust_av->up_limit = atoi(pos + 9); - - pos = os_strstr(cmd, "stream_timeout="); - if (!pos) - return -1; - - robust_av->stream_timeout = atoi(pos + 15); - if (robust_av->stream_timeout == 0) - return -1; - - pos = os_strstr(cmd, "frame_classifier="); - if (!pos) - return -1; - - pos += 17; - end = os_strchr(pos, ' '); - if (!end) - end = pos + os_strlen(pos); - - frame_classifier_len = (end - pos) / 2; - if (frame_classifier_len > sizeof(robust_av->frame_classifier) || - hexstr2bin(pos, robust_av->frame_classifier, frame_classifier_len)) - return -1; - - robust_av->frame_classifier_len = frame_classifier_len; - robust_av->valid_config = true; - - return wpas_send_mscs_req(wpa_s); -} - - #ifdef CONFIG_PASN static int wpas_ctrl_iface_pasn_start(struct wpa_supplicant *wpa_s, char *cmd) { @@ -11172,6 +11110,75 @@ static int wpas_ctrl_iface_pasn_deauthenticate(struct wpa_supplicant *wpa_s, #endif /* CONFIG_PASN */ +#ifndef CONFIG_NO_ROBUST_AV +static int wpas_ctrl_iface_configure_mscs(struct wpa_supplicant *wpa_s, + const char *cmd) +{ + size_t frame_classifier_len; + const char *pos, *end; + struct robust_av_data *robust_av = &wpa_s->robust_av; + int val; + + /* + * format: + * [up_bitmap=] [up_limit=] + * [stream_timeout=] [frame_classifier=] + */ + os_memset(robust_av, 0, sizeof(struct robust_av_data)); + if (os_strncmp(cmd, "add ", 4) == 0) { + robust_av->request_type = SCS_REQ_ADD; + } else if (os_strcmp(cmd, "remove") == 0) { + robust_av->request_type = SCS_REQ_REMOVE; + robust_av->valid_config = false; + return wpas_send_mscs_req(wpa_s); + } else if (os_strncmp(cmd, "change ", 7) == 0) { + robust_av->request_type = SCS_REQ_CHANGE; + } else { + return -1; + } + + pos = os_strstr(cmd, "up_bitmap="); + if (!pos) + return -1; + + val = hex2byte(pos + 10); + if (val < 0) + return -1; + robust_av->up_bitmap = val; + + pos = os_strstr(cmd, "up_limit="); + if (!pos) + return -1; + + robust_av->up_limit = atoi(pos + 9); + + pos = os_strstr(cmd, "stream_timeout="); + if (!pos) + return -1; + + robust_av->stream_timeout = atoi(pos + 15); + if (robust_av->stream_timeout == 0) + return -1; + + pos = os_strstr(cmd, "frame_classifier="); + if (!pos) + return -1; + + pos += 17; + end = os_strchr(pos, ' '); + if (!end) + end = pos + os_strlen(pos); + + frame_classifier_len = (end - pos) / 2; + if (frame_classifier_len > sizeof(robust_av->frame_classifier) || + hexstr2bin(pos, robust_av->frame_classifier, frame_classifier_len)) + return -1; + + robust_av->frame_classifier_len = frame_classifier_len; + robust_av->valid_config = true; + + return wpas_send_mscs_req(wpa_s); +} static int set_type4_frame_classifier(const char *cmd, struct type4_params *param) @@ -11868,6 +11875,7 @@ static int wpas_ctrl_iface_send_dscp_query(struct wpa_supplicant *wpa_s, return wpas_send_dscp_query(wpa_s, pos + 12, os_strlen(pos + 12)); } +#endif /* CONFIG_NO_ROBUST_AV */ static int wpas_ctrl_iface_mlo_signal_poll(struct wpa_supplicant *wpa_s, @@ -12726,6 +12734,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, reply_len = wpa_supplicant_ctrl_iface_tdls_link_status( wpa_s, buf + 17, reply, reply_size); #endif /* CONFIG_TDLS */ +#ifndef CONFIG_NO_WMM_AC } else if (os_strcmp(buf, "WMM_AC_STATUS") == 0) { reply_len = wpas_wmm_ac_status(wpa_s, reply, reply_size); } else if (os_strncmp(buf, "WMM_AC_ADDTS ", 13) == 0) { @@ -12734,6 +12743,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, } else if (os_strncmp(buf, "WMM_AC_DELTS ", 13) == 0) { if (wmm_ac_ctrl_delts(wpa_s, buf + 13)) reply_len = -1; +#endif /* CONFIG_NO_WMM_AC */ } else if (os_strncmp(buf, "SIGNAL_POLL", 11) == 0) { reply_len = wpa_supplicant_signal_poll(wpa_s, reply, reply_size); @@ -12873,9 +12883,11 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, } else if (os_strncmp(buf, "VENDOR_ELEM_REMOVE ", 19) == 0) { if (wpas_ctrl_vendor_elem_remove(wpa_s, buf + 19) < 0) reply_len = -1; +#ifndef CONFIG_NO_RRM } else if (os_strncmp(buf, "NEIGHBOR_REP_REQUEST", 20) == 0) { if (wpas_ctrl_iface_send_neighbor_rep(wpa_s, buf + 20)) reply_len = -1; +#endif /* CONFIG_NO_RRM */ } else if (os_strcmp(buf, "ERP_FLUSH") == 0) { wpas_ctrl_iface_erp_flush(wpa_s); } else if (os_strncmp(buf, "MAC_RAND_SCAN ", 14) == 0) { @@ -13048,9 +13060,6 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, reply_len = -1; #endif /* CONFIG_DPP3 */ #endif /* CONFIG_DPP */ - } else if (os_strncmp(buf, "MSCS ", 5) == 0) { - if (wpas_ctrl_iface_configure_mscs(wpa_s, buf + 5)) - reply_len = -1; #ifdef CONFIG_PASN } else if (os_strncmp(buf, "PASN_START ", 11) == 0) { if (wpas_ctrl_iface_pasn_start(wpa_s, buf + 11) < 0) @@ -13063,6 +13072,10 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, if (wpas_ctrl_iface_pasn_deauthenticate(wpa_s, buf + 12) < 0) reply_len = -1; #endif /* CONFIG_PASN */ +#ifndef CONFIG_NO_ROBUST_AV + } else if (os_strncmp(buf, "MSCS ", 5) == 0) { + if (wpas_ctrl_iface_configure_mscs(wpa_s, buf + 5)) + reply_len = -1; } else if (os_strncmp(buf, "SCS ", 4) == 0) { if (wpas_ctrl_iface_configure_scs(wpa_s, buf + 4)) reply_len = -1; @@ -13072,6 +13085,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, } else if (os_strncmp(buf, "DSCP_QUERY ", 11) == 0) { if (wpas_ctrl_iface_send_dscp_query(wpa_s, buf + 11)) reply_len = -1; +#endif /* CONFIG_NO_ROBUST_AV */ } else if (os_strcmp(buf, "MLO_STATUS") == 0) { reply_len = wpas_ctrl_iface_mlo_status(wpa_s, reply, reply_size); diff --git a/wpa_supplicant/defconfig b/wpa_supplicant/defconfig index 8422a095f..78b367a63 100644 --- a/wpa_supplicant/defconfig +++ b/wpa_supplicant/defconfig @@ -671,3 +671,11 @@ CONFIG_DPP2=y # design is still subject to change. As such, this should not yet be enabled in # production use. #CONFIG_PASN=y + +# Memory saving options: Disable support for rarely used features in the field +# Radio Measurement (IEEE 802.11k) +# CONFIG_NO_RRM=y +# WMM admission control +# CONFIG_NO_WMM_AC=y +# Robust AV streaming for consumer and enterprise Wi-Fi applications 802.11-202 (4.3.24) +# CONFIG_NO_ROBUST_AV=y diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index da73faaaf..4d1509ddd 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -382,7 +382,9 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s) wpa_s->key_mgmt = 0; wpa_s->allowed_key_mgmts = 0; +#ifndef CONFIG_NO_RRM wpas_rrm_reset(wpa_s); +#endif /* CONFIG_NO_RRM */ wpa_s->wnmsleep_used = 0; wnm_clear_coloc_intf_reporting(wpa_s); wpa_s->disable_mbo_oce = 0; @@ -2470,9 +2472,11 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s, if (sme_proc_obss_scan(wpa_s) > 0) goto scan_work_done; +#ifndef CONFIG_NO_RRM if (own_request && data && wpas_beacon_rep_scan_process(wpa_s, scan_res, &data->scan_info) > 0) goto scan_work_done; +#endif /* CONFIG_NO_RRM */ if (ml_link_probe_scan(wpa_s)) goto scan_work_done; @@ -3542,10 +3546,12 @@ no_pfs: data->assoc_info.resp_ies_len); #endif /* CONFIG_IEEE80211R */ +#ifndef CONFIG_NO_ROBUST_AV if (bssid_known) wpas_handle_assoc_resp_mscs(wpa_s, bssid, data->assoc_info.resp_ies, data->assoc_info.resp_ies_len); +#endif /* CONFIG_NO_ROBUST_AV */ /* WPA/RSN IE from Beacon/ProbeResp */ p = data->assoc_info.beacon_ies; @@ -3600,8 +3606,10 @@ no_pfs: wpa_s->assoc_freq = data->assoc_info.freq; +#ifndef CONFIG_NO_ROBUST_AV wpas_handle_assoc_resp_qos_mgmt(wpa_s, data->assoc_info.resp_ies, data->assoc_info.resp_ies_len); +#endif /* CONFIG_NO_ROBUST_AV */ return 0; } @@ -4339,6 +4347,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, wpas_wps_notify_assoc(wpa_s, bssid); +#ifndef CONFIG_NO_WMM_AC if (data) { wmm_ac_notify_assoc(wpa_s, data->assoc_info.resp_ies, data->assoc_info.resp_ies_len, @@ -4347,6 +4356,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, if (wpa_s->reassoc_same_bss) wmm_ac_restore_tspecs(wpa_s); } +#endif /* CONFIG_NO_WMM_AC */ #if defined(CONFIG_FILS) || defined(CONFIG_MBO) bss = wpa_bss_get_bssid(wpa_s, bssid); @@ -5198,10 +5208,12 @@ static void wpas_event_rx_mgmt_action(struct wpa_supplicant *wpa_s, " Category=%u DataLen=%d freq=%d MHz", MAC2STR(mgmt->sa), category, (int) plen, freq); +#ifndef CONFIG_NO_WMM_AC if (category == WLAN_ACTION_WMM) { wmm_ac_rx_action(wpa_s, mgmt->da, mgmt->sa, payload, plen); return; } +#endif /* CONFIG_NO_WMM_AC */ #ifdef CONFIG_IEEE80211R if (category == WLAN_ACTION_FT) { @@ -5273,6 +5285,7 @@ static void wpas_event_rx_mgmt_action(struct wpa_supplicant *wpa_s, } #endif /* CONFIG_INTERWORKING */ +#ifndef CONFIG_NO_RRM if (category == WLAN_ACTION_RADIO_MEASUREMENT && payload[0] == WLAN_RRM_RADIO_MEASUREMENT_REQUEST) { wpas_rrm_handle_radio_measurement_request(wpa_s, mgmt->sa, @@ -5295,6 +5308,7 @@ static void wpas_event_rx_mgmt_action(struct wpa_supplicant *wpa_s, rssi); return; } +#endif /* CONFIG_NO_RRM */ #ifdef CONFIG_FST if (mgmt->u.action.category == WLAN_ACTION_FST && wpa_s->fst) { @@ -5314,7 +5328,7 @@ static void wpas_event_rx_mgmt_action(struct wpa_supplicant *wpa_s, return; } #endif /* CONFIG_DPP */ - +#ifndef CONFIG_NO_ROBUST_AV if (category == WLAN_ACTION_ROBUST_AV_STREAMING && payload[0] == ROBUST_AV_SCS_RESP) { wpas_handle_robust_av_scs_recv_action(wpa_s, mgmt->sa, @@ -5335,7 +5349,7 @@ static void wpas_event_rx_mgmt_action(struct wpa_supplicant *wpa_s, payload + 4, plen - 4); return; } - +#endif /* CONFIG_NO_ROBUST_AV */ wpas_p2p_rx_action(wpa_s, mgmt->da, mgmt->sa, mgmt->bssid, category, payload, plen, freq); if (wpa_s->ifmsh) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 4ed20b62d..7aad6af08 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -260,9 +260,10 @@ static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit) /* Clear the scan_res_handler */ wpa_s->scan_res_handler = NULL; } - +#ifndef CONFIG_NO_RRM if (wpa_s->beacon_rep_data.token) wpas_rrm_refuse_request(wpa_s); +#endif /* CONFIG_NO_RRM */ return; } diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index d5a4785ea..d2a859b2f 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -874,11 +874,12 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s, sme_auth_handle_rrm(wpa_s, bss); +#ifndef CONFIG_NO_RRM wpa_s->sme.assoc_req_ie_len += wpas_supp_op_class_ie( wpa_s, ssid, bss, wpa_s->sme.assoc_req_ie + wpa_s->sme.assoc_req_ie_len, sizeof(wpa_s->sme.assoc_req_ie) - wpa_s->sme.assoc_req_ie_len); - +#endif /* CONFIG_NO_RRM */ if (params.p2p) wpa_drv_get_ext_capa(wpa_s, WPA_IF_P2P_CLIENT); else @@ -2357,7 +2358,7 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode, } pfs_fail: #endif /* CONFIG_DPP2 */ - +#ifndef CONFIG_NO_ROBUST_AV wpa_s->mscs_setup_done = false; if (wpa_bss_ext_capab(wpa_s->current_bss, WLAN_EXT_CAPAB_MSCS) && wpa_s->robust_av.valid_config) { @@ -2391,7 +2392,7 @@ pfs_fail: wpabuf_free(mscs_ie); } mscs_fail: - +#endif /* CONFIG_NO_RRM */ if (ssid && ssid->multi_ap_backhaul_sta) { size_t multi_ap_ie_len; diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 65078edf1..90d0276c4 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -2846,7 +2846,7 @@ static int wpa_cli_cmd_tdls_link_status(struct wpa_ctrl *ctrl, int argc, return wpa_cli_cmd(ctrl, "TDLS_LINK_STATUS", 1, argc, argv); } - +#ifndef CONFIG_NO_WMM_AC static int wpa_cli_cmd_wmm_ac_addts(struct wpa_ctrl *ctrl, int argc, char *argv[]) { @@ -2866,6 +2866,7 @@ static int wpa_cli_cmd_wmm_ac_status(struct wpa_ctrl *ctrl, int argc, { return wpa_ctrl_command(ctrl, "WMM_AC_STATUS"); } +#endif /* CONFIG_NO_WMM_AC */ static int wpa_cli_cmd_tdls_chan_switch(struct wpa_ctrl *ctrl, int argc, diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index c4c58b757..a6157c8d8 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -582,7 +582,9 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s) wpa_tdls_deinit(wpa_s->wpa); #endif /* CONFIG_TDLS */ +#ifndef CONFIG_NO_WMM_AC wmm_ac_clear_saved_tspecs(wpa_s); +#endif /* CONFIG_NO_WMM_AC */ pmksa_candidate_free(wpa_s->wpa); ptksa_cache_deinit(wpa_s->ptksa); wpa_s->ptksa = NULL; @@ -698,9 +700,9 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s) wpabuf_free(wpa_s->vendor_elem[i]); wpa_s->vendor_elem[i] = NULL; } - +#ifndef CONFIG_NO_WMM_AC wmm_ac_notify_disassoc(wpa_s); - +#endif /* CONFIG_NO_WMM_AC */ wpa_s->sched_scan_plans_num = 0; os_free(wpa_s->sched_scan_plans); wpa_s->sched_scan_plans = NULL; @@ -715,7 +717,9 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s) wpabuf_free(wpa_s->lci); wpa_s->lci = NULL; +#ifndef CONFIG_NO_RRM wpas_clear_beacon_rep_data(wpa_s); +#endif /* CONFIG_NO_RRM */ #ifdef CONFIG_PMKSA_CACHE_EXTERNAL #ifdef CONFIG_MESH @@ -747,13 +751,15 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s) #ifdef CONFIG_PASN wpas_pasn_auth_stop(wpa_s); #endif /* CONFIG_PASN */ +#ifndef CONFIG_NO_ROBUST_AV wpas_scs_deinit(wpa_s); wpas_dscp_deinit(wpa_s); - +#endif /* CONFIG_NO_ROBUST_AV */ #ifdef CONFIG_OWE os_free(wpa_s->owe_trans_scan_freq); wpa_s->owe_trans_scan_freq = NULL; #endif /* CONFIG_OWE */ + } @@ -1063,9 +1069,10 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, if (state == WPA_DISCONNECTED || state == WPA_INACTIVE) wpa_supplicant_start_autoscan(wpa_s); +#ifndef CONFIG_NO_WMM_AC if (old_state >= WPA_ASSOCIATED && wpa_s->wpa_state < WPA_ASSOCIATED) wmm_ac_notify_disassoc(wpa_s); - +#endif /* CONFIG_NO_WMM_AC */ if (wpa_s->wpa_state != old_state) { wpas_notify_state_changed(wpa_s, wpa_s->wpa_state, old_state); @@ -2476,7 +2483,9 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, wpa_s->eapol_failed = 0; wpa_s->multi_ap_ie = 0; +#ifndef CONFIG_NO_WMM_AC wmm_ac_clear_saved_tspecs(wpa_s); +#endif /* CONFIG_NO_WMM_AC */ wpa_s->reassoc_same_bss = 0; wpa_s->reassoc_same_ess = 0; #ifdef CONFIG_TESTING_OPTIONS @@ -2487,7 +2496,9 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, wpa_dbg(wpa_s, MSG_DEBUG, "Re-association to the same ESS"); wpa_s->reassoc_same_ess = 1; if (wpa_s->current_bss && wpa_s->current_bss == bss) { +#ifndef CONFIG_NO_WMM_AC wmm_ac_save_tspecs(wpa_s); +#endif /* CONFIG_NO_WMM_AC */ wpa_s->reassoc_same_bss = 1; } else if (wpa_s->current_bss && wpa_s->current_bss != bss) { os_get_reltime(&wpa_s->roam_start); @@ -3234,8 +3245,10 @@ static int wpas_populate_wfa_capa(struct wpa_supplicant *wpa_s, size_t wfa_ie_len, buf_len; os_memset(wfa_capa, 0, sizeof(wfa_capa)); +#ifndef CONFIG_NO_ROBUST_AV if (wpa_s->enable_dscp_policy_capa) wfa_capa[0] |= WFA_CAPA_QM_DSCP_POLICY; +#endif /* CONFIG_NO_ROBUST_AV */ if (wpa_is_non_eht_scs_traffic_desc_supported(bss)) wfa_capa[0] |= WFA_CAPA_QM_NON_EHT_SCS_TRAFFIC_DESC; @@ -3499,13 +3512,14 @@ static u8 * wpas_populate_assoc_ies( os_memset(wpa_s->p2p_ip_addr_info, 0, sizeof(wpa_s->p2p_ip_addr_info)); #endif /* CONFIG_P2P */ +#ifndef CONFIG_NO_RRM if (bss) { wpa_ie_len += wpas_supp_op_class_ie(wpa_s, ssid, bss, wpa_ie + wpa_ie_len, max_wpa_ie_len - wpa_ie_len); } - +#endif /* CONFIG_NO_RRM */ /* * Workaround: Add Extended Capabilities element only if the AP * included this element in Beacon/Probe Response frames. Some older @@ -3732,6 +3746,7 @@ pfs_fail: if (wpa_s->disable_mscs_support) goto mscs_end; #endif /* CONFIG_TESTING_OPTIONS */ +#ifndef CONFIG_NO_ROBUST_AV if (wpa_bss_ext_capab(bss, WLAN_EXT_CAPAB_MSCS) && wpa_s->robust_av.valid_config) { struct wpabuf *mscs_ie; @@ -3762,7 +3777,7 @@ pfs_fail: wpabuf_free(mscs_ie); } mscs_end: - +#endif /* CONFIG_NO_ROBUST_AV */ wpa_ie_len = wpas_populate_wfa_capa(wpa_s, bss, wpa_ie, wpa_ie_len, max_wpa_ie_len); @@ -4046,7 +4061,9 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, NULL, 0); wpa_sm_set_assoc_rsnxe(wpa_s->wpa, NULL, 0); wpa_s->rsnxe_len = 0; +#ifndef CONFIG_NO_ROBUST_AV wpa_s->mscs_setup_done = false; +#endif /* CONFIG_NO_ROBUST_AV */ wpa_ie = wpas_populate_assoc_ies(wpa_s, bss, ssid, ¶ms, NULL); if (!wpa_ie) { @@ -4511,8 +4528,10 @@ static void wpa_supplicant_clear_connection(struct wpa_supplicant *wpa_s, if (old_ssid != wpa_s->current_ssid) wpas_notify_network_changed(wpa_s); +#ifndef CONFIG_NO_ROBUST_AV wpas_scs_deinit(wpa_s); wpas_dscp_deinit(wpa_s); +#endif /* CONFIG_NO_ROBUST_AV */ eloop_cancel_timeout(wpa_supplicant_timeout, wpa_s, NULL); } @@ -5818,7 +5837,9 @@ wpa_supplicant_alloc(struct wpa_supplicant *parent) #ifdef CONFIG_TESTING_OPTIONS dl_list_init(&wpa_s->drv_signal_override); #endif /* CONFIG_TESTING_OPTIONS */ +#ifndef CONFIG_NO_ROBUST_AV dl_list_init(&wpa_s->active_scs_ids); +#endif /* CONFIG_NO_ROBUST_AV */ wpa_s->ml_probe_mld_id = -1; return wpa_s; @@ -7195,7 +7216,9 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s, wpa_s->extended_capa_len = capa.extended_capa_len; wpa_s->num_multichan_concurrent = capa.num_multichan_concurrent; +#ifndef CONFIG_NO_WMM_AC wpa_s->wmm_ac_supported = capa.wmm_ac_supported; +#endif /* CONFIG_NO_WMM_AC */ wpa_s->max_num_akms = capa.max_num_akms; if (capa.mac_addr_rand_scan_supported) @@ -7352,7 +7375,9 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s, if (wpas_init_ext_pw(wpa_s) < 0) return -1; +#ifndef CONFIG_NO_RRM wpas_rrm_reset(wpa_s); +#endif /* CONFIG_NO_RRM */ wpas_sched_scan_plans_set(wpa_s, wpa_s->conf->sched_scan_plans); diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 35a9c0c9e..928b82d0a 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -515,7 +515,7 @@ struct driver_signal_override { int si_current_noise; int scan_level; }; - +#ifndef CONFIG_NO_ROBUST_AV struct robust_av_data { u8 dialog_token; enum scs_request_type request_type; @@ -659,7 +659,7 @@ struct active_scs_elem { u8 scs_id; enum scs_response_status status; }; - +#endif /* CONFIG_NO_ROBUST_AV */ struct ml_sta_link_info { u8 link_id; @@ -1547,25 +1547,11 @@ struct wpa_supplicant { unsigned int multi_ap_ie:1; unsigned int multi_ap_backhaul:1; unsigned int multi_ap_fronthaul:1; +#ifndef CONFIG_NO_ROBUST_AV struct robust_av_data robust_av; bool mscs_setup_done; - - bool wps_scan_done; /* Set upon receiving scan results event */ - bool supp_pbc_active; /* Set for interface when PBC is triggered */ - bool wps_overlap; - -#ifdef CONFIG_PASN - struct pasn_data pasn; - struct wpa_radio_work *pasn_auth_work; - unsigned int pasn_count; - struct pasn_auth *pasn_params; -#endif /* CONFIG_PASN */ struct scs_robust_av_data scs_robust_av_req; u8 scs_dialog_token; -#ifdef CONFIG_TESTING_OPTIONS - unsigned int disable_scs_support:1; - unsigned int disable_mscs_support:1; -#endif /* CONFIG_TESTING_OPTIONS */ struct dl_list active_scs_ids; bool ongoing_scs_req; u8 dscp_req_dialog_token; @@ -1573,6 +1559,22 @@ struct wpa_supplicant { unsigned int enable_dscp_policy_capa:1; unsigned int connection_dscp:1; unsigned int wait_for_dscp_req:1; +#ifdef CONFIG_TESTING_OPTIONS + unsigned int disable_scs_support:1; + unsigned int disable_mscs_support:1; +#endif /* CONFIG_TESTING_OPTIONS */ +#endif /* CONFIG_NO_ROBUST_AV */ + + bool wps_scan_done; /* Set upon receiving scan results event */ + bool supp_pbc_active; /* Set for interface when PBC is triggered */ + bool wps_overlap; +#ifdef CONFIG_PASN + struct pasn_data pasn; + struct pasn_auth *pasn_params; + struct wpas_pasn pasn; + struct *pasn_auth_work; +#endif /* CONFIG_PASN */ + bool is_6ghz_enabled; bool crossed_6ghz_dom; bool last_scan_all_chan; @@ -1727,7 +1729,7 @@ int wpas_twt_send_setup(struct wpa_supplicant *wpa_s, u8 dtok, int exponent, bool flow_type, u8 flow_id, bool protection, u8 twt_channel, u8 control); int wpas_twt_send_teardown(struct wpa_supplicant *wpa_s, u8 flags); - +#ifndef CONFIG_NO_RRM void wpas_rrm_reset(struct wpa_supplicant *wpa_s); void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s, const u8 *report, size_t report_len); @@ -1745,6 +1747,7 @@ void wpas_rrm_handle_link_measurement_request(struct wpa_supplicant *wpa_s, const u8 *frame, size_t len, int rssi); void wpas_rrm_refuse_request(struct wpa_supplicant *wpa_s); +#endif /* CONFIG_NO_RRM */ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s, struct wpa_scan_results *scan_res, struct scan_info *info); @@ -1939,6 +1942,7 @@ int wpa_is_fils_sk_pfs_supported(struct wpa_supplicant *wpa_s); void wpas_clear_driver_signal_override(struct wpa_supplicant *wpa_s); int wpas_send_mscs_req(struct wpa_supplicant *wpa_s); +#ifndef CONFIG_NO_ROBUST_AV void wpas_populate_mscs_descriptor_ie(struct robust_av_data *robust_av, struct wpabuf *buf); void wpas_handle_robust_av_recv_action(struct wpa_supplicant *wpa_s, @@ -1963,7 +1967,7 @@ void wpas_handle_assoc_resp_qos_mgmt(struct wpa_supplicant *wpa_s, const u8 *ies, size_t ies_len); int wpas_send_dscp_query(struct wpa_supplicant *wpa_s, const char *domain_name, size_t domain_name_length); - +#endif /* CONFIG_NO_ROBUST_AV */ int wpas_pasn_auth_start(struct wpa_supplicant *wpa_s, const u8 *own_addr, const u8 *bssid, int akmp, int cipher, u16 group, int network_id,