Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1460350rdb; Mon, 2 Oct 2023 10:05:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHYA7/e++RD4KYbkE72yVvOy0Q20mDr9BWwRC4QfSkuPFgmk9GoxNicmqQkMdML6eBnEzwq X-Received: by 2002:a05:6a20:914f:b0:160:83e1:712f with SMTP id x15-20020a056a20914f00b0016083e1712fmr14224360pzc.23.1696266343023; Mon, 02 Oct 2023 10:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696266343; cv=none; d=google.com; s=arc-20160816; b=vmBR/bQKdgku52BtjWBMWbs9Me7S6cRQvE6dNKN/sMGzfsvFIlHsiTZK8Zh9W1HC4B jrEG7Ts91a9HCx0vS4/ygpNYiHR5eb4PYg8zpl3pYNfPD22WRbmBht2Z47dN/Rn+oUZ2 CaU6P9dZ0BjDahSiUBHIqq/WPC8U2uZ4zDyJBOI4GksjGoasFFnHZ8K6gpYs86TnF061 5/juZZFNML26tLRyESp8aphk8lhoeanOH9ZURlUw9Po1N9EHNDMj5SfZ3g40KZHuty/3 RyzbyzqJwW0gjLjhfQrRw4BebF38L4hCVM24i69Ln7TleRsyJyPZGEq6o/BnRNUTGpLw tQWA== 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=vUXZoiDhoi/XDqzApMmUIkCtTi9i4IQXDb8q4QmGQlg=; fh=LsoUksxT4ktkOP1nIG/YuHD4CB61Z5PuhwDEBkE4zew=; b=ZJbRVzU3ZdoJns6WL5amJZinfJws9k/lUkFyu6ww5K+xeWPnX03guL4H5QDY7SniaC 9goGXgrBC7JDbHVWaFTBFGMGuNeaac5CslikezfhxdYSRRMST7d6mUA104EkvxRPv4XI NVCjDoNExKsP0FkMTaOf5D5Qz3Fykouo+v+IIua/gVuz+tTHtekheJNAPX68WeltPNPg 45uj0VZugPWA58m0hfxAonPcT5G4SeXjJ3z+HmUTa7x9jpF7tb9gbuJtxrJWbjpQ6y32 q5sfBeI+rNcIb6jcsHJ9YjapCoaxvlniF4iGz/Jox6G3etFV/uTU/J3KAqibeL18Xvda EHIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QGJLEx8C; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id ch3-20020a056a00288300b0068a2f6b841esi27552226pfb.293.2023.10.02.10.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 10:05:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QGJLEx8C; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E4A1580D6A23; Mon, 2 Oct 2023 09:59:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238430AbjJBQ7f (ORCPT + 53 others); Mon, 2 Oct 2023 12:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236742AbjJBQ7e (ORCPT ); Mon, 2 Oct 2023 12:59:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AC53A9 for ; Mon, 2 Oct 2023 09:59:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9390C433C8; Mon, 2 Oct 2023 16:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696265971; bh=Zo9c2Ppi/WpONYzKUs6UGR+A1VsQtNmDXzGoZqUCFqg=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=QGJLEx8C4gdUQrc+7f1dKhMSumXSjzwiMhBppKwQUOImwi773cJVeauJ/z0Myfxcm VJPNukKOXPXKZFfzMf1zsn1E0SinzjIYDit1s5PSFf80HctxZccNuIZgfcwK9Km92I 6zSzeo9Q38OcG4LLBU8mRLr3RX8H75vLKnlD3DK3qwx9k8l+x0NMUXkTUV+QQo0VIb wUQ1R6RhOn1Ecdlaj9CZbjEaN92BaxJQpjd009ZLaxYfKUKll+y8SLK32W600lQVzZ zh6ZY1Q7ZP93OWb+s1xHXCWsmU3IgrnN7wPCtFatxrOEvd3ap7SqX2idSQ+F6vkI8O 1OSV6ZS7iK82Q== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ath10k: indicate to mac80211 scan complete with aborted flag for ATH10K_SCAN_STARTING state From: Kalle Valo In-Reply-To: <20230626024232.15579-1-quic_wgong@quicinc.com> References: <20230626024232.15579-1-quic_wgong@quicinc.com> To: Wen Gong Cc: , , User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169626596907.3936351.16766976807544333414.kvalo@kernel.org> Date: Mon, 2 Oct 2023 16:59:30 +0000 (UTC) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 09:59:35 -0700 (PDT) Wen Gong wrote: > Scan failure can not be recovered from when running a loop of the > following steps: > 1. run scan: "iw wlan scan". > 2. run command: echo soft > /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash > immediately after step 1. > > result: > scan failed and can not recover even when wlan recovery succeeds: > command failed: Device or resource busy (-16) > > reason: > When scan arrives, WMI_START_SCAN_CMDID is sent to the firmware and > function ath10k_hw_scan() returns, then simulate_fw_crash arrives > and the scan started event does not arrive, and then it starts to do > recovery of wlan. __ath10k_scan_finish() which is called from > ath10k_halt() is one step of recovery, it will not call > ieee80211_scan_completed() by logic currently because the scan state is > ATH10K_SCAN_STARTING. Thus it leads the scan not being completed in > mac80211, and leads all consecutive scans failing with -EBUSY in > nl80211_trigger_scan even after wlan recovery success. > > Indicate scan complete with aborted flag to mac80211 for > ATH10K_SCAN_STARTING to allow recovery from scan failed with "Device or > resource busy (-16)" after wlan recovery. > > Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00174 > > Signed-off-by: Wen Gong > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. d876188ab807 wifi: ath10k: indicate to mac80211 scan complete with aborted flag for ATH10K_SCAN_STARTING state -- https://patchwork.kernel.org/project/linux-wireless/patch/20230626024232.15579-1-quic_wgong@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches