Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1528910pxb; Wed, 30 Mar 2022 05:43:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz11EjvSxZ4UyVes+jzl5fgV2FMcejN6LEtHUoPNERnlqEV+O3euuYLkNpmXcgAP6aQhOSh X-Received: by 2002:a17:90b:38d1:b0:1c9:ba10:353b with SMTP id nn17-20020a17090b38d100b001c9ba10353bmr4867712pjb.9.1648644223818; Wed, 30 Mar 2022 05:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648644223; cv=none; d=google.com; s=arc-20160816; b=K8M9RZY/iZej4q5fcDRwuSUSU0ofKyE71aOiks63Ki6RvviVzmUOUnT0MyEBL/Ofvt G69QsFm1jTADqLZXAJYJoKwOfO84yOk2S2ipud0po3kzVtV2RjFa380Pqf372dGlnAB9 loe+4eJ5Nh/AxFwKSIumNuEUOhO5ZZZxtqV/1CHyyP+fHS27GDK/+v5+86O47UCSC1VU xCONIxKGOaJIb26yxtxqY49O+mdfMidxMYtcWCEsf8xAyeX/B5wnCBloqT7aYwuIdw6L Kun49Ld1sp/W+/Vju9icjmLHmbSoVTdd1tliAMixg+a2vBJ9BksZBFWs8+X/m2maLmXK gRTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=0wn4e5fjczEAFQt03ICS3qvCHBBEq/ZpVsUPtQEtRJg=; b=uP234thkYbK7sfSDvoCTitX4As2YzSSR3W+V5Mk9XMOfuB/DjNKlhXZS0naq+WdNc7 jqXqXV51VdV3iqGO49pS0G4JwWpLLQLJciYUhQ7iOk3pLY2limsxx+JUeTsRKb2d5N51 LmXue3d+XmUozGWnKHNNeH2ylm11BpALSsOIubxPWCO4Pfw1ODI0C/md3FkT1CqV+u29 2KyCcz+pL8d42oZprbOJ80J+do/y29AGpRTPUw8DGUZkE7u3xw9axx25rdv1PInd4n7u sn8DSqybzgsR/HzxKdc/VsW13rJUA6xO+oY1KaODSbL3dmxFFTlPAkp5d2mA9Gak+j06 riNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nLIh3E9B; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw12-20020a17090b4d0c00b001c9818229c8si2210857pjb.163.2022.03.30.05.43.32; Wed, 30 Mar 2022 05:43:43 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nLIh3E9B; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236650AbiC3IJJ (ORCPT + 68 others); Wed, 30 Mar 2022 04:09:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232101AbiC3IJH (ORCPT ); Wed, 30 Mar 2022 04:09:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B24312E6A4 for ; Wed, 30 Mar 2022 01:07:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 33965B8128F for ; Wed, 30 Mar 2022 08:07:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03264C340EC; Wed, 30 Mar 2022 08:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648627639; bh=VeqVUHrwVumQkd/+UiBnyW9Un4ZO7zwAY3fgeshHU4g=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=nLIh3E9B7EknvVUTaYGP7itaLzZ5Kgoa0IumWbg0de/g6j/3BSKe1BzqrR2dQ3F/G Y3qSQGtjMCufKzL/B5pFnhLAHMklNel80iu0aRcMIuIq4uLyOmmRfYkc6ZaiPboDYZ 8vL2Iv/yVitvt2WRPGK0jVYPM8sVnZj3bXhSOAsMlgXUPSp7ahm19aGXHRo4JQ4EAR w64+S98oaR6df5FUQd72vld4UlMeiIyIirYS1bqC6SiRO51cS7nbr6nrmKiPBXK4H8 p29cXnMbIedjGo4xDNaYNI04OEU2LCM9iM7snoJhOWk3GeAY8G2Mj5vV65WQWpFE2d u7g+TWKEV5Cmg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v2] ath11k: reduce the wait time of 11d scan and hw scan while add interface From: Kalle Valo In-Reply-To: <20220328035832.14122-1-quic_wgong@quicinc.com> References: <20220328035832.14122-1-quic_wgong@quicinc.com> To: Wen Gong Cc: , , User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <164862763578.10264.10006075245448797606.kvalo@kernel.org> Date: Wed, 30 Mar 2022 08:07:17 +0000 (UTC) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wen Gong wrote: > Currently ath11k will wait 11d scan complete while add interface in > ath11k_mac_op_add_interface(), when system resume without enable > wowlan, ath11k_mac_op_add_interface() is called for each resume, thus > it increase the resume time of system. And ath11k_mac_op_hw_scan() > after ath11k_mac_op_add_interface() also needs some time cost because > the previous 11d scan need more than 5 seconds when 6 GHz is enabled, > then the scan started event will indicated to ath11k after the 11d > scan completed. > > While 11d scan/hw scan is running in firmware, if ath11k update channel > list to firmware by WMI_SCAN_CHAN_LIST_CMDID, then firmware will cancel > the current scan which is running, it lead the scan failed. The patch > commit 9dcf6808b253 ("ath11k: add 11d scan offload support") used > finish_11d_scan/finish_11d_ch_list/pending_11d to synchronize the 11d > scan/hw scan/channel list between ath11k/firmware/mac80211 and to avoid > the scan fail. > > Add wait operation before ath11k update channel list, function > ath11k_reg_update_chan_list() will wait until the current 11d scan/hw > scan completed. And remove the wait operation of start 11d scan and > waiting channel list complete in hw scan. After these changes, resume > time cost reduce about 5 seconds and also hw scan time cost reduced > obviously, and scan failed not seen. > > The 11d scan is sent to firmware only one time for each interface added > in mac.c, and it is moved after the 1st hw scan because 11d scan will > cost some time and thus leads the AP scan result update to UI delay. > Currently priority of ath11k's hw scan is WMI_SCAN_PRIORITY_LOW, and > priority of 11d scan in firmware is WMI_SCAN_PRIORITY_MEDIUM, then the > 11d scan which sent after hw scan will cancel the hw scan in firmware, > so change the priority to WMI_SCAN_PRIORITY_MEDIUM for the hw scan which > is in front of the 11d scan, thus it will not happen scan cancel in > firmware. > > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 > > Fixes: 9dcf6808b253 ("ath11k: add 11d scan offload support") > Signed-off-by: Wen Gong > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 1f682dc9fb37 ath11k: reduce the wait time of 11d scan and hw scan while add interface -- https://patchwork.kernel.org/project/linux-wireless/patch/20220328035832.14122-1-quic_wgong@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches