Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp813626rwi; Fri, 14 Oct 2022 08:55:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7w1vh4ISBLkZoK5oXW6sB8lQS+TAf0mBD/6p/p7ZhPMaj7ohP/EPn9tGXE5pkgDdsk4o2y X-Received: by 2002:a17:907:2dab:b0:78d:fc4b:7e31 with SMTP id gt43-20020a1709072dab00b0078dfc4b7e31mr3827399ejc.531.1665762947337; Fri, 14 Oct 2022 08:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665762947; cv=none; d=google.com; s=arc-20160816; b=cyqMASgYDoTxOuunrl8vyhloqHubweNsd4xb+3JaI9zjvnlch7d9LViUEx7IKwAYqa GSQ/kSIAspmSRjKDTRctaZwuuOlzOc1IwZ3IhpiMUiY45WKiZBTh7qyCkTphJrX9tULs iAGORhpS2wi0YNGh+j9gIcfSb5MVAcg2FSywcWCyGOfUUMKGthLXpXUsEtnUa8fKNvBm JddL+aDKn79lsSaxkwTMEMX7zQin+QDKHtntYksJkARt2qrBdwvymziXqYbOJJksB562 vecR+k2WDDn5vt5MW6Rw0SMps54gnqytz4BqudJLDKQ/HlzOdP/my+GaAA8uNEfDdmHi zxLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=w8WXgsxHUnYC5vbVnWv6ClP4j9dQ1/w1LgnmG8Ik+qM=; b=pSZaRfSiAF/XgABzTQ97kNifDwS9rr2XXN75mGntDfyExNXhUDamOlBN/7ymKQeIj2 DgsdtWR000YDRQllCCl96rcqn2oNpSvvvZQTGhyvqFMXofDDiKyOK4/RaTw7sks5dabJ 1pdgHkE8KOcxB1nF955rCZHyq47qdFn5Tq3EytMGujW6hLAfbJq4SWis5bD8FJHNUyoV Pa2kQpkAYVKqT4flIPtYS+LmiBdXyF2B7Q4QrUaMqTrfTovbQsH65oWwYXjAmzeWAFCX e/sJilF9QHAekNjr24j+oSfnZyOsvL5LfTwgaa9dFo61IlB2+5nRMjWAYsBT1NeyrMlf D2iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lmeCSgM1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020a170906684d00b00788a4c018b5si2064387ejs.806.2022.10.14.08.55.31; Fri, 14 Oct 2022 08:55:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lmeCSgM1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbiJNPvM (ORCPT + 63 others); Fri, 14 Oct 2022 11:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229588AbiJNPvL (ORCPT ); Fri, 14 Oct 2022 11:51:11 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CA181B6CA8 for ; Fri, 14 Oct 2022 08:51:09 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29EE0CU2025599; Fri, 14 Oct 2022 15:51:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=w8WXgsxHUnYC5vbVnWv6ClP4j9dQ1/w1LgnmG8Ik+qM=; b=lmeCSgM1uYkV5PhVaoHnu5YuqkTlirI4RRiCcw1YNKMFdPQGqGeM+VbnxmXaJ2Nn6bro OzFNpbr5pvVHoWrXTOn0/WutaJ1yGQafjnBzqvviUlzSYrvJGzp5fgBB332u4E/D2PQt P4GD1LgJynAs00hY7S/rqhGrdJcSnNTJUUC5dAgvrsX+0rz/5/L12jCOTZdjuX4s/QDC Gws63Dp/WXDm8mKZC0MDCI++0mEF/hTBYf59aHaWWnHg+iN43ozg/c80tcWOV9yUS3wa CJRRaJtBb/dK6MixQw2t/zgLGSlfosTfqEf/JgZPl8I644N579jMHkogyJnNrXoYe51D gA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3k6mkdun6j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Oct 2022 15:51:07 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 29EFp66l001361 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Oct 2022 15:51:06 GMT Received: from nmaran-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Fri, 14 Oct 2022 08:51:05 -0700 From: Nagarajan Maran To: CC: , Nagarajan Maran Subject: [PATCH v2] wifi: ath11k: fix monitor vdev creation with firmware recovery Date: Fri, 14 Oct 2022 21:20:54 +0530 Message-ID: <20221014155054.11471-1-quic_nmaran@quicinc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 9Vil6rtAYSRq404a4VRt1Js5wY3h59DT X-Proofpoint-ORIG-GUID: 9Vil6rtAYSRq404a4VRt1Js5wY3h59DT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-14_09,2022-10-14_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 clxscore=1015 impostorscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=927 suspectscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210140088 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 During firmware recovery, the monitor interface is not getting created in the driver and firmware since the respective flags are not updated properly. So after firmware recovery is successful, when monitor interface is brought down manually, firmware assertion is observed, since we are trying to bring down the interface which is not yet created in the firmware. Fix this by updating the monitor flags properly per phy#, during firmware recovery. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Nagarajan Maran --- v2: - added "wifi" to the patch title. --- drivers/net/wireless/ath/ath11k/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 35a5de3a0a8a..0ab2f190f1ec 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -1677,6 +1677,10 @@ void ath11k_core_pre_reconfigure_recovery(struct ath11k_base *ab) ath11k_mac_tx_mgmt_pending_free, ar); idr_destroy(&ar->txmgmt_idr); wake_up(&ar->txmgmt_empty_waitq); + + ar->monitor_vdev_id = -1; + clear_bit(ATH11K_FLAG_MONITOR_STARTED, &ar->monitor_flags); + clear_bit(ATH11K_FLAG_MONITOR_VDEV_CREATED, &ar->monitor_flags); } wake_up(&ab->wmi_ab.tx_credits_wq); -- 2.17.1