Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3255209rwb; Tue, 8 Nov 2022 02:21:21 -0800 (PST) X-Google-Smtp-Source: AMsMyM7s4RffxSDGzISYVIyX7R52I8QfAI0CAAW44kbW1dHyhoEXSFOGuQ0FAlbq+bDk581eN+m+ X-Received: by 2002:a17:902:7101:b0:180:202c:ad77 with SMTP id a1-20020a170902710100b00180202cad77mr57457475pll.47.1667902881607; Tue, 08 Nov 2022 02:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667902881; cv=none; d=google.com; s=arc-20160816; b=KmPQGq0mQabJ71Xju+pmpI/kQ2igKpjyEERUbv1EBNBlANpxMgPwxQBJGcXj7DU20n i7QobfAD3TyzfLCCmFkhDbuefBG8SsEu7cixMYEpCIIQrR20FbtXu1PzVmC74r2SzQkO 74pZprS1WiRjyKip3gDiWBbkD//KlAAA9ApLe6GdoOts8i+gL4hGohd2wpls/NNuP9iU LdxwN3Oar3AK6ufaekEfYYS9kR3dJcHyANd5AN1OBcNbzKCfT9cU1Z6WpxAjc7DnYbZI KZ+z2zBjUZ/zDK+rEUyZNiEc1b/m6QyTUIKkKXxELGgyCvtbYVd4B1430qJX7eLKNkxr anvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=3/I6fdcxPXpQCyRDxLrpbX2tz9jzLM4ubGwMp/JpXow=; b=Ckder9/WT5/bTkrSc8qw4X/vwc/Z7ITNVHZdsuj6SKCMYTnSuKoqI+9WvpKrYdaSve eaaja98vFlzILbYMIFiuZpiCbOXa875x4VmzpB5YJLRX9WcJC99tqGkKOzpLAd0LbPsV VLgSuf/a6C3XJW1rzy03NeB9J9Zloxy1ZzW61ZJKvjI5VJTfey6lQQSr9rfRCZd8MtiW nN/Foz6mId8WgxCa1s+P7+RrCujC6iEkPibjUV0RlnN5Vz395prttlfRgWGtZZ0UgGYM CtKC6tnzjcZVgGKMHusKwduH95j71ymeQdd7ShMsE6e4BeKxz8CtpV6zzeVYaSEgARSq lm3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mvd7sFW2; 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 j190-20020a6380c7000000b00470684489fcsi9767323pgd.525.2022.11.08.02.21.13; Tue, 08 Nov 2022 02:21:21 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mvd7sFW2; 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 S233946AbiKHKUn (ORCPT + 67 others); Tue, 8 Nov 2022 05:20:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233726AbiKHKUV (ORCPT ); Tue, 8 Nov 2022 05:20:21 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 928A114D13 for ; Tue, 8 Nov 2022 02:20:20 -0800 (PST) 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 48E77B816DD for ; Tue, 8 Nov 2022 10:20:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30151C433D6; Tue, 8 Nov 2022 10:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667902818; bh=fj3GSjuI/xSDQX1HQai9knNPR5hppsvev38xKxYNPFo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mvd7sFW2tY2oJMAVWF+GerRLIYEGXDYfBWpg2MDXULNdZ65+Y/frPtDmLOHI6sbLO ehrOIt8jprA0eKOybe2KuEqxKyMnjpsn9OjofYKUcygwKtGqi4gjJpRVBLWHCkSejB l7xELMzZoJfnUc0XwXz3Y7avH0EwD7kzGozS8jZhMg3Je314OWs/4K6N3g9evji4t7 /KWUiiLXHGLKwbfh0OwiD1hA+ZnODdcWhIp10Jp5wcwPsuIPCW2zriDsxH8fCCTZrU kbrQJZ60d/fPJ7C1jG6scAncdDC3GaTT1uaLwEWUHH6LDx+W8bE9L3eZw5QTTT5R4D 5OBgDCJvZCIKg== From: Kalle Valo To: Wen Gong Cc: , Subject: Re: [PATCH v3 2/2] wifi: ath11k: reduce the timeout value back for hw scan from 10 seconds to 1 second References: <20221011072408.23731-1-quic_wgong@quicinc.com> <20221011072408.23731-3-quic_wgong@quicinc.com> Date: Tue, 08 Nov 2022 12:20:14 +0200 In-Reply-To: <20221011072408.23731-3-quic_wgong@quicinc.com> (Wen Gong's message of "Tue, 11 Oct 2022 03:24:08 -0400") Message-ID: <8735atg335.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 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 writes: > For 11d scan, commit 9dcf6808b253 ("ath11k: add 11d scan offload support") > increased the timeout from one second to max 10 seconds when 11d scan > offload enabled and 6 GHz enabled, it is reasonable for the commit, it > is because the first 11d scan request is sent to firmware before the > first hw scan request after wlan load, then the hw scan started event > will reported from firmware after the 11d scan finished, it needs about > 6 seconds when 6 GHz enabled, so increased it from one second to 10 > seconds in the commit to avoid timed out for hw scan started. Then > another commit 1f682dc9fb37 ("ath11k: reduce the wait time of 11d scan > and hw scan while add interface") change the sequence of the first 11d > scan and hw scan, then ath11k will receive the hw scan started event > from firmware immediately for the first hw scan, thus ath11k does not > need set the timeout value to max 10 seconds again, and this is to set > the timeout value back from 10 seconds to 1 second. > > After the 1st hw scan finished, firmware will start 11d scan immediately, > and firmware need use some seconds to finish 11d scan, if the 2nd hw > scan is sent from ath11k to firmware before 11d scan finished, the 2nd > hw scan will started after 11d scan finished, this will lead timeout to > wait scan started in ath11k. Treat the timeout as a normal situation if > 11d scan is running and skip report scan fail for this situation. > > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 > > Signed-off-by: Wen Gong [...] > @@ -3682,7 +3677,12 @@ static int ath11k_mac_op_hw_scan(struct ieee80211_hw *hw, > > ret = ath11k_start_scan(ar, &arg); > if (ret) { > - ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret); > + if (ret == -EBUSY) > + ath11k_dbg(ar->ab, ATH11K_DBG_MAC, > + "scan engine is busy 11d state %d\n", ar->state_11d); > + else > + ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret); > + > spin_lock_bh(&ar->data_lock); > ar->scan.state = ATH11K_SCAN_IDLE; > spin_unlock_bh(&ar->data_lock); This feels like a hack to me, for example will these failed scans now cause delays is connection establishment? IMHO it's crucial from user's point of view that we don't delay that in any way. I would rather fix the root cause, do we know what's causing this? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches