From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45A99C433FE for ; Tue, 9 Nov 2021 01:17:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B984610A0 for ; Tue, 9 Nov 2021 01:17:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1B984610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xQQakYLEcti+B8J8mDF5ci5jOK9voGLoKLazdUL5vVc=; b=K9j6YkH3sQLJET FdeUnFDJB6/mMu6shg4mbXohQOlobdOqnMwgd2zPB6RCQp1flcPzUhBK95CWUrZA8g53AWYSWpFkD dPXfaO6iG5udQap6pTYGqPwswcid/xZzZC/XgcsVztFbuMhY80h+MkBl4s6y3kolX7vgMQRf3ABdk JDGTxH/DXbCTnC3xhXECeTcpnwxKO/cg0CT77nn/vkVrr/zOURTNvJmcLTADtM+G9e0XRX+KYHZKo 6nK0hHM9NozzyRn13VlsmTasSBZYm8frIucoMv+wq3EDE+pCrQR2msLWCHlcW+EP7VLx4jiXPXXOI mF0WGDnqSukbeisDJ6Ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkFlT-000H8g-1H; Tue, 09 Nov 2021 01:17:31 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkFYS-000C7w-Hs for ath11k@lists.infradead.org; Tue, 09 Nov 2021 01:04:06 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9001761A59; Tue, 9 Nov 2021 01:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636419843; bh=bHa5gPhozM+s6vrbsoyeHM3zp4a5PsqgvND0jai6kAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q6oAFhob9m48AisTdlKlukU/Cghj0bCNSaXx0LyuVByGmHi28pw0g4e0mIAa8NYgY 7l3xD7MBG3aYCtXFrvCg+xtB/0YsIQ9Kz4Q4OZW8O6cCYVAWoNwTO+AfOvYDATSdHC 3gOKDjTD/TuqtEgv6PmOHO0mDJdo0IhPKom1jUqdZvdFOgRImqQFqzGG2Gqmd4FQ88 PG2nuYBOSisKEXJGX25um2+nnRXfVo7AYWsvvOvGO9KTJ6BqOh3L1GnivDqySNzmHG UQD2xepFJYAUBJgzGwgMqZUdz1GLe0mV5K5og1WHE/wuEDwxtgJkrgUwZ6p8P2y/Z9 4Q36hwb/mXCrA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wen Gong , Jouni Malinen , Kalle Valo , Sasha Levin , davem@davemloft.net, kuba@kernel.org, ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 024/101] ath11k: add handler for scan event WMI_SCAN_EVENT_DEQUEUED Date: Mon, 8 Nov 2021 12:47:14 -0500 Message-Id: <20211108174832.1189312-24-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211108174832.1189312-1-sashal@kernel.org> References: <20211108174832.1189312-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211108_170404_704868_2B9C58B6 X-CRM114-Status: GOOD ( 10.43 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath11k" Errors-To: ath11k-bounces+ath11k=archiver.kernel.org@lists.infradead.org From: Wen Gong [ Upstream commit 441b3b5911f8ead7f2fe2336587b340a33044d58 ] When wlan interface is up, 11d scan is sent to the firmware, and the firmware needs to spend couple of seconds to complete the 11d scan. If immediately a normal scan from user space arrives to ath11k, then the normal scan request is also sent to the firmware, but the scan started event will be reported to ath11k until the 11d scan complete. When timed out for the scan started in ath11k, ath11k stops the normal scan and the firmware reports WMI_SCAN_EVENT_DEQUEUED to ath11k for the normal scan. ath11k has no handler for the event and then timed out for the scan completed in ath11k_scan_stop(), and ath11k prints the following error message. [ 1491.604750] ath11k_pci 0000:02:00.0: failed to receive scan abort comple: timed out [ 1491.604756] ath11k_pci 0000:02:00.0: failed to stop scan: -110 [ 1491.604758] ath11k_pci 0000:02:00.0: failed to start hw scan: -110 Add a handler for WMI_SCAN_EVENT_DEQUEUED and then complete the scan to get rid of the above error message. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210914164226.38843-1-jouni@codeaurora.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/wmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index 2f777d61f9065..cf0f778b0cbc9 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -5856,6 +5856,8 @@ static void ath11k_scan_event(struct ath11k_base *ab, struct sk_buff *skb) ath11k_wmi_event_scan_start_failed(ar); break; case WMI_SCAN_EVENT_DEQUEUED: + __ath11k_mac_scan_finish(ar); + break; case WMI_SCAN_EVENT_PREEMPTED: case WMI_SCAN_EVENT_RESTARTED: case WMI_SCAN_EVENT_FOREIGN_CHAN_EXIT: -- 2.33.0 -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9044C433EF for ; Tue, 9 Nov 2021 01:08:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A493B61B1F for ; Tue, 9 Nov 2021 01:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241900AbhKIBKz (ORCPT ); Mon, 8 Nov 2021 20:10:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:33466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242014AbhKIBIv (ORCPT ); Mon, 8 Nov 2021 20:08:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9001761A59; Tue, 9 Nov 2021 01:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636419843; bh=bHa5gPhozM+s6vrbsoyeHM3zp4a5PsqgvND0jai6kAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q6oAFhob9m48AisTdlKlukU/Cghj0bCNSaXx0LyuVByGmHi28pw0g4e0mIAa8NYgY 7l3xD7MBG3aYCtXFrvCg+xtB/0YsIQ9Kz4Q4OZW8O6cCYVAWoNwTO+AfOvYDATSdHC 3gOKDjTD/TuqtEgv6PmOHO0mDJdo0IhPKom1jUqdZvdFOgRImqQFqzGG2Gqmd4FQ88 PG2nuYBOSisKEXJGX25um2+nnRXfVo7AYWsvvOvGO9KTJ6BqOh3L1GnivDqySNzmHG UQD2xepFJYAUBJgzGwgMqZUdz1GLe0mV5K5og1WHE/wuEDwxtgJkrgUwZ6p8P2y/Z9 4Q36hwb/mXCrA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wen Gong , Jouni Malinen , Kalle Valo , Sasha Levin , davem@davemloft.net, kuba@kernel.org, ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 024/101] ath11k: add handler for scan event WMI_SCAN_EVENT_DEQUEUED Date: Mon, 8 Nov 2021 12:47:14 -0500 Message-Id: <20211108174832.1189312-24-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211108174832.1189312-1-sashal@kernel.org> References: <20211108174832.1189312-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wen Gong [ Upstream commit 441b3b5911f8ead7f2fe2336587b340a33044d58 ] When wlan interface is up, 11d scan is sent to the firmware, and the firmware needs to spend couple of seconds to complete the 11d scan. If immediately a normal scan from user space arrives to ath11k, then the normal scan request is also sent to the firmware, but the scan started event will be reported to ath11k until the 11d scan complete. When timed out for the scan started in ath11k, ath11k stops the normal scan and the firmware reports WMI_SCAN_EVENT_DEQUEUED to ath11k for the normal scan. ath11k has no handler for the event and then timed out for the scan completed in ath11k_scan_stop(), and ath11k prints the following error message. [ 1491.604750] ath11k_pci 0000:02:00.0: failed to receive scan abort comple: timed out [ 1491.604756] ath11k_pci 0000:02:00.0: failed to stop scan: -110 [ 1491.604758] ath11k_pci 0000:02:00.0: failed to start hw scan: -110 Add a handler for WMI_SCAN_EVENT_DEQUEUED and then complete the scan to get rid of the above error message. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210914164226.38843-1-jouni@codeaurora.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/wmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index 2f777d61f9065..cf0f778b0cbc9 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -5856,6 +5856,8 @@ static void ath11k_scan_event(struct ath11k_base *ab, struct sk_buff *skb) ath11k_wmi_event_scan_start_failed(ar); break; case WMI_SCAN_EVENT_DEQUEUED: + __ath11k_mac_scan_finish(ar); + break; case WMI_SCAN_EVENT_PREEMPTED: case WMI_SCAN_EVENT_RESTARTED: case WMI_SCAN_EVENT_FOREIGN_CHAN_EXIT: -- 2.33.0