Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2072237rwb; Thu, 15 Dec 2022 19:14:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4pdPFvdMKc3nj0idesFHgrP7+v5OxWOis7VffCv28cGs8qau6ZmjZEfTl4hmXmdckv9Lpu X-Received: by 2002:a05:6402:5511:b0:463:aeaf:338f with SMTP id fi17-20020a056402551100b00463aeaf338fmr21786953edb.32.1671160453130; Thu, 15 Dec 2022 19:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671160453; cv=none; d=google.com; s=arc-20160816; b=mjZC0mxezPxGca2KRYp8bvEKNoV6XbDgsOL3Odge6s/D7hQFtvWLC6qxpvdtRzIxyh szaOGTQAEL5/d6Knjkaa8FFgBMU/bMRIreSb7WW6wxrTrSFWlTv7sKYZ38Rh0mBmQhzI GpbxqW9m8sRGKxOnnsj5gYDNx2hPbu9C5Dbos7leiLgZrGHUkvzW8SqBhsWwjmVXq5j4 NczO+2+lvLnEOaoI/4jPA144sCsdixxs7/kbyvrCshAnriFXxIyEf7dXegS9JWQcu/Q8 e+DohnccXB5rx42HTcWd21Mg0lb5g6fA7GZqOgKLXgKsVwdgL8/YRM54iruOerSyLvWD LLEQ== 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=v8Aymr4G+mfcPgVDJEuCZ392GczaMpgm6BxnebUW0Xg=; b=b/9Im1sTd4jGf9/gHlGUIoiX5I1GneV+SH4s2lL1JdTidqlSQxHX8AWsTs0L8PLlAn Nnt2Txo8vhz7Tf+DiuKBLuHRY0XASxNfo8FwG+bg+WpEykSxAppKaS+177FrMEwIpcel Z5oYFO3Sb89zdMTVTLdqQ+rWu3O88syeae8T89aYLZKCT4IdVRiPXfA0mE7oQgS5s9K2 xPl5y2uwPL+56ykRzcmbJlNHyhLyQX/Y07Iqn1awvuh7i610jOBJYDgE7FudloK1ZzBI lxBVBjJrTJVnHWbEZVfI/zVUAtkl8tb+9LcdlR7pSo3QG3nSRJB3J26WXB9N6fIiSoJO dELw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XD5DTLFT; 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 a12-20020a056402168c00b0046c24dd6f2esi982935edv.235.2022.12.15.19.13.52; Thu, 15 Dec 2022 19:14:13 -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=XD5DTLFT; 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 S229695AbiLPDJM (ORCPT + 67 others); Thu, 15 Dec 2022 22:09:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiLPDJJ (ORCPT ); Thu, 15 Dec 2022 22:09:09 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EF6826549 for ; Thu, 15 Dec 2022 19:09:01 -0800 (PST) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BG2KnhS012413; Fri, 16 Dec 2022 03:08:55 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=v8Aymr4G+mfcPgVDJEuCZ392GczaMpgm6BxnebUW0Xg=; b=XD5DTLFTHcrvhq2cH9LBUtq9PhVSZRasaS6bGXw8kNB+anUDzYPkhlpVziCFxuc/WUlw zCwdZLKBoW0l8o58v7UKgFKc86q4kJPcoCd/sj6eDhm2z8Au0J8AN9aXM2ITajI4LWbA i2ty7IevQ0gj7YCefB95LBhPiZCoIAo+AUOiRxkbOm7Z4Jn1I4ay5faTiO3AARiGIV2Y 4zdDDokDj5IwLiuIDPjGF/+wRAQQQsSGjcO1kZQ168QfkfgLUOvXNBiEMPHSPzwymbJM noag0Xow+PKobbQTRYfqm+xs7Jk4Wsgu7hdz9e3GySSdieEOZEDQ3v7ZRo6gtBZ4nlKt xQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3mfyyu3a1r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Dec 2022 03:08:55 +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 2BG38s4C018200 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Dec 2022 03:08:54 GMT Received: from [10.253.8.132] (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; Thu, 15 Dec 2022 19:08:53 -0800 Message-ID: <7bcd1a12-fb60-98cd-1a29-f55efa8d1499@quicinc.com> Date: Fri, 16 Dec 2022 11:08:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 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: 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-ORIG-GUID: OM3ARP3Le7q85pOff2XFlA-mmfjKExnv X-Proofpoint-GUID: OM3ARP3Le7q85pOff2XFlA-mmfjKExnv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-15_12,2022-12-15_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 adultscore=0 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 priorityscore=1501 clxscore=1011 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212160027 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,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 Hi Kalle, Should I change commit log with below explanation and send v4? On 11/23/2022 11:41 AM, Wen Gong wrote: > 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? >