From patchwork Fri Apr 5 07:52:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruth Mekonnen X-Patchwork-Id: 1920060 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=PS22WOZz; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=I5E4UHHk; 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 4V9rM83V1qz1yZH for ; Fri, 5 Apr 2024 18:53:06 +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:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Z7Z4fc2UUrmXuF2CVQWAkt/bf112vtMeA7O491l4Duk=; b=PS22WOZzTnPOOi ZgqkX5WFVFz1bzTiwhuG1JLV2ZOs+OFTL9m9JQhZF4AKh8xihST2qAT0xikedt0QYyxDwY5ulJAom WowKKzXBNyIpTLaI8nPjZUFaVKhDj5cpnVuuDWadcJvmpsh1cSAW47DEZ71D3rZnMDcxUf4SGTrPd vqxi7Y2Lg7Mj4NTSHt12T3FLgsfc9/SPr4sKAMTjbeesNC8wbo61I6pVBbM62A9NE71xtMS8zVgot BBIRJeSKD2+M7vTGCN5XDkenATXTzKRM8Z/SiJe9pOFTGcynb0wF9HaBlx+BGUD1F+ysVWEpZCun6 gCN5tYEOKaKphrxXa9CA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rseNR-00000005m5t-01F1; Fri, 05 Apr 2024 07:52:45 +0000 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rseNO-00000005m3j-0b1K for hostap@lists.infradead.org; Fri, 05 Apr 2024 07:52:43 +0000 Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-3bbc649c275so989031b6e.0 for ; Fri, 05 Apr 2024 00:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712303558; x=1712908358; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=oJIRcuX0Rt3+nLoJfj4Kjpr0nrI3Zi5B9NdDSCR2eoQ=; b=I5E4UHHkO5VVWClgXdW7Y2XK58Ql2z5O024IFXymr9d2LmPqOuI3AOP9t0nsPjfxSo tZpUhmffgL2ap3iaFQlVtU8UttHExfGfqw97hiHhzTyQM30WLT+q1ui88czpUDK3yzU4 5bQwqrQRPAkcaP8Iv+mgVWVwNIjOi0GxCDpAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712303558; x=1712908358; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oJIRcuX0Rt3+nLoJfj4Kjpr0nrI3Zi5B9NdDSCR2eoQ=; b=CfHw9Fsmbr1yz+oLHr5rK3S/srdWvxbpCX7tipF2qR/Mw9bjVFd4G6XIeDiQg07Vap GYfrifPODOJfCjFIk4JYSRIU3EWahK+U6dHolGzIqqk74VXbsguL0MVmhzLSUv4vHmjL 86OgrKMlpCc9AJLn02QqHlClZDdgqcGRTqGsKOf4keM/mh5U9pxXp5q01DRKIMQYvgTS 9TYSwpC45A3wOTcNFqd2kE8xUZ6FuRlzaYKtfquHsUg7XokQLybPlGdvW6kkcgV/5Cl7 3je3VjT3tYY2Epglvsu16J8il6yeW3iQPYt+6WxBOTAfPiDdQESheN8MxaNj9/nh/T4O R7gQ== X-Gm-Message-State: AOJu0Yxlas9HZ6tl/U3dFprq4pdYmikaxunxxIo33+wgIW/hMByI/G2w yNQexXNTJdsSqNWNjJ4lhPlJj/I4LJ0keBFTagIBfhoWGgOzZt3qfq+WG/PQYq+KxLTQDxjiM8s = X-Google-Smtp-Source: AGHT+IGkv14/T4ppJJ4GaslNFYxizCqvhax5AiBuetmkNNpgIYD1uUbqcKWuRzu/1m9fpkQUkQ8iCw== X-Received: by 2002:a05:6808:274c:b0:3c5:dd4c:82a5 with SMTP id eh12-20020a056808274c00b003c5dd4c82a5mr678963oib.25.1712303558435; Fri, 05 Apr 2024 00:52:38 -0700 (PDT) Received: from localhost (98.176.125.34.bc.googleusercontent.com. [34.125.176.98]) by smtp.gmail.com with UTF8SMTPSA id h10-20020a63f90a000000b005e438fe702dsm849201pgi.65.2024.04.05.00.52.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Apr 2024 00:52:38 -0700 (PDT) From: Ruth Mekonnen To: hostap@lists.infradead.org Cc: Ruth Mekonnen Subject: [PATCH] Emit ScanInProgress6GHz property Date: Fri, 5 Apr 2024 07:52:22 +0000 Message-ID: <20240405075227.3877310-1-rmekonnen@chromium.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240405_005242_225819_E8F36CA6 X-CRM114-Status: GOOD ( 16.04 ) 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: Expose whether a 6GHz scan is in progress with the ScanInProgress6GHz property, so that platforms can choose not to disconnect while the 6GHz scan is in progress. Once the 6GHz scan has completed the [...] 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:22d 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.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 Expose whether a 6GHz scan is in progress with the ScanInProgress6GHz property, so that platforms can choose not to disconnect while the 6GHz scan is in progress. Once the 6GHz scan has completed the ScanInProgress6GHz property is reset to false. Signed-off-by: Ruth Mekonnen --- doc/dbus.doxygen | 5 +++++ wpa_supplicant/dbus/dbus_new.c | 9 +++++++++ wpa_supplicant/dbus/dbus_new.h | 1 + wpa_supplicant/dbus/dbus_new_handlers.c | 21 +++++++++++++++++++++ wpa_supplicant/dbus/dbus_new_handlers.h | 1 + wpa_supplicant/events.c | 7 +++++++ wpa_supplicant/notify.c | 8 ++++++++ wpa_supplicant/notify.h | 1 + wpa_supplicant/wpa_supplicant_i.h | 1 + 9 files changed, 54 insertions(+) diff --git a/doc/dbus.doxygen b/doc/dbus.doxygen index 9f72614d4..3c689cf55 100644 --- a/doc/dbus.doxygen +++ b/doc/dbus.doxygen @@ -883,6 +883,11 @@ fi.w1.wpa_supplicant1.CreateInterface.

