Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6960512rdb; Tue, 2 Jan 2024 22:38:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmp+1P9SOZvP3kOmeKDhA+TtVWJa5Odc/3tLr3WMN/6N24Ul2wvFHlWOdilDRe5uyKy23j X-Received: by 2002:a05:6512:3e07:b0:50e:8e76:1324 with SMTP id i7-20020a0565123e0700b0050e8e761324mr1977507lfv.155.1704263906370; Tue, 02 Jan 2024 22:38:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704263906; cv=none; d=google.com; s=arc-20160816; b=HjpsZm3efeiFZiOzDgJsJJh7E4w1SpyMskUTv/nTUWSDUD99VTjCCS7RokuFg9ABFz 9ULftM9hS2qV8L01A2g2WNyObz0KrGaR4Lt0VtcRz+Gb6aSALQBIUmk9NMJYXkGSyhKg ekIg2efmVXu0o7ZzaRhBWBtC+nbzsaa9PXrYwvQUOJNGrOMVje665XUIMmwV/rxb6UG9 A5iZmakgADD5FtxGxLY3CpOmQDw2CAzC/cuXgUDQLAhSSbIfUlv158hcVjtcknwhVn7W 0tSuNJ+uEMSvLfTN6iQ9xImAfoy0qyguRjaWai04ezU17P1WkrN1YsxWIHD0ETxG4J3r B3RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HGHVdrRUvhAD4Acloe8QMpuEUKp8ardjCnqGgRckmLc=; fh=MxTMBbpPis+LJg6f98kFxxaQtu01YonzaHniHOzTjro=; b=DXTlTuvWANRMhxBOwIz3/SZJk+XVKdfkDGLAH6QP6shyDUkUn3d4LVga5foeHIYCQh TGTctN5WW+VYhtRAuSBsRsUCh46Jccp0p3OWh8JNYwNB0AHcQ++hYGUMF75Q3GmonTad RKKTNdi9VZ6O9CZbHVhQ6KkPZ9PzjbHKkyBHq2ohRI29vysjWIEmskVn7BqmFLfw8H5P FuDOmAz02j+5yNhWRLHliiI7CTm0cNSMW5r5DmmhP1R7WudHQznmCMD1P/nAueVYg/QX pDKP9EfDZvzvfdEIWzG8MA0pQjavq7hJ4+VoQljMthROfarttLfHFKVSGytlkBlf9Nvy /tog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QMJ60ewK; spf=pass (google.com: domain of linux-wireless+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t2-20020a50d702000000b00553afbd5672si11765393edi.448.2024.01.02.22.38.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 22:38:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QMJ60ewK; spf=pass (google.com: domain of linux-wireless+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EAE691F2283F for ; Wed, 3 Jan 2024 06:38:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F80F182AF; Wed, 3 Jan 2024 06:38:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="QMJ60ewK" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E498B182AB for ; Wed, 3 Jan 2024 06:38:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4034dqkW010226; Wed, 3 Jan 2024 06:37:59 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=HGHVdrRUvhAD4Acloe8QMpuEUKp8ardjCnqGgRckmLc=; b=QM J60ewK9iWvLv4oYEo+VGaZusVFI470cHgseQ+9sLT9Le4o1P6ii33A9DVL1qwnqt 96CjcE2Je1a40+BfQ6sDwYox6ijAqWSmp4ZkIb4f52UN0+aHQSfc5+9vHhKuCYKy PxlU5YKWFe010F8rPdg1VyHxVGEF/nqtv/+8/PjrtBB1ei6EUtEmyqx18WUEytWO p+IhdCSoR8j7BdWqF8bt/qGE8g6uOYruTh7/6Ffnz/uQcOASc2rqNUPQ2gsRxRTe bAV07zk6aEbstCuPILQnLdWVn/fVpSkvPPvLpIfZuRsCKFb7gOy5YOGnS+uTBCSe x3OM8TdOxjwvfSkU8IDw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vcbnb2sjx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jan 2024 06:37:59 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4036bwxD017723 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 3 Jan 2024 06:37:58 GMT Received: from hu-periyasa-blr.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.1118.40; Tue, 2 Jan 2024 22:37:56 -0800 From: Karthikeyan Periyasamy To: CC: , Karthikeyan Periyasamy Subject: [PATCH 05/10] wifi: ath12k: Refactor mac callback of stop Date: Wed, 3 Jan 2024 12:07:26 +0530 Message-ID: <20240103063731.3356060-6-quic_periyasa@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240103063731.3356060-1-quic_periyasa@quicinc.com> References: <20240103063731.3356060-1-quic_periyasa@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-ORIG-GUID: _gA52hO7VKB-NLowzMjtho-9AHqsKJcR X-Proofpoint-GUID: _gA52hO7VKB-NLowzMjtho-9AHqsKJcR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 mlxlogscore=797 mlxscore=0 bulkscore=0 impostorscore=0 suspectscore=0 clxscore=1015 malwarescore=0 spamscore=0 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401030052 To support single wiphy abstraction, introduce link/radio specific helper function in the mac80211 callback stop(). This way, the callback can be extended to handle multiple link/radio in the future. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Karthikeyan Periyasamy --- drivers/net/wireless/ath/ath12k/mac.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 31ed3d342741..0b72b32e25d4 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -5276,14 +5276,11 @@ int ath12k_mac_rfkill_enable_radio(struct ath12k *ar, bool enable) return 0; } -static void ath12k_mac_op_stop(struct ieee80211_hw *hw) +static void ath12k_mac_stop(struct ath12k *ar) { - struct ath12k *ar = hw->priv; struct htt_ppdu_stats_info *ppdu_stats, *tmp; int ret; - ath12k_mac_drain_tx(ar); - mutex_lock(&ar->conf_mutex); ret = ath12k_mac_config_mon_status_default(ar, false); if (ret && (ret != -ENOTSUPP)) @@ -5312,6 +5309,15 @@ static void ath12k_mac_op_stop(struct ieee80211_hw *hw) atomic_set(&ar->num_pending_mgmt_tx, 0); } +static void ath12k_mac_op_stop(struct ieee80211_hw *hw) +{ + struct ath12k *ar = hw->priv; + + ath12k_mac_drain_tx(ar); + + ath12k_mac_stop(ar); +} + static u8 ath12k_mac_get_vdev_stats_id(struct ath12k_vif *arvif) { -- 2.34.1