Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3307109rdh; Thu, 28 Sep 2023 08:08:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSQ2e4IpUEeZ2e9JBaXhCrt7peF2m+Dve/HXninV4NwWr1XA7LlVP30pnbWL5IVL8EgTOY X-Received: by 2002:a17:90a:fc8d:b0:268:5575:93d9 with SMTP id ci13-20020a17090afc8d00b00268557593d9mr1411658pjb.10.1695913726097; Thu, 28 Sep 2023 08:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695913726; cv=none; d=google.com; s=arc-20160816; b=Cewfbxt0IfaPFSaWfyMfKr9GmTvV+SuoXFB1dHMwRViWZ+JBFEFF37Twm6DJtwjFPP fPXJFQ5U7/R8S1KmnwOLC9ywzyZQL9gnVjQxng9GXaLwf1jSqEdDAxn2bU5IYpi1wq4P 2/OgUSTQ3i+DjNUNhKULDfFRujdyj2wpH/G/Hi+B8lxrtKtkuFRjjzTwoWuQFBrayJY9 dt0w1cHFxxzO6mVqfqnLFHuRZHRK58eJeJauW+KSPWmpcJNbLAltDtilh9XJK6eFUyEG EZZLCzVeEf1uT2R+Nrsf287y1iK01782QOytbAYlqs6TSUdoI9rrlSyfypsnuuYWJhrP EW3w== 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=OrHFksLl4NR7RqOCKsEC0s9RMSO8XTfD/dlSFLoLcPg=; fh=pFUMRLcs2CxJLfynOFPNNsxKPxj2wYRvMQW6PkoiSbA=; b=X8HypYrTRwdxY2DzWR2Q2AeqbFcQvO/WTYQfjqduc1nZA6yLIiXePYVXtb/reDRPQr vdTu3XPwJsdA10fQb5SEFFr8DwZBqCAsJAMR5wJKLfJej9LTmzOiVo4iryq2C/jNcXgy 04v4RN4H2XoK20OydqYWzHB3Cf1pVRpdbJ0NbkJ1d3P4KNbRDsWWnVJzyZnM2m0Xuc6t i6i2pJdWyNmiN7NY+l/aC/ZzNNpBBGp5w6ou6Ciz3kB94PTulR11r+o7oMra892T+2y3 YO+VnBaleAm7Zk1eMKHV0zX/+CyEM1m4TQnueXkm/G2ZOqeZsbjwcOJCHGI/k5HlSWJ8 tmlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LykRHUy0; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id a1-20020a17090abe0100b002791b907f0csi1014372pjs.121.2023.09.28.08.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 08:08:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LykRHUy0; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 9AEAF81F3315; Thu, 28 Sep 2023 08:02:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231262AbjI1PCv (ORCPT + 54 others); Thu, 28 Sep 2023 11:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230430AbjI1PCu (ORCPT ); Thu, 28 Sep 2023 11:02:50 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B371194 for ; Thu, 28 Sep 2023 08:02:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16123C433C7; Thu, 28 Sep 2023 15:02:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695913368; bh=tsaHVP2mx7ljQj4gqbh8HSWkgBxSGcfcQehBDZTlBcY=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=LykRHUy0u0cVgoS6993uSGpPsRukfCzMfffkSXgrHN1fnV57PE3PwypUy4B60tL7Q KxLCUTNbO8ugzwI42HBXiJI8tDYrCZKYeWxTWNfzK6v6bKRWtKt5cHhjYgU26hd/Dn 1xzYEGN7+MpNYZJkw11fbg2DFMwQbKnU5oQF7EfIpT79OtnAavaJI5+VqPHz1/YuwS +cQF50UrENEgAFang6JAqgiHsufWmUI0dJy5xMvHq10orEBApUcuskJeUDbgn5CScS UixESlDAxNx75cj7VwIpLPyWOzDj0Y+kShJUD4cAl6yaMN+a4uzzw5bbB2GOoOB7MD kOEdzn92TOB9Q== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ath12k: indicate to mac80211 scan complete with aborted flag for ATH12K_SCAN_STARTING state From: Kalle Valo In-Reply-To: <20230905105947.10369-1-quic_wgong@quicinc.com> References: <20230905105947.10369-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: <169591336483.3019228.4801533515401885948.kvalo@kernel.org> Date: Thu, 28 Sep 2023 15:02:46 +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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 28 Sep 2023 08:02:51 -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 assert > /sys/kernel/debug/ath12k/wcn7850\ hw2.0/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 ath12k_mac_op_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. __ath12k_mac_scan_finish() which is called from > ath12k_core_halt() is one step of recovery, it will not call > ieee80211_scan_completed() by logic currently because the scan state is > ATH12K_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 > ATH12K_SCAN_STARTING to allow recovery from scan failed with "Device or > resource busy (-16)" after wlan recovery. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 > > Signed-off-by: Wen Gong > Acked-by: Jeff Johnson > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. c2ebb1d11ab9 wifi: ath12k: indicate to mac80211 scan complete with aborted flag for ATH12K_SCAN_STARTING state -- https://patchwork.kernel.org/project/linux-wireless/patch/20230905105947.10369-1-quic_wgong@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches