Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4942439iob; Mon, 9 May 2022 05:23:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN9SyxNjYwalRqXRqVw+Y1Xg6062fNsO4Mo4gLHYqlTELRrQ4JiYIg4mi6TPX7RwH1391V X-Received: by 2002:a17:902:b7ca:b0:15c:df6a:be86 with SMTP id v10-20020a170902b7ca00b0015cdf6abe86mr15881482plz.70.1652098990272; Mon, 09 May 2022 05:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652098990; cv=none; d=google.com; s=arc-20160816; b=odHXbWQDHDB2H767+1b17CkX/g3gGqwn3hIvVNksuA0/JyZC/9516LgXXWCbmWvh5R Ah7jP6IZcNPgULAPWQZ47rZBNUfkYXoTSkA8Gfk2d6rYINxMkfVd7vAhSY9yqrVfkT9J GDQsVUuXPM42OTHXcM4tiLAvSC6ub9zYS/h1IRRuWNDr8N9mS2SeeWt/f5H/lhfFVAOo 55t3NJ96XtiXeT6nU53IRDvvbgOBYYxOXkXQSB5pmJaT+kAblJ1x6+GzzOm9Ilo3st5x zR8tQvHPHStuibGZs+Uc+XLvQl2kS/wBLFUmqC1xYTs0+Fc5lO5IBTUZZNvFrQb0h3jA 4rmA== 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=++ur/VLbZds1eKP1q24NNcYn7nEPj03xbm2Iktm44ZM=; b=xAPwmkV8Vidc242Rj3u2dIqDMC/Vk7WXg4ztHKNVDfJOrq93d3wvMFGPiEDQnb9VOs ggsIfvU6QPr+xbXxfnxHZwGSDabuaJAcXCVTpRkbCveCD+RuI4ID7Flxpr04/ZJO+bXQ vEIFG7OSTWZX+cHb3cQtKg1K2SdZiH/7GJZvs6lXCU9UN3nzf9zFYCZvQYP3fZXprawI MQt4kYcXuCm43lsCNWM9wt7IfyruO7LvuZglG0ygENhe95fuzCShnCZSYO+pccp835Wv faulzUj+NAS3mLL1Dd7Z8bP1tIvMhMq+ebDMbwkBg3g7h1B1WTyyl3yCdHZXK2WJyUUj BbVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iMGQrT1Y; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k4-20020a170902c40400b001585910d6a4si12984795plk.235.2022.05.09.05.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 05:23:10 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iMGQrT1Y; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ED8141F8C75; Mon, 9 May 2022 04:54:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233368AbiEIL6k (ORCPT + 69 others); Mon, 9 May 2022 07:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233367AbiEIL6k (ORCPT ); Mon, 9 May 2022 07:58:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50E5F1E0288 for ; Mon, 9 May 2022 04:54:46 -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 dfw.source.kernel.org (Postfix) with ESMTPS id DEA84612AF for ; Mon, 9 May 2022 11:54:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FBD2C385AB; Mon, 9 May 2022 11:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652097285; bh=jQjOOtNpxpDFq6PzmcAd+quJ3sSW0LUC1b7oMv0wFNs=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=iMGQrT1YNlPViSNCEGS7KBymcWcEP+4d7YL+07FMAS2F5dMvXYdMtLUryLzMJQFTr jgBS7etNr3a2raw9I8JSDVj5pIK0QT42lZzF+Vyx5wrWi5DuSoSDyr/MeG5g1EcFu5 4YjqKI6ycMyRN9FZ/PuZzPemxiJf/hByQYm+xtS3vL+b0g4SPz5O3Pos2UzLppRERY Siubk4Qp+jE7CssroJ7EsFX8Z/at7sZ987VcY7dJnck5J1u63aEbumkrsgk4Ghapr6 M711cPJKb2rqnKLZ0DVmYAThmjRZSqL9obTRkC68CGBKsADC0hFsLILrLaY7il4CQr W+ikIAutQDpcg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] ath11k: reset 11d state in process of recovery From: Kalle Valo In-Reply-To: <20220505034636.29582-1-quic_wgong@quicinc.com> References: <20220505034636.29582-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: <165209728067.20365.11713036278436650363.kvalo@kernel.org> Date: Mon, 9 May 2022 11:54:44 +0000 (UTC) X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: > When doing simulate_fw_crash operation periodically with a short interval > time such as 10 seconds, it is easy happened WMI command timed out for > WMI_SCAN_CHAN_LIST_CMDID in ath11k_reg_update_chan_list(). > > log: > [42287.610053] ath11k_pci 0000:01:00.0: wmi command 12291 timeout > [42287.610064] ath11k_pci 0000:01:00.0: failed to send WMI_SCAN_CHAN_LIST cmd > [42287.610073] ath11k_pci 0000:01:00.0: failed to perform regd update : -11 > > Note that this issue does not occur with a longer interval such as 20 seconds. > > The reason the issue occurs with a shorter interval is the following steps: > 1) Upon initial boot, or after device recovery, the initial hw scan plus > the 11d scan will run, and when 6 GHz support is present, these scans > can take up to 12 seconds to complete, so ath11k_reg_update_chan_list() > is still waiting the completion of ar->completed_11d_scan. > 2) If a simulate_fw_crash operation is received during this time, those > scans do not complete, and ath11k_core_pre_reconfigure_recovery() > complete the ar->completed_11d_scan, then ath11k_reg_update_chan_list() > wakeup and start to send WMI_SCAN_CHAN_LIST_CMDID, but firmware is crashed > at this moment, so wmi timed out occur. > > To address this issue, reset the 11d state during device recovery so that > WMI_SCAN_CHAN_LIST_CMDID does not timed out for short interval time such > as 10 seconds. > > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 > > Fixes: 1f682dc9fb37 ("ath11k: reduce the wait time of 11d scan and hw scan while add interface") > Signed-off-by: Wen Gong > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 9497b7880ffd ath11k: reset 11d state in process of recovery -- https://patchwork.kernel.org/project/linux-wireless/patch/20220505034636.29582-1-quic_wgong@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches