Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp497245rwe; Thu, 25 Aug 2022 04:23:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR6WmLl6n0BIR3GFDrnfvVgHiyO9RnVBzLYL40DbGdxyq7hLnzFxVJNF9iG/6ZHYfToD6X00 X-Received: by 2002:a63:5252:0:b0:42a:9680:bd9c with SMTP id s18-20020a635252000000b0042a9680bd9cmr2817249pgl.469.1661426626841; Thu, 25 Aug 2022 04:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661426626; cv=none; d=google.com; s=arc-20160816; b=UD6ngGkdu1irgG8KNdfSfk6pK/rblsTMgCfBVAZ44+aHnNNa1ga4qAB4DwPwS5nIBd L+e1WIRf9plsG04shfgj0/glS7c+V7ybx14rVk6uLG4KryRG3OKh+lHEfDYLHWVWDmvL BDwwc0OZM1MiMSmqrXLloZzkXxleKTVU21/GPXO3z3B1gfSl3IKcIhoy2nCgwQupSDKs tpMIl93aR/46/NfhUIyNEdkf15oi/RON0PS3ZAqsB4hM0flbktoypUNK8hN8xsQswJzH YSuV/B+4zR0OHPOQZsNA2/a1s/HvKPkxII/FmibuJpt/M83oygySsBzV/rTu8i4Kviio Gklg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gpOoq6K+fdQ+vkPooeACGPDLk/61cBBk1wvVavXaks4=; b=ChfhxfFWMyqneOhWJ9Ra0G/bTArafSbw9XG6OrLMdeyaATtIG2u8xzUHlc/WRt7hfc QAVa6ypbZOW4SODu4vCm33uvtc0hspeQEn1t87LxPwSmtEIIPncIA8ZjrbC47MEGBX+9 wQQyd3SSq7tLPglvzx9vNB94LGNJXteNYfOnjs+usPQJRp6HFLk7xI3o0N+XCzuzSTN2 oW0KpDagfnFxNrm5pDIIdodWoQZ9E/cO0c+o0KjO8xMO0WrPf9yHh5N40Sv4cUIH4yTs O3tWypHaeODvPCqpfih2spZNbZHNSLaxkzeVGlAhpzHiBsqxIK0X68y97TBiySh99xbb d0kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pNuysyc4; 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 b7-20020a170902d50700b00172ded6ff02si3330350plg.382.2022.08.25.04.23.38; Thu, 25 Aug 2022 04:23:46 -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=pNuysyc4; 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 S241427AbiHYLSv (ORCPT + 64 others); Thu, 25 Aug 2022 07:18:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239077AbiHYLSu (ORCPT ); Thu, 25 Aug 2022 07:18:50 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A618BAEDA3 for ; Thu, 25 Aug 2022 04:18:49 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27P4Q35O010129; Thu, 25 Aug 2022 11:18:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=gpOoq6K+fdQ+vkPooeACGPDLk/61cBBk1wvVavXaks4=; b=pNuysyc45QkKU1S8aEMWqEtHY88uZBnM99LHX841toYcVf9L+1J/Kf0n8wQn6szZ5tHe UBvUpv+yPEHmRRmd3le+mVDSXgPnvH6FdfczhLvD/cfQNLHPDSXJ1cz+0N/JJ9+7kctn TidrNkrDV+Z1ZTo3oqJCbA56e5kA5b4mWnlIVmir5EAnU5f1mX5duHl6WYyGHbedc9qF twVTr152SEpYLVx90w3LcD0fJRHF21GVhid8fJrCOpju23GCnc61PoneTF/ipK/K4/x4 RRa8kDRQ/NYVGsoitA8mXHSObvO8eY7CUnkiwEOJ88NVTZu3P7TxZvJb8AxD6/R+17Fy HA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j60etsawm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Aug 2022 11:18:44 +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 27PBIi0E017280 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Aug 2022 11:18:44 GMT Received: from mpubbise-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; Thu, 25 Aug 2022 04:18:42 -0700 From: Manikanta Pubbisetty To: CC: , Manikanta Pubbisetty Subject: [PATCH v2 4/4] ath11k: Fix failed to parse regulatory event print Date: Thu, 25 Aug 2022 16:48:18 +0530 Message-ID: <20220825111818.30869-5-quic_mpubbise@quicinc.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220825111818.30869-1-quic_mpubbise@quicinc.com> References: <20220825111818.30869-1-quic_mpubbise@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: gerrdOcMt0w5DMjOZdVMPZHFLGFplBt3 X-Proofpoint-ORIG-GUID: gerrdOcMt0w5DMjOZdVMPZHFLGFplBt3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-25_05,2022-08-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 mlxscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208250044 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 In the continuous WiFi ON/OFF scenario, we see a lot of "failed to parse regulatory event" prints on the console. This is because we already would have created a regulatory domain for the wiphy and we will discard the subsequent events to create the same regulatory event. Fix this error print by freeing up the regulatory resources in WiFi OFF and create the database again in WiFi ON. The same applies for hardware recovery as well. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Manikanta Pubbisetty --- drivers/net/wireless/ath/ath11k/core.c | 3 ++- drivers/net/wireless/ath/ath11k/reg.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 88a54b36e178..6002bd7b7799 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -1175,7 +1175,6 @@ static int ath11k_core_soc_create(struct ath11k_base *ab) static void ath11k_core_soc_destroy(struct ath11k_base *ab) { ath11k_debugfs_soc_destroy(ab); - ath11k_reg_free(ab); ath11k_qmi_deinit_service(ab); } @@ -1471,6 +1470,7 @@ static void ath11k_core_reconfigure_on_crash(struct ath11k_base *ab) mutex_unlock(&ab->core_lock); ath11k_dp_free(ab); + ath11k_reg_free(ab); ab->free_vdev_map = (1LL << (ab->num_radios * TARGET_NUM_VDEVS(ab))) - 1; } @@ -1844,6 +1844,7 @@ void ath11k_core_stop_device(struct ath11k_base *ab) ath11k_thermal_unregister(ab); ath11k_dp_pdev_free(ab); ath11k_dp_free(ab); + ath11k_reg_free(ab); } EXPORT_SYMBOL(ath11k_core_stop_device); diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c index 7ee3ff69dfc8..0aa4c7b039d0 100644 --- a/drivers/net/wireless/ath/ath11k/reg.c +++ b/drivers/net/wireless/ath/ath11k/reg.c @@ -757,5 +757,7 @@ void ath11k_reg_free(struct ath11k_base *ab) for (i = 0; i < ab->hw_params.max_radios; i++) { kfree(ab->default_regd[i]); kfree(ab->new_regd[i]); + ab->default_regd[i] = NULL; + ab->new_regd[i] = NULL; } } -- 2.37.1