From patchwork Tue Mar 16 15:00:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Isaacs, Jeff (EXT - US/Murray Hill)" X-Patchwork-Id: 1453960 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=mEqtGTPS; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nokia.onmicrosoft.com header.i=@nokia.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-nokia-onmicrosoft-com header.b=ZO8n0b0x; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F0GxD4j8Qz9sj5 for ; Wed, 17 Mar 2021 02:12:32 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=WOnviPtCnrV7HXUXW96coIghEEUtjfmq2XXdVD+VtbU=; b=mEqtGTPSFRuS09M9l3GZOttp7j OGYavX72aG3QS2jPn/KG9XhIZ6kZSZryixH7CPjaRdtZ8cvde8IaTTyS7ACciIqZL5Ci60VjHbsES yVD6GDhlGWDaVsV2zaHtVyRHUTkM2LDPpSvTA1hBd2OFxBJXmZht9mPqYcCeE+yZFtsn6sDDAQDtY T0m5o3VO4rDWaGm6osJGZMtqak3JTbpEB9BSk0STFl5H6zctl1nN9hrHNNPMLbUdGGAN6S38MMsiX F/yULNMfUoAHHKT6hlc/uStZuHKefjgKDnjD/UzvoWFXrPUnhHcO4KfuFe6jjIZGV2oOwZNl5L4gc +QsjomBg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMBM4-0011L1-Q4; Tue, 16 Mar 2021 15:11:32 +0000 Received: from mail-eopbgr760127.outbound.protection.outlook.com ([40.107.76.127] helo=NAM02-CY1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lMBBp-000zs8-Ru for hostap@lists.infradead.org; Tue, 16 Mar 2021 15:01:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QLeikES8H8XQstccfzIQ6gnAE4fJgx+nNcQlPwV2xUA3aXOCeFDwA3To3a6s8kvpdF6WwboqTcW01NSdhjVexfomHueNWNTvbBcHPUGUtLJGsfOXyOVieu8kVQFQfas9+9nkBLybmrad6Ev2qDy0KuNAcFjvz92b1ErR9NQYF0CUQfo07OG2YfCY2MpTKr45XARxxDkvXnlyA0BR3kCg6Tw0QwxxSPY/RPItBurJo+villgpUO1wG+Mkoa96ED0JNCAQEYdepf777rhX2lyMq0H4fRTjxn8MgpOftpHF3yx+OkZPiapit9mJ+ZVKsc1zva+kVzPwQsxZ6SndyqC+Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HpkqP6YJvssQSOqwoXSw2HHW7XzRZI6gIeS9lAqoN48=; b=OiwsNRcDJNGAojGJqeOq3/pDcJiCEtkJH1IMLMeks1oa8UovDs6SIohmBLwvqM50PAnw29qMiKlecnNorD28c7F+Yy2/QZor4rNm8H2qp8gFN2GvTYosV5CbrGi6CIYGIr+NcU4RE7hfexehd3xSolgOXD0hp1CiXwzyfHgrgyrr3/SWOZj1YZp8vM9WMtLPOqUZb2H838qEH2r+GJAPIfipBB4mXu1ctVRGn5+0H2qxlo9gHk3V7MKkCEaALrWZyCJX/LuGyCTTVRrS1IxfO8l4jDPu1Lw2pNlspAps674svhoM/Jt8lAmCbNYbPp40HzzOIyxdZOQ5MGVWqWkSXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HpkqP6YJvssQSOqwoXSw2HHW7XzRZI6gIeS9lAqoN48=; b=ZO8n0b0xDXvGK6PASbWj+YLNB83zznDIj3piU8oDU6xmyaoHLEGD+kWBsv1YVHyfd6pVH9SLDPcPvQCsPYbeKuQdgCvgfHxUYQCopuUD+MbVbNL8VKkLqY6uMjLecxOhOvqZBRzAZele6QzcAdGsDF+DNbcizz16N+NBW+gkfjo= Received: from CO2PR0801MB2296.namprd08.prod.outlook.com (2603:10b6:100:1::9) by CO1PR08MB6659.namprd08.prod.outlook.com (2603:10b6:303:90::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Tue, 16 Mar 2021 15:00:50 +0000 Received: from CO2PR0801MB2296.namprd08.prod.outlook.com ([fe80::745f:b352:f250:c3ae]) by CO2PR0801MB2296.namprd08.prod.outlook.com ([fe80::745f:b352:f250:c3ae%7]) with mapi id 15.20.3933.032; Tue, 16 Mar 2021 15:00:50 +0000 From: "Isaacs, Jeff (EXT - US/Murray Hill)" To: "hostap@lists.infradead.org" Subject: RFC: Perform active scanning on secondary interface (wpa_supplicant) Thread-Topic: RFC: Perform active scanning on secondary interface (wpa_supplicant) Thread-Index: AQHXGnTGu2lgQ4Iwck2zzRtjTriKOw== Date: Tue, 16 Mar 2021 15:00:50 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=none action=none header.from=nokia.com; x-originating-ip: [100.8.182.29] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 10181eec-a13b-433e-900f-08d8e88c49eb x-ms-traffictypediagnostic: CO1PR08MB6659: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: abQ1O9/3F7o3dWPWO+VJo8RKZZt+A7sV1AVmnmuHEeyF1eNkUf+YpUmxeQRmvz3VUgzgV7Ysf9DcTJnPDorVG7gTMX65M7Ha5cuzn6a1NLCnVkjkKpPCUPxsGj8Gl4zubZtOWOWTRIqJpyB8m6cXQAtGTgmR2A5KMkYn5uZ/bj9Jh81yYp3eFTj9C8SOmUFXL3SBq02gkhpmbgd3buWBMxgGL4FJrADwO66waCNTfpFyzf7bBOlpu0wFfnSL4VH97scrMyG1chnNqb4e6423Zot/8u5tduLp/I+j4+D8Uw7V2OSpBF9X2axKGevFkSsVMRCrHj0i7iIaVN7tndoKR40N15pWWwSnlOlpkP9j5y7ZM2PTtkUO4wPc0r2vanNRrfsu6MemCaPYBA40gXkGGSEQ3delAIyRabyRLA3KiBsLdgmqPNIDZpZrOxpoI7sRq7nQJHPcdqcFlwo4lBJFc+DbuWZ1t/AROvbFCNt7qYii3i0eSsPVUR14AEz3VvuSh1orxUMw/QBYDbRCp0z5cTUK83KZMPQsd4o00yx1VgOWje8D+5TqwZw3R8qc03RP x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO2PR0801MB2296.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39840400004)(396003)(366004)(376002)(346002)(8936002)(33656002)(83380400001)(55016002)(9686003)(26005)(66446008)(2906002)(86362001)(66946007)(5660300002)(7696005)(91956017)(66556008)(66476007)(99936003)(8676002)(66616009)(76116006)(71200400001)(6916009)(186003)(52536014)(64756008)(316002)(6506007)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?iso-8859-1?q?MPqS8UfLhMl8UkvodLQCagMZf?= =?iso-8859-1?q?gK4RT9UfJSSzz60OT7qT8O5u4SsD2V74bk/h4ACULfan7KTpPi7h2kPuRlG/?= =?iso-8859-1?q?UDhyWtRaR0R62QzsVFYVRGDyzOyyrFy08GiKXPJzkEFCp5GOTqUwuRyoO1qK?= =?iso-8859-1?q?HG9rFw6n5zk8j4cbkidRhsKV1JFuWr6zEP3bbj5eBDAWx7Tm5cXlCB1vuH9S?= =?iso-8859-1?q?rEFR5HIWlmI9J9p4MrB3dUNJgUploSetMISYGtdFgrLJy1/w3SWz0bpVZ9PU?= =?iso-8859-1?q?wi+v56gzadabv5ezRa4XfrDPFpKsnN3WAX52vqfOGn0MyVuQ4NzYVj6xPcUW?= =?iso-8859-1?q?1nOcFwUCHz5fR5es4Q77pOvXHacxd4c2SKdINAYi6yha90Dheupyr46qg4fo?= =?iso-8859-1?q?5tnSJshqoiKQfsqzeNoKCSfZ6F7EivaqM4fmX6hOUvuRVLbIJkXCewe2JGNb?= =?iso-8859-1?q?bMGbGVzMUHIl0pRkElSaQDOolx6eSZjiQhEKBHLt5aC8qK8Mna+4vT7X4voF?= =?iso-8859-1?q?VSt474gBZSXuFc4hK7d9PZVymKKt3XjjHiQt2oTyVB0g8REhkLQo97WJDE5h?= =?iso-8859-1?q?mcFtRNymHIgKf2uOB0NWALbUJXJi8yCEBHVVqF6HuA6Dry2yQ0lesoKBZ6vv?= =?iso-8859-1?q?uufSNu9BLZ1H328BHjrRzg2uvm284OZkxai3yKD2JQ0kOg/R7Ht9z21FrC1q?= =?iso-8859-1?q?WmKCwrRpdSaievYxVSmo2R63ugxhPTQuoKKv/x+f5lN4cq7jD0+EV0YKLDM7?= =?iso-8859-1?q?z/wvK79KzsuKGM9Rg2xVwfDylNUJnPKFPbH4yplIsEZ3toVzi6nxhlUgV7Gc?= =?iso-8859-1?q?KcX+MpPSL4QZFPkyw1QyaSyWigoSyzFN8phJimRyzMdLcWVHe3aKuagwoRQx?= =?iso-8859-1?q?wq2RNpzij4VKzmcJt8kpdngKKZuUQhxVRQDZp9zEchSts9qUkMhaz33Jlhie?= =?iso-8859-1?q?C6TZfkGLrrs98bLW8xrYjodnrdw0lYUnItmcoTi9Z9934DLy8tDOueWqF6ds?= =?iso-8859-1?q?9qXHJh9L5dib4ha4EGcuaAT2UcTjXlbTZwfqqFJSABY1NXpHgOad6OhfkZqu?= =?iso-8859-1?q?rs/CQsxR46sXGr/Ah4yFQOmdxjVb1Zie1B5Bt3muqnsE5MnL4ZkWb32efuPY?= =?iso-8859-1?q?2/6AdjU15WO/YJm5rcIe1N97Gu1unUhrdO8UTTIIQsixJCywuYvcx8zLo/ID?= =?iso-8859-1?q?EgRTjrf1OFKQsqKcQfIsZhNavu5U9RCVKioGECn8MNCUh1emATgVInth28vp?= =?iso-8859-1?q?O9R7kVYXn7bs4Py/Lh0k4JRTfGYLomgJ63JMaMzrJ4Xj7G4d5sYU9KukKCGb?= =?iso-8859-1?q?AVlllVGHzvRFnkXScjlqhdPRf8ZLl7Rtu1NWUM=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO2PR0801MB2296.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10181eec-a13b-433e-900f-08d8e88c49eb X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Mar 2021 15:00:50.4765 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: P9JOmbKsknj56qNi7MdyUcmYFWqPlZ2GLfqlVNd0r2X7NpMqQ5EcHiajpwiyYdCPdEJUEZOH6Ty+fdSuSbBFv/V7n7DsZ+RcgMpjpts1N6Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR08MB6659 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210316_150058_244866_2BCA42A1 X-CRM114-Status: GOOD ( 31.49 ) X-Spam-Score: -0.3 (/) X-Spam-Report: Spam detection software, running on the system "desiato.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: WiFi clients using wpa_supplicant maintain a table of available BSSs for each interface managed. Entries in this table are populated by performing active scanning on each interface. Entries not seen f [...] Content analysis details: (-0.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.76.127 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.76.127 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -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.3 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-Mailman-Approved-At: Tue, 16 Mar 2021 15:11:27 +0000 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 WiFi clients using wpa_supplicant maintain a table of available BSSs for each interface managed. Entries in this table are populated by performing active scanning on each interface. Entries not seen for a certain number of scans or a certain amount of time expire and are removed from the table. When the RSSI of an active connection drops too low and the quality of the connection is very poor, the interface performs a scan, which further degrades the connection quality. In environments with high density networks, mobile clients can get caught in this cycle of letting the connection quality get very bad, then scanning, then reconnecting to a better AP. In the wpa_cli, there is the roam command, which allows clients to move to another AP in the same SSID. The roam command requires the BSSID to be in the BSS table of the interface performing the command. This means that the interface still needs to perform disruptive scanning to roam to other APs. In applications where high throughput and low latency are required, roaming between access points without disruption is not possible. To achieve this, the interface would need to be constantly scanning for a better AP, which decreases throughput and increase latency. If a client has multiple WiFi interfaces, one interface could be designated as the secondary scanning interface and be used to perform periodic scanning in small intervals (every 5 seconds). The results of scans on the secondary interface could be made available to the primary interface. This would allow wpa_cli roam to be used to its full potential and open the door to seamless roaming in enterprise and industrial environments. The mechanism that decides when to execute handoffs is application based and would be up to the user to implement using the CLI. I have attached a patch that introduces a global config parameter "is_secondary_scan_iface" that can be set for each interface. When an interface performs a scan, if the is_secondary_scan_iface is set to 1, the results from the scan are used to update the BSS tables of all other interfaces whose is_secondary_scan_iface parameter is set to 0. To test this feature, you'll need two WiFi adapters. Add is_secondary_scan_iface=1 to the config file of the secondary interface. Startup wpa_supplicant using the two interfaces. Flush the BSS table of the primary interface, then verify that it is empty. Next, perform a scan on the secondary interface. You'll see that the results of this scan are populated in the BSS table of the primary interface. An obvious limitation of this feature as it is implemented right now would be lack of capabilities matching. For instance, if the secondary scan interface can see 5GHz but the primary interface cannot, those results should not be made available to the primary interface. I am interested in your comments, concerns, and questions. Thank you, Jeffrey Isaacs From 5f8e010965377c28ede4d09ef8cb4b321d69769f Mon Sep 17 00:00:00 2001 From: Jeffrey Isaacs Date: Mon, 15 Mar 2021 17:02:25 -0400 Subject: [PATCH 1/2] wpa_supplicant: Add is_secondary_scan_iface to wpa_config This is the first in a series of commits that will implement offloading active scanning for available access points to a secondary interface. The motivation behind this is that performing active scans is disruptive to the WiFi connection. In mission critical applications, or when a constant high throughput is required, roaming between APs can result in unacceptable performance. When a client's rssi drops too low, or all the BSS table entries expire, the interface performs an active scan to find the next available AP. The new parameter is_secondary_scan_iface will be specified in the interface config file. When set to 1, scan results from that interface will be used to update the BSS tables in all interfaces whose is_secondary_scan_iface is set to 0. This allows the primary interface to roam between BSSs without having to take time to scan. This parameter does not affect any other parameters. It would make sense that if a secondary interface is specified, the frequency of scans performed on that interface should be increased to fully leverage this feature. Signed-off-by: Jeffrey Isaacs --- wpa_supplicant/config.c | 2 ++ wpa_supplicant/config.h | 12 ++++++++++++ wpa_supplicant/config_file.c | 3 +++ 3 files changed, 17 insertions(+) diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index ce5c80d02..1935e097d 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -4378,6 +4378,7 @@ struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface, config->cert_in_cb = DEFAULT_CERT_IN_CB; config->wpa_rsc_relaxation = DEFAULT_WPA_RSC_RELAXATION; config->extended_key_id = DEFAULT_EXTENDED_KEY_ID; + config->is_secondary_scan_iface = DEFAULT_IS_SECONDARY_SCAN_IFACE; #ifdef CONFIG_MBO config->mbo_cell_capa = DEFAULT_MBO_CELL_CAPA; @@ -5210,6 +5211,7 @@ static const struct global_parse_data global_fields[] = { { INT_RANGE(force_kdk_derivation, 0, 1), 0 }, #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_PASN */ + { INT(is_secondary_scan_iface), 0 }, }; #undef FUNC diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h index aac4a9dff..b10beaba4 100644 --- a/wpa_supplicant/config.h +++ b/wpa_supplicant/config.h @@ -46,6 +46,7 @@ #define DEFAULT_OCE_SUPPORT OCE_STA #define DEFAULT_EXTENDED_KEY_ID 0 #define DEFAULT_SCAN_RES_VALID_FOR_CONNECT 5 +#define DEFAULT_IS_SECONDARY_SCAN_IFACE 0 #include "config_ssid.h" #include "wps/wps.h" @@ -1650,6 +1651,17 @@ struct wpa_config { int force_kdk_derivation; #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_PASN*/ + + /** + * is_secondary_scan_iface - Enable dedicated scan interface + * + * 0 = Scan results are not shared with other interfaces + * 1 = Scan results from this interface are used to update + the BSS table of each other interface + * + * By default, scan results are not shared + */ + int is_secondary_scan_iface; }; diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index a535e3f08..2f86263b8 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -1530,6 +1530,9 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config) if (config->wowlan_disconnect_on_deinit) fprintf(f, "wowlan_disconnect_on_deinit=%d\n", config->wowlan_disconnect_on_deinit); + if (config->is_secondary_scan_iface) + fprintf(f, "is_secondary_scan_iface=%d\n", + config->is_secondary_scan_iface); } #endif /* CONFIG_NO_CONFIG_WRITE */ -- 2.17.1 From cbf7388a3cb99f67c240d1b41f9edef6d685732f Mon Sep 17 00:00:00 2001 From: Jeffrey Isaacs Date: Mon, 15 Mar 2021 17:36:56 -0400 Subject: [PATCH 2/2] wpa_supplicant: Implement active scanning from secondary interface This commit implements the changes required for the is_secondary_scan_iface parameter. When the parameter is set for a given interface, when scan results are available on that interface, wpa_bss_update is called using those results on all other interfaces that have is_secondary_scan_interface set to 0. Signed-off-by: Jeffrey Isaacs --- wpa_supplicant/bss.c | 20 +++++++++++++++++++- wpa_supplicant/bss.h | 3 ++- wpa_supplicant/ctrl_iface.c | 2 +- wpa_supplicant/scan.c | 2 +- wpa_supplicant/wnm_sta.c | 2 +- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index e13783ce1..56121436e 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -747,8 +747,26 @@ void wpa_bss_update_start(struct wpa_supplicant *wpa_s) */ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, struct wpa_scan_res *res, - struct os_reltime *fetch_time) + struct os_reltime *fetch_time, + int secondary_scan) { + struct wpa_supplicant *iface; + iface = wpa_s->global->ifaces; + + while (iface && !secondary_scan) { + if (wpa_s->conf->is_secondary_scan_iface && !iface->conf->is_secondary_scan_iface) { + wpa_bss_update_scan_res(iface, res, fetch_time, 1); + } + if (iface->p2pdev == wpa_s) + iface->p2pdev = iface->parent; + if (iface == wpa_s || iface->parent != wpa_s) { + iface = iface->next; + continue; + } + iface = iface->next; + } + + const u8 *ssid, *p2p, *mesh; struct wpa_bss *bss; diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h index 4078b9b9d..eb34b425d 100644 --- a/wpa_supplicant/bss.h +++ b/wpa_supplicant/bss.h @@ -135,7 +135,8 @@ void notify_bss_changes(struct wpa_supplicant *wpa_s, u32 changes, void wpa_bss_update_start(struct wpa_supplicant *wpa_s); void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, struct wpa_scan_res *res, - struct os_reltime *fetch_time); + struct os_reltime *fetch_time, + int secondary_scan); void wpa_bss_remove(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, const char *reason); void wpa_bss_update_end(struct wpa_supplicant *wpa_s, struct scan_info *info, diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index c05175822..2c3cf2601 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -9291,7 +9291,7 @@ static int wpas_ctrl_iface_driver_scan_res(struct wpa_supplicant *wpa_s, } os_get_reltime(&now); - wpa_bss_update_scan_res(wpa_s, res, &now); + wpa_bss_update_scan_res(wpa_s, res, &now, 0); ret = 0; fail: os_free(res); diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index c53474dae..8684d1c97 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -2509,7 +2509,7 @@ wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s, wpa_bss_update_start(wpa_s); for (i = 0; i < scan_res->num; i++) wpa_bss_update_scan_res(wpa_s, scan_res->res[i], - &scan_res->fetch_time); + &scan_res->fetch_time, 0); wpa_bss_update_end(wpa_s, info, new_scan); return scan_res; diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index c4c6651d4..c9ebcaca8 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -1354,7 +1354,7 @@ static int wnm_fetch_scan_results(struct wpa_supplicant *wpa_s) scan_snr(res); scan_est_throughput(wpa_s, res); wpa_bss_update_scan_res(wpa_s, res, - &scan_res->fetch_time); + &scan_res->fetch_time, 0); } } -- 2.17.1