Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp700932rwb; Wed, 14 Dec 2022 01:28:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf6vkN+KzOl++8SE+xTF8+Gr6AcXBoKCbvf/GUo5DIAJ/hwb3f5GJNv95y14MUcccfcfr1rq X-Received: by 2002:a17:907:9217:b0:7c0:cf7e:b515 with SMTP id ka23-20020a170907921700b007c0cf7eb515mr16766306ejb.6.1671010107710; Wed, 14 Dec 2022 01:28:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671010107; cv=none; d=google.com; s=arc-20160816; b=MFQKF1a7R+mo89NeqnHgDhjxhEqrLMrhfvpuMHAXVgDgcov7zbsTNlUZGDlu+SaDEA 50pCTT9zWwZMMXdiHjZDYcdZsnvSSfpLSHcVNi8Ar1/HbMkZfLa33fYosDzBCXxe5VE4 4g6nLHlhV8IZHmN1D7JgwKmCJbC2j969fD3xmHsiohykpoganaKNVJ9/HACNSJcXYQlk SVTCB80XFYoChHJJwvshllHC0gcr+olS7xSJAasF2nIl04aFxH3dnsvGIG6hzvhvttBG 5CsreinWqEPFqEkVup8EFd74SK82t+9IyKr2dCsXurKb8bhsniHJXNN3A1fdpS/JA/gX iJbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:authenticated-by; bh=HusfSErz2djkCdI3d2vqgaps/NcTh+ObPdasG45MLTs=; b=PmDFiUHL8q/cokGc4PEML5uZdXqfCENgb1fT78Ue8vKB8Suqsi96TESDwZhn8ibDx2 HNBQq6tOyYAUvwCGvdJO40dUkdtIHH8lLsdhjFARNIrsOPb5AqCVkatVv3Hb0llsxDDg I2UvXn+nxDnc4ml/ueUWl2TP7D6FcbGoF9mLqzNqDXNIPImfZ5P1qtwHvstCt26O7UqR ufNENPy0fObQgwHvwOdTZunmYD8C3Y6ZmTvSLKdWAGwahOI9Qab06BhlXExQ3uG5+q+Y RziCwQ4NuWtC1r+LG5oINhkO+BAyFDK7+vcYtCXfn5Qi5URfJtfFJtSZAQqqJJOwJIel DTcQ== 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 sh31-20020a1709076e9f00b007ae545e330csi11026851ejc.218.2022.12.14.01.28.09; Wed, 14 Dec 2022 01:28:27 -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 S237773AbiLNJVG (ORCPT + 66 others); Wed, 14 Dec 2022 04:21:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237878AbiLNJVF (ORCPT ); Wed, 14 Dec 2022 04:21:05 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B0EC60C1 for ; Wed, 14 Dec 2022 01:21:04 -0800 (PST) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 2BE9K6410006763, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 2BE9K6410006763 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Wed, 14 Dec 2022 17:20:06 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Wed, 14 Dec 2022 17:20:55 +0800 Received: from localhost (172.21.69.188) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 14 Dec 2022 17:20:55 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH] wifi: rtw89: refine 6 GHz scanning dwell time Date: Wed, 14 Dec 2022 17:19:52 +0800 Message-ID: <20221214091952.42792-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.69.188] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: trusted connection X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Deterministic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 12/14/2022 09:05:00 X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: =?big5?B?Q2xlYW4sIGJhc2VzOiAyMDIyLzEyLzE0IKRXpMggMDc6NDI6MDA=?= X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled 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 From: Po-Hao Huang Reduce dwell time to improve scan duration in 6 GHz. This is required for scan requests that does not include RNR parsing and does full channel scan. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/fw.c | 5 +++-- drivers/net/wireless/realtek/rtw89/fw.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index de1f23779fc62..3655dfd4ab7ea 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -2738,7 +2738,7 @@ static void rtw89_hw_scan_add_chan(struct rtw89_dev *rtwdev, int chan_type, if (ssid_num == 1 && req->ssids[0].ssid_len == 0) { ch_info->tx_pkt = false; if (!req->duration_mandatory) - ch_info->period -= RTW89_DWELL_TIME; + ch_info->period -= RTW89_DWELL_TIME_6G; } } @@ -2791,7 +2791,8 @@ static int rtw89_hw_scan_add_chan_list(struct rtw89_dev *rtwdev, if (req->duration_mandatory) ch_info->period = req->duration; else if (channel->band == NL80211_BAND_6GHZ) - ch_info->period = RTW89_CHANNEL_TIME_6G + RTW89_DWELL_TIME; + ch_info->period = RTW89_CHANNEL_TIME_6G + + RTW89_DWELL_TIME_6G; else ch_info->period = RTW89_CHANNEL_TIME; diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h index 4d2f9ea9e0022..4ff168937cb91 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.h +++ b/drivers/net/wireless/realtek/rtw89/fw.h @@ -203,6 +203,7 @@ struct rtw89_h2creg_sch_tx_en { #define RTW89_DFS_CHAN_TIME 105 #define RTW89_OFF_CHAN_TIME 100 #define RTW89_DWELL_TIME 20 +#define RTW89_DWELL_TIME_6G 10 #define RTW89_SCAN_WIDTH 0 #define RTW89_SCANOFLD_MAX_SSID 8 #define RTW89_SCANOFLD_MAX_IE_LEN 512 -- 2.25.1