Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp837705pxb; Tue, 14 Sep 2021 09:45:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpaZ7om8clvsvoPUYhwOhKLF1SnWkUrpw+LI+xvekOAwS+487riyJa2zVwFpu9dIFVMqgq X-Received: by 2002:a05:6512:468:: with SMTP id x8mr14269609lfd.369.1631637922095; Tue, 14 Sep 2021 09:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631637922; cv=none; d=google.com; s=arc-20160816; b=gHoPfi1MrBlBZKhr0Q+YuQLsEmRjmYTm0VbInMq9hCfiwLk9Lulk6UJg428SGx2wKz eslpGOHJ6hKgjwmrG/F4OI12TtmfZXQbjonLBWgCmqvcmDh6YlD3eTqhMelwHil6Rq3Z mj0U4DMfLcLZ/4zOPjhSZ96nzMuWi3TivyRMbjkwmavJIbeLSTScXvFqCTYvu98OMHkX ejev4ITof7/bj9wsFeIjD3aWzSaiEDzC8ZjxMZqwj6+UGrQ1IVI2VQMjjbSzXZjFhlHr DuR+ZLC54glMLHS8enY8dCt5qX+0pVZJsqxeoeCXSBpXMtPuq5qHi+FCVvtE4Y5rtHdm xQxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dmarc-filter:sender :dkim-signature; bh=/3SlPjFoOTyGidiNu/qotzsWPXsUtRrZdHqqB6BAzaQ=; b=r8nb3HoLKGLWaNQ1/iQl1oIGopP1W59zpEanWnnkb40sdROSkiMVbHvu8ODldOO2Ac HLJJItaJRLLNj3/ck8+o7OVrKUxq1YV1uzGrXMS58BYx+8jqPMlD4YyKZX6dVsLe9Ern 5+yr49/buOnYiGvCNAAuNyDESF4xPPQaT9i6noNrefAyHAKkD6dI67saSZ7gDRo4s6hv Udm7pNSx/VzhOx97FrxhpIs74SN2rrY6pPPkXSZNbNA2CzBKVBLqLFT+2im7tnm+/4JY IhCTyzbaBbDvaAXQmV83P9J0DsQxGCr47FchUORo7BYyvZ/Uc1hJM1113wkQemOneauN WI4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=EGeHf0N4; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si14076401lfk.49.2021.09.14.09.44.43; Tue, 14 Sep 2021 09:45:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=EGeHf0N4; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229580AbhINQnx (ORCPT + 99 others); Tue, 14 Sep 2021 12:43:53 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:47772 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbhINQnw (ORCPT ); Tue, 14 Sep 2021 12:43:52 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1631637755; h=Content-Transfer-Encoding: MIME-Version: Message-Id: Date: Subject: Cc: To: From: Sender; bh=/3SlPjFoOTyGidiNu/qotzsWPXsUtRrZdHqqB6BAzaQ=; b=EGeHf0N4KkHZoi7sK+6MMo5NLOLlRzlchiANG39BLKz8C/pfj3TZ7nYM+IEGay9AEMumjSmV pGcEdlmSWeVeYtmB1GuNMvxyq+VwpvShOpDnfQTfwcg2yIvIXkh0++tGb3x6dYXEQCbp3G1U a+XsG2QziZuQUzeFKiH2KL6JC+k= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 6140d0f98b04ef8589c65fda (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 14 Sep 2021 16:42:33 GMT Sender: jouni=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id ECCDAC43460; Tue, 14 Sep 2021 16:42:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from jouni.codeaurora.org (85-76-72-211-nat.elisa-mobile.fi [85.76.72.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jouni) by smtp.codeaurora.org (Postfix) with ESMTPSA id E3B0AC4338F; Tue, 14 Sep 2021 16:42:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org E3B0AC4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Jouni Malinen To: Kalle Valo Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, Wen Gong , Jouni Malinen Subject: [PATCH 1/3] ath11k: add handler for scan event WMI_SCAN_EVENT_DEQUEUED Date: Tue, 14 Sep 2021 19:42:24 +0300 Message-Id: <20210914164226.38843-1-jouni@codeaurora.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wen Gong 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 --- 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 ec46e06aace9..d11022455d97 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -6370,6 +6370,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.25.1