From patchwork Tue Jan 7 02:56:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13928021 X-Patchwork-Delegate: quic_jjohnson@quicinc.com 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 C1C231419A9 for ; Tue, 7 Jan 2025 02:56:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736218615; cv=none; b=vAwk2CQacayOF11wryAvo+GK3M7UcLJ+7N6BAVKwjyCQQ9s8UuheMgFKArRNonr4fGoW+IatBG4yQvqAvVexC95Ub/4ORuXSSr66DJWg8rZCTCHMnzw/erOMeGDgiH+1Zm9O+beIOpKNAMc/cCfsF2B/LZwgbY5/0mcd/hxzUhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736218615; c=relaxed/simple; bh=IWAuzZgCtSdAL3j6Dw6Jg/M747nR9KUhsrYibZyvg44=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Npa/VRrMFNPsF6Gvu12IRY70IY4EBLAuELmIWXPgrgYVeW3Kgghkqw/xqiB4unzuAdYbwoIu4usVxenBfH45OsKtmOWTLi6UBRRyHKwrf8YBcXZYo/oNrVy4by6DExxQZtm/Vb8JRILc5Efk2z4p8aZCmASklM6d9Y4MH1Hhajg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=GmfJ7dgt; arc=none smtp.client-ip=205.220.180.131 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="GmfJ7dgt" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 506GbZ8m006191; Tue, 7 Jan 2025 02:56:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= cGIviWtggc5YprwKyU6EcO5tiswcfTg6E33b3UJYhXA=; b=GmfJ7dgtYfTyB6x0 JCY58wuznO4dOyUPCbbEWewttVQv0IGeB8UTXFd9Kq3r2thubVaCM+uuPuj0kSI/ ofCZV1RMg0NlroQpOn3UOIoArS8f30JrmjE0IStHpJc0vg9e1eWTZZ2lA2+qfIGj A2JKHv6SfWT4J5sRC5Hoetrg2ojzVBz7ItquOCwG7oV9SyCVTxQQ66GQ26MVV7tg iQ1IHsrxLeI7Gus4ToHA3qScr7cKKeNJvrJvWCKmCny5dNR3yTi7RwRm5AaW8Pu+ oTwWdkDkqnFIhBP9NAEwWIZyFMN1vR0P5XyYvvEQOXUmq0/P971WVXlujiwPXX00 7bz+Cg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 440jv395nx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Jan 2025 02:56:46 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 5072ujf4002727 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 7 Jan 2025 02:56:45 GMT Received: from kangyang.ap.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 6 Jan 2025 18:56:44 -0800 From: Kang Yang To: CC: , Subject: [PATCH v6 1/3] wifi: ath12k: optimize storage size for struct ath12k Date: Tue, 7 Jan 2025 10:56:19 +0800 Message-ID: <20250107025621.1907-2-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20250107025621.1907-1-quic_kangyang@quicinc.com> References: <20250107025621.1907-1-quic_kangyang@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: eag2Is__YIiybi2_Rr3X522XfKnF0Zw8 X-Proofpoint-ORIG-GUID: eag2Is__YIiybi2_Rr3X522XfKnF0Zw8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 spamscore=0 bulkscore=0 phishscore=0 mlxscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501070022 Optimize storage size for struct ath12k by clean up bool variables. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang --- drivers/net/wireless/ath/ath12k/core.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index b789b375b891..41a51c7bad6c 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef ATH12K_CORE_H @@ -591,16 +591,15 @@ struct ath12k { u32 ht_cap_info; u32 vht_cap_info; struct ath12k_he ar_he; - bool supports_6ghz; struct { struct completion started; struct completion completed; struct completion on_channel; struct delayed_work timeout; enum ath12k_scan_state state; - bool is_roc; + bool is_roc:1; + bool roc_notify:1; int roc_freq; - bool roc_notify; struct wiphy_work vdev_clean_wk; struct ath12k_link_vif *arvif; } scan; @@ -679,7 +678,6 @@ struct ath12k { * However there are deviations from this rule. This flag is used to * avoid reporting garbage data. */ - bool ch_info_can_report_survey; struct survey_info survey[ATH12K_NUM_CHANS]; struct completion bss_survey_done; @@ -690,7 +688,6 @@ struct ath12k { struct ath12k_wow wow; struct completion target_suspend; - bool target_suspend_ack; struct ath12k_per_peer_tx_stats peer_tx_stats; struct list_head ppdu_stats_info; u32 ppdu_stat_list_depth; @@ -702,16 +699,20 @@ struct ath12k { struct ath12k_debug debug; #endif - bool dfs_block_radar_events; - bool monitor_conf_enabled; - bool monitor_vdev_created; - bool monitor_started; + bool supports_6ghz:1; + bool ch_info_can_report_survey:1; + bool target_suspend_ack:1; + bool dfs_block_radar_events:1; + bool monitor_conf_enabled:1; + bool monitor_vdev_created:1; + bool monitor_started:1; + bool nlo_enabled:1; + /* Add new boolean variable here. */ + int monitor_vdev_id; struct wiphy_radio_freq_range freq_range; - bool nlo_enabled; - struct completion mlo_setup_done; u32 mlo_setup_status; }; From patchwork Tue Jan 7 02:56:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13928023 X-Patchwork-Delegate: quic_jjohnson@quicinc.com 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 879AA195FEF for ; Tue, 7 Jan 2025 02:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736218619; cv=none; b=NXUnsWB6L/8srEHTsOjsZUXif6OnMOYLywaYYHEn3BRUgbkCLQmJIk6uTiFg13kgLOOwPrMcmjocPoGE9q58E8B2BQF70SL8C5VxuMSdPd3FmCPBCXyQ7dfvnG7s8651A53+KY91DJeUceV8nKAxD1FHR8WnDTXwx+CMcp5ZdPY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736218619; c=relaxed/simple; bh=NxcbufF+JHiGi2m/CayiB8X70iwxANddF3ubgyQ5p4Q=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TgoJWtYNfnjYljNdcuOG5pvoqWN4206a7tMWO/iX4+ysyE3LO5/i8nOoeR0J6tPz7dl8ZN0zF5cnr/aAjO2hWMuLT+N88Q4lIBLKARHVqGaNdvHfU4F2XG9YOubfpllbZ+sDBXYTi0nM8zDSikCpuVEI0JtkYx5Z7mhyNqIlSk4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=hB27PRMz; arc=none smtp.client-ip=205.220.180.131 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="hB27PRMz" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 506GbhTd006250; Tue, 7 Jan 2025 02:56:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Iihw2z/gsntGFzDqRbBold9m/eBZuQd8JtEqz0fFxkg=; b=hB27PRMzKYODHSTk bIlZ1r+gnI7mCIYFEeZ1GfimN4ZRFkVMJjhhpYulp3xxg1tKG1xYWNdBui4gai2v tCUNaApLdM6RlLygKmRAvNjwZVn+R8iaKOVOO7+PH2CJQaWQxUhyijfJzVvfEgXj rjF1vk858JQ3uDt85RouYO/7fQiFjXurLvJz8CuyaRle2krch7t9s3/lbeRDZ+u/ FTjMQUNS9Qb4sH/27o/ImcusjMZXbMF4jW0rExHDdbz+p/AIkJkRoM3EaLWwBAIg /VseTW8LpgPgcnalsbEg1zBBiojvIZBeaqfcxTLFTfmOPN06WDgDoZLjQBCvenCn 5gN3Tg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 440jv395p1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Jan 2025 02:56:48 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 5072ulZh018110 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 7 Jan 2025 02:56:47 GMT Received: from kangyang.ap.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 6 Jan 2025 18:56:45 -0800 From: Kang Yang To: CC: , Subject: [PATCH v6 2/3] wifi: ath12k: properly handling the state variables of monitor mode Date: Tue, 7 Jan 2025 10:56:20 +0800 Message-ID: <20250107025621.1907-3-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20250107025621.1907-1-quic_kangyang@quicinc.com> References: <20250107025621.1907-1-quic_kangyang@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: pdLc2T8Sp-bEiB3FvWfJW5DATEX344Dz X-Proofpoint-ORIG-GUID: pdLc2T8Sp-bEiB3FvWfJW5DATEX344Dz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 spamscore=0 bulkscore=0 phishscore=0 mlxscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501070022 Now monitor mode has some status variables, such as monitor_started, monitor_vdev_created. They are not always handled correctly. For monitor_started, it should be true when driver works in monitor mode, and should be false at other times. For monitor_vdev_id, it should be -1 when driver doesn't work in monitor mode. For monitor_vdev_created, it should be true after monitor vdev is created successfully and should be false at other times. For monitor_conf_enabled, it should be true when mac80211 sets IEEE80211_CONF_MONITOR, and should be false at other times. Handle those state variables according to above descriptions. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang --- drivers/net/wireless/ath/ath12k/core.c | 7 ++++++- drivers/net/wireless/ath/ath12k/mac.c | 13 ++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index 0c6b35aac96e..15c8a8dc0133 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -1261,6 +1261,11 @@ static void ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab) ath12k_mac_tx_mgmt_pending_free, ar); idr_destroy(&ar->txmgmt_idr); wake_up(&ar->txmgmt_empty_waitq); + + ar->monitor_vdev_id = -1; + ar->monitor_started = false; + ar->monitor_vdev_created = false; + ar->monitor_conf_enabled = false; } } diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 6f10813d9378..3c4ca240a15d 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -7947,6 +7947,9 @@ int ath12k_mac_vdev_create(struct ath12k *ar, struct ath12k_link_vif *arvif) goto err_peer_del; } break; + case WMI_VDEV_TYPE_MONITOR: + ar->monitor_vdev_created = true; + break; default: break; } @@ -7993,6 +7996,10 @@ int ath12k_mac_vdev_create(struct ath12k *ar, struct ath12k_link_vif *arvif) err_vdev_del: ath12k_wmi_vdev_delete(ar, arvif->vdev_id); + if (ahvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { + ar->monitor_vdev_created = false; + ar->monitor_vdev_id = -1; + } ar->num_created_vdevs--; arvif->is_created = false; arvif->ar = NULL; @@ -11057,6 +11064,10 @@ static void ath12k_mac_setup(struct ath12k *ar) ar->num_tx_chains = hweight32(pdev->cap.tx_chain_mask); ar->num_rx_chains = hweight32(pdev->cap.rx_chain_mask); ar->scan.arvif = NULL; + ar->monitor_vdev_id = -1; + ar->monitor_started = false; + ar->monitor_vdev_created = false; + ar->monitor_conf_enabled = false; spin_lock_init(&ar->data_lock); INIT_LIST_HEAD(&ar->arvifs); From patchwork Tue Jan 7 02:56:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13928022 X-Patchwork-Delegate: quic_jjohnson@quicinc.com 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 84FEB195FEC for ; Tue, 7 Jan 2025 02:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736218618; cv=none; b=Vc4yec1c/xVdLPDM8isDijrw2yn0HSKVTItMaqZGmSnFXerF9Xt8aa89L0Fo4yijDzFeJxAXTM4E5vX8efY12QrKhztJD8o2aodi3oB4jnWllV8OtG6oSSWVxVo9TU+Q6Pa55l1J2jLfqiLYxR0AzMJC6P0vIFZjhG8/ftRhLzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736218618; c=relaxed/simple; bh=+0I/+JHlvxi0GNxlB1P48E4FoZwFAH7dbhwJJmWBEf4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eeDUok9p5Xl7G74zK/VBazGjI46kLQ6rer1cOHXKcsdI1mB1QIcO7U9VrzMGK5p7oyYh/96LqOw7F4ls1K5Sk3pgfUhXezYR8qUBTWcaNSHqyteNYP6kVjXCy5ssXnf8sjrkDj7KHBT68DfkaOA59fzDTFnP0mJw76Rh+6NH7Gg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=ilLDSZEn; arc=none smtp.client-ip=205.220.180.131 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ilLDSZEn" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 506HrmGJ012208; Tue, 7 Jan 2025 02:56:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= PMIsY5x3PoCXltmEjUuC7GTHfxDBdc/13Rku0xl3rQo=; b=ilLDSZEnnfTFmFjZ xBQ3ii3eMt07A3i6SjEMYMncy18yvuO+ZMQXmUH+8gsy98y8GQAq6bmratZKd/2C rNh2Qw4T31wcN9V79VWvABXyRXdRTALve9aAJfHAQw0IVFDLE399C1hHID0bDNi2 sNvxs6dyNCvAy4lgM/yGoJBJFVZpB9/hLhd0QQYgTwbd0iW4T5lSSEo9jGyxbWdg s3I6fDsNQCiSQs9byXMqmydZ8RxbOQm8n0I8UNEit7fOuwBaoWORKOC9zAzxDF9J 32lnAXEOueABOblJNsM1XBquvJDsyfwYKkiLWUOFh+lkSdOWIZgy1A7vHGr5flWv HvXTqg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 440kyqh06h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Jan 2025 02:56:49 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 5072unPR032235 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 7 Jan 2025 02:56:49 GMT Received: from kangyang.ap.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 6 Jan 2025 18:56:47 -0800 From: Kang Yang To: CC: , Subject: [PATCH v6 3/3] wifi: ath12k: delete mon reap timer Date: Tue, 7 Jan 2025 10:56:21 +0800 Message-ID: <20250107025621.1907-4-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20250107025621.1907-1-quic_kangyang@quicinc.com> References: <20250107025621.1907-1-quic_kangyang@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: Vjk7nOLhzmzMYqZEgnlFEYnyd17CFqUM X-Proofpoint-GUID: Vjk7nOLhzmzMYqZEgnlFEYnyd17CFqUM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 impostorscore=0 malwarescore=0 adultscore=0 priorityscore=1501 mlxlogscore=785 clxscore=1015 phishscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501070022 Currently mon reap timer is not used, and it is not needed anymore. So remove related code. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang --- drivers/net/wireless/ath/ath12k/core.h | 2 -- drivers/net/wireless/ath/ath12k/dp.c | 30 +------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 41a51c7bad6c..ad2451fd7ce9 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -992,8 +992,6 @@ struct ath12k_base { struct ath12k_dbring_cap *db_caps; u32 num_db_cap; - struct timer_list mon_reap_timer; - struct completion htc_suspend; u64 fw_soc_drop_count; diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c index 9e5a4e75f2f6..f162f98e7b79 100644 --- a/drivers/net/wireless/ath/ath12k/dp.c +++ b/drivers/net/wireless/ath/ath12k/dp.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -982,11 +982,6 @@ void ath12k_dp_pdev_free(struct ath12k_base *ab) { int i; - if (!ab->mon_reap_timer.function) - return; - - del_timer_sync(&ab->mon_reap_timer); - for (i = 0; i < ab->num_radios; i++) ath12k_dp_rx_pdev_free(ab, i); } @@ -1024,27 +1019,6 @@ void ath12k_dp_hal_rx_desc_init(struct ath12k_base *ab) ab->hal_rx_ops->rx_desc_get_desc_size(); } -static void ath12k_dp_service_mon_ring(struct timer_list *t) -{ - struct ath12k_base *ab = from_timer(ab, t, mon_reap_timer); - int i; - - for (i = 0; i < ab->hw_params->num_rxdma_per_pdev; i++) - ath12k_dp_mon_process_ring(ab, i, NULL, DP_MON_SERVICE_BUDGET, - ATH12K_DP_RX_MONITOR_MODE); - - mod_timer(&ab->mon_reap_timer, jiffies + - msecs_to_jiffies(ATH12K_MON_TIMER_INTERVAL)); -} - -static void ath12k_dp_mon_reap_timer_init(struct ath12k_base *ab) -{ - if (ab->hw_params->rxdma1_enable) - return; - - timer_setup(&ab->mon_reap_timer, ath12k_dp_service_mon_ring, 0); -} - int ath12k_dp_pdev_alloc(struct ath12k_base *ab) { struct ath12k *ar; @@ -1055,8 +1029,6 @@ int ath12k_dp_pdev_alloc(struct ath12k_base *ab) if (ret) goto out; - ath12k_dp_mon_reap_timer_init(ab); - /* TODO: Per-pdev rx ring unlike tx ring which is mapped to different AC's */ for (i = 0; i < ab->num_radios; i++) { ar = ab->pdevs[i].ar;