From patchwork Thu Oct 17 03:10:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 836649 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 BCBF021E3C1 for ; Thu, 17 Oct 2024 03:11:31 +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=1729134694; cv=none; b=BbM/ikFFL3G+GYHYepLkM1BGQBF+9HSdArrAMf4mzHEVjulxZZ54UcwMRH3UTF7zhg5lgzoQrTWDP5U55pz51HiOj+P/du3KV/Ar1LqWttc5y7z5VSXaLzZkmbt8ZpEiEgyP0zfNJQcHCU5pkSqySKGuv1oWJEYjB8Z1I+uGUAw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134694; c=relaxed/simple; bh=5NEJTAfXtZrfBW2CAWyLMZUwKWso/wjLR88iCkpE1TA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FnnuNR7LQhPD/u53Bk4N5qhjk7zKLeB2/Prq/LIcF2eRbHy0xoN742NJUANgwsGP1YwVcr2/oP7x77sH+XJdsgMS5mCylNrkwZIj1dZPXU6mMmGUse6JqrwWuyfOpEHAj6XLerrVH2JwXHFgg99gU8ikAbSwru22hhT2nM4FvV0= 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=CXazx3gP; 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="CXazx3gP" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49GJUTtE011294; Thu, 17 Oct 2024 03:11:25 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= i67x8h0pCZwMp06Ij9CD2QZUgJ1r4Q3XnI8Nri2aKu4=; b=CXazx3gPQ915NyOa fbmUqF1VA0LsKoN1/VUmO5G/iabS/RDREJMGqk8nvyJsSJyiKXmAymovJEnx6wI9 cULVc1uWIVE8z1AAVOoUAzLAPyTC0Q15ZPpv38iY2YldHbExf0QyX/QUUwMcUEGL dn+l8fBaaK21Z8RKZCLLLL5OWfoGcvo29uVbCJQxtQM8ODGGVxTc2de500kJuRvn eTIeIr69foZrKZR4kle6k5dkJjtom0bD4Nwxy9Gjk72uBmGHZuEt+Kq4UCatuSHN XaXiHz+cFCEHSpYm8sRj/k/E20WtcvEAtXF4f368ygY4AMueoeit/EgGTXHDC9Sr m+AutA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42abm5jjdw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:25 +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 49H3BOhJ030057 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:24 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; Wed, 16 Oct 2024 20:11:22 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 01/11] wifi: ath12k: remove unused variable monitor_present Date: Thu, 17 Oct 2024 11:10:46 +0800 Message-ID: <20241017031056.1714-2-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: QjYldwoQPi0sK9cAvaSo0X1ndspQLnND X-Proofpoint-GUID: QjYldwoQPi0sK9cAvaSo0X1ndspQLnND 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 malwarescore=0 adultscore=0 clxscore=1015 impostorscore=0 mlxscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 spamscore=0 mlxlogscore=799 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170021 Variable monitor_present is never used. So delete it. 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 | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 06b637ba8b8f..8833c83d0292 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -586,7 +586,6 @@ struct ath12k { u32 chan_tx_pwr; u32 num_stations; u32 max_num_stations; - bool monitor_present; /* protects the radio specific data like debug stats, ppdu_stats_info stats, * vdev_stop_status info, scan data, ath12k_sta info, ath12k_link_vif info, From patchwork Thu Oct 17 03:10:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 837049 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 568E01F94D for ; Thu, 17 Oct 2024 03:11:33 +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=1729134694; cv=none; b=dHz6lrObpa6o4Xl+wQEOP8N5iktIubIH9qr3go5oSu8EP1MlrzClVL5E1l2MNxfra+JNgqDCOThShBJXdW4gXIg09suw34rRkl1Tq7WcH7MuX3u3RsbJd+q/CQbx5Zha2FflwZeut/SOAytSZzh+2NqC+lzCV2ubZvSN2Xx7I/w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134694; c=relaxed/simple; bh=raOc72T5ow4Nf56MpMheJBa2FVZfsRP2fgdYpGJCxfc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=a4Tw+Cgg3tH9UhEPHzSTZOMdcV7edaBVGex7sUVBarOZximgMDhlXP24Yr5uS3TG0d7A9i+3LFuJrbThAQ0nPoVRqFQq2iem6NalsIQh09bhH9sSeENxs5cPEc3PoCg7jZYEV1rGjKqw2xA6hollesO9BVsj5Xfh9oPrHbdZJas= 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=QxLPVhPo; 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="QxLPVhPo" 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 49GH6wYd014541; Thu, 17 Oct 2024 03:11:27 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= 4I+vndbtgVku40LQdwDgvR9tyqELjUdRDLpVbpuiwHQ=; b=QxLPVhPozLaibTLF O1YfoVXs4yqyYZMhYQva5k6/kQsTGx9+Ix04cSDGKywgu6QDxMvcjEtqV3sjChcO 7jzQt2sJ6r8RsuT3wt84w5ZBXBUUw0DLMPilRkNvMHCZGrwpgvz2mvXlwcDEJFeh rHDh5eqV6lQea8hGmAe1q1xo2WrAIrASW0ZWOJoPeEJIQN0+WQlAldp9Sbc2rrnr t+qHMVN28ZrTIzGBuXmiBN6KizXJM7IyYyd6ozPaORGbVQ0YbwuYppwPSTkRxTch gSWKlz6Yt989+whZpXL9YGZaFAhGUhxqu2vnfud0llUWHNVo2pgmMS19wNrW/dkR kjhdzg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42a79hbbc8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:26 +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 49H3BPWq025668 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:25 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; Wed, 16 Oct 2024 20:11:24 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 02/11] wifi: ath12k: optimize storage size for struct ath12k Date: Thu, 17 Oct 2024 11:10:47 +0800 Message-ID: <20241017031056.1714-3-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: BfEauYCOjfgKCmOOqftMhl2mGhefTi5Q X-Proofpoint-ORIG-GUID: BfEauYCOjfgKCmOOqftMhl2mGhefTi5Q 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 phishscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 adultscore=0 mlxscore=0 spamscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170021 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 | 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 8833c83d0292..18820c23cfaa 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -556,17 +556,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 { @@ -643,7 +642,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; @@ -654,7 +652,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; @@ -666,16 +663,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 { From patchwork Thu Oct 17 03:10:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 837045 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 A6B0A13541B for ; Thu, 17 Oct 2024 03:11:46 +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=1729134708; cv=none; b=ejnZ3g5vDqPoxm7CZyRO+vZpNHGDEdVkH5PqQmBglKHCf1AEnhz5gSs2fG1THS+58NiLdRwYNnqgkUV35wewzhKuPl4uHv06wcDSf7Bai+vaAzEtD0tXHG41Ex9wpMErNPGyEyakuCaLH1uZWQjedD1sflVJ7xV5ZZQRlTW9gn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134708; c=relaxed/simple; bh=ybTMlYb/c48nyJUECSplkelm8pZ6bdMKJkWZDZuAjts=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ucLn4t1wVdbtM5TO+g9CrihNnEWEO5u/2QMJcPhCyTjZTTRN09uIppj/RodOUeFxt+YMx7jJrH5P6x7n3isoGI8B9vxMCKhWyzJfbztA0od5LRoSmc3eib55GO12wnQsOF1mkd723JOPW+/+0Xj4Qp8Tv59Egp+g4XvfA6Kw5SQ= 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=dNHOociN; 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="dNHOociN" 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 49GKHLQd012632; Thu, 17 Oct 2024 03:11:40 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= PYATHTB8gDq85qeJy5EQocHka/EQkjkJdmJZwQKIeg8=; b=dNHOociNexdnrbjX gMp6ZXhncrgzjKnVzBJIu6qXfGOu6KM3Rdj64feNuZE/tsWspaOTmz20v7N73XG6 pCGWgvyAAGmQwi54Qwe2EqQIru/uzXDpSWZv8TCRs4C/WdZh9EOCPcQGG3LVPtIq LGStn2Bv1OBDjWjUxMeC0AZtehGX/44hotEcZ8HCgEKcNXUBeGttpGFMdRYU8vWA ZlnamZ3m+MmKFaLapi1Zvi7fHrkV6stOSGOOzVUlERYiJFJXRr6k1528uZU/TuWy gQg/mmp7v7Op5kC+pultaivHrRO3gAqBmy48QqnNtnL4mhYEFaW89dCc3UowANUz 6gKapg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42abbxtm77-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:39 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49H3BRhR005937 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:27 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; Wed, 16 Oct 2024 20:11:26 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 03/11] wifi: ath12k: fix struct hal_rx_ppdu_end_user_stats Date: Thu, 17 Oct 2024 11:10:48 +0800 Message-ID: <20241017031056.1714-4-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: dYBwSbKEz0VtrBoXIwgRRLndmVDZEAt9 X-Proofpoint-GUID: dYBwSbKEz0VtrBoXIwgRRLndmVDZEAt9 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 phishscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxscore=0 mlxlogscore=824 bulkscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 adultscore=2 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170022 Current struct hal_rx_ppdu_end_user_stats in hal_rx.h is not matched with hardware descriptor definition. So update this structure and 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/dp_mon.c | 10 +++++----- drivers/net/wireless/ath/ath12k/hal_rx.h | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c index f688f4ad5168..8aef25c0d98b 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -21,20 +21,20 @@ static void ath12k_dp_mon_rx_handle_ofdma_info(void *rx_tlv, __le32_to_cpu(ppdu_end_user->usr_resp_ref_ext); } -static void +static inline void ath12k_dp_mon_rx_populate_byte_count(const struct hal_rx_ppdu_end_user_stats *stats, void *ppduinfo, struct hal_rx_user_status *rx_user_status) { - u32 mpdu_ok_byte_count = __le32_to_cpu(stats->mpdu_ok_cnt); - u32 mpdu_err_byte_count = __le32_to_cpu(stats->mpdu_err_cnt); + u32 mpdu_ok_byte_count = __le32_to_cpu(stats->info7); + u32 mpdu_err_byte_count = __le32_to_cpu(stats->info8); rx_user_status->mpdu_ok_byte_count = u32_get_bits(mpdu_ok_byte_count, - HAL_RX_PPDU_END_USER_STATS_MPDU_DELIM_OK_BYTE_COUNT); + HAL_RX_PPDU_END_USER_STATS_INFO7_MPDU_OK_BYTE_COUNT); rx_user_status->mpdu_err_byte_count = u32_get_bits(mpdu_err_byte_count, - HAL_RX_PPDU_END_USER_STATS_MPDU_DELIM_ERR_BYTE_COUNT); + HAL_RX_PPDU_END_USER_STATS_INFO8_MPDU_ERR_BYTE_COUNT); } static void diff --git a/drivers/net/wireless/ath/ath12k/hal_rx.h b/drivers/net/wireless/ath/ath12k/hal_rx.h index 095216eabc01..837ba4adba88 100644 --- a/drivers/net/wireless/ath/ath12k/hal_rx.h +++ b/drivers/net/wireless/ath/ath12k/hal_rx.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-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef ATH12K_HAL_RX_H @@ -240,13 +240,13 @@ struct hal_rx_ppdu_start { __le32 ppdu_start_ts; } __packed; -#define HAL_RX_PPDU_END_USER_STATS_INFO0_MPDU_CNT_FCS_ERR GENMASK(25, 16) +#define HAL_RX_PPDU_END_USER_STATS_INFO0_MPDU_CNT_FCS_ERR GENMASK(26, 16) -#define HAL_RX_PPDU_END_USER_STATS_INFO1_MPDU_CNT_FCS_OK GENMASK(8, 0) -#define HAL_RX_PPDU_END_USER_STATS_INFO1_FC_VALID BIT(9) -#define HAL_RX_PPDU_END_USER_STATS_INFO1_QOS_CTRL_VALID BIT(10) -#define HAL_RX_PPDU_END_USER_STATS_INFO1_HT_CTRL_VALID BIT(11) -#define HAL_RX_PPDU_END_USER_STATS_INFO1_PKT_TYPE GENMASK(23, 20) +#define HAL_RX_PPDU_END_USER_STATS_INFO1_MPDU_CNT_FCS_OK GENMASK(10, 0) +#define HAL_RX_PPDU_END_USER_STATS_INFO1_FC_VALID BIT(11) +#define HAL_RX_PPDU_END_USER_STATS_INFO1_QOS_CTRL_VALID BIT(12) +#define HAL_RX_PPDU_END_USER_STATS_INFO1_HT_CTRL_VALID BIT(13) +#define HAL_RX_PPDU_END_USER_STATS_INFO1_PKT_TYPE GENMASK(24, 21) #define HAL_RX_PPDU_END_USER_STATS_INFO2_AST_INDEX GENMASK(15, 0) #define HAL_RX_PPDU_END_USER_STATS_INFO2_FRAME_CTRL GENMASK(31, 16) @@ -262,8 +262,8 @@ struct hal_rx_ppdu_start { #define HAL_RX_PPDU_END_USER_STATS_INFO6_TID_BITMAP GENMASK(15, 0) #define HAL_RX_PPDU_END_USER_STATS_INFO6_TID_EOSP_BITMAP GENMASK(31, 16) -#define HAL_RX_PPDU_END_USER_STATS_MPDU_DELIM_OK_BYTE_COUNT GENMASK(24, 0) -#define HAL_RX_PPDU_END_USER_STATS_MPDU_DELIM_ERR_BYTE_COUNT GENMASK(24, 0) +#define HAL_RX_PPDU_END_USER_STATS_INFO7_MPDU_OK_BYTE_COUNT GENMASK(24, 0) +#define HAL_RX_PPDU_END_USER_STATS_INFO8_MPDU_ERR_BYTE_COUNT GENMASK(24, 0) struct hal_rx_ppdu_end_user_stats { __le32 rsvd0[2]; @@ -278,9 +278,9 @@ struct hal_rx_ppdu_end_user_stats { __le32 usr_resp_ref; __le32 info6; __le32 rsvd3[4]; - __le32 mpdu_ok_cnt; + __le32 info7; __le32 rsvd4; - __le32 mpdu_err_cnt; + __le32 info8; __le32 rsvd5[2]; __le32 usr_resp_ref_ext; __le32 rsvd6; From patchwork Thu Oct 17 03:10:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 837048 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 11C461369B6 for ; Thu, 17 Oct 2024 03:11:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134699; cv=none; b=KTuDwO4kDFxgfLhsR8RHYaH5TxqZRyRbh3kfWk6E3wB4uFOOr1xLNM3QO61Tuc+h4H/bwY/F4O4rwwTSyj9u7uycsRQPCDyqlBtYPuNIHnxDakKCihYk4igJXRqZofSfsARQdfHq9mtUthQrbAiD2HIfrxHeN4j2pxOURTY5V4U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134699; c=relaxed/simple; bh=cEGioahY18EnS5cuBujQ3ugzimiD1Ne8Gkgg7tmhxx4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DEv1Kly7CVrkIgE1esnzUe/SVMrec6cquW1FQtJCF+xJLuqr+I4jIF1lMrQ50mCLS4PwCMK0FvAjXOfxH4ZUSNMQagHrGhWKHwigMirV7wOIqfuilUEnzzv4LsK0R/zFht0Va+eEFnMn+NzBMX1TdUE6zH8deIXuZzZQlf5oiRU= 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=g8zkiCFP; arc=none smtp.client-ip=205.220.168.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="g8zkiCFP" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49H0N3XE010214; Thu, 17 Oct 2024 03:11:32 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= +bg4DQm+o1iu3+6gh9EP74GfIJYafrQpfWXfGTw9kWc=; b=g8zkiCFPXTrrTU46 zRIzKKsblBRZUdiZfTKvszAzVex4nVcpP9MbVPwYsaVtuxikfADsWC3BL+1Ja7eH pafMl+3iRMBQtdILMSc4aregPAKg2uQ60ez4AFKRiGgNXdZSQQWwxN5rVw0r7nhY qB+bztjMwUuHsqCkNRXHe6UvZtK5UwBfji0aJZ4thELYpa0B+hFOrb0JW1cQkG9O a0m99H+mzj8+2D/Q3jZZeHBa8rIecQtqH/LaCxXy9qbqE+7IEti+3Yie5Mvl/QOU uJXOuo5uw5K9Tc9R5MvP08ZDogrLiGDNhXXQ/7G3c3XuNWpWbWoeZSl/uMIAxN7Y tBwiQg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42ar050bnu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:31 +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 49H3BT5x030626 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:29 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; Wed, 16 Oct 2024 20:11:27 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 04/11] wifi: ath12k: fix struct hal_rx_ppdu_start Date: Thu, 17 Oct 2024 11:10:49 +0800 Message-ID: <20241017031056.1714-5-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: av_JuG7__kkrl1v7Um2ezJE0lxiLylCq X-Proofpoint-ORIG-GUID: av_JuG7__kkrl1v7Um2ezJE0lxiLylCq 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 phishscore=0 mlxlogscore=543 clxscore=1015 spamscore=0 suspectscore=0 bulkscore=0 adultscore=1 priorityscore=1501 mlxscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170022 Current struct hal_rx_ppdu_start in hal_rx.h is not matched with hardware descriptor definition. So update this structure and 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/dp_mon.c | 16 ++++++++++++---- drivers/net/wireless/ath/ath12k/hal_rx.h | 11 ++++++++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c index 8aef25c0d98b..86796efe5acd 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -593,12 +593,20 @@ ath12k_dp_mon_rx_parse_status_tlv(struct ath12k_base *ab, struct hal_rx_ppdu_start *ppdu_start = (struct hal_rx_ppdu_start *)tlv_data; + u64 ppdu_ts = __le32_to_cpu(ppdu_start->ppdu_start_ts_31_0) | + (u64)(__le32_to_cpu(ppdu_start->ppdu_start_ts_63_32)) << 32; + info[0] = __le32_to_cpu(ppdu_start->info0); - ppdu_info->ppdu_id = - u32_get_bits(info[0], HAL_RX_PPDU_START_INFO0_PPDU_ID); - ppdu_info->chan_num = __le32_to_cpu(ppdu_start->chan_num); - ppdu_info->ppdu_ts = __le32_to_cpu(ppdu_start->ppdu_start_ts); + ppdu_info->ppdu_id = u32_get_bits(info[0], + HAL_RX_PPDU_START_INFO0_PPDU_ID); + + info[1] = __le32_to_cpu(ppdu_start->info1); + ppdu_info->chan_num = u32_get_bits(info[1], + HAL_RX_PPDU_START_INFO1_CHAN_NUM); + ppdu_info->freq = u32_get_bits(info[1], + HAL_RX_PPDU_START_INFO1_CHAN_FREQ); + ppdu_info->ppdu_ts = ppdu_ts; if (ppdu_info->ppdu_id != ppdu_info->last_ppdu_id) { ppdu_info->last_ppdu_id = ppdu_info->ppdu_id; diff --git a/drivers/net/wireless/ath/ath12k/hal_rx.h b/drivers/net/wireless/ath/ath12k/hal_rx.h index 837ba4adba88..6ab33d5f1b2a 100644 --- a/drivers/net/wireless/ath/ath12k/hal_rx.h +++ b/drivers/net/wireless/ath/ath12k/hal_rx.h @@ -156,6 +156,7 @@ struct hal_rx_mon_ppdu_info { u32 preamble_type; u32 mpdu_len; u16 chan_num; + u16 freq; u16 tcp_msdu_count; u16 tcp_ack_msdu_count; u16 udp_msdu_count; @@ -232,12 +233,16 @@ struct hal_rx_mon_ppdu_info { u8 medium_prot_type; }; -#define HAL_RX_PPDU_START_INFO0_PPDU_ID GENMASK(15, 0) +#define HAL_RX_PPDU_START_INFO0_PPDU_ID GENMASK(15, 0) +#define HAL_RX_PPDU_START_INFO1_CHAN_NUM GENMASK(15, 0) +#define HAL_RX_PPDU_START_INFO1_CHAN_FREQ GENMASK(31, 16) struct hal_rx_ppdu_start { __le32 info0; - __le32 chan_num; - __le32 ppdu_start_ts; + __le32 info1; + __le32 ppdu_start_ts_31_0; + __le32 ppdu_start_ts_63_32; + __le32 rsvd[2]; } __packed; #define HAL_RX_PPDU_END_USER_STATS_INFO0_MPDU_CNT_FCS_ERR GENMASK(26, 16) From patchwork Thu Oct 17 03:10:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 837044 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 0A46D7DA8C for ; Thu, 17 Oct 2024 03:11: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=1729134714; cv=none; b=lOBr3vDeaN14vf0BNFDl/Ga5jL4esRh/Bp48Kw51Lj+SueisHR2tXsY9r4OhS2TZsqTKQEKtQG548QCvD2efZCa0RSfzP6CCPlRIJ6jGLEev2MT3+Abmi0GaQqfQmlmloeaI6HCNK2kXrFoHGlf+1eqenOw9Hf64UcNyRdG8msk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134714; c=relaxed/simple; bh=QTYefpnBwfaxpDtw0++ToLEhdw1pZGmECljvIpNcMjU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ej2nNB2t8WJqg1m31DxDxFsRo2+S2+yprOWPPel9kursplswHSEVczOT/T59IKQDdEAIgXa9cOyGg6Qroacc+8tdxf4FoAXgQ5h/a2zlMpQn+yindpwwuB/22oNc+IeP1P/PHkej6d6X81baJsCG93wC6octLtKi9YJfSmTdUf8= 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=oMPQXKRt; 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="oMPQXKRt" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49GJUTtF011294; Thu, 17 Oct 2024 03:11: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= h2GHgVg/3zq8bX7NDyb+J1q4oiSCPQ9ILV8FM+pjKgw=; b=oMPQXKRtlZHnZ8Kh SZsQa2nAZYlyB2Jzh3snQ5SciVv5u/L58k0mrjDIyYQd1CIdQJ1P03p5X9ESiyD0 oY5Pd8E8mNnSHnB1yjJXQqjgDb3C7f9S61vYHn6Shr9iYTWPADj56TiW57tJhmhW uSwwky4DyNzRClbO7bITIE6gRQkqY+BPqsX1eaIyIti6zi/IAu6XqgNa+Tl+BmR1 Ax5r39YPMXoU3k50N3fW4wy/UUZG/IDIbDAfYke5GEHF5tEDF2vToqUYfA5vMMTb aiCZnj5+ofPyKo+8Q2xxKl8ukDCAJoZRCm+ZTkAC+C4z/KK0gLpscyDqeTITyo36 aDDseA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42abm5jje9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:46 +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 49H3BUM0025706 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:30 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; Wed, 16 Oct 2024 20:11:29 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 05/11] wifi: ath12k: fix struct hal_rx_phyrx_rssi_legacy_info Date: Thu, 17 Oct 2024 11:10:50 +0800 Message-ID: <20241017031056.1714-6-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: LJ9EBdnRi4A-2DXq7lkva3HC2RWeSZTn X-Proofpoint-GUID: LJ9EBdnRi4A-2DXq7lkva3HC2RWeSZTn 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 malwarescore=0 adultscore=0 clxscore=1015 impostorscore=0 mlxscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 spamscore=0 mlxlogscore=811 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170022 Current struct hal_rx_phyrx_rssi_legacy_info in hal_rx.h is not matched with hardware descriptor definition. So update this structure and 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/dp_mon.c | 25 ++++++------------------ drivers/net/wireless/ath/ath12k/hal_rx.h | 9 ++++++--- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c index 86796efe5acd..0232fe49764c 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -734,33 +734,20 @@ ath12k_dp_mon_rx_parse_status_tlv(struct ath12k_base *ab, case HAL_PHYRX_RSSI_LEGACY: { struct hal_rx_phyrx_rssi_legacy_info *rssi = (struct hal_rx_phyrx_rssi_legacy_info *)tlv_data; - u32 reception_type = 0; - u32 rssi_legacy_info = __le32_to_cpu(rssi->rsvd[0]); info[0] = __le32_to_cpu(rssi->info0); + info[1] = __le32_to_cpu(rssi->info1); /* TODO: Please note that the combined rssi will not be accurate * in MU case. Rssi in MU needs to be retrieved from * PHYRX_OTHER_RECEIVE_INFO TLV. */ ppdu_info->rssi_comb = - u32_get_bits(info[0], - HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RSSI_COMB); - reception_type = - u32_get_bits(rssi_legacy_info, - HAL_RX_PHYRX_RSSI_LEGACY_INFO_RSVD1_RECEPTION); - - switch (reception_type) { - case HAL_RECEPTION_TYPE_ULOFMDA: - ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_MU_OFDMA; - break; - case HAL_RECEPTION_TYPE_ULMIMO: - ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_MU_MIMO; - break; - default: - ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_SU; - break; - } + u32_get_bits(info[1], + HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB); + + ppdu_info->bw = u32_get_bits(info[0], + HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RX_BW); break; } case HAL_RXPCU_PPDU_END_INFO: { diff --git a/drivers/net/wireless/ath/ath12k/hal_rx.h b/drivers/net/wireless/ath/ath12k/hal_rx.h index 6ab33d5f1b2a..c69df852ae69 100644 --- a/drivers/net/wireless/ath/ath12k/hal_rx.h +++ b/drivers/net/wireless/ath/ath12k/hal_rx.h @@ -441,12 +441,15 @@ enum hal_rx_ul_reception_type { HAL_RECEPTION_TYPE_FRAMELESS }; -#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RSSI_COMB GENMASK(15, 8) -#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_RSVD1_RECEPTION GENMASK(3, 0) +#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RECEPTION GENMASK(3, 0) +#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RX_BW GENMASK(7, 5) +#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB GENMASK(15, 8) struct hal_rx_phyrx_rssi_legacy_info { - __le32 rsvd[35]; __le32 info0; + __le32 rsvd0[39]; + __le32 info1; + __le32 rsvd1; } __packed; #define HAL_RX_MPDU_START_INFO0_PPDU_ID GENMASK(31, 16) From patchwork Thu Oct 17 03:10:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 836646 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 58FF113A40D for ; Thu, 17 Oct 2024 03:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134701; cv=none; b=JIT61mVdkgtW3L367VdWW4ktbdPzfm1knjxMsWXIKgTV9MyA5BCM7Mvtpsva5brXE9+9MpQDsp6E3sbHdAqdStrlyeo2cXVwgPsoWuWTGw0Y2zC3qIyEDdhYAFISBYYGQEfxz3YlFfTsmANQxUb50ZtIhdlOxBO3LCfAOf+sT8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134701; c=relaxed/simple; bh=uz74VTpHEFmnkpY8l6yjOY26MylYcFGzA0qy8tI4djc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WeqAuQIaV5TUaXayTdEF9IXWnZdX0UR6a7Z3vEeXg9mSSGK4ptHeX6c2G6ev1lrSUIm/qGs5DM4r4pU5sYwgbu2bjxrMPCXoQ/lNtHGEy7KHYC1jJZZjBs0N14q8x+Qdj+PnlurlZSDlqneJikFFfO6h1VYvvUd6XDuFgRpnMtY= 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=nPpIWX0P; arc=none smtp.client-ip=205.220.168.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="nPpIWX0P" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49GFVZ2c026699; Thu, 17 Oct 2024 03:11:33 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= sJEn4r5GPs/o23DpmP8yG0gTbw4JKLdP7cf2Ql1BpkU=; b=nPpIWX0PHf9nicqY Grs/JU01mm4lalDZke/qUKfCBva/C1bh3qtq3e2PQVJ5WrO1nhrDJ+/kw4i4zE70 ASkFK28nGZzFwOXoSxyDvrYltM0zMDvw/dAhf0dS/eBGlbMCEz9j6QTN20xs55Zn 9sHfqmZNzqJ4WsxGFSF8l35ZM269segviRpN2yuWUKnoxFvk7w6u8RDYR6Gq8H4p fAXCnOYnXfFh8CMFm1sS2qs00taedb9SqylhgG2V2tW7CrgGJrA4e3Dj3XW4MazX kCJ8aB2SjnNeLEvoP+j+iaWWcOCUmIljKZuQiXLFUxKdSnGp4lY71ehQfLQ+pNDQ A7mj4w== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42a8w6k5n5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:32 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49H3BWuD020902 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:32 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; Wed, 16 Oct 2024 20:11:30 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 06/11] wifi: ath12k: fix struct hal_rx_mpdu_start Date: Thu, 17 Oct 2024 11:10:51 +0800 Message-ID: <20241017031056.1714-7-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: ZegQ25W21xXr0kyQjAaThXXexVLWND3Q X-Proofpoint-ORIG-GUID: ZegQ25W21xXr0kyQjAaThXXexVLWND3Q 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 spamscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=643 malwarescore=0 impostorscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170021 Current struct hal_rx_mpdu_start in hal_rx.h is not matched with hardware descriptor definition. So update this structure and 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/hal_rx.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/hal_rx.h b/drivers/net/wireless/ath/ath12k/hal_rx.h index c69df852ae69..2de7b0eba9f2 100644 --- a/drivers/net/wireless/ath/ath12k/hal_rx.h +++ b/drivers/net/wireless/ath/ath12k/hal_rx.h @@ -452,15 +452,16 @@ struct hal_rx_phyrx_rssi_legacy_info { __le32 rsvd1; } __packed; -#define HAL_RX_MPDU_START_INFO0_PPDU_ID GENMASK(31, 16) -#define HAL_RX_MPDU_START_INFO1_PEERID GENMASK(31, 16) -#define HAL_RX_MPDU_START_INFO2_MPDU_LEN GENMASK(13, 0) +#define HAL_RX_MPDU_START_INFO0_PPDU_ID GENMASK(31, 16) +#define HAL_RX_MPDU_START_INFO1_PEERID GENMASK(31, 16) +#define HAL_RX_MPDU_START_INFO2_MPDU_LEN GENMASK(13, 0) struct hal_rx_mpdu_start { + __le32 rsvd0[9]; __le32 info0; __le32 info1; - __le32 rsvd1[11]; + __le32 rsvd1[2]; __le32 info2; - __le32 rsvd2[9]; + __le32 rsvd2[16]; } __packed; #define HAL_RX_PPDU_END_DURATION GENMASK(23, 0) From patchwork Thu Oct 17 03:10:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 836645 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 4D7AD21E3C1 for ; Thu, 17 Oct 2024 03:11:46 +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=1729134707; cv=none; b=dSoFbwNleGtHP2g4PQkDKPBhuIqhMjybRtXxWlpAuFWCVPVj8y8KsNtW6G8cf7bWWSA2cUZVD0zzd7DGAFQE1tsvqjCPcv/WxG5il9b4JcuM2YWsGYYG22iOkgdfNWn+x20yNdIjT4GBA6Vzfm1+clCYL7vKmcrJ3qLOcXdI5/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134707; c=relaxed/simple; bh=L+VezoBRasd0ogBpgQvczui1ECV/GEA3/NjmLd1Vwuo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KYvJtJw9x3BRDxedJmIpL2rHjToG+NADYnEVfDTDYO8rN0iTVGFDpSRaRvn2CsmIZowtWmau8PH75MHAj/w8lBLPGtboVJAR3CmfaZLKGWExQC4zmkt7GuavGmH/qFSzdNryHmfG1IPGT9SR2kuOWGCY2JvzHzSdNNdp4HmI6l8= 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=iVs6SBFv; 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="iVs6SBFv" 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 49GIsN4U013279; Thu, 17 Oct 2024 03:11:40 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= h5WkOpWZdcr8cOLGKU3CUVuB6GNy2LrFsQAtKE0oDLY=; b=iVs6SBFv6pYo6b4y 9aoQL5xwyzda/7y5KchJaDScQ8JqQRi30KpllgqUubcgit95Ch581MgTsGMjYzT3 qYDJEpztM8MvLfIuwF/5NDLFLOr520TJPhWwAALExK9fr6THK4vUS6poM3r4u/WX Fs+a3MW8qZYzvaJgy6bgwR3ZaE63Y/44s15IWdB2BV0zm8pRu3gODuJFYSoDwSue WDPUHEWlryuHA3Y6aOlS0F0Y6vIrNJiiJVC+OjlMoftjTt8IKEipk+PxGpv9+jQm 8sl+78VjDLY05UwKAEo9dGvH5pwmj+hyj3h2iKUQmjiJTe4XXUbG4pabUkJxm/5+ 0mIK2g== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42abbxtm7c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:39 +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 49H3BXNJ025740 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:33 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; Wed, 16 Oct 2024 20:11:32 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 07/11] wifi: ath12k: properly handling the state variables of monitor mode Date: Thu, 17 Oct 2024 11:10:52 +0800 Message-ID: <20241017031056.1714-8-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: bNRVihM3YPykITe1hAt-brY_9qZRrrfx X-Proofpoint-GUID: bNRVihM3YPykITe1hAt-brY_9qZRrrfx 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 phishscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170022 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 | 5 +++++ drivers/net/wireless/ath/ath12k/mac.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index c57322221e1d..655894506cd2 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -1060,6 +1060,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 f5f96a8b1d61..f60219cc01aa 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7008,6 +7008,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; } @@ -7056,6 +7059,8 @@ int ath12k_mac_vdev_create(struct ath12k *ar, struct ath12k_link_vif *arvif) err_vdev_del: ath12k_wmi_vdev_delete(ar, arvif->vdev_id); ar->num_created_vdevs--; + ar->monitor_vdev_created = false; + ar->monitor_vdev_id = -1; arvif->is_created = false; arvif->ar = NULL; ar->allocated_vdev_map &= ~(1LL << arvif->vdev_id); @@ -9827,6 +9832,11 @@ static void ath12k_mac_setup(struct ath12k *ar) INIT_WORK(&ar->wmi_mgmt_tx_work, ath12k_mgmt_over_wmi_tx_work); skb_queue_head_init(&ar->wmi_mgmt_tx_queue); + + ar->monitor_vdev_id = -1; + ar->monitor_started = false; + ar->monitor_vdev_created = false; + ar->monitor_conf_enabled = false; } int ath12k_mac_register(struct ath12k_base *ab) From patchwork Thu Oct 17 03:10:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 836647 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 675FE1F94D for ; Thu, 17 Oct 2024 03:11:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134700; cv=none; b=e8fcP1U13/cI4k+xO3Ya5qnkBP52khNlNozuqy2ZrCQ6pEI9Li97P9fmAM3Tm+/rjnLeAShbZgSytxNA+o1titooGoubK5JDrU3fY21eltY6SPso1UtRvkoGUQmaWpkyBQGlhlcHkwiuDmNYW2mjXb+IED6DjW5ikX4iVF0ycX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134700; c=relaxed/simple; bh=gPGqd8URNcHDaFHBMURfSpzc5ZJ6iT8/DfYrna5Krmc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PvfwkX7co13N6oq6iMzoB1nm9r4rpVS089W469mqfJdlseIfpaAh6qw0w1Djkqq+qCrt66mq+8AtOT5bH+KriXh1Ae+Wf8uJNcEttFT3TyyyZoof4D/5wibeyVGuZTW4dg4DAreJK5MnPwnGDnaEz6hFx09AcB5kt/KiFUhVZSU= 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=YO7DSsiG; arc=none smtp.client-ip=205.220.168.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="YO7DSsiG" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49GFtiVt024083; Thu, 17 Oct 2024 03:11:36 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= 9OsXjEwt/9+/NaPcQadhiEVemp1UQ3RNwnl/5SzPUE8=; b=YO7DSsiGbb3NEic7 xUbglBm1YwtdUSG6Gearze6XTGmVqSTA2foGFk3r+w6BszYegPCSjAyzE/vSdPYa i2R0Vr4bNJfcRaTHQQ5z3SXw1U7/8Qcxag6VE5nOoHZxVBucvx2llv0Q5hhVKz3k ofYVqanb+Lt2FialMp3dKgIqREtSSOQGUzDwVjloeVfZNpdmqW7gedUX8iNvBwsB cGy1IFjm3OgHGmHxwckxooNfkADxHhzE3imgnjcWVbj1AwNnsQWjEzMkVuqGgi8K ZJ8+YE/YYXUiI6uy7+XG15kVC2iGApg4ITDoyz2CZcv2+kcJYN4GnSWO1qRh5YBz QUyGnA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 429xdbcvg1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:36 +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 49H3BZRm030692 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:35 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; Wed, 16 Oct 2024 20:11:34 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 08/11] wifi: ath12k: delete NSS and TX power setting for monitor vdev Date: Thu, 17 Oct 2024 11:10:53 +0800 Message-ID: <20241017031056.1714-9-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: WQEUaVdMllL0GWYSfNlrcGHtTPfp0XBk X-Proofpoint-GUID: WQEUaVdMllL0GWYSfNlrcGHtTPfp0XBk 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 spamscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=690 impostorscore=0 phishscore=0 clxscore=1015 adultscore=0 mlxscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170022 ath12k_mac_monitor_vdev_create() will set NSS and TX power for monitor vdev. But this is not needed for monitor vdev. So delete them. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang --- drivers/net/wireless/ath/ath12k/mac.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index f60219cc01aa..f21a155ca168 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -1091,7 +1091,6 @@ static int ath12k_mac_monitor_vdev_create(struct ath12k *ar) struct ath12k_wmi_vdev_create_arg arg = {}; int bit, ret; u8 tmp_addr[6]; - u16 nss; lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy); @@ -1131,19 +1130,6 @@ static int ath12k_mac_monitor_vdev_create(struct ath12k *ar) return ret; } - nss = hweight32(ar->cfg_tx_chainmask) ? : 1; - ret = ath12k_wmi_vdev_set_param_cmd(ar, ar->monitor_vdev_id, - WMI_VDEV_PARAM_NSS, nss); - if (ret) { - ath12k_warn(ar->ab, "failed to set vdev %d chainmask 0x%x, nss %d :%d\n", - ar->monitor_vdev_id, ar->cfg_tx_chainmask, nss, ret); - return ret; - } - - ret = ath12k_mac_txpower_recalc(ar); - if (ret) - return ret; - ar->allocated_vdev_map |= 1LL << ar->monitor_vdev_id; ar->ab->free_vdev_map &= ~(1LL << ar->monitor_vdev_id); ar->num_created_vdevs++; From patchwork Thu Oct 17 03:10:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 837047 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 C0A477DA76 for ; Thu, 17 Oct 2024 03:11:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134701; cv=none; b=Uf7JecZG5s8o8Yf3ecsLrnGWqx5gQKyfcYRAPYuN375q9VCe44zhSv9ZO3DEXlLhmtBF69dS5VY4UexYdp+sThoizgjNHewcjjNcwSOvJolxxE/KqZFJWvNimNBtJS86LlTPEMYTDjzZ6sCs2Mk8wWB3sbiKlDc8bR2phofo3HE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134701; c=relaxed/simple; bh=tyH6sHS9hwtWHY6JdNMBpojOfk4WRX4C3QRxN6pXu4Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c69kGqJg3JT99mhhjAcBso7qhtZY0UoXPq53OKeYnKD8nlGy0z8aNZJKjSh8MXordFUKQsUsUre19dNJHdGP+4N8z8yb3vOX+XcfGZyXdnUbmppsiuxutoqQy6CPSE8Vy7ShGYZzqGkYNiW4pZyn5z5YpgHB4zTCqSbonbvZtCw= 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=dWmgh0We; arc=none smtp.client-ip=205.220.168.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="dWmgh0We" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49GIFrMS001599; Thu, 17 Oct 2024 03:11:38 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= iSfzrjKWksEKl1Bezon7/6hpGqXEGQBKgImZwO3q3BE=; b=dWmgh0WeKW3SyARe 9WCeO83QSJAE1si5pGWP0x6ISOhC+uE91SiEJoWUk610MrOH1Wt38TnXuHBL7sOP Zr2XUFHmfANjhsDbcdVpSfIrGCB63v1NxfLjCrEZNDR3hclgmOXVxm/yq79rtY1g P020//k1iwC6kBq911xJ77KNkzg8cpVmpLY6vzxQztYEAnaIU9AFz8imYsQhVcyq eazKVChFUtdtRSnPxKoZrJWlWb4WAjE5YDsrmFWYKVYLtG4S2iS98lzCCWF/imwj lYpmuMd6PE9FpI2oY49ESLVMQbV/JcyltJv9Z4PTty3Y2FUvUzTwpzL852XEfCkR FOfGXw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42ajm593sx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:37 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49H3BbCM020963 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:37 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; Wed, 16 Oct 2024 20:11:35 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 09/11] wifi: ath12k: use tail MSDU to get MSDU information Date: Thu, 17 Oct 2024 11:10:54 +0800 Message-ID: <20241017031056.1714-10-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: GI8s9_hvwSnzR0MebYDAuhkHKCD6-4FD X-Proofpoint-ORIG-GUID: GI8s9_hvwSnzR0MebYDAuhkHKCD6-4FD 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 mlxlogscore=999 mlxscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 spamscore=0 suspectscore=0 clxscore=1015 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170022 When receiving a packet in monitor mode, hardware will fill status information msdu_end for MSDUs. Then host can use these status information to get specific information about this packet, such as l3 offset, bandwidth, mcs, packet type. If this packet is composed of multiple MSDUs, then hardware will only fill status information for the last(tail) MSDU. At this time, MSDU information is uncertain for others MSDUs. But current code use the first MSDU in monitor mode, so will get the wrong information. Fix it by getting msdu information from last(tail) msdu. 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/dp_mon.c | 41 +++++++++++++----------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c index 0232fe49764c..42181652bfd9 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -855,24 +855,26 @@ ath12k_dp_mon_rx_parse_status_tlv(struct ath12k_base *ab, return HAL_RX_MON_STATUS_PPDU_NOT_DONE; } -static void ath12k_dp_mon_rx_msdus_set_payload(struct ath12k *ar, struct sk_buff *msdu) +static void ath12k_dp_mon_rx_msdus_set_payload(struct ath12k *ar, + struct sk_buff *head_msdu, + struct sk_buff *tail_msdu) { u32 rx_pkt_offset, l2_hdr_offset; rx_pkt_offset = ar->ab->hal.hal_desc_sz; - l2_hdr_offset = ath12k_dp_rx_h_l3pad(ar->ab, - (struct hal_rx_desc *)msdu->data); - skb_pull(msdu, rx_pkt_offset + l2_hdr_offset); + l2_hdr_offset = + ath12k_dp_rx_h_l3pad(ar->ab, (struct hal_rx_desc *)tail_msdu->data); + skb_pull(head_msdu, rx_pkt_offset + l2_hdr_offset); } static struct sk_buff * -ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, - u32 mac_id, struct sk_buff *head_msdu, +ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, u32 mac_id, + struct sk_buff *head_msdu, struct sk_buff *tail_msdu, struct ieee80211_rx_status *rxs, bool *fcs_err) { struct ath12k_base *ab = ar->ab; struct sk_buff *msdu, *mpdu_buf, *prev_buf; - struct hal_rx_desc *rx_desc; + struct hal_rx_desc *rx_desc, *tail_rx_desc; u8 *hdr_desc, *dest, decap_format; struct ieee80211_hdr_3addr *wh; u32 err_bitmap; @@ -883,23 +885,24 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, goto err_merge_fail; rx_desc = (struct hal_rx_desc *)head_msdu->data; - err_bitmap = ath12k_dp_rx_h_mpdu_err(ab, rx_desc); + tail_rx_desc = (struct hal_rx_desc *)tail_msdu->data; + err_bitmap = ath12k_dp_rx_h_mpdu_err(ab, tail_rx_desc); if (err_bitmap & HAL_RX_MPDU_ERR_FCS) *fcs_err = true; - decap_format = ath12k_dp_rx_h_decap_type(ab, rx_desc); + decap_format = ath12k_dp_rx_h_decap_type(ab, tail_rx_desc); - ath12k_dp_rx_h_ppdu(ar, rx_desc, rxs); + ath12k_dp_rx_h_ppdu(ar, tail_rx_desc, rxs); if (decap_format == DP_RX_DECAP_TYPE_RAW) { - ath12k_dp_mon_rx_msdus_set_payload(ar, head_msdu); + ath12k_dp_mon_rx_msdus_set_payload(ar, head_msdu, tail_msdu); prev_buf = head_msdu; msdu = head_msdu->next; while (msdu) { - ath12k_dp_mon_rx_msdus_set_payload(ar, msdu); + ath12k_dp_mon_rx_msdus_set_payload(ar, msdu, tail_msdu); prev_buf = msdu; msdu = msdu->next; @@ -924,7 +927,7 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, msdu = head_msdu; while (msdu) { - ath12k_dp_mon_rx_msdus_set_payload(ar, msdu); + ath12k_dp_mon_rx_msdus_set_payload(ar, msdu, tail_msdu); if (qos_pkt) { dest = skb_push(msdu, sizeof(__le16)); if (!dest) @@ -1130,7 +1133,7 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct } static int ath12k_dp_mon_rx_deliver(struct ath12k *ar, u32 mac_id, - struct sk_buff *head_msdu, + struct sk_buff *head_msdu, struct sk_buff *tail_msdu, struct hal_rx_mon_ppdu_info *ppduinfo, struct napi_struct *napi) { @@ -1139,7 +1142,8 @@ static int ath12k_dp_mon_rx_deliver(struct ath12k *ar, u32 mac_id, struct ieee80211_rx_status *rxs = &dp->rx_status; bool fcs_err = false; - mon_skb = ath12k_dp_mon_rx_merg_msdus(ar, mac_id, head_msdu, + mon_skb = ath12k_dp_mon_rx_merg_msdus(ar, mac_id, + head_msdu, tail_msdu, rxs, &fcs_err); if (!mon_skb) goto mon_deliver_fail; @@ -1247,7 +1251,7 @@ ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar, if (head_msdu && tail_msdu) { ath12k_dp_mon_rx_deliver(ar, mac_id, head_msdu, - ppdu_info, napi); + tail_msdu, ppdu_info, napi); } kfree(mon_mpdu); @@ -1943,15 +1947,16 @@ ath12k_dp_mon_tx_process_ppdu_info(struct ath12k *ar, int mac_id, struct dp_mon_tx_ppdu_info *tx_ppdu_info) { struct dp_mon_mpdu *tmp, *mon_mpdu; - struct sk_buff *head_msdu; + struct sk_buff *head_msdu, *tail_msdu; list_for_each_entry_safe(mon_mpdu, tmp, &tx_ppdu_info->dp_tx_mon_mpdu_list, list) { list_del(&mon_mpdu->list); head_msdu = mon_mpdu->head; + tail_msdu = mon_mpdu->tail; if (head_msdu) - ath12k_dp_mon_rx_deliver(ar, mac_id, head_msdu, + ath12k_dp_mon_rx_deliver(ar, mac_id, head_msdu, tail_msdu, &tx_ppdu_info->rx_status, napi); kfree(mon_mpdu); From patchwork Thu Oct 17 03:10:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 837046 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 6AC1213AD06 for ; Thu, 17 Oct 2024 03:11:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134702; cv=none; b=Y9wMFlnBUaVLhpEUUPmluLs2QioSii3lj7sMN1TY5D24xMc+I/gTqA0oh9mjJD0vVe2SGcL4CINvg/GYJs531KjShfoJI4KtIup6Fm1BeKO0xkMvNoMKMNanSHDkNmlWOpasfPeRbsp0EttdrLhHDLrNLcqHIqNsywb9DQAK9M8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134702; c=relaxed/simple; bh=8v4ScUY18pOpcpLCil17VfcStYgsTp1wE03ROWYulM4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=L7jk/mN37TobhYGYx3h7lEvf1MalM+WBq5QtMZjOGjtBc+jlmczsoaa2urHICmix5mG6csVMhcbwHpm/ZczEKOqAPbR3UtYv2rubRWv1RtPSNSEi7tnKNVl8z2dGnKlDjF9QRZ/TvQA5sGIrx+0pK2yudrUF+Ca3f/mUoBZqNJ8= 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=bPZD30UC; arc=none smtp.client-ip=205.220.168.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="bPZD30UC" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49GFopJs002357; Thu, 17 Oct 2024 03:11:39 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= Dv31Dft1u9+cntKlhDh62mu6SyaHorgNbrWTeE1nTUE=; b=bPZD30UCWx4g2/GR /LTJUccevG9z+hWmSDIVKa9yybMC5V/+2DOMPXETE2dY7nkyckVGfjWaBryxZxlS Ux8dLgH1Xu6FnYfiUG0BjqtJXd+AhhiuL8vbUXlQB7zC1qs58jgtLc5FjzxYo4bP M6gT7AgwrZBWgs35WTiVpg3FYD9A4HaHW5eSEqSTYN6btdUQbX2hH5iSVaP1NNN8 yxSXrqjtEN0B7I8fCn4vDn4/RMnHCet+N+ZulRiYIFZg6PndoPaCmcFXc+TOJ1Ao 9aOSk7HLOo8r83uhoZFen75j9KM/fMlKsEEl8RFD/uJt/wQXQGCwVp+jN+6q6Jf9 /XHIZA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42a5xykkt2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:39 +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 49H3Bcku030707 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:38 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; Wed, 16 Oct 2024 20:11:37 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 10/11] wifi: ath12k: fix A-MSDU indication in monitor mode Date: Thu, 17 Oct 2024 11:10:55 +0800 Message-ID: <20241017031056.1714-11-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: PWullOR_7GzzJWwBd5CKw6FT6Xbv1aB3 X-Proofpoint-ORIG-GUID: PWullOR_7GzzJWwBd5CKw6FT6Xbv1aB3 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 impostorscore=0 mlxlogscore=951 lowpriorityscore=0 mlxscore=0 bulkscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 phishscore=0 clxscore=1015 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170021 In monitor mode, host will reap MSDUs and then the MSDUs with same PPDU ID will be aggregated into an A-MSDU in ath12k_dp_mon_rx_merg_msdus(). However, ath12k_dp_mon_rx_merg_msdus() doesn't calculate the total length of the A-MSDU. This causes Wireshark to display the A-MSDU incorrectly. Therefore, need to add calculation of the A-MSDU length. 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/dp_mon.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c index 42181652bfd9..bf50c90f4c40 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -873,11 +873,11 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, u32 mac_id, struct ieee80211_rx_status *rxs, bool *fcs_err) { struct ath12k_base *ab = ar->ab; - struct sk_buff *msdu, *mpdu_buf, *prev_buf; + struct sk_buff *msdu, *mpdu_buf, *prev_buf, *head_frag_list; struct hal_rx_desc *rx_desc, *tail_rx_desc; u8 *hdr_desc, *dest, decap_format; struct ieee80211_hdr_3addr *wh; - u32 err_bitmap; + u32 err_bitmap, frag_list_sum_len = 0; mpdu_buf = NULL; @@ -900,10 +900,15 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, u32 mac_id, prev_buf = head_msdu; msdu = head_msdu->next; + head_frag_list = NULL; while (msdu) { ath12k_dp_mon_rx_msdus_set_payload(ar, msdu, tail_msdu); + if (!head_frag_list) + head_frag_list = msdu; + + frag_list_sum_len += msdu->len; prev_buf = msdu; msdu = msdu->next; } @@ -911,6 +916,12 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, u32 mac_id, prev_buf->next = NULL; skb_trim(prev_buf, prev_buf->len - HAL_RX_FCS_LEN); + if (head_frag_list) { + skb_shinfo(head_msdu)->frag_list = head_frag_list; + head_msdu->data_len = frag_list_sum_len; + head_msdu->len += head_msdu->data_len; + head_msdu->next = NULL; + } } else if (decap_format == DP_RX_DECAP_TYPE_NATIVE_WIFI) { u8 qos_pkt = 0; From patchwork Thu Oct 17 03:10:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 836644 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 E7E3013541B for ; Thu, 17 Oct 2024 03:11:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134711; cv=none; b=BIilLsMUY2N8d8Wj5aoSiwRgsDQhQteA0v1W/n41P/hzQTmf/qbqNQYp2tCZdDn8T1Fm1zLwFrFuL3LJ8W9VgV7DISshrybxclxDo62aVlxgflaVVP74utuS/r0Umu9kY2ZP1Vd9rIfNNLt81M+Tr92WV9anVxjn1CYPDA00uUI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729134711; c=relaxed/simple; bh=GZF+yPnWaCuCfxtUHooNk5YSYZhEGkheZa2OXRVcXEE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SzioJCgn0SzEWuCbJ7vLRaHR7g4kPBeeelu84udCP+Q1/JQE27VZrh2GhrAjomyELGb/Rbw7KhGrkWme1jWH2rpx6pM4X37/D0fXyhMEVQfRFXgwLqEFD2d4NF9JdB2Q3kdx/ioqdZO8V78Khppon1dOIaffB4ecs0ezG/A/28M= 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=a3scpOoH; arc=none smtp.client-ip=205.220.168.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="a3scpOoH" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49GFwQMa002345; Thu, 17 Oct 2024 03:11:41 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= aEGn070CMJGZjpQjvswZAAnwCGqgtJ1t5dfYpKVGaes=; b=a3scpOoHXG7bimkd zFKlNhksqdxkdvL+ri1zvvID6E7qdR/y/gA8DH/zwulE095Ef7EnLlWTClkkHhmU P/YFYVY6a6XIj8HDJUClgmmnz01PWlHOk+EDmhuHmuegvYcvARq6cdrBEwueDR/4 7nmIybbNVgnhvv23CT+xTtjO2amwO0WfLwCPUL+lUR0cK/PfiURhYul7Hiph9J+W SZpq9PAoxELVgSXjOx5Ul/oEcdl5M821S2Wdabaj2wY3AjPVhEa7/0VWMevMJ+5p E+p+Ufk9sk7zeJsDkwsja7KF5+wgVlFGsYoBCcQQ/0IN7cPry2TIRg0BqBSCwrnK w8oCpg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42a5xykkta-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:41 +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 49H3BeeP025821 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 03:11:40 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; Wed, 16 Oct 2024 20:11:38 -0700 From: Kang Yang To: CC: , Subject: [PATCH v4 11/11] wifi: ath12k: delete mon reap timer Date: Thu, 17 Oct 2024 11:10:56 +0800 Message-ID: <20241017031056.1714-12-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20241017031056.1714-1-quic_kangyang@quicinc.com> References: <20241017031056.1714-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: myJMdKVIG3s7OeGX6B3N0CU6yXdzSbPj X-Proofpoint-ORIG-GUID: myJMdKVIG3s7OeGX6B3N0CU6yXdzSbPj 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 impostorscore=0 mlxlogscore=698 lowpriorityscore=0 mlxscore=0 bulkscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 phishscore=0 clxscore=1015 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170021 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 | 25 ------------------------- 2 files changed, 27 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 18820c23cfaa..cac1f6773a22 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -921,8 +921,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 1125362bfea6..a920ca0ca07f 100644 --- a/drivers/net/wireless/ath/ath12k/dp.c +++ b/drivers/net/wireless/ath/ath12k/dp.c @@ -977,8 +977,6 @@ void ath12k_dp_pdev_free(struct ath12k_base *ab) { int i; - del_timer_sync(&ab->mon_reap_timer); - for (i = 0; i < ab->num_radios; i++) ath12k_dp_rx_pdev_free(ab, i); } @@ -1023,27 +1021,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; @@ -1054,8 +1031,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;