* [PATCH 0/3] wifi: ath12k: Refactor monitor Rx handler
@ 2024-12-19 0:10 Karthikeyan Periyasamy
2024-12-19 0:10 ` [PATCH 1/3] wifi: ath12k: Refactor the monitor Rx parser handler argument Karthikeyan Periyasamy
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Karthikeyan Periyasamy @ 2024-12-19 0:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
Currently, monitor support is not added. However, in the future, the
monitor will be enabled. Therefore, refactor the monitor handler, which
help to add monitor support in the future.
Depends-on:
[PATCH] wifi: ath12k: Add support for parsing 64-bit TLVs
https://lore.kernel.org/all/20241204071238.948885-1-quic_ppranees@quicinc.com/
[PATCH 0/8] wifi: ath12k: Refactor the monitor status Rx path
https://lore.kernel.org/all/20241217084511.2981515-1-quic_periyasa@quicinc.com/
Karthikeyan Periyasamy (3):
wifi: ath12k: Refactor the monitor Rx parser handler argument
wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments
wifi: ath12k: Refactor Rx status TLV parsing procedure argument
drivers/net/wireless/ath/ath12k/dp_mon.c | 60 ++++++++++++------------
drivers/net/wireless/ath/ath12k/dp_mon.h | 7 ++-
2 files changed, 33 insertions(+), 34 deletions(-)
base-commit: 9a448415ed0c46edeb9170091a03b620986ca0b2
prerequisite-patch-id: 17dd9d2f723e951761f037999a1a7baed16e0d04
prerequisite-patch-id: b2e45c89692e23290870fcdec73106c9a910c054
prerequisite-patch-id: 7f6954e09b67481e7b5ea44ec495d7bf95696502
prerequisite-patch-id: 42680e4dd84e5bf3cef644d08f1a17326915e238
prerequisite-patch-id: 6c936b626c89ef9aefc898004826ca755367c93d
prerequisite-patch-id: 02f5565f0ed6cec4b43e5248395845f415729321
prerequisite-patch-id: 14dcc6fdc6722661a74bd1c9c7e459b4937c83e8
prerequisite-patch-id: 4cce8563f290b716a4d3b18ff15b0fbf7c11a64a
prerequisite-patch-id: 6755d0467c39a99b37e3a1f574f0ef57d6cf6399
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/3] wifi: ath12k: Refactor the monitor Rx parser handler argument
2024-12-19 0:10 [PATCH 0/3] wifi: ath12k: Refactor monitor Rx handler Karthikeyan Periyasamy
@ 2024-12-19 0:10 ` Karthikeyan Periyasamy
2024-12-19 11:27 ` Kalle Valo
2024-12-19 0:10 ` [PATCH 2/3] wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments Karthikeyan Periyasamy
2024-12-19 0:10 ` [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument Karthikeyan Periyasamy
2 siblings, 1 reply; 11+ messages in thread
From: Karthikeyan Periyasamy @ 2024-12-19 0:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
Currently, the monitor Rx parser handlers
ath12k_dp_mon_rx_parse_status_tlv() and ath12k_dp_mon_parse_rx_dest()
take the device handle from the caller. However, these handlers
functionality is technically pdev specific. Additionally, the device handle
can be retrieved from the pdev handle. Therefore, for better code
understanding, change the monitor Rx parser handlers argument from the
device handle to the pdev handle.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 5a21961cfd46..85ff89b91624 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -563,11 +563,12 @@ static void ath12k_dp_mon_parse_he_sig_su(const struct hal_rx_he_sig_a_su_info *
}
static enum hal_rx_mon_status
-ath12k_dp_mon_rx_parse_status_tlv(struct ath12k_base *ab,
+ath12k_dp_mon_rx_parse_status_tlv(struct ath12k *ar,
struct ath12k_mon_data *pmon,
u32 tlv_tag, const void *tlv_data,
u32 userid)
{
+ struct ath12k_base *ab = ar->ab;
struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
u32 info[7];
@@ -1180,7 +1181,7 @@ static int ath12k_dp_mon_rx_deliver(struct ath12k *ar, u32 mac_id,
}
static enum hal_rx_mon_status
-ath12k_dp_mon_parse_rx_dest(struct ath12k_base *ab, struct ath12k_mon_data *pmon,
+ath12k_dp_mon_parse_rx_dest(struct ath12k *ar, struct ath12k_mon_data *pmon,
struct sk_buff *skb)
{
struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
@@ -1208,7 +1209,7 @@ ath12k_dp_mon_parse_rx_dest(struct ath12k_base *ab, struct ath12k_mon_data *pmon
if (tlv_tag == HAL_RX_PPDU_END)
tlv_len = sizeof(struct hal_rx_rxpcu_classification_overview);
- hal_status = ath12k_dp_mon_rx_parse_status_tlv(ab, pmon,
+ hal_status = ath12k_dp_mon_rx_parse_status_tlv(ar, pmon,
tlv_tag, ptr, tlv_userid);
ptr += tlv_len;
ptr = PTR_ALIGN(ptr, HAL_TLV_64_ALIGN);
@@ -1228,14 +1229,13 @@ ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
struct sk_buff *skb,
struct napi_struct *napi)
{
- struct ath12k_base *ab = ar->ab;
struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
struct dp_mon_mpdu *tmp;
struct dp_mon_mpdu *mon_mpdu = pmon->mon_mpdu;
struct sk_buff *head_msdu, *tail_msdu;
enum hal_rx_mon_status hal_status = HAL_RX_MON_STATUS_BUF_DONE;
- ath12k_dp_mon_parse_rx_dest(ab, pmon, skb);
+ ath12k_dp_mon_parse_rx_dest(ar, pmon, skb);
list_for_each_entry_safe(mon_mpdu, tmp, &pmon->dp_rx_mon_mpdu_list, list) {
list_del(&mon_mpdu->list);
@@ -2477,7 +2477,7 @@ int ath12k_dp_mon_rx_process_stats(struct ath12k *ar, int mac_id,
for (i = 0; i < dest_idx; i++) {
skb = pmon->dest_skb_q[i];
- hal_status = ath12k_dp_mon_parse_rx_dest(ab, pmon, skb);
+ hal_status = ath12k_dp_mon_parse_rx_dest(ar, pmon, skb);
if (ppdu_info->peer_id == HAL_INVALID_PEERID ||
hal_status != HAL_RX_MON_STATUS_PPDU_DONE) {
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/3] wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments
2024-12-19 0:10 [PATCH 0/3] wifi: ath12k: Refactor monitor Rx handler Karthikeyan Periyasamy
2024-12-19 0:10 ` [PATCH 1/3] wifi: ath12k: Refactor the monitor Rx parser handler argument Karthikeyan Periyasamy
@ 2024-12-19 0:10 ` Karthikeyan Periyasamy
2024-12-19 11:32 ` Kalle Valo
2024-12-19 11:35 ` Kalle Valo
2024-12-19 0:10 ` [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument Karthikeyan Periyasamy
2 siblings, 2 replies; 11+ messages in thread
From: Karthikeyan Periyasamy @ 2024-12-19 0:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
Currently, the pdev handle is given along with the mac id to all the
monitor Tx/Rx handler procedure arguments. The mac id information is
derived from the pdev handle itself. Therefore, remove the unnecessary
mac id argument from the handler.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 29 ++++++++++++------------
drivers/net/wireless/ath/ath12k/dp_mon.h | 7 +++---
2 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 85ff89b91624..ae2f6847bc88 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -845,7 +845,7 @@ static void ath12k_dp_mon_rx_msdus_set_payload(struct ath12k *ar,
}
static struct sk_buff *
-ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, u32 mac_id,
+ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
struct sk_buff *head_msdu, struct sk_buff *tail_msdu,
struct ieee80211_rx_status *rxs, bool *fcs_err)
{
@@ -1126,7 +1126,7 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
ieee80211_rx_napi(ath12k_ar_to_hw(ar), pubsta, msdu, napi);
}
-static int ath12k_dp_mon_rx_deliver(struct ath12k *ar, u32 mac_id,
+static int ath12k_dp_mon_rx_deliver(struct ath12k *ar,
struct sk_buff *head_msdu, struct sk_buff *tail_msdu,
struct hal_rx_mon_ppdu_info *ppduinfo,
struct napi_struct *napi)
@@ -1136,7 +1136,7 @@ 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,
+ mon_skb = ath12k_dp_mon_rx_merg_msdus(ar,
head_msdu, tail_msdu,
rxs, &fcs_err);
if (!mon_skb)
@@ -1225,7 +1225,6 @@ ath12k_dp_mon_parse_rx_dest(struct ath12k *ar, struct ath12k_mon_data *pmon,
enum hal_rx_mon_status
ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
struct ath12k_mon_data *pmon,
- int mac_id,
struct sk_buff *skb,
struct napi_struct *napi)
{
@@ -1243,7 +1242,7 @@ ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
tail_msdu = mon_mpdu->tail;
if (head_msdu && tail_msdu) {
- ath12k_dp_mon_rx_deliver(ar, mac_id, head_msdu,
+ ath12k_dp_mon_rx_deliver(ar, head_msdu,
tail_msdu, ppdu_info, napi);
}
@@ -1924,7 +1923,7 @@ ath12k_dp_mon_tx_status_get_num_user(u16 tlv_tag,
}
static void
-ath12k_dp_mon_tx_process_ppdu_info(struct ath12k *ar, int mac_id,
+ath12k_dp_mon_tx_process_ppdu_info(struct ath12k *ar,
struct napi_struct *napi,
struct dp_mon_tx_ppdu_info *tx_ppdu_info)
{
@@ -1938,7 +1937,7 @@ ath12k_dp_mon_tx_process_ppdu_info(struct ath12k *ar, int mac_id,
tail_msdu = mon_mpdu->tail;
if (head_msdu)
- ath12k_dp_mon_rx_deliver(ar, mac_id, head_msdu, tail_msdu,
+ ath12k_dp_mon_rx_deliver(ar, head_msdu, tail_msdu,
&tx_ppdu_info->rx_status, napi);
kfree(mon_mpdu);
@@ -1948,7 +1947,6 @@ ath12k_dp_mon_tx_process_ppdu_info(struct ath12k *ar, int mac_id,
enum hal_rx_mon_status
ath12k_dp_mon_tx_parse_mon_status(struct ath12k *ar,
struct ath12k_mon_data *pmon,
- int mac_id,
struct sk_buff *skb,
struct napi_struct *napi,
u32 ppdu_id)
@@ -1995,13 +1993,13 @@ ath12k_dp_mon_tx_parse_mon_status(struct ath12k *ar,
break;
} while (tlv_status != DP_MON_TX_FES_STATUS_END);
- ath12k_dp_mon_tx_process_ppdu_info(ar, mac_id, napi, tx_data_ppdu_info);
- ath12k_dp_mon_tx_process_ppdu_info(ar, mac_id, napi, tx_prot_ppdu_info);
+ ath12k_dp_mon_tx_process_ppdu_info(ar, napi, tx_data_ppdu_info);
+ ath12k_dp_mon_tx_process_ppdu_info(ar, napi, tx_prot_ppdu_info);
return tlv_status;
}
-int ath12k_dp_mon_srng_process(struct ath12k *ar, int mac_id, int *budget,
+int ath12k_dp_mon_srng_process(struct ath12k *ar, int *budget,
enum dp_monitor_mode monitor_mode,
struct napi_struct *napi)
{
@@ -2022,12 +2020,13 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int mac_id, int *budget,
bool end_of_ppdu;
struct hal_rx_mon_ppdu_info *ppdu_info;
struct ath12k_peer *peer = NULL;
+ u8 pdev_idx = ath12k_hw_mac_id_to_pdev_id(ab->hw_params, ar->pdev_idx);
ppdu_info = &pmon->mon_ppdu_info;
memset(ppdu_info, 0, sizeof(*ppdu_info));
ppdu_info->peer_id = HAL_INVALID_PEERID;
- srng_id = ath12k_hw_mac_id_to_srng_id(ab->hw_params, mac_id);
+ srng_id = ath12k_hw_mac_id_to_srng_id(ab->hw_params, pdev_idx);
if (monitor_mode == ATH12K_DP_RX_MONITOR_MODE) {
mon_dst_ring = &pdev_dp->rxdma_mon_dst_ring[srng_id];
@@ -2077,10 +2076,10 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int mac_id, int *budget,
skb = pmon->dest_skb_q[i];
if (monitor_mode == ATH12K_DP_RX_MONITOR_MODE)
- ath12k_dp_mon_rx_parse_mon_status(ar, pmon, mac_id,
+ ath12k_dp_mon_rx_parse_mon_status(ar, pmon,
skb, napi);
else
- ath12k_dp_mon_tx_parse_mon_status(ar, pmon, mac_id,
+ ath12k_dp_mon_tx_parse_mon_status(ar, pmon,
skb, napi, ppdu_id);
peer = ath12k_peer_find_by_id(ab, ppdu_info->peer_id);
@@ -2538,7 +2537,7 @@ int ath12k_dp_mon_process_ring(struct ath12k_base *ab, int mac_id,
if (!ar->monitor_started)
ath12k_dp_mon_rx_process_stats(ar, mac_id, napi, &budget);
else
- num_buffs_reaped = ath12k_dp_mon_srng_process(ar, mac_id, &budget,
+ num_buffs_reaped = ath12k_dp_mon_srng_process(ar, &budget,
monitor_mode, napi);
return num_buffs_reaped;
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.h b/drivers/net/wireless/ath/ath12k/dp_mon.h
index fb9e9c176ce5..64c959c36459 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.h
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
* Copyright (c) 2019-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_DP_MON_H
@@ -77,12 +77,12 @@ struct dp_mon_tx_ppdu_info {
enum hal_rx_mon_status
ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
struct ath12k_mon_data *pmon,
- int mac_id, struct sk_buff *skb,
+ struct sk_buff *skb,
struct napi_struct *napi);
int ath12k_dp_mon_buf_replenish(struct ath12k_base *ab,
struct dp_rxdma_mon_ring *buf_ring,
int req_entries);
-int ath12k_dp_mon_srng_process(struct ath12k *ar, int mac_id,
+int ath12k_dp_mon_srng_process(struct ath12k *ar,
int *budget, enum dp_monitor_mode monitor_mode,
struct napi_struct *napi);
int ath12k_dp_mon_process_ring(struct ath12k_base *ab, int mac_id,
@@ -96,7 +96,6 @@ ath12k_dp_mon_tx_status_get_num_user(u16 tlv_tag,
enum hal_rx_mon_status
ath12k_dp_mon_tx_parse_mon_status(struct ath12k *ar,
struct ath12k_mon_data *pmon,
- int mac_id,
struct sk_buff *skb,
struct napi_struct *napi,
u32 ppdu_id);
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument
2024-12-19 0:10 [PATCH 0/3] wifi: ath12k: Refactor monitor Rx handler Karthikeyan Periyasamy
2024-12-19 0:10 ` [PATCH 1/3] wifi: ath12k: Refactor the monitor Rx parser handler argument Karthikeyan Periyasamy
2024-12-19 0:10 ` [PATCH 2/3] wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments Karthikeyan Periyasamy
@ 2024-12-19 0:10 ` Karthikeyan Periyasamy
2024-12-19 11:34 ` Kalle Valo
2 siblings, 1 reply; 11+ messages in thread
From: Karthikeyan Periyasamy @ 2024-12-19 0:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
Currently, ath12k_dp_mon_rx_parse_status_tlv() takes the TLV tag, TLV data
and TLV userid as separate arguments from the caller. These argument can
be fetched from the TLV header itself. Therefore, pass the TLV header and
retrieve the necessary fields from the header instead of passing them from
the caller.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index ae2f6847bc88..53f8e8f8959a 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -565,12 +565,16 @@ static void ath12k_dp_mon_parse_he_sig_su(const struct hal_rx_he_sig_a_su_info *
static enum hal_rx_mon_status
ath12k_dp_mon_rx_parse_status_tlv(struct ath12k *ar,
struct ath12k_mon_data *pmon,
- u32 tlv_tag, const void *tlv_data,
- u32 userid)
+ const struct hal_tlv_64_hdr *tlv)
{
struct ath12k_base *ab = ar->ab;
struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
- u32 info[7];
+ const void *tlv_data = tlv->value;
+ u32 info[7], userid;
+ u16 tlv_tag;
+
+ tlv_tag = le64_get_bits(tlv->tl, HAL_TLV_64_HDR_TAG);
+ userid = le64_get_bits(tlv->tl, HAL_TLV_64_USR_ID);
switch (tlv_tag) {
case HAL_RX_PPDU_START: {
@@ -1187,7 +1191,6 @@ ath12k_dp_mon_parse_rx_dest(struct ath12k *ar, struct ath12k_mon_data *pmon,
struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
struct hal_tlv_64_hdr *tlv;
enum hal_rx_mon_status hal_status;
- u32 tlv_userid;
u16 tlv_tag, tlv_len;
u8 *ptr = skb->data;
@@ -1196,9 +1199,6 @@ ath12k_dp_mon_parse_rx_dest(struct ath12k *ar, struct ath12k_mon_data *pmon,
do {
tlv = (struct hal_tlv_64_hdr *)ptr;
tlv_tag = le64_get_bits(tlv->tl, HAL_TLV_64_HDR_TAG);
- tlv_len = le64_get_bits(tlv->tl, HAL_TLV_64_HDR_LEN);
- tlv_userid = le64_get_bits(tlv->tl, HAL_TLV_64_USR_ID);
- ptr += sizeof(*tlv);
/* The actual length of PPDU_END is the combined length of many PHY
* TLVs that follow. Skip the TLV header and
@@ -1208,10 +1208,11 @@ ath12k_dp_mon_parse_rx_dest(struct ath12k *ar, struct ath12k_mon_data *pmon,
if (tlv_tag == HAL_RX_PPDU_END)
tlv_len = sizeof(struct hal_rx_rxpcu_classification_overview);
+ else
+ tlv_len = le64_get_bits(tlv->tl, HAL_TLV_64_HDR_LEN);
- hal_status = ath12k_dp_mon_rx_parse_status_tlv(ar, pmon,
- tlv_tag, ptr, tlv_userid);
- ptr += tlv_len;
+ hal_status = ath12k_dp_mon_rx_parse_status_tlv(ar, pmon, tlv);
+ ptr += sizeof(*tlv) + tlv_len;
ptr = PTR_ALIGN(ptr, HAL_TLV_64_ALIGN);
if ((ptr - skb->data) >= DP_RX_BUFFER_SIZE)
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: ath12k: Refactor the monitor Rx parser handler argument
2024-12-19 0:10 ` [PATCH 1/3] wifi: ath12k: Refactor the monitor Rx parser handler argument Karthikeyan Periyasamy
@ 2024-12-19 11:27 ` Kalle Valo
0 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2024-12-19 11:27 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath12k, linux-wireless
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
> Currently, the monitor Rx parser handlers
> ath12k_dp_mon_rx_parse_status_tlv() and ath12k_dp_mon_parse_rx_dest()
> take the device handle from the caller. However, these handlers
> functionality is technically pdev specific. Additionally, the device handle
> can be retrieved from the pdev handle. Therefore, for better code
> understanding, change the monitor Rx parser handlers argument from the
> device handle to the pdev handle.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments
2024-12-19 0:10 ` [PATCH 2/3] wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments Karthikeyan Periyasamy
@ 2024-12-19 11:32 ` Kalle Valo
2024-12-19 11:35 ` Kalle Valo
1 sibling, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2024-12-19 11:32 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath12k, linux-wireless
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
> Currently, the pdev handle is given along with the mac id to all the
> monitor Tx/Rx handler procedure arguments. The mac id information is
> derived from the pdev handle itself. Therefore, remove the unnecessary
> mac id argument from the handler.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> ---
> drivers/net/wireless/ath/ath12k/dp_mon.c | 29 ++++++++++++------------
> drivers/net/wireless/ath/ath12k/dp_mon.h | 7 +++---
> 2 files changed, 17 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
> index 85ff89b91624..ae2f6847bc88 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_mon.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
> @@ -845,7 +845,7 @@ static void ath12k_dp_mon_rx_msdus_set_payload(struct ath12k *ar,
> }
>
> static struct sk_buff *
> -ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar, u32 mac_id,
> +ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
BTW I find it confusing that in the commit message you talk about "pdev
handle" but in the code it's named "ar". It would be nice to have
terminology all over. No need to change anything for this patch, just a
small comment for the future.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument
2024-12-19 0:10 ` [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument Karthikeyan Periyasamy
@ 2024-12-19 11:34 ` Kalle Valo
2024-12-19 11:42 ` Karthikeyan Periyasamy
0 siblings, 1 reply; 11+ messages in thread
From: Kalle Valo @ 2024-12-19 11:34 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath12k, linux-wireless
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
> Currently, ath12k_dp_mon_rx_parse_status_tlv() takes the TLV tag, TLV data
> and TLV userid as separate arguments from the caller. These argument can
> be fetched from the TLV header itself. Therefore, pass the TLV header and
> retrieve the necessary fields from the header instead of passing them from
> the caller.
The commit message doesn't reply to "why?". Is there a clear benefit in
the future or are you just doing random code cleanup?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments
2024-12-19 0:10 ` [PATCH 2/3] wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments Karthikeyan Periyasamy
2024-12-19 11:32 ` Kalle Valo
@ 2024-12-19 11:35 ` Kalle Valo
1 sibling, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2024-12-19 11:35 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath12k, linux-wireless
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
> Currently, the pdev handle is given along with the mac id to all the
> monitor Tx/Rx handler procedure arguments. The mac id information is
> derived from the pdev handle itself. Therefore, remove the unnecessary
> mac id argument from the handler.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument
2024-12-19 11:34 ` Kalle Valo
@ 2024-12-19 11:42 ` Karthikeyan Periyasamy
2024-12-19 18:54 ` Kalle Valo
0 siblings, 1 reply; 11+ messages in thread
From: Karthikeyan Periyasamy @ 2024-12-19 11:42 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath12k, linux-wireless
On 12/19/2024 5:04 PM, Kalle Valo wrote:
> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
>
>> Currently, ath12k_dp_mon_rx_parse_status_tlv() takes the TLV tag, TLV data
>> and TLV userid as separate arguments from the caller. These argument can
>> be fetched from the TLV header itself. Therefore, pass the TLV header and
>> retrieve the necessary fields from the header instead of passing them from
>> the caller.
>
> The commit message doesn't reply to "why?". Is there a clear benefit in
> the future or are you just doing random code cleanup?
>
It benefit in the future for supporting EHT monitor functionality.
--
Karthikeyan Periyasamy
--
கார்த்திகேயன் பெரியசாமி
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument
2024-12-19 11:42 ` Karthikeyan Periyasamy
@ 2024-12-19 18:54 ` Kalle Valo
2024-12-20 0:26 ` Karthikeyan Periyasamy
0 siblings, 1 reply; 11+ messages in thread
From: Kalle Valo @ 2024-12-19 18:54 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath12k, linux-wireless
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
> On 12/19/2024 5:04 PM, Kalle Valo wrote:
>> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
>>
>>> Currently, ath12k_dp_mon_rx_parse_status_tlv() takes the TLV tag, TLV data
>>> and TLV userid as separate arguments from the caller. These argument can
>>> be fetched from the TLV header itself. Therefore, pass the TLV header and
>>> retrieve the necessary fields from the header instead of passing them from
>>> the caller.
>> The commit message doesn't reply to "why?". Is there a clear benefit
>> in
>> the future or are you just doing random code cleanup?
>>
>
> It benefit in the future for supporting EHT monitor functionality.
How does it help exactly? Having even just one sentence explaining the
motivation in the commit message would help a lot. Otherwise these just
look random changes.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument
2024-12-19 18:54 ` Kalle Valo
@ 2024-12-20 0:26 ` Karthikeyan Periyasamy
0 siblings, 0 replies; 11+ messages in thread
From: Karthikeyan Periyasamy @ 2024-12-20 0:26 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath12k, linux-wireless
On 12/20/2024 12:24 AM, Kalle Valo wrote:
> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
>
>> On 12/19/2024 5:04 PM, Kalle Valo wrote:
>>> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
>>>
>>>> Currently, ath12k_dp_mon_rx_parse_status_tlv() takes the TLV tag, TLV data
>>>> and TLV userid as separate arguments from the caller. These argument can
>>>> be fetched from the TLV header itself. Therefore, pass the TLV header and
>>>> retrieve the necessary fields from the header instead of passing them from
>>>> the caller.
>>> The commit message doesn't reply to "why?". Is there a clear benefit
>>> in
>>> the future or are you just doing random code cleanup?
>>>
>>
>> It benefit in the future for supporting EHT monitor functionality.
>
> How does it help exactly? Having even just one sentence explaining the
> motivation in the commit message would help a lot. Otherwise these just
> look random changes.
>
Currently, ath12k_dp_mon_rx_parse_status_tlv() takes the TLV tag, TLV
data and TLV user ID as separate arguments from the caller. In the
future, the TLV length will be needed for the EHT monitor TLV tags.
These arguments can be fetched from the TLV header itself. Therefore,
instead of increasing the arguments, pass the TLV header and retrieve
the necessary fields from the TLV header instead of passing them from
the caller.
Above commit is ok ?
--
Karthikeyan Periyasamy
--
கார்த்திகேயன் பெரியசாமி
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-12-20 0:26 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 0:10 [PATCH 0/3] wifi: ath12k: Refactor monitor Rx handler Karthikeyan Periyasamy
2024-12-19 0:10 ` [PATCH 1/3] wifi: ath12k: Refactor the monitor Rx parser handler argument Karthikeyan Periyasamy
2024-12-19 11:27 ` Kalle Valo
2024-12-19 0:10 ` [PATCH 2/3] wifi: ath12k: Refactor the monitor Tx/RX handler procedure arguments Karthikeyan Periyasamy
2024-12-19 11:32 ` Kalle Valo
2024-12-19 11:35 ` Kalle Valo
2024-12-19 0:10 ` [PATCH 3/3] wifi: ath12k: Refactor Rx status TLV parsing procedure argument Karthikeyan Periyasamy
2024-12-19 11:34 ` Kalle Valo
2024-12-19 11:42 ` Karthikeyan Periyasamy
2024-12-19 18:54 ` Kalle Valo
2024-12-20 0:26 ` Karthikeyan Periyasamy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox