From patchwork Mon Feb 26 16:32:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Damien Dejean X-Patchwork-Id: 1904478 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=lH1CffW9; 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=FNRhN+Y9; 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 4Tk5lX17vfz23qJ for ; Tue, 27 Feb 2024 03:33:28 +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=6i+I6u/2WVsv3bOZIQ2hLI8dJmqa5xCy5inTIRsu2mk=; b=lH1CffW9Kh4N1a frrH3m49VoYrHjJiXuGiCNexv3xxC9npZUzY2eYgyQHqsFuxzq++ziHL5w9kzQxpxPJQQN9NrO+Kd KOOCKL5yuBAyvfJ9sfB8z6tdm2tlC7dk9OjfcjbIKsnCGeb1K79rRCxuwCylMk5iGl5ouuReTG9ku z4Kjm9t2xMPRQksyPP+HypBJF9xLjdMxfvXBD7MzY50s01Pds/Rq1ZhXa0bCj4F/AHj9doS/hBrs3 u9ONY5wKlEl4qvogvF86N5q7ewqTOKeweUHlBI2AgUKkyxjw+8jf5Ma2jUGCcOevW2fmdu1Jur/sI lCRbf759ZOScIxtlgZ+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1redub-00000001gbj-0E8i; Mon, 26 Feb 2024 16:33:05 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1reduW-00000001gam-3yIL for hostap@lists.infradead.org; Mon, 26 Feb 2024 16:33:02 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-412a38e2adaso9683545e9.1 for ; Mon, 26 Feb 2024 08:32:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708965178; x=1709569978; 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=NH5EElqy/pqxRLCCmHnPJYjTo6fs0DqkgnJGdw7LLx4=; b=FNRhN+Y9NR4lEXMO5174jQlRDU402vQqpMgXl0S69WTCoHhDYjiLv5xxnWqWhDK2E+ QcQ8GWdzeO9vg8L+dlOySNLG7dc87U7un5kF8Nb5zbt0qIjPUlMqDV34ZHVQvyb+3fkJ cktm+umKfvSSr/knnrxkHX5ustqIY1T5+amJY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708965178; x=1709569978; 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=NH5EElqy/pqxRLCCmHnPJYjTo6fs0DqkgnJGdw7LLx4=; b=JVYcrDdGtbX9X6rGrfepvC5PNmwd+Hw4Jdh4kORUH6m+w8AJRz5NAhHDbiJFyngZdb n2Yzh/+uNBexeLcjvp4qVJkeMAJq4AXIWuLuqpAPX9rmCCj198g8rISBvLl3I/Gxx/ub lexRRPJj7K3Yrm2MrCT2qBePZy4FDe+GpIwvtFhtXfqpwSUPH5pith8OJmb1LiK45uA/ WNbGhnYiEuF9g87QhLlL1lR9NpyZZy20tb6ARcRFjzOgrz3efzabc/hXCpTR+oDmVuxG YxmBGs0k/TAPrmBka/ttx+P4Hi5f/NTEgHLMCfr0kLrdJomVd6Q6PHWwzfl9YC5XgaJ4 hQBw== X-Gm-Message-State: AOJu0Yx4B5Be1roebAp+JwJZ90eUvWd+LQM+c2endPUkSOzJwrKH/llO 4UpKPh5Oa6AHQfVrR+kEdJADa+a/tJLIe0qxnySVvpeEe6N4C7qAE24IfEZ3GA8TI9OlhkLowd7 QfA== X-Google-Smtp-Source: AGHT+IFu/UMVP+xm8F1vpXVt5J5oNE9LBjG3z/Rq48bQ8M2So02awXvQvWSvEfBgQxu2Zn3lAv7wow== X-Received: by 2002:a05:600c:5199:b0:412:a371:4a14 with SMTP id fa25-20020a05600c519900b00412a3714a14mr2756747wmb.26.1708965178156; Mon, 26 Feb 2024 08:32:58 -0800 (PST) Received: from ddejean-chromeos.c.googlers.com.com (110.121.148.146.bc.googleusercontent.com. [146.148.121.110]) by smtp.gmail.com with ESMTPSA id i1-20020a05600c354100b0041298c9baccsm8939017wmq.8.2024.02.26.08.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:32:56 -0800 (PST) From: Damien Dejean To: hostap@lists.infradead.org Cc: Damien Dejean Subject: [PATCH] DBus: add ANQP fields to BSS properties Date: Mon, 26 Feb 2024 16:32:41 +0000 Message-ID: <20240226163247.806012-1-damiendejean@chromium.org> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240226_083301_045533_5ADCFCB2 X-CRM114-Status: GOOD ( 17.56 ) 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: Add ANQP fields to the BSS properties to allow DBus clients to be notified and obtain the values when it changes. Signed-off-by: Damien Dejean Change-Id: I40c192ed71c21f809748a03405e680245c37c4dc --- doc/dbus.doxygen | 24 ++++ tests/hwsim/test_dbus.py | 67 +++++++++ wpa_supplicant/dbus/dbus_new.c | 8 ++ wpa_supplicant/dbus/dbus_new.h | 1 + w [...] 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 [2a00:1450:4864:20:0:0:0:330 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_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.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 T_SCC_BODY_TEXT_LINE No description available. -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 Add ANQP fields to the BSS properties to allow DBus clients to be notified and obtain the values when it changes. Signed-off-by: Damien Dejean Change-Id: I40c192ed71c21f809748a03405e680245c37c4dc --- doc/dbus.doxygen | 24 ++++ tests/hwsim/test_dbus.py | 67 +++++++++ wpa_supplicant/dbus/dbus_new.c | 8 ++ wpa_supplicant/dbus/dbus_new.h | 1 + wpa_supplicant/dbus/dbus_new_handlers.c | 184 ++++++++++++++++++++++++ wpa_supplicant/dbus/dbus_new_handlers.h | 1 + wpa_supplicant/interworking.c | 1 + wpa_supplicant/notify.c | 9 ++ wpa_supplicant/notify.h | 2 + 9 files changed, 297 insertions(+) diff --git a/doc/dbus.doxygen b/doc/dbus.doxygen index 61d67dca1..a4a277086 100644 --- a/doc/dbus.doxygen +++ b/doc/dbus.doxygen @@ -2214,6 +2214,30 @@ scan results.

Age - u - (read)

Number of seconds since the BSS was last seen.

+
  • +

    ANQP - a{sv} - (read)

    +

    ANQP information of the BSS. Empty dictionary indicates no ANQP field. Named dictionary entries are:

    + + + + + + + + + + + + + + + + + + +
    CapabilityListay
    VenueNameay
    NetworkAuthTypeay
    RoamingConsortiumay
    IPAddrTypeAvailabilityay
    NAIRealmay
    3GPPay
    DomainNameay
    FilsRealmInfoay
    HS20CapabilityListay
    HS20OperatorFriendlyNameay
    HS20WanMetricsay
    HS20ConnectionCapabilityay
    HS20OperatingClassay
    HS20OSUProvidersListay
    HS20OperatorIconMetadataay
    HS20OSUProvidersNAIListay
    +

    Unnamed ANQP elements have a generic entry name 'anqp[id]' where 'id' is the index of the ANQP element as described in IEEE802.11-2020 ยง9.4.5.1.

    +
  • \subsection dbus_bss_signals Signals diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index ce9a2336f..2deceedbe 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -6400,3 +6400,70 @@ def test_dbus_anqp_query_done(dev, apdev): with TestDbusANQPGet(bus) as t: if not t.success(): raise Exception("Expected signals not seen") + +def test_dbus_bss_anqp_properties(dev, apdev): + "D-Bus ANQP BSS properties changed" + + (bus, wpa_obj, path, if_obj) = prepare_dbus(dev[0]) + iface = dbus.Interface(if_obj, WPAS_DBUS_IFACE) + + venue_group = 1 + venue_type = 13 + lang1 = "eng" + name1 = "Example venue" + lang2 = "fin" + name2 = "Esimerkkipaikka" + + bssid = apdev[0]['bssid'] + params = {"ssid": "test-anqp", "hessid": bssid, "wpa": "2", + "rsn_pairwise": "CCMP", "wpa_key_mgmt": "WPA-EAP", + "ieee80211w": "1", "ieee8021x": "1", + "auth_server_addr": "127.0.0.1", "auth_server_port": "1812", + "auth_server_shared_secret": "radius", + "interworking": "1", + "venue_group": str(venue_group), + "venue_type": str(venue_type), + "venue_name": [lang1 + ":" + name1, lang2 + ":" + name2], + "roaming_consortium": ["112233", "1020304050", "010203040506", "fedcba"], + "domain_name": "example.com,another.example.com", + "nai_realm": ["0,example.com,13[5:6],21[2:4][5:7]", "0,another.example.com"]} + + hapd = hostapd.add_ap(apdev[0], params) + + class TestDbusANQPBSSPropertiesChanged(TestDbus): + def __init__(self, bus): + TestDbus.__init__(self, bus) + self.capability_list = False + self.venue_name = False + self.roaming_consortium = False + self.nai_realm = False + + def __enter__(self): + gobject.timeout_add(1, self.run_query) + gobject.timeout_add(15000, self.timeout) + self.add_signal(self.propertiesChanged, WPAS_DBUS_BSS, + "PropertiesChanged") + self.loop.run() + return self + + def propertiesChanged(self, properties): + logger.debug("propertiesChanged: %s" % str(properties)) + if 'ANQP' in properties: + anqp_properties = properties['ANQP'] + self.capability_list = 'CapabilityList' in anqp_properties + self.venue_name = 'VenueName' in anqp_properties + self.roaming_consortium = 'RoamingConsortium' in anqp_properties + self.nai_realm = 'NAIRealm' in anqp_properties + + def run_query(self, *args): + dev[0].scan_for_bss(bssid, freq="2412", force_scan=True) + iface.ANQPGet({"addr": bssid, + "ids": dbus.Array([257,258,261,263], dbus.Signature("q"))}) + return False + + def success(self): + return self.capability_list and self.venue_name and self.roaming_consortium and self.nai_realm + + with TestDbusANQPBSSPropertiesChanged(bus) as t: + if not t.success(): + raise Exception("Expected signals not seen") diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index 4eb339966..fcf614eaa 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -2473,6 +2473,9 @@ void wpas_dbus_bss_signal_prop_changed(struct wpa_supplicant *wpa_s, case WPAS_DBUS_BSS_PROP_AGE: prop = "Age"; break; + case WPAS_DBUS_BSS_PROP_ANQP: + prop = "ANQP"; + break; default: wpa_printf(MSG_ERROR, "dbus: %s: Unknown Property value %d", __func__, property); @@ -3011,6 +3014,11 @@ static const struct wpa_dbus_property_desc wpas_dbus_bss_properties[] = { NULL, NULL }, + {"ANQP", WPAS_DBUS_NEW_IFACE_BSS, "a{sv}", + wpas_dbus_getter_bss_anqp, + NULL, + NULL, + }, { NULL, NULL, NULL, NULL, NULL, NULL } }; diff --git a/wpa_supplicant/dbus/dbus_new.h b/wpa_supplicant/dbus/dbus_new.h index 545f326d3..f0e99670d 100644 --- a/wpa_supplicant/dbus/dbus_new.h +++ b/wpa_supplicant/dbus/dbus_new.h @@ -53,6 +53,7 @@ enum wpas_dbus_bss_prop { WPAS_DBUS_BSS_PROP_WPS, WPAS_DBUS_BSS_PROP_IES, WPAS_DBUS_BSS_PROP_AGE, + WPAS_DBUS_BSS_PROP_ANQP, }; enum wpas_dbus_sta_prop { diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index e19a7bc8b..a3d797190 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -5751,6 +5751,190 @@ dbus_bool_t wpas_dbus_getter_bss_age( } +/** + * wpas_dbus_getter_bss_anqp - Return all the ANQP fields of a BSS + * @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 for "ANQP" property. + */ +dbus_bool_t wpas_dbus_getter_bss_anqp( + const struct wpa_dbus_property_desc *property_desc, + DBusMessageIter *iter, DBusError *error, void *user_data) +{ + DBusMessageIter iter_dict, variant_iter; + struct bss_handler_args *args = user_data; + struct wpa_bss *bss; + struct wpa_bss_anqp *anqp; + struct wpa_bss_anqp_elem *elem; + + bss = get_bss_helper(args, error, __func__); + if (!bss) + return FALSE; + + if (!dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT, + "a{sv}", &variant_iter) || + !wpa_dbus_dict_open_write(&variant_iter, &iter_dict)) + goto nomem; + + anqp = bss->anqp; + if (anqp) { +#ifdef CONFIG_INTERWORKING + if (anqp->capability_list) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "CapabilityList", + wpabuf_head(anqp->capability_list), + wpabuf_len(anqp->capability_list))) + goto nomem; + } + if (anqp->venue_name) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "VenueName", + wpabuf_head(anqp->venue_name), + wpabuf_len(anqp->venue_name))) + goto nomem; + } + if (anqp->network_auth_type) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "NetworkAuthType", + wpabuf_head(anqp->network_auth_type), + wpabuf_len(anqp->network_auth_type))) + goto nomem; + } + if (anqp->roaming_consortium) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "RoamingConsortium", + wpabuf_head(anqp->roaming_consortium), + wpabuf_len(anqp->roaming_consortium))) + goto nomem; + } + if (anqp->ip_addr_type_availability) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "IPAddrTypeAvailability", + wpabuf_head(anqp->ip_addr_type_availability), + wpabuf_len(anqp->ip_addr_type_availability))) + goto nomem; + } + if (anqp->nai_realm) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "NAIRealm", + wpabuf_head(anqp->nai_realm), + wpabuf_len(anqp->nai_realm))) + goto nomem; + } + if (anqp->anqp_3gpp) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "3GPP", + wpabuf_head(anqp->anqp_3gpp), + wpabuf_len(anqp->anqp_3gpp))) + goto nomem; + } + if (anqp->domain_name) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "DomainName", + wpabuf_head(anqp->domain_name), + wpabuf_len(anqp->domain_name))) + goto nomem; + } + if (anqp->fils_realm_info) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "FilsRealmInfo", + wpabuf_head(anqp->fils_realm_info), + wpabuf_len(anqp->fils_realm_info))) + goto nomem; + } +#ifdef CONFIG_HS20 + if (anqp->hs20_capability_list) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "HS20CapabilityList", + wpabuf_head(anqp->hs20_capability_list), + wpabuf_len(anqp->hs20_capability_list))) + goto nomem; + } + if (anqp->hs20_operator_friendly_name) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "HS20OperatorFriendlyName", + wpabuf_head(anqp->hs20_operator_friendly_name), + wpabuf_len(anqp->hs20_operator_friendly_name))) + goto nomem; + } + if (anqp->hs20_wan_metrics) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "HS20WanMetrics", + wpabuf_head(anqp->hs20_wan_metrics), + wpabuf_len(anqp->hs20_wan_metrics))) + goto nomem; + } + if (anqp->hs20_connection_capability) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "HS20ConnectionCapability", + wpabuf_head(anqp->hs20_connection_capability), + wpabuf_len(anqp->hs20_connection_capability))) + goto nomem; + } + if (anqp->hs20_operating_class) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "HS20OperatingClass", + wpabuf_head(anqp->hs20_operating_class), + wpabuf_len(anqp->hs20_operating_class))) + goto nomem; + } + if (anqp->hs20_osu_providers_list) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "HS20OSUProvidersList", + wpabuf_head(anqp->hs20_osu_providers_list), + wpabuf_len(anqp->hs20_osu_providers_list))) + goto nomem; + } + if (anqp->hs20_operator_icon_metadata) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "HS20OperatorIconMetadata", + wpabuf_head(anqp->hs20_operator_icon_metadata), + wpabuf_len(anqp->hs20_operator_icon_metadata))) + goto nomem; + } + if (anqp->hs20_osu_providers_nai_list) { + if (!wpa_dbus_dict_append_byte_array( + &iter_dict, "HS20OSUProvidersNAIList", + wpabuf_head(anqp->hs20_osu_providers_nai_list), + wpabuf_len(anqp->hs20_osu_providers_nai_list))) + goto nomem; + } +#endif /* CONFIG_HS20 */ + dl_list_for_each(elem, &anqp->anqp_elems, + struct wpa_bss_anqp_elem, list) { + char title[32]; + + os_snprintf(title, sizeof(title), "anqp[%u]", + elem->infoid); + if (!wpa_dbus_dict_append_byte_array(&iter_dict, + title, + wpabuf_head(elem->payload), + wpabuf_len(elem->payload))) + goto nomem; + + os_snprintf(title, sizeof(title), "protected-anqp-info[%u]", elem->infoid); + if (!wpa_dbus_dict_append_bool(&iter_dict, title, + elem->protected_response)) + goto nomem; + } +#endif /* CONFIG_INTERWORKING */ + } + + if (!wpa_dbus_dict_close_write(&variant_iter, &iter_dict) || + !dbus_message_iter_close_container(iter, &variant_iter)) + goto nomem; + + return TRUE; + +nomem: + dbus_set_error(error, DBUS_ERROR_NO_MEMORY, "no memory"); + return FALSE; +} + + /** * wpas_dbus_getter_enabled - Check whether network is enabled or disabled * @iter: Pointer to incoming dbus message iter diff --git a/wpa_supplicant/dbus/dbus_new_handlers.h b/wpa_supplicant/dbus/dbus_new_handlers.h index 5a69ec6de..3351dbdc3 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.h +++ b/wpa_supplicant/dbus/dbus_new_handlers.h @@ -220,6 +220,7 @@ DECLARE_ACCESSOR(wpas_dbus_getter_bss_rsn); DECLARE_ACCESSOR(wpas_dbus_getter_bss_wps); DECLARE_ACCESSOR(wpas_dbus_getter_bss_ies); DECLARE_ACCESSOR(wpas_dbus_getter_bss_age); +DECLARE_ACCESSOR(wpas_dbus_getter_bss_anqp); DECLARE_ACCESSOR(wpas_dbus_getter_enabled); DECLARE_ACCESSOR(wpas_dbus_setter_enabled); DECLARE_ACCESSOR(wpas_dbus_getter_network_properties); diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index 06b4d1116..735a20bb7 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -3198,6 +3198,7 @@ void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token, } out_parse_done: + wpas_notify_bss_anqp_changed(wpa_s, bss->id); #ifdef CONFIG_HS20 hs20_notify_parse_done(wpa_s); #endif /* CONFIG_HS20 */ diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c index 1c7406021..0845a8f63 100644 --- a/wpa_supplicant/notify.c +++ b/wpa_supplicant/notify.c @@ -559,6 +559,15 @@ void wpas_notify_bss_seen(struct wpa_supplicant *wpa_s, unsigned int id) } +void wpas_notify_bss_anqp_changed(struct wpa_supplicant *wpa_s, unsigned int id) +{ + if (wpa_s->p2p_mgmt) + return; + + wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_ANQP, id); +} + + void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name) { if (wpa_s->p2p_mgmt) diff --git a/wpa_supplicant/notify.h b/wpa_supplicant/notify.h index 659380b0f..37bb3b710 100644 --- a/wpa_supplicant/notify.h +++ b/wpa_supplicant/notify.h @@ -83,6 +83,8 @@ void wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s, void wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s, unsigned int id); void wpas_notify_bss_seen(struct wpa_supplicant *wpa_s, unsigned int id); +void wpas_notify_bss_anqp_changed(struct wpa_supplicant *wpa_s, + unsigned int id); void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name); void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name);