From patchwork Thu Jul 25 12:00:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13741838 X-Patchwork-Delegate: kvalo@adurom.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 199F22B9C8 for ; Thu, 25 Jul 2024 12:01:09 +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=1721908871; cv=none; b=Z0os9kqtvO2Pd91vhSmRXVqEYKIX8wm7OIu1/mkBvAtR2advEzM420rvsA8uamMp/hJHz7ufK9L8uQuwsHM1fDaDTWh/+OP/bvIMo/M292J8fGhcMPEnU29WvGqjhTySqYfQpU9aqspkzk3aKUqkj5Hq7KZsFVUbeRMnIy0FmRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721908871; c=relaxed/simple; bh=cIY2jwCkE2OYRXU9M5mdKA4mdfs6KOY6mugvWx5Ure4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ap5bHIUcPH3YiMmX35Az0d0L9O3Qhh2kCCpgLzHSC0AkOIiOcccIP1rBl8LehVkzhah24N0VKE91lLFiA3yI0VtfWfT6Sjs/UaxqVOws0uIWIQM9qwWTkwKdcxfIKZxy/umAWKgwaa1goZnlmSPZyBOzkTBZIgclq0bdz4jRxik= 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=ECWj+NcB; 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="ECWj+NcB" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46P8lleH016652; Thu, 25 Jul 2024 12:01:04 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= mBLOLkYK3twn2dBRiNAOTF8a9XA2IEwiwkv257OS/Qo=; b=ECWj+NcB5SOrsDZt kT3I+WXQGh2Tquuz9VoLxQ1PglD+tm/V2TOkmrk1JCZ0LyS1FgpGiQEzzBR19heI g8MJ9AKVhRs/UTTEpgEgt059gb6SGPFj34ABcbHN9k/FD/B5EsehTAzOcmWwfsSr Emi0lfgkqk25Igeh02TY0gd48cFdbKYgCXaT0MT4+uJ0Jg1qBlTUJ9mz8abeRAwa 9rMJXeJHhCEmjtPdQhWuC9u5K2nLaDobiaNJXj1HkNrNGh3v/0fmNWgLS44y89Ts Vo98bhjfuF3im+IVR5ZC5Rl55YLnjcQEq8X5QYRiXq2utjScpz7xE+wy2ePc/Ptb tf+cLg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40g5m759hp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jul 2024 12:01:03 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 46PC12lQ005117 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jul 2024 12:01:02 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; Thu, 25 Jul 2024 05:01:01 -0700 From: kangyang To: CC: , Subject: [PATCH 02/11] wifi: ath12k: optimize storage size for struct ath12k Date: Thu, 25 Jul 2024 20:00:26 +0800 Message-ID: <20240725120035.493-3-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20240725120035.493-1-quic_kangyang@quicinc.com> References: <20240725120035.493-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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: XbPSH-DtZgAsAUi59_wUuZqSt-DvGA8Y X-Proofpoint-ORIG-GUID: XbPSH-DtZgAsAUi59_wUuZqSt-DvGA8Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-25_11,2024-07-25_03,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 mlxscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2407250082 From: Kang Yang 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 Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/core.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 00c96d839a77..daf7c04bb728 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -525,17 +525,16 @@ 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; int vdev_id; int roc_freq; - bool roc_notify; + bool is_roc:1; + bool roc_notify:1; } scan; struct { @@ -615,7 +614,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; @@ -626,7 +624,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; @@ -638,16 +635,19 @@ struct ath12k { struct ath12k_debug debug; #endif - bool dfs_block_radar_events; - bool monitor_conf_enabled; - bool monitor_vdev_created; - bool monitor_started; int monitor_vdev_id; u32 freq_low; u32 freq_high; - bool nlo_enabled; + 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; }; struct ath12k_hw {