Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp209386rwb; Wed, 28 Sep 2022 01:22:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/y8YK7D7R6+zIHNKxS6+AX7gkfouW+eNFfWfFRRibhTaTGkVOBT3z8lK3yTIG27KTFyK/ X-Received: by 2002:a17:907:701:b0:780:2c44:e4dd with SMTP id xb1-20020a170907070100b007802c44e4ddmr26697120ejb.589.1664353336036; Wed, 28 Sep 2022 01:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664353336; cv=none; d=google.com; s=arc-20160816; b=Z5iRd3G1fdBYQ+QOAPSEw2ETxROG12IaXhK0YyBlo47D3Mr3bj4owL4u/NCnkfWA8o N3Jxn0EJe2+jIO2l65+zQc+GGKEgG0CmZt+/rgfgDrvP00MX2/dsmXMqcok5iEHar3Is U5deRJDwqHDEOpFizEA8Lc1qtv0/iBsnXhvzVCb0LMIA58CNSE6exawAPepTTZQIvfqf Os/zAILVY2wJxpHBgkGOH/8q3g2PEvvLCqnBA/VUWA3QrQ9WROi7TOkk1tavPB52o+n6 a7J8z6Qm6TdqJu1bcTIQH8390BzJE5bQ91plijZyFH0RLWY90IjXqR2c0upY2SUoIFO4 11mQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CxAohSPYOCh2XaboYoY/2SkjjhppvjA5sdowS2JM7FQ=; b=U7kf4y6dgXOsZsSI2HjBoJuR7p5qpv2u8abgFVqza1UEpoPNV9tLF/Wr5a2GXhYwNz iPZRMdsuA35fm7q+SI8MYxPz162lVM+Eh22HfQiIZkGtQhgZLy1+VnhGsEYC+JER/8gi 2FhwiYD+FOLYu0+LpzcgE5gOnmEBj/W+jbKDmp3qE9WelVcmHrreQB6r0tgV5ezFnJkg sn4zSZ01RMjpDYUaO6IWzFB/PxQfEQyjF0nsJ8VsnK0H9Z5l1o0lqrD5TavvXJoQinT2 1q3Y0KAhtXoZDOCjvtziUdlpfWPDBnLG4v2UFG7bgcYUG45LAIxeb5A9yNaQFqgCkCdi MNyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Tc70uR4v; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o22-20020a170906975600b00782ff2649a7si5353218ejy.346.2022.09.28.01.21.40; Wed, 28 Sep 2022 01:22:16 -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=@quicinc.com header.s=qcppdkim1 header.b=Tc70uR4v; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234037AbiI1IPw (ORCPT + 59 others); Wed, 28 Sep 2022 04:15:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234041AbiI1IOl (ORCPT ); Wed, 28 Sep 2022 04:14:41 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D67D0B852 for ; Wed, 28 Sep 2022 01:14:38 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28S5Y5OY029030; Wed, 28 Sep 2022 08:14:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=CxAohSPYOCh2XaboYoY/2SkjjhppvjA5sdowS2JM7FQ=; b=Tc70uR4vC8TjWhmYXlB76zNpiI5wcKyb9zRB27CmE/7RFHBEJVFY9Hq5tY4CJs2UCwhT Y8ko2wqncehobJ5+7SEgisPXCKnsGIUbbCVSzifIDo/3en/1h2ldvYJcX9T3WAUwdH81 JU20yVc5zbSg6vFGECuG9TmY2oVmTA1F7ewv50xqh/927id75ljH7jhCptEgz+1rVmEu fqt43h9AlY2Yov6w1bPxDDvm1E4m3QZGaomqipASHTZRAd4NZDfaQB+hQGtTDuL7IY73 UGEKB8TKAS7nsz72E9NNo0eR6NcS2iWrTL7bXyLWyDK+cCI4zG21xm6cx1d6FdrwIhdt gw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jva41hfgx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Sep 2022 08:14:36 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28S8EY7f022990 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Sep 2022 08:14:34 GMT Received: from wgong-HP3-Z230-SFF-Workstation.qca.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 28 Sep 2022 01:14:33 -0700 From: Wen Gong To: CC: , Subject: [PATCH v2 2/2] wifi: ath11k: reduce the timeout value back for hw scan from 10 seconds to 1 second Date: Wed, 28 Sep 2022 04:14:13 -0400 Message-ID: <20220928081413.27339-3-quic_wgong@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220928081413.27339-1-quic_wgong@quicinc.com> References: <20220928081413.27339-1-quic_wgong@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 1Fz8g7f98SY7ta85Me99YqVtcyAnDAQ0 X-Proofpoint-ORIG-GUID: 1Fz8g7f98SY7ta85Me99YqVtcyAnDAQ0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-28_03,2022-09-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 suspectscore=0 mlxscore=0 bulkscore=0 phishscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209280050 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 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. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Signed-off-by: Wen Gong --- drivers/net/wireless/ath/ath11k/mac.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index b0c3cf258d12..c2a0fb099a0b 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3560,7 +3560,6 @@ static int ath11k_start_scan(struct ath11k *ar, struct scan_req_params *arg) { int ret; - unsigned long timeout = 1 * HZ; lockdep_assert_held(&ar->conf_mutex); @@ -3571,14 +3570,7 @@ static int ath11k_start_scan(struct ath11k *ar, if (ret) return ret; - if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ar->ab->wmi_ab.svc_map)) { - timeout = 5 * HZ; - - if (ar->supports_6ghz) - timeout += 5 * HZ; - } - - ret = wait_for_completion_timeout(&ar->scan.started, timeout); + ret = wait_for_completion_timeout(&ar->scan.started, 1 * HZ); if (ret == 0) { ret = ath11k_scan_stop(ar); if (ret) -- 2.31.1