Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1358778pxj; Fri, 18 Jun 2021 05:35:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYdjx3qxhcVhbwARw7KRHjF0XwIVGlPvbHgiFfoVmMBuXhIYlol+mNY3AY4+bKIhJs7TDk X-Received: by 2002:aa7:db49:: with SMTP id n9mr4551209edt.361.1624019706394; Fri, 18 Jun 2021 05:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624019706; cv=none; d=google.com; s=arc-20160816; b=FFuBYVqtRR/Vy0gVofhmO9qoxm9HqW4szMs6Uf8nVk5vadhKljj06zdGUtxRU3xJGm x/kwERCgl4PiGMZ69Q/FS0aHUH/Qu4KHBF6Uh8Zx4vieC0KnAcnHrGM/yknwf0EnySIv GmGtqm9T5t8QY3a3O+adAeQ507qOIan+0ux0zMeFuTuUNKUbNsEkyl6kvmd10MYrzfMP LjYNhseynV3CbjbEB+HYLAb/Rjp+0pgj4YumtU6KuxkmqiTQ0V/BQfRVFaFBi26pF75+ CczrskbYdT6p4ahthfBciHJu9+ZnTqOEbIkVXkuB7Ix6ILzfnniHy9xdSo6zZJiUd8K1 hEjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=VwrpJs8+1KkA2XBmPwCFXjxaKl5vAnNVAG+He5gaZn4=; b=okV9LoxJKITEJeRfLWEyYloIf6HI/NCph+2HeozAgjGZOcRKV2gdaltK39zUhIznJd CLTxj/Ibp2EqDPD9xweI9iEhwkIo01dkRbmMVlpcPQkv05qP6lQL73IvWUd5vX6tC2tw IATgc8AKKDNFKHTXGFz0ZCvqc0P+ijvjMFRso6zE+5rG1rV01pMnWIW8NQpWXtxotgcb FqMKFjX5R8idmGGFKEtLIWEcUwWw2F5i03bhZgiKeyfZ9EFX2XS0/thxRwts2hHwYQ9T /SPgesR5Vak7hMGI3nQWvYBNU1828BJrbOH4z9KDmPZnYeUAwOGcNXMjKHpIpRdg04Dr 4Row== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz12si2332889ejc.734.2021.06.18.05.34.43; Fri, 18 Jun 2021 05:35:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232453AbhFRKv5 (ORCPT + 99 others); Fri, 18 Jun 2021 06:51:57 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:48232 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232315AbhFRKv4 (ORCPT ); Fri, 18 Jun 2021 06:51:56 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=kveik.lan) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1luBwz-001YXx-Ui; Fri, 18 Jun 2021 13:42:15 +0300 From: Luca Coelho To: johannes@sipsolutions.net Cc: luca@coelho.fi, linux-wireless@vger.kernel.org Date: Fri, 18 Jun 2021 13:41:41 +0300 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618104156.747775-1-luca@coelho.fi> References: <20210618104156.747775-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.5-pre1 Subject: [PATCH 16/31] cfg80211: Support hidden AP discovery over 6GHz band Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ilan Peer To discover a hidden AP on the 6GHz band, the probe request sent to the AP needs to include the AP's SSID, as some APs would not respond with a probe response based only on short SSID match. To support hidden AP discovery over the 6GHz band, when constructing the specific 6GHz band scan also include SSIDs that were part of the original scan request, so these can be used in the probe requests transmitted during scan. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho --- net/wireless/scan.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 4f06c1825029..86cd66952131 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -5,7 +5,7 @@ * Copyright 2008 Johannes Berg * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright 2016 Intel Deutschland GmbH - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation */ #include #include @@ -757,7 +757,8 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev) } request = kzalloc(struct_size(request, channels, n_channels) + - sizeof(*request->scan_6ghz_params) * count, + sizeof(*request->scan_6ghz_params) * count + + sizeof(*request->ssids) * rdev_req->n_ssids, GFP_KERNEL); if (!request) { cfg80211_free_coloc_ap_list(&coloc_ap_list); @@ -848,9 +849,18 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev) if (request->n_channels) { struct cfg80211_scan_request *old = rdev->int_scan_req; - rdev->int_scan_req = request; + /* + * Add the ssids from the parent scan request to the new scan + * request, so the driver would be able to use them in its + * probe requests to discover hidden APs on PSC channels. + */ + request->ssids = (void *)&request->channels[request->n_channels]; + request->n_ssids = rdev_req->n_ssids; + memcpy(request->ssids, rdev_req->ssids, sizeof(*request->ssids) * + request->n_ssids); + /* * If this scan follows a previous scan, save the scan start * info from the first part of the scan -- 2.32.0