The most recent roam success or failure.

+
  • +

    ScanInProgress6GHz - b - (read)

    +

    Whether a 6GHz scan is currently in progress.

    +
  • +
  • SessionLength - u - (read)

    The most recent BSS session length in milliseconds.

    diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index 8bd6a9a43..7e11f1c33 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -2395,6 +2395,9 @@ void wpas_dbus_signal_prop_changed(struct wpa_supplicant *wpa_s, case WPAS_DBUS_PROP_ROAM_COMPLETE: prop = "RoamComplete"; break; + case WPAS_DBUS_PROP_SCAN_IN_PROGRESS_6GHZ: + prop = "ScanInProgress6GHz"; + break; case WPAS_DBUS_PROP_SESSION_LENGTH: prop = "SessionLength"; break; @@ -3982,6 +3985,12 @@ static const struct wpa_dbus_property_desc wpas_dbus_interface_properties[] = { NULL, NULL }, + { + "ScanInProgress6GHz", WPAS_DBUS_NEW_IFACE_INTERFACE, "b", + wpas_dbus_getter_scan_in_progress_6ghz, + NULL, + NULL + }, { "SessionLength", WPAS_DBUS_NEW_IFACE_INTERFACE, "u", wpas_dbus_getter_session_length, diff --git a/wpa_supplicant/dbus/dbus_new.h b/wpa_supplicant/dbus/dbus_new.h index 952bb422a..1db5fe8ae 100644 --- a/wpa_supplicant/dbus/dbus_new.h +++ b/wpa_supplicant/dbus/dbus_new.h @@ -36,6 +36,7 @@ enum wpas_dbus_prop { WPAS_DBUS_PROP_ASSOC_STATUS_CODE, WPAS_DBUS_PROP_ROAM_TIME, WPAS_DBUS_PROP_ROAM_COMPLETE, + WPAS_DBUS_PROP_SCAN_IN_PROGRESS_6GHZ, WPAS_DBUS_PROP_SESSION_LENGTH, WPAS_DBUS_PROP_BSS_TM_STATUS, WPAS_DBUS_PROP_MAC_ADDRESS, diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index 3897d98f4..ee8a7c4bd 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -3832,6 +3832,27 @@ dbus_bool_t wpas_dbus_getter_roam_complete( &roam_complete, error); } +/** + * wpas_dbus_getter_scan_in_progress_6ghz - Get whether a 6ghz scan is in + * progress + * @iter: Pointer to incoming dbus message iter + * @error: Location to store error on failure + * @user_data: Function specific data + * Returns: TRUE on success, FALSE on failure + * + * Getter function for "ScanInProgress6GHz" property. + */ +dbus_bool_t wpas_dbus_getter_scan_in_progress_6ghz( + const struct wpa_dbus_property_desc *property_desc, + DBusMessageIter *iter, DBusError *error, void *user_data) +{ + struct wpa_supplicant *wpa_s = user_data; + dbus_bool_t scan_in_progress_6ghz = wpa_s->scan_in_progress_6ghz ? TRUE : FALSE; + + return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_BOOLEAN, + &scan_in_progress_6ghz, error); +} + /** * wpas_dbus_getter_session_length - Get most recent BSS session length diff --git a/wpa_supplicant/dbus/dbus_new_handlers.h b/wpa_supplicant/dbus/dbus_new_handlers.h index acd6af7ff..7faf70a77 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.h +++ b/wpa_supplicant/dbus/dbus_new_handlers.h @@ -173,6 +173,7 @@ DECLARE_ACCESSOR(wpas_dbus_getter_auth_status_code); DECLARE_ACCESSOR(wpas_dbus_getter_assoc_status_code); DECLARE_ACCESSOR(wpas_dbus_getter_roam_time); DECLARE_ACCESSOR(wpas_dbus_getter_roam_complete); +DECLARE_ACCESSOR(wpas_dbus_getter_scan_in_progress_6ghz); DECLARE_ACCESSOR(wpas_dbus_getter_session_length); DECLARE_ACCESSOR(wpas_dbus_getter_bss_tm_status); DECLARE_ACCESSOR(wpas_dbus_getter_bss_expire_age); diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index ca2794638..dae3f6fbb 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2402,6 +2402,11 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s, wpa_supplicant_notify_scanning(wpa_s, 0); + if (wpa_s->scan_in_progress_6ghz) { + wpa_s->scan_in_progress_6ghz = false; + wpas_notify_scan_in_progress_6ghz(wpa_s); + } + scan_res = wpa_supplicant_get_scan_results(wpa_s, data ? &data->scan_info : NULL, 1, NULL); @@ -2584,6 +2589,8 @@ static int wpas_trigger_6ghz_scan(struct wpa_supplicant *wpa_s, wpa_add_scan_freqs_list(wpa_s, HOSTAPD_MODE_IEEE80211A, ¶ms, true, !wpa_s->last_scan_non_coloc_6ghz, false); if (!wpa_supplicant_trigger_scan(wpa_s, ¶ms, true, true)) { + wpa_s->scan_in_progress_6ghz = true; + wpas_notify_scan_in_progress_6ghz(wpa_s); os_free(params.freqs); return 1; } diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c index 6d5dbcc29..1e5c43ba0 100644 --- a/wpa_supplicant/notify.c +++ b/wpa_supplicant/notify.c @@ -167,6 +167,14 @@ void wpas_notify_roam_complete(struct wpa_supplicant *wpa_s) wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_ROAM_COMPLETE); } +void wpas_notify_scan_in_progress_6ghz(struct wpa_supplicant *wpa_s) +{ + if (wpa_s->p2p_mgmt) + return; + + wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_SCAN_IN_PROGRESS_6GHZ); +} + void wpas_notify_session_length(struct wpa_supplicant *wpa_s) { diff --git a/wpa_supplicant/notify.h b/wpa_supplicant/notify.h index f6c7ac4e2..9749e9cfc 100644 --- a/wpa_supplicant/notify.h +++ b/wpa_supplicant/notify.h @@ -30,6 +30,7 @@ void wpas_notify_auth_status_code(struct wpa_supplicant *wpa_s); void wpas_notify_assoc_status_code(struct wpa_supplicant *wpa_s); void wpas_notify_roam_time(struct wpa_supplicant *wpa_s); void wpas_notify_roam_complete(struct wpa_supplicant *wpa_s); +void wpas_notify_scan_in_progress_6ghz(struct wpa_supplicant *wpa_s); void wpas_notify_session_length(struct wpa_supplicant *wpa_s); void wpas_notify_bss_tm_status(struct wpa_supplicant *wpa_s); void wpas_notify_network_changed(struct wpa_supplicant *wpa_s); diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 426d077d2..58c833e3e 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -1579,6 +1579,7 @@ struct wpa_supplicant { bool wps_scan_done; /* Set upon receiving scan results event */ bool supp_pbc_active; /* Set for interface when PBC is triggered */ bool wps_overlap; + bool scan_in_progress_6ghz; /* Set upon a 6GHz scan being triggered */ #ifdef CONFIG_PASN struct pasn_data pasn;