Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6804100rwb; Tue, 22 Nov 2022 20:04:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf5vhvjFFjVxYJq2nTq3YFBxmHIiyJbPya39PIdJbE5aVEs2/9KTSjNqlif5qGh7zHmNAXMd X-Received: by 2002:a17:902:e0ca:b0:188:712f:dfa5 with SMTP id e10-20020a170902e0ca00b00188712fdfa5mr7099118pla.140.1669176274703; Tue, 22 Nov 2022 20:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669176274; cv=none; d=google.com; s=arc-20160816; b=OKhaj0zpyZiLZ2GE2cl6WReEr/75nmw1svcnTyMAV6U1+BWqkvrNFxNu5m4DjVnBar vmnMmyqken6Nhmdn1OCZcPV0aBk7NIqW2bNo9g950uzKkPIjeNTEBU+pl1s5HkZGxC43 ng2SfD1B0dCaPz3lo7lIakdCDymxAzJUXxd/aSGso46/Dn8me0fezm+7h5lURHgINemB VoSoSbj5/Ihf1/ODOZ5TV5zCzb5WCFkOl8YrdjokzrY7vjtQT105nkK0eGEw01e9xcJ9 jrD0DrEYcFC3c2EM6rzM+rk1WNIiQG4gf7PzO1uVc1rq2YWNR15qHu7VxRBOtWujv3yC XXHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=eGzzukjTuIWTfYBwo3GDLtYJqd+V27Mca1HLgoxlagU=; b=hsFtIC/CAlTW+ELALjsyOI380WqMeqGIGZLapNNSCzMMg4Vksc6ShYk1xqBCot+Gs9 9uc4u8+8FBaulhqdgpD2r72ZBygKkMGVFzWfXLhXISlxkOsZW+zE5KNzql7sBuHm5E2j rJkqwgoxCeAQXMobl1C94oLGc8WSOm4ylz8c7qGAqQWs4Rp5sXesAGU6zbBsPVEm+HfQ 5GE1Zs0ZrSaQumGoAcvGyWmsjGAtf/x35rU/jxYTi+Oti4OaZKlnJ7vwn1E52DsGwyZg qb16HA3tz973JjPcnJF7JpYK15gTWwmyyGTVMkMAm0iLdPq7C0Hqmgtb6ckaneKWX0+i jVkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=U4lPgne7; 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 x1-20020a623101000000b00562a956d979si13517431pfx.67.2022.11.22.20.04.22; Tue, 22 Nov 2022 20:04:34 -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=@quicinc.com header.s=qcppdkim1 header.b=U4lPgne7; 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 S235320AbiKWDln (ORCPT + 68 others); Tue, 22 Nov 2022 22:41:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234329AbiKWDlm (ORCPT ); Tue, 22 Nov 2022 22:41:42 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E056E6EFB for ; Tue, 22 Nov 2022 19:41:41 -0800 (PST) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AN2fMBe023623; Wed, 23 Nov 2022 03:41:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=eGzzukjTuIWTfYBwo3GDLtYJqd+V27Mca1HLgoxlagU=; b=U4lPgne755B0ClR7iLDAsdcJneEyStjLsd/VgoJV7L2ITCpOuKqkldSUM7TozfAZAs9x xgQft0mXxbaH/v0cPP6y/7TFApp0j81wfqmZjxvzO7LOd87trutpjzM7V2JL3NszYT0n 9lyMWsaW2JhNfSnVVXsRCHh1ZBtaOeIebiCHCBT4pbnZFD0LnzFL4OBHGcFZ2gCORkvr G+rXB0t2AaMHvCSbuGDQ0BRUJQ8aXFR8o0agCcGkvG0R7Jg+EqMVS7IxtXYWwWV95oEu v+tQFQiS2BIU/5LVp2hmLt3bbWy49rLhpnPrU8CRO8gGRSLT0tEUpftnAcGW7aU2wGvN Ug== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3m0q6xb6bw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 03:41:29 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2AN3fSF8012423 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 03:41:28 GMT Received: from [10.231.195.37] (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.36; Tue, 22 Nov 2022 19:41:27 -0800 Message-ID: Date: Wed, 23 Nov 2022 11:41:25 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v3 2/2] wifi: ath11k: reduce the timeout value back for hw scan from 10 seconds to 1 second Content-Language: en-US From: Wen Gong To: Kalle Valo CC: , References: <20221011072408.23731-1-quic_wgong@quicinc.com> <20221011072408.23731-3-quic_wgong@quicinc.com> <8735atg335.fsf@kernel.org> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: K1TxHWZRUqRdZXTmHehE4lQs2w_uPGwD X-Proofpoint-ORIG-GUID: K1TxHWZRUqRdZXTmHehE4lQs2w_uPGwD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-22_13,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 spamscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 mlxscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211230026 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 On 11/18/2022 6:29 PM, Wen Gong wrote: > On 11/8/2022 6:20 PM, Kalle Valo wrote: >> Wen Gong writes: >> > ... >> [...] >> >>> @@ -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. > It will not delay connection. > After wlan load, the 1st hw scan will arrived to ath11k, and then 11d > scan will be sent to firmware after the 1st hw scan. It means the hw > scan for connection is run before 11d scan, and then connection could > be started immediately after the 1st hw scan finished. It means no > delay for connection. >> I would rather fix the root cause, do we know what's causing this? > In firmware, hw scan and 11d scan are all running in the same queue, > they can not be run parallel. > > When 6 GHz enabled, the 1st hw scan cost about 7s and finished, and > then 11d scan cost the next 7s. After the 14s, the each hw scan arrived > to ath11k will be run immediately. If the 2nd hw scan arrived before > the 11d scan finished, for example, it arrived 7.1 seconds after the > 1st hw scan, at this moment, the 11d scan is still running in firmware, > then the 2nd hw scan will not receive scan started event untill the 11d > scan finished, and meanwhile, the 2nd hw scan is holding the > ar->conf_mutex > in ath11k_mac_op_hw_scan(), it is not good to hold a lock for some > seconds because ar->conf_mutex is widely used. So reduce the 10s to 1s > to avoid holding ar->conf_mutex for long time. Hi Kalle, Should I change commit log with above explanation and send v4?