Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4013129rwj; Tue, 20 Dec 2022 05:07:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf4bn8XKuDQPFBln7G4fd9mbpBd3Sy3uyeEw/qTbRt7ZRIQo+HKZ5bjX0o1y5vanb2k0sgZI X-Received: by 2002:a17:90a:c28b:b0:219:76d5:8da7 with SMTP id f11-20020a17090ac28b00b0021976d58da7mr47927088pjt.23.1671541651939; Tue, 20 Dec 2022 05:07:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671541651; cv=none; d=google.com; s=arc-20160816; b=C8OKmy9u8VBWbLM/GvICOhHyzU+GMpMj59RF/cw+1++oIcOsNx2W9dq1Piu7r9GLzH GHFKKiNMTnIk1UF46MfjNwhwEvbQAxsiupXaYOw9zwdNDNhW/RihHLEIIrI3+ZeJ8OwJ GAQg7ORoS58H7DIj/zEQvtcjrb/VDmP9/4DfnZUd/NN/Q27ZJO7KpUxHb8oQFPutfd18 cJoTj6yzsIiu7CfhXFYvnCs37jCjFmQfWyGDj1p9O5RyiEsMOqkkyFDZHNcfbfwzAeaJ D+hOX7/dOBfGvKZFSfEADsT7ZtkrPGqCGH6iuVJkG5ZGe4bH2FXIlUaSFpKhsv0rr1OY ehUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=rATVWE2xe5oiCF39v6v9QcPtbJ3GWwivOx71b82gaOM=; b=baMo7Jy1vMB0GzgkiE226Q/DBNVeFk//9cZck4pxiL+dwHgc7jdtOXgWCCaNwv36Lt mXK1Lwk41qxbzwJk7/M1RhV30ayKC4fZHCwkbudXZet+DJYAZjNIkdZyM20xaMkViD3y qRqUG0QCrb4Q6SZhA3VPpiZ2WMEmFuV1Uwc1amd9nwza3SHjynBhjXlGxn+NsPrfBHAt FVpClPhnwPW1ePprli3BuZQ+y90tuI5ikYjPr22qIruOQvK1ISBGMO5N79GDIws348/K IB6yT8ZSz2JjTa7KxFbcFXL9/tDm5y2IgFzvTk4953LZlT33Zq3DHFbWaHRr1U1M/+m6 HCaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk12-20020a17090b4a0c00b002193f84afc5si21327141pjb.121.2022.12.20.05.07.24; Tue, 20 Dec 2022 05:07:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233572AbiLTNGc (ORCPT + 66 others); Tue, 20 Dec 2022 08:06:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233546AbiLTNGb (ORCPT ); Tue, 20 Dec 2022 08:06:31 -0500 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0736AE0A9 for ; Tue, 20 Dec 2022 05:06:27 -0800 (PST) Received: from smtpclient.apple (p4fefcc21.dip0.t-ipconnect.de [79.239.204.33]) by mail.holtmann.org (Postfix) with ESMTPSA id 2BAC7CED05; Tue, 20 Dec 2022 14:06:27 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH] wifi: ath11k: Optimize 6 GHz scan time From: Marcel Holtmann In-Reply-To: <20221220043823.20382-1-quic_mpubbise@quicinc.com> Date: Tue, 20 Dec 2022 14:06:26 +0100 Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <5DAEA8B2-2B44-4A91-9E57-12B6C6B6C1FC@holtmann.org> References: <20221220043823.20382-1-quic_mpubbise@quicinc.com> To: Manikanta Pubbisetty X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Manikanta, > Currently, time taken to scan all supported channels on WCN6750 > is ~8 seconds and connection time is almost 10 seconds. WCN6750 > supports three Wi-Fi bands (i.e., 2.4/5/6 GHz) and the numbers of > channels for scan come around ~100 channels (default case). > Since the chip doesn't have support for DBS (Dual Band Simultaneous), > scans cannot be parallelized resulting in longer scan times. > > Among the 100 odd channels, ~60 channels are in 6 GHz band. Therefore, > optimizing the scan for 6 GHz channels will bring down the overall > scan time. > > WCN6750 firmware has support to scan a 6 GHz channel based on co-located > AP information i.e., RNR IE which is found in the legacy 2.4/5 GHz scan > results. When a scan request with all supported channel list is enqueued > to the firmware, then based on WMI_SCAN_CHAN_FLAG_SCAN_ONLY_IF_RNR_FOUND > scan channel flag, firmware will scan only those 6 GHz channels for which > RNR IEs are found in the legacy scan results. > > In the proposed design, based on NL80211_SCAN_FLAG_COLOCATED_6GHZ scan > flag, driver will set the WMI_SCAN_CHAN_FLAG_SCAN_ONLY_IF_RNR_FOUND flag > for non-PSC channels. Since there is high probability to find 6 GHz APs > on PSC channels, these channels are always scanned. Only non-PSC channels > are selectively scanned based on cached RNR information from the legacy > scan results. > > If NL80211_SCAN_FLAG_COLOCATED_6GHZ is not set in the scan flags, > then scan will happen on all supported channels (default behavior). is this really a good idea? The interpretation on what scan results will be reported would be preferable the same no matter what hardware is present. Why would ath11k now have a different behavior? And more important, why is this something driver or even Linux kernel specific. Let userspace select the frequencies to scan. Looks like that iwd and wpa_supplicant set this flag regardless which means to me that a driver should respect the requested frequencies to be scanned. Anyhow, if you worry about time-to-connect, then fix userspace to be smart with scanning. I am also confused on how a savings of 1.5 seconds out of 8 seconds is significant. It still means you spent 6+ seconds in the 2.4 GHz and 5 GHz bands. I assume that you spent most time in 5 GHz right now. I highly doubt that a 6+ seconds plus 2 seconds connection time is anywhere acceptable. Have you tried using iwd and see what the connection time actually is after initial connection. Regards Marcel