* [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274
@ 2025-01-07 2:10 Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 1/7] wifi: ath12k: fix link valid field initialization in the monitor Rx Karthikeyan Periyasamy
` (7 more replies)
0 siblings, 8 replies; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-07 2:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
Currently, monitor interface not supported. Therefore, add the missed TLV
tags parsing in the monitor parser, configure the monitor vdev state
identifier with HTT filter setup.
Depends-On:
[PATCH v3 0/3] wifi: ath12k: Refactor monitor Rx handler
https://lore.kernel.org/all/20241224143613.164921-1-quic_periyasa@quicinc.com/
[PATCH v2 00/14] wifi: ath12k: Enable monitor ring for updating station dump in QCN9274
https://lore.kernel.org/all/20241223060132.3506372-1-quic_ppranees@quicinc.com/
[PATCH v2 00/10] wifi: ath12k: Add peer extended Rx statistics debugfs support
https://lore.kernel.org/all/20241224161442.263729-1-quic_periyasa@quicinc.com/
Hari Chandrakanthan (1):
wifi: ath12k: fix link valid field initialization in the monitor Rx
Karthikeyan Periyasamy (1):
wifi: ath12k: Replace band define G with GHZ where appropriate
P Praneesh (5):
wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path
wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV
wifi: ath12k: change the status update in the monitor Rx
wifi: ath12k: Avoid packet offset and FCS length from Rx TLV
wifi: ath12k: add monitor interface support on QCN9274
drivers/net/wireless/ath/ath12k/core.c | 7 +-
drivers/net/wireless/ath/ath12k/core.h | 20 +-
drivers/net/wireless/ath/ath12k/dp.h | 4 +-
drivers/net/wireless/ath/ath12k/dp_mon.c | 364 +++++++++++++++++++----
drivers/net/wireless/ath/ath12k/dp_mon.h | 5 +-
drivers/net/wireless/ath/ath12k/dp_rx.c | 7 +-
drivers/net/wireless/ath/ath12k/dp_tx.c | 4 +-
drivers/net/wireless/ath/ath12k/hal_rx.h | 17 +-
drivers/net/wireless/ath/ath12k/hw.c | 4 +-
drivers/net/wireless/ath/ath12k/mac.c | 76 +++--
drivers/net/wireless/ath/ath12k/wmi.c | 38 +--
drivers/net/wireless/ath/ath12k/wmi.h | 20 +-
12 files changed, 439 insertions(+), 127 deletions(-)
base-commit: 09fa3b6974a1245ddd0751747609431494ba5b4f
prerequisite-patch-id: 5f5721a4c9f1c26659fd8f09a8eda648d8ecccf5
prerequisite-patch-id: 59cc2121e734e4e1e7e461a3ae24f3f1f9d0fa02
prerequisite-patch-id: fdc512e43ea7cb6c097ba4c0d9c661a74c0c2a6f
prerequisite-patch-id: afb04ab90da26435239077de723d1276946a194a
prerequisite-patch-id: 1b12bea72973c14f461b8202eed9432f27932876
prerequisite-patch-id: a6719494f46b8568504be8c64255676e67b4deda
prerequisite-patch-id: 054756eb1705babff324a743e62685bb78035198
prerequisite-patch-id: 889c4a0174fac23261705a42b46e923d7e7a0a18
prerequisite-patch-id: ea0321fbd8a59c09191873f59b6aea8225f4b8e5
prerequisite-patch-id: 3c8ccb635d319f8755649e445b68feb615fd82c4
prerequisite-patch-id: d516b2a3196218f42fdf4567516a1fd2c8b4c40f
prerequisite-patch-id: a2c59b4e468384e27d934a986e5fe9a951685fd9
prerequisite-patch-id: 359fecf93ef53f39243cc1b3466ab06fbd33cc71
prerequisite-patch-id: bf0b6542c65299c0bfa7fef2da6f09dd8453c39f
prerequisite-patch-id: 1dc79cafb399be590d1e418afcc5a719ae35834f
prerequisite-patch-id: fb1e39f2dce024ff692b0e6b112dc90c6a43ad00
prerequisite-patch-id: 9ea3943ae0b6e6a5a09cb648eaa35f8087967ac3
prerequisite-patch-id: 35da9ccb2466675b50e819029c13cbda70702fc2
prerequisite-patch-id: 282cdacca7b9bbef5a94b1a78457304d38362af2
prerequisite-patch-id: 5bdb2bd29cd4c92d23708432f451e92951c23f0e
prerequisite-patch-id: 4b6f75cfa4d25f974f8fa61adbc85fff35a187fa
prerequisite-patch-id: 6a015b7d89f3d61adb5d60eff2d63fea10d9c3b0
prerequisite-patch-id: eab7d17c9891dd9a1c6152d8e180b72a08980956
prerequisite-patch-id: 12367e8ecdccf254c41bd0518cea6877e4673bb3
prerequisite-patch-id: d94f4a9c9b0b3bdc9e709efcae0cba4983bf440f
prerequisite-patch-id: 8c9df1e16a25c3b9a3fb709ba9bc8d37e6f14a5e
prerequisite-patch-id: 35a364a01fcf09cff2d3c7a7630465e4977b5c06
--
2.34.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/7] wifi: ath12k: fix link valid field initialization in the monitor Rx
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
@ 2025-01-07 2:10 ` Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 2/7] wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path Karthikeyan Periyasamy
` (6 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-07 2:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Hari Chandrakanthan, Karthikeyan Periyasamy
From: Hari Chandrakanthan <quic_haric@quicinc.com>
Currently, the link_valid field is not initialized in the monitor Rx path.
This can result in random values for the link_valid and link_id leads to
undefined behaviour in mac80211. Therefore, initialize the link_valid
field in the monitor Rx path.
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: Hari Chandrakanthan <quic_haric@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index d78ea638451e..84289e4dacb1 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include "dp_mon.h"
@@ -1999,6 +1999,8 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
bool is_mcbc = rxcb->is_mcbc;
bool is_eapol_tkip = rxcb->is_eapol;
+ status->link_valid = 0;
+
if ((status->encoding == RX_ENC_HE) && !(status->flag & RX_FLAG_RADIOTAP_HE) &&
!(status->flag & RX_FLAG_SKIP_MONITOR)) {
he = skb_push(msdu, sizeof(known));
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/7] wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 1/7] wifi: ath12k: fix link valid field initialization in the monitor Rx Karthikeyan Periyasamy
@ 2025-01-07 2:10 ` Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 3/7] wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV Karthikeyan Periyasamy
` (5 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-07 2:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, P Praneesh, Karthikeyan Periyasamy
From: P Praneesh <quic_ppranees@quicinc.com>
Currently, the monitor Rx parser handler is inherited from the ath11k.
However, the ath12k 802.11be hardware does not report the Rx TLV header
in the MSDU data. Instead, the hardware reports those TLVs under the
following TLV tags:
1. Buffer address
2. MPDU start
3. MPDU end
4. MSDU end
Therefore, add support for parsing the above TLVs in the Rx monitor path
and use this information for MSDU buffer and status updates.
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: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp.h | 4 +-
drivers/net/wireless/ath/ath12k/dp_mon.c | 157 ++++++++++++++++++++++-
drivers/net/wireless/ath/ath12k/dp_mon.h | 4 +-
drivers/net/wireless/ath/ath12k/dp_rx.c | 3 +-
drivers/net/wireless/ath/ath12k/hal_rx.h | 14 +-
5 files changed, 172 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
index 07bad88552c7..6d063958ab2c 100644
--- a/drivers/net/wireless/ath/ath12k/dp.h
+++ b/drivers/net/wireless/ath/ath12k/dp.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef ATH12K_DP_H
@@ -106,6 +106,8 @@ struct dp_mon_mpdu {
struct list_head list;
struct sk_buff *head;
struct sk_buff *tail;
+ u32 err_bitmap;
+ u8 decap_format;
};
#define DP_MON_MAX_STATUS_BUF 32
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 84289e4dacb1..c82dc71f8790 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -1676,7 +1676,7 @@ ath12k_dp_mon_rx_parse_status_tlv(struct ath12k *ar,
u32_get_bits(info[0], HAL_RX_MPDU_START_INFO0_PPDU_ID);
}
- break;
+ return HAL_RX_MON_STATUS_MPDU_START;
}
case HAL_RX_MSDU_START:
/* TODO: add msdu start parsing logic */
@@ -2119,6 +2119,144 @@ static int ath12k_dp_mon_rx_deliver(struct ath12k *ar,
return -EINVAL;
}
+static int ath12k_dp_pkt_set_pktlen(struct sk_buff *skb, u32 len)
+{
+ if (skb->len > len) {
+ skb_trim(skb, len);
+ } else {
+ if (skb_tailroom(skb) < len - skb->len) {
+ if ((pskb_expand_head(skb, 0,
+ len - skb->len - skb_tailroom(skb),
+ GFP_ATOMIC))) {
+ return -ENOMEM;
+ }
+ }
+ skb_put(skb, (len - skb->len));
+ }
+
+ return 0;
+}
+
+static void ath12k_dp_mon_parse_rx_msdu_end_err(u32 info, u32 *errmap)
+{
+ if (info & RX_MSDU_END_INFO13_FCS_ERR)
+ *errmap |= HAL_RX_MPDU_ERR_FCS;
+
+ if (info & RX_MSDU_END_INFO13_DECRYPT_ERR)
+ *errmap |= HAL_RX_MPDU_ERR_DECRYPT;
+
+ if (info & RX_MSDU_END_INFO13_TKIP_MIC_ERR)
+ *errmap |= HAL_RX_MPDU_ERR_TKIP_MIC;
+
+ if (info & RX_MSDU_END_INFO13_A_MSDU_ERROR)
+ *errmap |= HAL_RX_MPDU_ERR_AMSDU_ERR;
+
+ if (info & RX_MSDU_END_INFO13_OVERFLOW_ERR)
+ *errmap |= HAL_RX_MPDU_ERR_OVERFLOW;
+
+ if (info & RX_MSDU_END_INFO13_MSDU_LEN_ERR)
+ *errmap |= HAL_RX_MPDU_ERR_MSDU_LEN;
+
+ if (info & RX_MSDU_END_INFO13_MPDU_LEN_ERR)
+ *errmap |= HAL_RX_MPDU_ERR_MPDU_LEN;
+}
+
+static int
+ath12k_dp_mon_parse_status_msdu_end(struct ath12k_mon_data *pmon,
+ const struct hal_rx_msdu_end *msdu_end)
+{
+ struct dp_mon_mpdu *mon_mpdu = pmon->mon_mpdu;
+
+ ath12k_dp_mon_parse_rx_msdu_end_err(__le32_to_cpu(msdu_end->info2),
+ &mon_mpdu->err_bitmap);
+
+ mon_mpdu->decap_format = le32_get_bits(msdu_end->info1,
+ RX_MSDU_END_INFO11_DECAP_FORMAT);
+
+ return 0;
+}
+
+static int
+ath12k_dp_mon_parse_status_buf(struct ath12k *ar,
+ struct ath12k_mon_data *pmon,
+ const struct dp_mon_packet_info *packet_info)
+{
+ struct ath12k_base *ab = ar->ab;
+ struct dp_rxdma_mon_ring *buf_ring = &ab->dp.rxdma_mon_buf_ring;
+ struct sk_buff *msdu;
+ int buf_id;
+ u32 offset;
+
+ buf_id = u32_get_bits(packet_info->cookie, DP_RXDMA_BUF_COOKIE_BUF_ID);
+
+ spin_lock_bh(&buf_ring->idr_lock);
+ msdu = idr_remove(&buf_ring->bufs_idr, buf_id);
+ spin_unlock_bh(&buf_ring->idr_lock);
+
+ if (unlikely(!msdu)) {
+ ath12k_warn(ab, "mon dest desc with inval buf_id %d\n", buf_id);
+ return 0;
+ }
+
+ dma_unmap_single(ab->dev, ATH12K_SKB_RXCB(msdu)->paddr,
+ msdu->len + skb_tailroom(msdu),
+ DMA_FROM_DEVICE);
+
+ offset = packet_info->dma_length + ATH12K_MON_RX_DOT11_OFFSET;
+ if (ath12k_dp_pkt_set_pktlen(msdu, offset)) {
+ dev_kfree_skb_any(msdu);
+ goto dest_replenish;
+ }
+
+ if (!pmon->mon_mpdu->head)
+ pmon->mon_mpdu->head = msdu;
+ else
+ pmon->mon_mpdu->tail->next = msdu;
+
+ pmon->mon_mpdu->tail = msdu;
+
+dest_replenish:
+ ath12k_dp_mon_buf_replenish(ab, buf_ring, 1);
+
+ return 0;
+}
+
+static int
+ath12k_dp_mon_parse_rx_dest_tlv(struct ath12k *ar,
+ struct ath12k_mon_data *pmon,
+ enum hal_rx_mon_status hal_status,
+ const void *tlv_data)
+{
+ switch (hal_status) {
+ case HAL_RX_MON_STATUS_MPDU_START:
+ if (WARN_ON_ONCE(pmon->mon_mpdu))
+ break;
+
+ pmon->mon_mpdu = kzalloc(sizeof(*pmon->mon_mpdu), GFP_ATOMIC);
+ if (!pmon->mon_mpdu)
+ return -ENOMEM;
+ break;
+ case HAL_RX_MON_STATUS_BUF_ADDR:
+ return ath12k_dp_mon_parse_status_buf(ar, pmon, tlv_data);
+ case HAL_RX_MON_STATUS_MPDU_END:
+ /* If no MSDU then free empty MPDU */
+ if (pmon->mon_mpdu->tail) {
+ pmon->mon_mpdu->tail->next = NULL;
+ list_add_tail(&pmon->mon_mpdu->list, &pmon->dp_rx_mon_mpdu_list);
+ } else {
+ kfree(pmon->mon_mpdu);
+ }
+ pmon->mon_mpdu = NULL;
+ break;
+ case HAL_RX_MON_STATUS_MSDU_END:
+ return ath12k_dp_mon_parse_status_msdu_end(pmon, tlv_data);
+ default:
+ break;
+ }
+
+ return 0;
+}
+
static enum hal_rx_mon_status
ath12k_dp_mon_parse_rx_dest(struct ath12k *ar, struct ath12k_mon_data *pmon,
struct sk_buff *skb)
@@ -2145,14 +2283,20 @@ ath12k_dp_mon_parse_rx_dest(struct ath12k *ar, struct ath12k_mon_data *pmon,
tlv_len = le64_get_bits(tlv->tl, HAL_TLV_64_HDR_LEN);
hal_status = ath12k_dp_mon_rx_parse_status_tlv(ar, pmon, tlv);
+
+ if (ar->monitor_started &&
+ ath12k_dp_mon_parse_rx_dest_tlv(ar, pmon, hal_status, tlv->value))
+ return HAL_RX_MON_STATUS_PPDU_DONE;
+
ptr += sizeof(*tlv) + tlv_len;
ptr = PTR_ALIGN(ptr, HAL_TLV_64_ALIGN);
- if ((ptr - skb->data) >= DP_RX_BUFFER_SIZE)
+ if ((ptr - skb->data) > skb->len)
break;
} while ((hal_status == HAL_RX_MON_STATUS_PPDU_NOT_DONE) ||
(hal_status == HAL_RX_MON_STATUS_BUF_ADDR) ||
+ (hal_status == HAL_RX_MON_STATUS_MPDU_START) ||
(hal_status == HAL_RX_MON_STATUS_MPDU_END) ||
(hal_status == HAL_RX_MON_STATUS_MSDU_END));
@@ -2173,9 +2317,11 @@ ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
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;
+ enum hal_rx_mon_status hal_status;
- ath12k_dp_mon_parse_rx_dest(ar, pmon, skb);
+ hal_status = ath12k_dp_mon_parse_rx_dest(ar, pmon, skb);
+ if (hal_status != HAL_RX_MON_STATUS_PPDU_DONE)
+ return hal_status;
list_for_each_entry_safe(mon_mpdu, tmp, &pmon->dp_rx_mon_mpdu_list, list) {
list_del(&mon_mpdu->list);
@@ -2189,6 +2335,7 @@ ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
kfree(mon_mpdu);
}
+
return hal_status;
}
@@ -3375,7 +3522,7 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int *budget,
ath12k_dp_mon_rx_memset_ppdu_info(ppdu_info);
while ((skb = __skb_dequeue(&skb_list))) {
- hal_status = ath12k_dp_mon_parse_rx_dest(ar, pmon, skb);
+ hal_status = ath12k_dp_mon_rx_parse_mon_status(ar, pmon, skb, napi);
if (hal_status != HAL_RX_MON_STATUS_PPDU_DONE) {
ppdu_info->ppdu_continuation = true;
dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.h b/drivers/net/wireless/ath/ath12k/dp_mon.h
index e4368eb42aca..b039f6b9277c 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-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef ATH12K_DP_MON_H
@@ -9,6 +9,8 @@
#include "core.h"
+#define ATH12K_MON_RX_DOT11_OFFSET 5
+
enum dp_monitor_mode {
ATH12K_DP_TX_MONITOR_MODE,
ATH12K_DP_RX_MONITOR_MODE
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 689a011439f8..0aacd6f80efe 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/ieee80211.h>
@@ -4439,6 +4439,7 @@ int ath12k_dp_rx_pdev_mon_attach(struct ath12k *ar)
pmon->mon_last_linkdesc_paddr = 0;
pmon->mon_last_buf_cookie = DP_RX_DESC_COOKIE_MAX + 1;
+ INIT_LIST_HEAD(&pmon->dp_rx_mon_mpdu_list);
spin_lock_init(&pmon->mon_lock);
return 0;
diff --git a/drivers/net/wireless/ath/ath12k/hal_rx.h b/drivers/net/wireless/ath/ath12k/hal_rx.h
index 764730c447de..ec272e341481 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-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef ATH12K_HAL_RX_H
@@ -111,11 +111,12 @@ enum hal_rx_mon_status {
HAL_RX_MON_STATUS_PPDU_DONE,
HAL_RX_MON_STATUS_BUF_DONE,
HAL_RX_MON_STATUS_BUF_ADDR,
+ HAL_RX_MON_STATUS_MPDU_START,
HAL_RX_MON_STATUS_MPDU_END,
HAL_RX_MON_STATUS_MSDU_END,
};
-#define HAL_RX_MAX_MPDU 256
+#define HAL_RX_MAX_MPDU 1024
#define HAL_RX_NUM_WORDS_PER_PPDU_BITMAP (HAL_RX_MAX_MPDU >> 5)
struct hal_rx_user_status {
@@ -509,6 +510,15 @@ struct hal_rx_mpdu_start {
__le32 rsvd2[16];
} __packed;
+struct hal_rx_msdu_end {
+ __le32 info0;
+ __le32 rsvd0[18];
+ __le32 info1;
+ __le32 rsvd1[10];
+ __le32 info2;
+ __le32 rsvd2;
+} __packed;
+
#define HAL_RX_PPDU_END_DURATION GENMASK(23, 0)
struct hal_rx_ppdu_end_duration {
__le32 rsvd0[9];
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/7] wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 1/7] wifi: ath12k: fix link valid field initialization in the monitor Rx Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 2/7] wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path Karthikeyan Periyasamy
@ 2025-01-07 2:10 ` Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 4/7] wifi: ath12k: Replace band define G with GHZ where appropriate Karthikeyan Periyasamy
` (4 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-07 2:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, P Praneesh, Karthikeyan Periyasamy
From: P Praneesh <quic_ppranees@quicinc.com>
Currently, error bitmap and decap format information are fetched from the
MSDU Rx TLV data. This logic is inherited from ath11k. However, for ath12k
802.11be hardware, the Rx TLV will not be present in the MSDU data.
Instead, this information is reported separately under the MSDU END TLV
tag. Therefore, remove the existing fetch code, handle the MSDU END TLV
tag and fetch the above information to store it in the mon_mpdu data
structure for use in the merge MSDU procedure.
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: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 58 ++++++++++--------------
1 file changed, 23 insertions(+), 35 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index c82dc71f8790..4e5c645b56e0 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -1731,30 +1731,26 @@ 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,
- struct sk_buff *head_msdu, struct sk_buff *tail_msdu,
- struct ieee80211_rx_status *rxs, bool *fcs_err)
+ struct dp_mon_mpdu *mon_mpdu,
+ struct ieee80211_rx_status *rxs)
{
struct ath12k_base *ab = ar->ab;
struct sk_buff *msdu, *mpdu_buf, *prev_buf, *head_frag_list;
+ struct sk_buff *head_msdu, *tail_msdu;
struct hal_rx_desc *rx_desc, *tail_rx_desc;
- u8 *hdr_desc, *dest, decap_format;
+ u8 *hdr_desc, *dest, decap_format = mon_mpdu->decap_format;
struct ieee80211_hdr_3addr *wh;
- u32 err_bitmap, frag_list_sum_len = 0;
+ u32 frag_list_sum_len = 0;
mpdu_buf = NULL;
+ head_msdu = mon_mpdu->head;
+ tail_msdu = mon_mpdu->tail;
if (!head_msdu)
goto err_merge_fail;
- rx_desc = (struct hal_rx_desc *)head_msdu->data;
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, tail_rx_desc);
-
ath12k_dp_rx_h_ppdu(ar, tail_rx_desc, rxs);
if (decap_format == DP_RX_DECAP_TYPE_RAW) {
@@ -1983,7 +1979,8 @@ static void ath12k_dp_mon_update_radiotap(struct ath12k *ar,
static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct *napi,
struct sk_buff *msdu,
- struct ieee80211_rx_status *status)
+ struct ieee80211_rx_status *status,
+ u8 decap)
{
static const struct ieee80211_radiotap_he known = {
.data1 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN |
@@ -1995,7 +1992,6 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
struct ieee80211_sta *pubsta = NULL;
struct ath12k_peer *peer;
struct ath12k_skb_rxcb *rxcb = ATH12K_SKB_RXCB(msdu);
- u8 decap = DP_RX_DECAP_TYPE_RAW;
bool is_mcbc = rxcb->is_mcbc;
bool is_eapol_tkip = rxcb->is_eapol;
@@ -2008,8 +2004,6 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
status->flag |= RX_FLAG_RADIOTAP_HE;
}
- if (!(status->flag & RX_FLAG_ONLY_MONITOR))
- decap = ath12k_dp_rx_h_decap_type(ar->ab, rxcb->rx_desc);
spin_lock_bh(&ar->ab->base_lock);
peer = ath12k_dp_rx_h_find_peer(ar->ab, msdu);
if (peer && peer->sta) {
@@ -2066,25 +2060,23 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
}
static int ath12k_dp_mon_rx_deliver(struct ath12k *ar,
- struct sk_buff *head_msdu, struct sk_buff *tail_msdu,
+ struct dp_mon_mpdu *mon_mpdu,
struct hal_rx_mon_ppdu_info *ppduinfo,
struct napi_struct *napi)
{
struct ath12k_pdev_dp *dp = &ar->dp;
struct sk_buff *mon_skb, *skb_next, *header;
struct ieee80211_rx_status *rxs = &dp->rx_status;
- bool fcs_err = false;
+ u8 decap = DP_RX_DECAP_TYPE_RAW;
- mon_skb = ath12k_dp_mon_rx_merg_msdus(ar,
- head_msdu, tail_msdu,
- rxs, &fcs_err);
+ mon_skb = ath12k_dp_mon_rx_merg_msdus(ar, mon_mpdu, rxs);
if (!mon_skb)
goto mon_deliver_fail;
header = mon_skb;
rxs->flag = 0;
- if (fcs_err)
+ if (mon_mpdu->err_bitmap & HAL_RX_MPDU_ERR_FCS)
rxs->flag = RX_FLAG_FAILED_FCS_CRC;
do {
@@ -2101,8 +2093,12 @@ static int ath12k_dp_mon_rx_deliver(struct ath12k *ar,
rxs->flag |= RX_FLAG_ALLOW_SAME_PN;
}
rxs->flag |= RX_FLAG_ONLY_MONITOR;
+
+ if (!(rxs->flag & RX_FLAG_ONLY_MONITOR))
+ decap = mon_mpdu->decap_format;
+
ath12k_dp_mon_update_radiotap(ar, ppduinfo, mon_skb, rxs);
- ath12k_dp_mon_rx_deliver_msdu(ar, napi, mon_skb, rxs);
+ ath12k_dp_mon_rx_deliver_msdu(ar, napi, mon_skb, rxs, decap);
mon_skb = skb_next;
} while (mon_skb);
rxs->flag = 0;
@@ -2110,7 +2106,7 @@ static int ath12k_dp_mon_rx_deliver(struct ath12k *ar,
return 0;
mon_deliver_fail:
- mon_skb = head_msdu;
+ mon_skb = mon_mpdu->head;
while (mon_skb) {
skb_next = mon_skb->next;
dev_kfree_skb_any(mon_skb);
@@ -2316,7 +2312,6 @@ ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
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_status = ath12k_dp_mon_parse_rx_dest(ar, pmon, skb);
@@ -2325,13 +2320,9 @@ ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
list_for_each_entry_safe(mon_mpdu, tmp, &pmon->dp_rx_mon_mpdu_list, list) {
list_del(&mon_mpdu->list);
- head_msdu = mon_mpdu->head;
- tail_msdu = mon_mpdu->tail;
- if (head_msdu && tail_msdu) {
- ath12k_dp_mon_rx_deliver(ar, head_msdu,
- tail_msdu, ppdu_info, napi);
- }
+ if (mon_mpdu->head && mon_mpdu->tail)
+ ath12k_dp_mon_rx_deliver(ar, mon_mpdu, ppdu_info, napi);
kfree(mon_mpdu);
}
@@ -3016,16 +3007,13 @@ ath12k_dp_mon_tx_process_ppdu_info(struct ath12k *ar,
struct dp_mon_tx_ppdu_info *tx_ppdu_info)
{
struct dp_mon_mpdu *tmp, *mon_mpdu;
- 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, head_msdu, tail_msdu,
+ if (mon_mpdu->head)
+ ath12k_dp_mon_rx_deliver(ar, mon_mpdu,
&tx_ppdu_info->rx_status, napi);
kfree(mon_mpdu);
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/7] wifi: ath12k: Replace band define G with GHZ where appropriate
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
` (2 preceding siblings ...)
2025-01-07 2:10 ` [PATCH 3/7] wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV Karthikeyan Periyasamy
@ 2025-01-07 2:10 ` Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 5/7] wifi: ath12k: change the status update in the monitor Rx Karthikeyan Periyasamy
` (3 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-07 2:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
Currently, band define and enum are with the word 'G'. Replace it with
more appropriate 'GHZ' for clarity and correctness.
No functional changes. Only compile tested.
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/core.h | 10 ++---
drivers/net/wireless/ath/ath12k/dp_rx.c | 4 +-
drivers/net/wireless/ath/ath12k/mac.c | 54 ++++++++++++-------------
drivers/net/wireless/ath/ath12k/wmi.c | 38 ++++++++---------
drivers/net/wireless/ath/ath12k/wmi.h | 20 ++++-----
5 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 3e67cd00abf8..71cdbcf8172a 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef ATH12K_CORE_H
@@ -522,11 +522,11 @@ struct ath12k_sta {
enum ieee80211_sta_state state;
};
-#define ATH12K_MIN_5G_FREQ 4150
-#define ATH12K_MIN_6G_FREQ 5925
-#define ATH12K_MAX_6G_FREQ 7115
+#define ATH12K_MIN_5GHZ_FREQ 4150
+#define ATH12K_MIN_6GHZ_FREQ 5925
+#define ATH12K_MAX_6GHZ_FREQ 7115
#define ATH12K_NUM_CHANS 101
-#define ATH12K_MAX_5G_CHAN 173
+#define ATH12K_MAX_5GHZ_CHAN 173
enum ath12k_hw_state {
ATH12K_HW_STATE_OFF,
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 0aacd6f80efe..090d97ee6a3e 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -2431,8 +2431,8 @@ void ath12k_dp_rx_h_ppdu(struct ath12k *ar, struct hal_rx_desc *rx_desc,
channel_num = meta_data;
center_freq = meta_data >> 16;
- if (center_freq >= ATH12K_MIN_6G_FREQ &&
- center_freq <= ATH12K_MAX_6G_FREQ) {
+ if (center_freq >= ATH12K_MIN_6GHZ_FREQ &&
+ center_freq <= ATH12K_MAX_6GHZ_FREQ) {
rx_status->band = NL80211_BAND_6GHZ;
rx_status->freq = center_freq;
} else if (channel_num >= 1 && channel_num <= 14) {
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 529647810f8c..abf7c7ed8967 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <net/mac80211.h>
@@ -769,12 +769,12 @@ static bool ath12k_mac_band_match(enum nl80211_band band1, enum WMI_HOST_WLAN_BA
{
switch (band1) {
case NL80211_BAND_2GHZ:
- if (band2 & WMI_HOST_WLAN_2G_CAP)
+ if (band2 & WMI_HOST_WLAN_2GHZ_CAP)
return true;
break;
case NL80211_BAND_5GHZ:
case NL80211_BAND_6GHZ:
- if (band2 & WMI_HOST_WLAN_5G_CAP)
+ if (band2 & WMI_HOST_WLAN_5GHZ_CAP)
return true;
break;
default:
@@ -875,7 +875,7 @@ static int ath12k_mac_txpower_recalc(struct ath12k *ar)
ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "txpower to set in hw %d\n",
txpower / 2);
- if ((pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) &&
+ if ((pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP) &&
ar->txpower_limit_2g != txpower) {
param = WMI_PDEV_PARAM_TXPOWER_LIMIT2G;
ret = ath12k_wmi_pdev_set_param(ar, param,
@@ -885,7 +885,7 @@ static int ath12k_mac_txpower_recalc(struct ath12k *ar)
ar->txpower_limit_2g = txpower;
}
- if ((pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP) &&
+ if ((pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP) &&
ar->txpower_limit_5g != txpower) {
param = WMI_PDEV_PARAM_TXPOWER_LIMIT5G;
ret = ath12k_wmi_pdev_set_param(ar, param,
@@ -1167,12 +1167,12 @@ static int ath12k_mac_monitor_vdev_create(struct ath12k *ar)
arg.pdev_id = pdev->pdev_id;
arg.if_stats_id = ATH12K_INVAL_VDEV_STATS_ID;
- if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
+ if (pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
arg.chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
arg.chains[NL80211_BAND_2GHZ].rx = ar->num_rx_chains;
}
- if (pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP) {
+ if (pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
arg.chains[NL80211_BAND_5GHZ].tx = ar->num_tx_chains;
arg.chains[NL80211_BAND_5GHZ].rx = ar->num_rx_chains;
}
@@ -3697,7 +3697,7 @@ static void ath12k_mac_bss_info_changed(struct ath12k *ar,
else
rateidx = ffs(info->basic_rates) - 1;
- if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP)
+ if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP)
rateidx += ATH12K_MAC_FIRST_OFDM_RATE_IDX;
bitrate = ath12k_legacy_rates[rateidx].bitrate;
@@ -3974,9 +3974,9 @@ ath12k_mac_select_scan_device(struct ieee80211_hw *hw,
* split the hw request and perform multiple scans
*/
- if (center_freq < ATH12K_MIN_5G_FREQ)
+ if (center_freq < ATH12K_MIN_5GHZ_FREQ)
band = NL80211_BAND_2GHZ;
- else if (center_freq < ATH12K_MIN_6G_FREQ)
+ else if (center_freq < ATH12K_MIN_6GHZ_FREQ)
band = NL80211_BAND_5GHZ;
else
band = NL80211_BAND_6GHZ;
@@ -6326,7 +6326,7 @@ static void ath12k_mac_setup_ht_vht_cap(struct ath12k *ar,
rate_cap_tx_chainmask = ar->cfg_tx_chainmask >> cap->tx_chain_mask_shift;
rate_cap_rx_chainmask = ar->cfg_rx_chainmask >> cap->rx_chain_mask_shift;
- if (cap->supported_bands & WMI_HOST_WLAN_2G_CAP) {
+ if (cap->supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
band = &ar->mac.sbands[NL80211_BAND_2GHZ];
ht_cap = cap->band[NL80211_BAND_2GHZ].ht_cap_info;
if (ht_cap_info)
@@ -6335,7 +6335,7 @@ static void ath12k_mac_setup_ht_vht_cap(struct ath12k *ar,
rate_cap_rx_chainmask);
}
- if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
+ if (cap->supported_bands & WMI_HOST_WLAN_5GHZ_CAP &&
(ar->ab->hw_params->single_pdev_only ||
!ar->supports_6ghz)) {
band = &ar->mac.sbands[NL80211_BAND_5GHZ];
@@ -6743,7 +6743,7 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
enum nl80211_band band;
int count;
- if (cap->supported_bands & WMI_HOST_WLAN_2G_CAP) {
+ if (cap->supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
band = NL80211_BAND_2GHZ;
count = ath12k_mac_copy_sband_iftype_data(ar, cap,
ar->mac.iftype[band],
@@ -6753,7 +6753,7 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
count);
}
- if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP) {
+ if (cap->supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
band = NL80211_BAND_5GHZ;
count = ath12k_mac_copy_sband_iftype_data(ar, cap,
ar->mac.iftype[band],
@@ -6763,7 +6763,7 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
count);
}
- if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
+ if (cap->supported_bands & WMI_HOST_WLAN_5GHZ_CAP &&
ar->supports_6ghz) {
band = NL80211_BAND_6GHZ;
count = ath12k_mac_copy_sband_iftype_data(ar, cap,
@@ -7635,15 +7635,15 @@ static int ath12k_mac_setup_vdev_create_arg(struct ath12k_link_vif *arvif,
return ret;
}
- if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
+ if (pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
arg->chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
arg->chains[NL80211_BAND_2GHZ].rx = ar->num_rx_chains;
}
- if (pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP) {
+ if (pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
arg->chains[NL80211_BAND_5GHZ].tx = ar->num_tx_chains;
arg->chains[NL80211_BAND_5GHZ].rx = ar->num_rx_chains;
}
- if (pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP &&
+ if (pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP &&
ar->supports_6ghz) {
arg->chains[NL80211_BAND_6GHZ].tx = ar->num_tx_chains;
arg->chains[NL80211_BAND_6GHZ].rx = ar->num_rx_chains;
@@ -7672,7 +7672,7 @@ ath12k_mac_prepare_he_mode(struct ath12k_pdev *pdev, u32 viftype)
u32 *hecap_phy_ptr = NULL;
u32 hemode;
- if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP)
+ if (pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP)
cap_band = &pdev_cap->band[NL80211_BAND_2GHZ];
else
cap_band = &pdev_cap->band[NL80211_BAND_5GHZ];
@@ -10315,10 +10315,10 @@ static u32 ath12k_get_phy_id(struct ath12k *ar, u32 band)
struct ath12k_pdev *pdev = ar->pdev;
struct ath12k_pdev_cap *pdev_cap = &pdev->cap;
- if (band == WMI_HOST_WLAN_2G_CAP)
+ if (band == WMI_HOST_WLAN_2GHZ_CAP)
return pdev_cap->band[NL80211_BAND_2GHZ].phy_id;
- if (band == WMI_HOST_WLAN_5G_CAP)
+ if (band == WMI_HOST_WLAN_5GHZ_CAP)
return pdev_cap->band[NL80211_BAND_5GHZ].phy_id;
ath12k_warn(ar->ab, "unsupported phy cap:%d\n", band);
@@ -10343,7 +10343,7 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
reg_cap = &ar->ab->hal_reg_cap[ar->pdev_idx];
- if (supported_bands & WMI_HOST_WLAN_2G_CAP) {
+ if (supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
channels = kmemdup(ath12k_2ghz_channels,
sizeof(ath12k_2ghz_channels),
GFP_KERNEL);
@@ -10359,7 +10359,7 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
bands[NL80211_BAND_2GHZ] = band;
if (ar->ab->hw_params->single_pdev_only) {
- phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_2G_CAP);
+ phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_2GHZ_CAP);
reg_cap = &ar->ab->hal_reg_cap[phy_id];
}
ath12k_mac_update_ch_list(ar, band,
@@ -10367,8 +10367,8 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
reg_cap->high_2ghz_chan);
}
- if (supported_bands & WMI_HOST_WLAN_5G_CAP) {
- if (reg_cap->high_5ghz_chan >= ATH12K_MIN_6G_FREQ) {
+ if (supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
+ if (reg_cap->high_5ghz_chan >= ATH12K_MIN_6GHZ_FREQ) {
channels = kmemdup(ath12k_6ghz_channels,
sizeof(ath12k_6ghz_channels), GFP_KERNEL);
if (!channels) {
@@ -10390,7 +10390,7 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
ah->use_6ghz_regd = true;
}
- if (reg_cap->low_5ghz_chan < ATH12K_MIN_6G_FREQ) {
+ if (reg_cap->low_5ghz_chan < ATH12K_MIN_6GHZ_FREQ) {
channels = kmemdup(ath12k_5ghz_channels,
sizeof(ath12k_5ghz_channels),
GFP_KERNEL);
@@ -10409,7 +10409,7 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
bands[NL80211_BAND_5GHZ] = band;
if (ar->ab->hw_params->single_pdev_only) {
- phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_5G_CAP);
+ phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_5GHZ_CAP);
reg_cap = &ar->ab->hal_reg_cap[phy_id];
}
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 562b0615ed06..640b10ee8fe0 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/skbuff.h>
#include <linux/ctype.h>
@@ -514,10 +514,10 @@ ath12k_pull_mac_phy_cap_svc_ready_ext(struct ath12k_wmi_pdev *wmi_handle,
* band to band for a single radio, need to see how this should be
* handled.
*/
- if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_2G_CAP) {
+ if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_2GHZ_CAP) {
pdev_cap->tx_chain_mask = le32_to_cpu(mac_caps->tx_chain_mask_2g);
pdev_cap->rx_chain_mask = le32_to_cpu(mac_caps->rx_chain_mask_2g);
- } else if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_5G_CAP) {
+ } else if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_5GHZ_CAP) {
pdev_cap->vht_cap = le32_to_cpu(mac_caps->vht_cap_info_5g);
pdev_cap->vht_mcs = le32_to_cpu(mac_caps->vht_supp_mcs_5g);
pdev_cap->he_mcs = le32_to_cpu(mac_caps->he_supp_mcs_5g);
@@ -540,7 +540,7 @@ ath12k_pull_mac_phy_cap_svc_ready_ext(struct ath12k_wmi_pdev *wmi_handle,
pdev_cap->rx_chain_mask_shift =
find_first_bit((unsigned long *)&pdev_cap->rx_chain_mask, 32);
- if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_2G_CAP) {
+ if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_2GHZ_CAP) {
cap_band = &pdev_cap->band[NL80211_BAND_2GHZ];
cap_band->phy_id = le32_to_cpu(mac_caps->phy_id);
cap_band->max_bw_supported = le32_to_cpu(mac_caps->max_bw_supported_2g);
@@ -560,7 +560,7 @@ ath12k_pull_mac_phy_cap_svc_ready_ext(struct ath12k_wmi_pdev *wmi_handle,
le32_to_cpu(mac_caps->he_ppet2g.ppet16_ppet8_ru3_ru0[i]);
}
- if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_5G_CAP) {
+ if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_5GHZ_CAP) {
cap_band = &pdev_cap->band[NL80211_BAND_5GHZ];
cap_band->phy_id = le32_to_cpu(mac_caps->phy_id);
cap_band->max_bw_supported =
@@ -3584,15 +3584,15 @@ ath12k_fill_band_to_mac_param(struct ath12k_base *soc,
arg[i].pdev_id = pdev->pdev_id;
switch (pdev->cap.supported_bands) {
- case WMI_HOST_WLAN_2G_5G_CAP:
+ case WMI_HOST_WLAN_2GHZ_5GHZ_CAP:
arg[i].start_freq = hal_reg_cap->low_2ghz_chan;
arg[i].end_freq = hal_reg_cap->high_5ghz_chan;
break;
- case WMI_HOST_WLAN_2G_CAP:
+ case WMI_HOST_WLAN_2GHZ_CAP:
arg[i].start_freq = hal_reg_cap->low_2ghz_chan;
arg[i].end_freq = hal_reg_cap->high_2ghz_chan;
break;
- case WMI_HOST_WLAN_5G_CAP:
+ case WMI_HOST_WLAN_5GHZ_CAP:
arg[i].start_freq = hal_reg_cap->low_5ghz_chan;
arg[i].end_freq = hal_reg_cap->high_5ghz_chan;
break;
@@ -4637,7 +4637,7 @@ ath12k_wmi_tlv_mac_phy_caps_ext_parse(struct ath12k_base *ab,
bands = pdev->cap.supported_bands;
}
- if (bands & WMI_HOST_WLAN_2G_CAP) {
+ if (bands & WMI_HOST_WLAN_2GHZ_CAP) {
ath12k_wmi_eht_caps_parse(pdev, NL80211_BAND_2GHZ,
caps->eht_cap_mac_info_2ghz,
caps->eht_cap_phy_info_2ghz,
@@ -4646,7 +4646,7 @@ ath12k_wmi_tlv_mac_phy_caps_ext_parse(struct ath12k_base *ab,
caps->eht_cap_info_internal);
}
- if (bands & WMI_HOST_WLAN_5G_CAP) {
+ if (bands & WMI_HOST_WLAN_5GHZ_CAP) {
ath12k_wmi_eht_caps_parse(pdev, NL80211_BAND_5GHZ,
caps->eht_cap_mac_info_5ghz,
caps->eht_cap_phy_info_5ghz,
@@ -4913,9 +4913,9 @@ static int ath12k_pull_reg_chan_list_ext_update_ev(struct ath12k_base *ab,
for (i = 0; i < WMI_REG_CURRENT_MAX_AP_TYPE; i++) {
num_6g_reg_rules_ap[i] = reg_info->num_6g_reg_rules_ap[i];
- if (num_6g_reg_rules_ap[i] > MAX_6G_REG_RULES) {
+ if (num_6g_reg_rules_ap[i] > MAX_6GHZ_REG_RULES) {
ath12k_warn(ab, "Num 6G reg rules for AP mode(%d) exceeds max limit (num_6g_reg_rules_ap: %d, max_rules: %d)\n",
- i, num_6g_reg_rules_ap[i], MAX_6G_REG_RULES);
+ i, num_6g_reg_rules_ap[i], MAX_6GHZ_REG_RULES);
kfree(tb);
return -EINVAL;
}
@@ -4936,9 +4936,9 @@ static int ath12k_pull_reg_chan_list_ext_update_ev(struct ath12k_base *ab,
reg_info->num_6g_reg_rules_cl[WMI_REG_VLP_AP][i];
total_reg_rules += num_6g_reg_rules_cl[WMI_REG_VLP_AP][i];
- if (num_6g_reg_rules_cl[WMI_REG_INDOOR_AP][i] > MAX_6G_REG_RULES ||
- num_6g_reg_rules_cl[WMI_REG_STD_POWER_AP][i] > MAX_6G_REG_RULES ||
- num_6g_reg_rules_cl[WMI_REG_VLP_AP][i] > MAX_6G_REG_RULES) {
+ if (num_6g_reg_rules_cl[WMI_REG_INDOOR_AP][i] > MAX_6GHZ_REG_RULES ||
+ num_6g_reg_rules_cl[WMI_REG_STD_POWER_AP][i] > MAX_6GHZ_REG_RULES ||
+ num_6g_reg_rules_cl[WMI_REG_VLP_AP][i] > MAX_6GHZ_REG_RULES) {
ath12k_warn(ab, "Num 6g client reg rules exceeds max limit, for client(type: %d)\n",
i);
kfree(tb);
@@ -4964,7 +4964,7 @@ static int ath12k_pull_reg_chan_list_ext_update_ev(struct ath12k_base *ab,
* from 5G rules list.
*/
if (memcmp(reg_info->alpha2, "US", 2) == 0) {
- reg_info->num_5g_reg_rules = REG_US_5G_NUM_REG_RULES;
+ reg_info->num_5g_reg_rules = REG_US_5GHZ_NUM_REG_RULES;
num_5g_reg_rules = reg_info->num_5g_reg_rules;
}
@@ -6223,13 +6223,13 @@ static void ath12k_mgmt_rx_event(struct ath12k_base *ab, struct sk_buff *skb)
if (rx_ev.status & WMI_RX_STATUS_ERR_MIC)
status->flag |= RX_FLAG_MMIC_ERROR;
- if (rx_ev.chan_freq >= ATH12K_MIN_6G_FREQ &&
- rx_ev.chan_freq <= ATH12K_MAX_6G_FREQ) {
+ if (rx_ev.chan_freq >= ATH12K_MIN_6GHZ_FREQ &&
+ rx_ev.chan_freq <= ATH12K_MAX_6GHZ_FREQ) {
status->band = NL80211_BAND_6GHZ;
status->freq = rx_ev.chan_freq;
} else if (rx_ev.channel >= 1 && rx_ev.channel <= 14) {
status->band = NL80211_BAND_2GHZ;
- } else if (rx_ev.channel >= 36 && rx_ev.channel <= ATH12K_MAX_5G_CHAN) {
+ } else if (rx_ev.channel >= 36 && rx_ev.channel <= ATH12K_MAX_5GHZ_CHAN) {
status->band = NL80211_BAND_5GHZ;
} else {
/* Shouldn't happen unless list of advertised channels to
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index b6a197389277..e836aeca367a 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef ATH12K_WMI_H
@@ -215,9 +215,9 @@ enum wmi_host_hw_mode_priority {
};
enum WMI_HOST_WLAN_BAND {
- WMI_HOST_WLAN_2G_CAP = 1,
- WMI_HOST_WLAN_5G_CAP = 2,
- WMI_HOST_WLAN_2G_5G_CAP = 3,
+ WMI_HOST_WLAN_2GHZ_CAP = 1,
+ WMI_HOST_WLAN_5GHZ_CAP = 2,
+ WMI_HOST_WLAN_2GHZ_5GHZ_CAP = 3,
};
enum wmi_cmd_group {
@@ -2674,8 +2674,8 @@ enum wmi_channel_width {
* 2 - index for 160 MHz, first 3 bytes valid
* 3 - index for 320 MHz, first 3 bytes valid
*/
-#define WMI_MAX_EHT_SUPP_MCS_2G_SIZE 2
-#define WMI_MAX_EHT_SUPP_MCS_5G_SIZE 4
+#define WMI_MAX_EHT_SUPP_MCS_2GHZ_SIZE 2
+#define WMI_MAX_EHT_SUPP_MCS_5GHZ_SIZE 4
#define WMI_EHTCAP_TXRX_MCS_NSS_IDX_80 0
#define WMI_EHTCAP_TXRX_MCS_NSS_IDX_160 1
@@ -2714,8 +2714,8 @@ struct ath12k_wmi_caps_ext_params {
struct ath12k_wmi_ppe_threshold_params eht_ppet_2ghz;
struct ath12k_wmi_ppe_threshold_params eht_ppet_5ghz;
__le32 eht_cap_info_internal;
- __le32 eht_supp_mcs_ext_2ghz[WMI_MAX_EHT_SUPP_MCS_2G_SIZE];
- __le32 eht_supp_mcs_ext_5ghz[WMI_MAX_EHT_SUPP_MCS_5G_SIZE];
+ __le32 eht_supp_mcs_ext_2ghz[WMI_MAX_EHT_SUPP_MCS_2GHZ_SIZE];
+ __le32 eht_supp_mcs_ext_5ghz[WMI_MAX_EHT_SUPP_MCS_5GHZ_SIZE];
__le32 eml_capability;
__le32 mld_capability;
} __packed;
@@ -4072,8 +4072,8 @@ struct ath12k_wmi_eht_rate_set_params {
#define MAX_REG_RULES 10
#define REG_ALPHA2_LEN 2
-#define MAX_6G_REG_RULES 5
-#define REG_US_5G_NUM_REG_RULES 4
+#define MAX_6GHZ_REG_RULES 5
+#define REG_US_5GHZ_NUM_REG_RULES 4
enum wmi_start_event_param {
WMI_VDEV_START_RESP_EVENT = 0,
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/7] wifi: ath12k: change the status update in the monitor Rx
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
` (3 preceding siblings ...)
2025-01-07 2:10 ` [PATCH 4/7] wifi: ath12k: Replace band define G with GHZ where appropriate Karthikeyan Periyasamy
@ 2025-01-07 2:10 ` Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 6/7] wifi: ath12k: Avoid packet offset and FCS length from Rx TLV Karthikeyan Periyasamy
` (2 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-07 2:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, P Praneesh, Karthikeyan Periyasamy
From: P Praneesh <quic_ppranees@quicinc.com>
Currently, in the monitor Rx path, status is filled from the RX TLV header
present in the MSDU data. This logic is inherited from ath11k. However, in
the ath12k 802.11be hardware, the Rx TLV header is not present in the MSDU
data. This information is reported under various TLV tags. Therefore, avoid
the existing status filling by accumulating the needed information in the
PPDU information structure and fill the status.
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: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/core.h | 16 ++-
drivers/net/wireless/ath/ath12k/dp_mon.c | 138 ++++++++++++++++++++++-
drivers/net/wireless/ath/ath12k/hal_rx.h | 5 +-
3 files changed, 151 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 71cdbcf8172a..a47ca111a1de 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -522,9 +522,19 @@ struct ath12k_sta {
enum ieee80211_sta_state state;
};
-#define ATH12K_MIN_5GHZ_FREQ 4150
-#define ATH12K_MIN_6GHZ_FREQ 5925
-#define ATH12K_MAX_6GHZ_FREQ 7115
+#define ATH12K_HALF_20MHZ_BW 10
+#define ATH12K_2GHZ_MIN_CENTER 2412
+#define ATH12K_2GHZ_MAX_CENTER 2484
+#define ATH12K_5GHZ_MIN_CENTER 4900
+#define ATH12K_5GHZ_MAX_CENTER 5920
+#define ATH12K_6GHZ_MIN_CENTER 5935
+#define ATH12K_6GHZ_MAX_CENTER 7115
+#define ATH12K_MIN_2GHZ_FREQ (ATH12K_2GHZ_MIN_CENTER - ATH12K_HALF_20MHZ_BW - 1)
+#define ATH12K_MAX_2GHZ_FREQ (ATH12K_2GHZ_MAX_CENTER + ATH12K_HALF_20MHZ_BW + 1)
+#define ATH12K_MIN_5GHZ_FREQ (ATH12K_5GHZ_MIN_CENTER - ATH12K_HALF_20MHZ_BW)
+#define ATH12K_MAX_5GHZ_FREQ (ATH12K_5GHZ_MAX_CENTER + ATH12K_HALF_20MHZ_BW)
+#define ATH12K_MIN_6GHZ_FREQ (ATH12K_6GHZ_MIN_CENTER - ATH12K_HALF_20MHZ_BW)
+#define ATH12K_MAX_6GHZ_FREQ (ATH12K_6GHZ_MAX_CENTER + ATH12K_HALF_20MHZ_BW)
#define ATH12K_NUM_CHANS 101
#define ATH12K_MAX_5GHZ_CHAN 173
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 4e5c645b56e0..00e0c5df3e32 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -1729,18 +1729,128 @@ static void ath12k_dp_mon_rx_msdus_set_payload(struct ath12k *ar,
skb_pull(head_msdu, rx_pkt_offset + l2_hdr_offset);
}
+static void
+ath12k_dp_mon_fill_rx_stats_info(struct ath12k *ar,
+ struct hal_rx_mon_ppdu_info *ppdu_info,
+ struct ieee80211_rx_status *rx_status)
+{
+ u32 center_freq = ppdu_info->freq;
+
+ rx_status->freq = center_freq;
+ rx_status->bw = ath12k_mac_bw_to_mac80211_bw(ppdu_info->bw);
+ rx_status->nss = ppdu_info->nss;
+ rx_status->rate_idx = 0;
+ rx_status->encoding = RX_ENC_LEGACY;
+ rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
+
+ if (center_freq >= ATH12K_MIN_6GHZ_FREQ &&
+ center_freq <= ATH12K_MAX_6GHZ_FREQ) {
+ rx_status->band = NL80211_BAND_6GHZ;
+ } else if (center_freq >= ATH12K_MIN_2GHZ_FREQ &&
+ center_freq <= ATH12K_MAX_2GHZ_FREQ) {
+ rx_status->band = NL80211_BAND_2GHZ;
+ } else if (center_freq >= ATH12K_MIN_5GHZ_FREQ &&
+ center_freq <= ATH12K_MAX_5GHZ_FREQ) {
+ rx_status->band = NL80211_BAND_5GHZ;
+ } else {
+ rx_status->band = NUM_NL80211_BANDS;
+ }
+}
+
+static void
+ath12k_dp_mon_fill_rx_rate(struct ath12k *ar,
+ struct hal_rx_mon_ppdu_info *ppdu_info,
+ struct ieee80211_rx_status *rx_status)
+{
+ struct ieee80211_supported_band *sband;
+ enum rx_msdu_start_pkt_type pkt_type;
+ u8 rate_mcs, nss, sgi;
+ bool is_cck;
+
+ pkt_type = ppdu_info->preamble_type;
+ rate_mcs = ppdu_info->rate;
+ nss = ppdu_info->nss;
+ sgi = ppdu_info->gi;
+
+ switch (pkt_type) {
+ case RX_MSDU_START_PKT_TYPE_11A:
+ case RX_MSDU_START_PKT_TYPE_11B:
+ is_cck = (pkt_type == RX_MSDU_START_PKT_TYPE_11B);
+ if (rx_status->band < NUM_NL80211_BANDS) {
+ sband = &ar->mac.sbands[rx_status->band];
+ rx_status->rate_idx = ath12k_mac_hw_rate_to_idx(sband, rate_mcs,
+ is_cck);
+ }
+ break;
+ case RX_MSDU_START_PKT_TYPE_11N:
+ rx_status->encoding = RX_ENC_HT;
+ if (rate_mcs > ATH12K_HT_MCS_MAX) {
+ ath12k_warn(ar->ab,
+ "Received with invalid mcs in HT mode %d\n",
+ rate_mcs);
+ break;
+ }
+ rx_status->rate_idx = rate_mcs + (8 * (nss - 1));
+ if (sgi)
+ rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
+ break;
+ case RX_MSDU_START_PKT_TYPE_11AC:
+ rx_status->encoding = RX_ENC_VHT;
+ rx_status->rate_idx = rate_mcs;
+ if (rate_mcs > ATH12K_VHT_MCS_MAX) {
+ ath12k_warn(ar->ab,
+ "Received with invalid mcs in VHT mode %d\n",
+ rate_mcs);
+ break;
+ }
+ if (sgi)
+ rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
+ break;
+ case RX_MSDU_START_PKT_TYPE_11AX:
+ rx_status->rate_idx = rate_mcs;
+ if (rate_mcs > ATH12K_HE_MCS_MAX) {
+ ath12k_warn(ar->ab,
+ "Received with invalid mcs in HE mode %d\n",
+ rate_mcs);
+ break;
+ }
+ rx_status->encoding = RX_ENC_HE;
+ rx_status->he_gi = ath12k_he_gi_to_nl80211_he_gi(sgi);
+ break;
+ case RX_MSDU_START_PKT_TYPE_11BE:
+ rx_status->rate_idx = rate_mcs;
+ if (rate_mcs > ATH12K_EHT_MCS_MAX) {
+ ath12k_warn(ar->ab,
+ "Received with invalid mcs in EHT mode %d\n",
+ rate_mcs);
+ break;
+ }
+ rx_status->encoding = RX_ENC_EHT;
+ rx_status->he_gi = ath12k_he_gi_to_nl80211_he_gi(sgi);
+ break;
+ default:
+ ath12k_dbg(ar->ab, ATH12K_DBG_DATA,
+ "monitor receives invalid preamble type %d",
+ pkt_type);
+ break;
+ }
+}
+
static struct sk_buff *
ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
struct dp_mon_mpdu *mon_mpdu,
+ struct hal_rx_mon_ppdu_info *ppdu_info,
struct ieee80211_rx_status *rxs)
{
struct ath12k_base *ab = ar->ab;
struct sk_buff *msdu, *mpdu_buf, *prev_buf, *head_frag_list;
struct sk_buff *head_msdu, *tail_msdu;
- struct hal_rx_desc *rx_desc, *tail_rx_desc;
+ struct hal_rx_desc *rx_desc;
u8 *hdr_desc, *dest, decap_format = mon_mpdu->decap_format;
struct ieee80211_hdr_3addr *wh;
+ struct ieee80211_channel *channel;
u32 frag_list_sum_len = 0;
+ u8 channel_num = ppdu_info->chan_num;
mpdu_buf = NULL;
head_msdu = mon_mpdu->head;
@@ -1749,9 +1859,29 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
if (!head_msdu)
goto err_merge_fail;
- tail_rx_desc = (struct hal_rx_desc *)tail_msdu->data;
+ ath12k_dp_mon_fill_rx_stats_info(ar, ppdu_info, rxs);
+
+ if (unlikely(rxs->band == NUM_NL80211_BANDS ||
+ !ath12k_ar_to_hw(ar)->wiphy->bands[rxs->band])) {
+ ath12k_dbg(ar->ab, ATH12K_DBG_DATA,
+ "sband is NULL for status band %d channel_num %d center_freq %d pdev_id %d\n",
+ rxs->band, channel_num, ppdu_info->freq, ar->pdev_idx);
+
+ spin_lock_bh(&ar->data_lock);
+ channel = ar->rx_channel;
+ if (channel) {
+ rxs->band = channel->band;
+ channel_num =
+ ieee80211_frequency_to_channel(channel->center_freq);
+ }
+ spin_unlock_bh(&ar->data_lock);
+ }
+
+ if (rxs->band < NUM_NL80211_BANDS)
+ rxs->freq = ieee80211_channel_to_frequency(channel_num,
+ rxs->band);
- ath12k_dp_rx_h_ppdu(ar, tail_rx_desc, rxs);
+ ath12k_dp_mon_fill_rx_rate(ar, ppdu_info, rxs);
if (decap_format == DP_RX_DECAP_TYPE_RAW) {
ath12k_dp_mon_rx_msdus_set_payload(ar, head_msdu, tail_msdu);
@@ -2069,7 +2199,7 @@ static int ath12k_dp_mon_rx_deliver(struct ath12k *ar,
struct ieee80211_rx_status *rxs = &dp->rx_status;
u8 decap = DP_RX_DECAP_TYPE_RAW;
- mon_skb = ath12k_dp_mon_rx_merg_msdus(ar, mon_mpdu, rxs);
+ mon_skb = ath12k_dp_mon_rx_merg_msdus(ar, mon_mpdu, ppduinfo, rxs);
if (!mon_skb)
goto mon_deliver_fail;
diff --git a/drivers/net/wireless/ath/ath12k/hal_rx.h b/drivers/net/wireless/ath/ath12k/hal_rx.h
index ec272e341481..003d5c1d8ad6 100644
--- a/drivers/net/wireless/ath/ath12k/hal_rx.h
+++ b/drivers/net/wireless/ath/ath12k/hal_rx.h
@@ -512,7 +512,10 @@ struct hal_rx_mpdu_start {
struct hal_rx_msdu_end {
__le32 info0;
- __le32 rsvd0[18];
+ __le32 rsvd0[9];
+ __le16 info00;
+ __le16 info01;
+ __le32 rsvd00[8];
__le32 info1;
__le32 rsvd1[10];
__le32 info2;
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/7] wifi: ath12k: Avoid packet offset and FCS length from Rx TLV
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
` (4 preceding siblings ...)
2025-01-07 2:10 ` [PATCH 5/7] wifi: ath12k: change the status update in the monitor Rx Karthikeyan Periyasamy
@ 2025-01-07 2:10 ` Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-01-15 17:55 ` [PATCH 0/7] wifi: ath12k: Add " Nicolas Escande
7 siblings, 0 replies; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-07 2:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, P Praneesh, Karthikeyan Periyasamy
From: P Praneesh <quic_ppranees@quicinc.com>
Currently, the packet offset and FCS length are fetched from the MSDU Rx
TLV data, a logic inherited from ath11k. However, for ath12k 802.11be
hardware, the Rx TLV will not be present in the MSDU data. Instead, this
information is constant. Therefore, remove the existing FCS trim and the
packet offset fetch code. Handle the packet offset with the constant in
the merge MSDU procedure.
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: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 23 +++++------------------
drivers/net/wireless/ath/ath12k/dp_mon.h | 1 +
2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 00e0c5df3e32..bce7e9ce6b1f 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -1717,18 +1717,6 @@ ath12k_dp_mon_rx_parse_status_tlv(struct ath12k *ar,
return HAL_RX_MON_STATUS_PPDU_NOT_DONE;
}
-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 *)tail_msdu->data);
- skb_pull(head_msdu, rx_pkt_offset + l2_hdr_offset);
-}
-
static void
ath12k_dp_mon_fill_rx_stats_info(struct ath12k *ar,
struct hal_rx_mon_ppdu_info *ppdu_info,
@@ -1844,7 +1832,7 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
{
struct ath12k_base *ab = ar->ab;
struct sk_buff *msdu, *mpdu_buf, *prev_buf, *head_frag_list;
- struct sk_buff *head_msdu, *tail_msdu;
+ struct sk_buff *head_msdu;
struct hal_rx_desc *rx_desc;
u8 *hdr_desc, *dest, decap_format = mon_mpdu->decap_format;
struct ieee80211_hdr_3addr *wh;
@@ -1854,7 +1842,6 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
mpdu_buf = NULL;
head_msdu = mon_mpdu->head;
- tail_msdu = mon_mpdu->tail;
if (!head_msdu)
goto err_merge_fail;
@@ -1884,14 +1871,14 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
ath12k_dp_mon_fill_rx_rate(ar, ppdu_info, rxs);
if (decap_format == DP_RX_DECAP_TYPE_RAW) {
- ath12k_dp_mon_rx_msdus_set_payload(ar, head_msdu, tail_msdu);
+ skb_pull(head_msdu, ATH12K_MON_RX_PKT_OFFSET);
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);
+ skb_pull(msdu, ATH12K_MON_RX_PKT_OFFSET);
if (!head_frag_list)
head_frag_list = msdu;
@@ -1903,7 +1890,7 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
prev_buf->next = NULL;
- skb_trim(prev_buf, prev_buf->len - HAL_RX_FCS_LEN);
+ skb_trim(prev_buf, prev_buf->len);
if (head_frag_list) {
skb_shinfo(head_msdu)->frag_list = head_frag_list;
head_msdu->data_len = frag_list_sum_len;
@@ -1926,7 +1913,7 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k *ar,
msdu = head_msdu;
while (msdu) {
- ath12k_dp_mon_rx_msdus_set_payload(ar, msdu, tail_msdu);
+ skb_pull(msdu, ATH12K_MON_RX_PKT_OFFSET);
if (qos_pkt) {
dest = skb_push(msdu, sizeof(__le16));
if (!dest)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.h b/drivers/net/wireless/ath/ath12k/dp_mon.h
index b039f6b9277c..9f3adee51cb2 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.h
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.h
@@ -10,6 +10,7 @@
#include "core.h"
#define ATH12K_MON_RX_DOT11_OFFSET 5
+#define ATH12K_MON_RX_PKT_OFFSET 8
enum dp_monitor_mode {
ATH12K_DP_TX_MONITOR_MODE,
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
` (5 preceding siblings ...)
2025-01-07 2:10 ` [PATCH 6/7] wifi: ath12k: Avoid packet offset and FCS length from Rx TLV Karthikeyan Periyasamy
@ 2025-01-07 2:10 ` Karthikeyan Periyasamy
2025-01-17 11:33 ` Nicolas Escande
2025-01-15 17:55 ` [PATCH 0/7] wifi: ath12k: Add " Nicolas Escande
7 siblings, 1 reply; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-07 2:10 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, P Praneesh, Karthikeyan Periyasamy
From: P Praneesh <quic_ppranees@quicinc.com>
Currently, the monitor interface is not supported. To support the monitor
interface, configure the monitor vdev state identifier, configure the HTT
filter setup, subscribe the mac80211 WANT_MONITOR_VIF feature and prevent
monitor interface to transmit packet. Therefore, add these procedures to
add monitor interface support and enable the monitor interface support on
the QCN9274 platform through the hardware parameter.
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: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/core.c | 7 ++++++-
drivers/net/wireless/ath/ath12k/dp_tx.c | 4 +++-
drivers/net/wireless/ath/ath12k/hw.c | 4 ++--
drivers/net/wireless/ath/ath12k/mac.c | 22 ++++++++++++++++++++++
4 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index 0c6b35aac96e..3a194cc52598 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/module.h>
@@ -1261,6 +1261,11 @@ static void ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab)
ath12k_mac_tx_mgmt_pending_free, ar);
idr_destroy(&ar->txmgmt_idr);
wake_up(&ar->txmgmt_empty_waitq);
+
+ ar->monitor_vdev_id = -1;
+ ar->monitor_conf_enabled = false;
+ ar->monitor_vdev_created = false;
+ ar->monitor_started = false;
}
}
diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
index b8f0df6f7a05..81d1ff918f48 100644
--- a/drivers/net/wireless/ath/ath12k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include "core.h"
@@ -1277,6 +1277,8 @@ int ath12k_dp_tx_htt_rx_monitor_mode_ring_config(struct ath12k *ar, bool reset)
HTT_RX_MON_MO_CTRL_FILTER_FLASG3 |
HTT_RX_MON_FP_DATA_FILTER_FLASG3 |
HTT_RX_MON_MO_DATA_FILTER_FLASG3;
+ } else {
+ tlv_filter.rxmon_disable = true;
}
if (ab->hw_params->rxdma1_enable) {
diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
index a106ebed7870..021a4b565e8b 100644
--- a/drivers/net/wireless/ath/ath12k/hw.c
+++ b/drivers/net/wireless/ath/ath12k/hw.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/types.h>
@@ -1049,7 +1049,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_MESH_POINT) |
BIT(NL80211_IFTYPE_AP_VLAN),
- .supports_monitor = false,
+ .supports_monitor = true,
.idle_ps = false,
.download_calib = true,
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index abf7c7ed8967..27d44b508884 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -1264,6 +1264,12 @@ static int ath12k_mac_monitor_start(struct ath12k *ar)
return ret;
}
+ ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
+ if (ret) {
+ ath12k_warn(ar->ab, "fail to set monitor filter: %d\n", ret);
+ return ret;
+ }
+
ar->monitor_started = true;
ar->num_started_vdevs++;
ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
@@ -7170,6 +7176,11 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw,
u8 link_id;
int ret;
+ if (ahvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
+ ieee80211_free_txskb(hw, skb);
+ return;
+ }
+
link_id = u32_get_bits(info->control.flags, IEEE80211_TX_CTRL_MLO_LINK);
memset(skb_cb, 0, sizeof(*skb_cb));
skb_cb->vif = vif;
@@ -7253,6 +7264,8 @@ static int ath12k_mac_config_mon_status_default(struct ath12k *ar, bool enable)
else
tlv_filter.rxmon_disable = true;
+ tlv_filter.offset_valid = false;
+
for (i = 0; i < ab->hw_params->num_rxdma_per_pdev; i++) {
ring_id = ar->dp.rxdma_mon_dst_ring[i].ring_id;
ret = ath12k_dp_tx_htt_rx_filter_setup(ab, ring_id,
@@ -8021,6 +8034,9 @@ int ath12k_mac_vdev_create(struct ath12k *ar, struct ath12k_link_vif *arvif)
}
err_vdev_del:
+ if (ahvif->vdev_type == WMI_VDEV_TYPE_MONITOR)
+ ar->monitor_vdev_id = -1;
+
ath12k_wmi_vdev_delete(ar, arvif->vdev_id);
ar->num_created_vdevs--;
arvif->is_created = false;
@@ -10894,6 +10910,7 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah)
ieee80211_hw_set(hw, QUEUE_CONTROL);
ieee80211_hw_set(hw, SUPPORTS_TX_FRAG);
ieee80211_hw_set(hw, REPORTS_LOW_ACK);
+ ieee80211_hw_set(hw, WANT_MONITOR_VIF);
if ((ht_cap & WMI_HT_CAP_ENABLED) || is_6ghz) {
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
@@ -11089,6 +11106,11 @@ static void ath12k_mac_setup(struct ath12k *ar)
wiphy_work_init(&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_conf_enabled = false;
+ ar->monitor_vdev_created = false;
+ ar->monitor_started = false;
}
static int __ath12k_mac_mlo_setup(struct ath12k *ar)
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
` (6 preceding siblings ...)
2025-01-07 2:10 ` [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274 Karthikeyan Periyasamy
@ 2025-01-15 17:55 ` Nicolas Escande
2025-01-15 19:56 ` Jeff Johnson
2025-01-17 4:37 ` Karthikeyan Periyasamy
7 siblings, 2 replies; 18+ messages in thread
From: Nicolas Escande @ 2025-01-15 17:55 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On Tue Jan 7, 2025 at 3:10 AM CET, Karthikeyan Periyasamy wrote:
> Currently, monitor interface not supported. Therefore, add the missed TLV
> tags parsing in the monitor parser, configure the monitor vdev state
> identifier with HTT filter setup.
>
> Depends-On:
> [PATCH v3 0/3] wifi: ath12k: Refactor monitor Rx handler
> https://lore.kernel.org/all/20241224143613.164921-1-quic_periyasa@quicinc.com/
>
> [PATCH v2 00/14] wifi: ath12k: Enable monitor ring for updating station dump in QCN9274
> https://lore.kernel.org/all/20241223060132.3506372-1-quic_ppranees@quicinc.com/
>
> [PATCH v2 00/10] wifi: ath12k: Add peer extended Rx statistics debugfs support
> https://lore.kernel.org/all/20241224161442.263729-1-quic_periyasa@quicinc.com/
>
> Hari Chandrakanthan (1):
> wifi: ath12k: fix link valid field initialization in the monitor Rx
>
> Karthikeyan Periyasamy (1):
> wifi: ath12k: Replace band define G with GHZ where appropriate
>
> P Praneesh (5):
> wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path
> wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV
> wifi: ath12k: change the status update in the monitor Rx
> wifi: ath12k: Avoid packet offset and FCS length from Rx TLV
> wifi: ath12k: add monitor interface support on QCN9274
>
[...]
Hello,
There might be something wrong with this series.
I applied it on top of ath-pending-202501150104 + the "ath12k: Add peer extended
Rx statistics debugfs support" and now 'iw dev wlan0 station dump' shows me
that the RSSI value seems to not be updated anymore after I stop a monitor
interface on the same phy.
Steps to reproduce:
iw phy phy0 interface add mon0 type monitor
ip link set mon0 up
# then just for 1 sec but it might not be usefull at all
tcpdump -nepi mon0
ip link set mon0 down
watch -n1 iw dev wlan0 station dump
# 'signal' seems to not be updating anymore, maybe some other fields too ?
Don't know if this is from this series or something else broken before, but as
we could not add a monitor interface before, I could not see it.
There still is a possibility that I messed something up while applying it so I
would greatly appreciate if you could check it.
This is on split-phy QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274
2025-01-15 17:55 ` [PATCH 0/7] wifi: ath12k: Add " Nicolas Escande
@ 2025-01-15 19:56 ` Jeff Johnson
2025-01-16 13:51 ` Nicolas Escande
2025-01-17 4:37 ` Karthikeyan Periyasamy
1 sibling, 1 reply; 18+ messages in thread
From: Jeff Johnson @ 2025-01-15 19:56 UTC (permalink / raw)
To: Nicolas Escande, Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/15/2025 9:55 AM, Nicolas Escande wrote:
> This is on split-phy QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
I don't know if it will help, but I just pushed out
new firmware WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1:
https://git.codelinaro.org/clo/ath-firmware/ath12k-firmware/-/commit/a289ab4de56345be86d2c89c81aa12577c2c5a30
new board file:
https://git.codelinaro.org/clo/ath-firmware/ath12k-firmware/-/commit/bd2ca865d78f3d7d899e06cef57e5bbb9da60bf7
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274
2025-01-15 19:56 ` Jeff Johnson
@ 2025-01-16 13:51 ` Nicolas Escande
0 siblings, 0 replies; 18+ messages in thread
From: Nicolas Escande @ 2025-01-16 13:51 UTC (permalink / raw)
To: Jeff Johnson, Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On Wed Jan 15, 2025 at 8:56 PM CET, Jeff Johnson wrote:
> On 1/15/2025 9:55 AM, Nicolas Escande wrote:
> > This is on split-phy QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
>
> I don't know if it will help, but I just pushed out
>
> new firmware WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1:
> https://git.codelinaro.org/clo/ath-firmware/ath12k-firmware/-/commit/a289ab4de56345be86d2c89c81aa12577c2c5a30
>
> new board file:
> https://git.codelinaro.org/clo/ath-firmware/ath12k-firmware/-/commit/bd2ca865d78f3d7d899e06cef57e5bbb9da60bf7
Thanks for the tip, I just tried it but alas it doesn't change a thing.
RSSI (and maybe rx/tx bitrates not so sure) is still broken for all connected
STA after a monitor device goes up & down.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274
2025-01-15 17:55 ` [PATCH 0/7] wifi: ath12k: Add " Nicolas Escande
2025-01-15 19:56 ` Jeff Johnson
@ 2025-01-17 4:37 ` Karthikeyan Periyasamy
2025-01-17 9:46 ` Nicolas Escande
1 sibling, 1 reply; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-17 4:37 UTC (permalink / raw)
To: Nicolas Escande, ath12k; +Cc: linux-wireless
On 1/15/2025 11:25 PM, Nicolas Escande wrote:
> On Tue Jan 7, 2025 at 3:10 AM CET, Karthikeyan Periyasamy wrote:
>> Currently, monitor interface not supported. Therefore, add the missed TLV
>> tags parsing in the monitor parser, configure the monitor vdev state
>> identifier with HTT filter setup.
>>
>> Depends-On:
>> [PATCH v3 0/3] wifi: ath12k: Refactor monitor Rx handler
>> https://lore.kernel.org/all/20241224143613.164921-1-quic_periyasa@quicinc.com/
>>
>> [PATCH v2 00/14] wifi: ath12k: Enable monitor ring for updating station dump in QCN9274
>> https://lore.kernel.org/all/20241223060132.3506372-1-quic_ppranees@quicinc.com/
>>
>> [PATCH v2 00/10] wifi: ath12k: Add peer extended Rx statistics debugfs support
>> https://lore.kernel.org/all/20241224161442.263729-1-quic_periyasa@quicinc.com/
>>
>> Hari Chandrakanthan (1):
>> wifi: ath12k: fix link valid field initialization in the monitor Rx
>>
>> Karthikeyan Periyasamy (1):
>> wifi: ath12k: Replace band define G with GHZ where appropriate
>>
>> P Praneesh (5):
>> wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path
>> wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV
>> wifi: ath12k: change the status update in the monitor Rx
>> wifi: ath12k: Avoid packet offset and FCS length from Rx TLV
>> wifi: ath12k: add monitor interface support on QCN9274
>>
> [...]
>
> Hello,
>
> There might be something wrong with this series.
>
> I applied it on top of ath-pending-202501150104 + the "ath12k: Add peer extended
> Rx statistics debugfs support" and now 'iw dev wlan0 station dump' shows me
> that the RSSI value seems to not be updated anymore after I stop a monitor
> interface on the same phy.
>
> Steps to reproduce:
> iw phy phy0 interface add mon0 type monitor
> ip link set mon0 up
> # then just for 1 sec but it might not be usefull at all
> tcpdump -nepi mon0
> ip link set mon0 down
> watch -n1 iw dev wlan0 station dump
> # 'signal' seems to not be updating anymore, maybe some other fields too ?
>
Not able to find the wlan0 interface details from the above steps ?
--
Karthikeyan Periyasamy
--
கார்த்திகேயன் பெரியசாமி
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274
2025-01-17 4:37 ` Karthikeyan Periyasamy
@ 2025-01-17 9:46 ` Nicolas Escande
0 siblings, 0 replies; 18+ messages in thread
From: Nicolas Escande @ 2025-01-17 9:46 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On Fri Jan 17, 2025 at 5:37 AM CET, Karthikeyan Periyasamy wrote:
> On 1/15/2025 11:25 PM, Nicolas Escande wrote:
> > On Tue Jan 7, 2025 at 3:10 AM CET, Karthikeyan Periyasamy wrote:
[...]
> > I applied it on top of ath-pending-202501150104 + the "ath12k: Add peer extended
> > Rx statistics debugfs support" and now 'iw dev wlan0 station dump' shows me
> > that the RSSI value seems to not be updated anymore after I stop a monitor
> > interface on the same phy.
> >
> > Steps to reproduce:
> > iw phy phy0 interface add mon0 type monitor
> > ip link set mon0 up
> > # then just for 1 sec but it might not be usefull at all
> > tcpdump -nepi mon0
> > ip link set mon0 down
> > watch -n1 iw dev wlan0 station dump
> > # 'signal' seems to not be updating anymore, maybe some other fields too ?
> >
>
> Not able to find the wlan0 interface details from the above steps ?
Arf maybe I wasn't clear, my bad.
I have a running AP on wlan0. I constantly monitor connected stations infos
using 'iw dev wlan0 station dump' on the side in another terminal, and then I
add a monitor interface with the above steps, and thats when I see that the
stations connected to my AP have frozen values in station dump.
I suspect that ath12k_dp_tx_htt_rx_monitor_mode_ring_config() should reset the
rx filters to ath12k_mac_mon_status_filter_default when disabling monitor. But
I'm not so sure, you guys know better.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274
2025-01-07 2:10 ` [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274 Karthikeyan Periyasamy
@ 2025-01-17 11:33 ` Nicolas Escande
2025-01-17 13:06 ` Karthikeyan Periyasamy
0 siblings, 1 reply; 18+ messages in thread
From: Nicolas Escande @ 2025-01-17 11:33 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless, P Praneesh
On Tue Jan 7, 2025 at 3:10 AM CET, Karthikeyan Periyasamy wrote:
> From: P Praneesh <quic_ppranees@quicinc.com>
>
> Currently, the monitor interface is not supported. To support the monitor
> interface, configure the monitor vdev state identifier, configure the HTT
> filter setup, subscribe the mac80211 WANT_MONITOR_VIF feature and prevent
> monitor interface to transmit packet. Therefore, add these procedures to
> add monitor interface support and enable the monitor interface support on
> the QCN9274 platform through the hardware parameter.
>
> 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: P Praneesh <quic_ppranees@quicinc.com>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> ---
[...]
> diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
> index b8f0df6f7a05..81d1ff918f48 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_tx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: BSD-3-Clause-Clear
> /*
> * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
> - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> #include "core.h"
> @@ -1277,6 +1277,8 @@ int ath12k_dp_tx_htt_rx_monitor_mode_ring_config(struct ath12k *ar, bool reset)
> HTT_RX_MON_MO_CTRL_FILTER_FLASG3 |
> HTT_RX_MON_FP_DATA_FILTER_FLASG3 |
> HTT_RX_MON_MO_DATA_FILTER_FLASG3;
> + } else {
> + tlv_filter.rxmon_disable = true;
Shouldn't this be
tlv_filter = ath12k_mac_mon_status_filter_default;
To match de default value ?
> }
>
> if (ab->hw_params->rxdma1_enable) {
> diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
> index a106ebed7870..021a4b565e8b 100644
> --- a/drivers/net/wireless/ath/ath12k/hw.c
> +++ b/drivers/net/wireless/ath/ath12k/hw.c
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: BSD-3-Clause-Clear
> /*
> * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
> - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> #include <linux/types.h>
> @@ -1049,7 +1049,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
> BIT(NL80211_IFTYPE_AP) |
> BIT(NL80211_IFTYPE_MESH_POINT) |
> BIT(NL80211_IFTYPE_AP_VLAN),
> - .supports_monitor = false,
> + .supports_monitor = true,
>
> .idle_ps = false,
> .download_calib = true,
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index abf7c7ed8967..27d44b508884 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -1264,6 +1264,12 @@ static int ath12k_mac_monitor_start(struct ath12k *ar)
> return ret;
> }
>
> + ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
This is already done a few lines after. Shouldn't the one after be removed
> + if (ret) {
> + ath12k_warn(ar->ab, "fail to set monitor filter: %d\n", ret);
> + return ret;
> + }
> +
> ar->monitor_started = true;
> ar->num_started_vdevs++;
> ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
[...]
And this is probably out of the scope of this patch but the code in
ath12k_dp_tx_htt_rx_monitor_mode_ring_config could be simplified by returning
early if (!ab->hw_params->rxdma1_enable) like in
ath12k_mac_config_mon_status_default.
And that brings the question for me as shouldn't theese two functions should be
refactored to share more code
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274
2025-01-17 11:33 ` Nicolas Escande
@ 2025-01-17 13:06 ` Karthikeyan Periyasamy
2025-01-17 13:20 ` Nicolas Escande
0 siblings, 1 reply; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-17 13:06 UTC (permalink / raw)
To: Nicolas Escande, ath12k; +Cc: linux-wireless, P Praneesh
On 1/17/2025 5:03 PM, Nicolas Escande wrote:
> On Tue Jan 7, 2025 at 3:10 AM CET, Karthikeyan Periyasamy wrote:
>> From: P Praneesh <quic_ppranees@quicinc.com>
>>
>> Currently, the monitor interface is not supported. To support the monitor
>> interface, configure the monitor vdev state identifier, configure the HTT
>> filter setup, subscribe the mac80211 WANT_MONITOR_VIF feature and prevent
>> monitor interface to transmit packet. Therefore, add these procedures to
>> add monitor interface support and enable the monitor interface support on
>> the QCN9274 platform through the hardware parameter.
>>
>> 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: P Praneesh <quic_ppranees@quicinc.com>
>> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
>> ---
> [...]
>> diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
>> index b8f0df6f7a05..81d1ff918f48 100644
>> --- a/drivers/net/wireless/ath/ath12k/dp_tx.c
>> +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
>> @@ -1,7 +1,7 @@
>> // SPDX-License-Identifier: BSD-3-Clause-Clear
>> /*
>> * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
>> - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
>> */
>>
>> #include "core.h"
>> @@ -1277,6 +1277,8 @@ int ath12k_dp_tx_htt_rx_monitor_mode_ring_config(struct ath12k *ar, bool reset)
>> HTT_RX_MON_MO_CTRL_FILTER_FLASG3 |
>> HTT_RX_MON_FP_DATA_FILTER_FLASG3 |
>> HTT_RX_MON_MO_DATA_FILTER_FLASG3;
>> + } else {
>> + tlv_filter.rxmon_disable = true;
> Shouldn't this be
> tlv_filter = ath12k_mac_mon_status_filter_default;
> To match de default value ?
In standalone monitor case, this will enable the default filter
unnecessary, no ?
>> }
>>
>> if (ab->hw_params->rxdma1_enable) {
>> diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
>> index a106ebed7870..021a4b565e8b 100644
>> --- a/drivers/net/wireless/ath/ath12k/hw.c
>> +++ b/drivers/net/wireless/ath/ath12k/hw.c
>> @@ -1,7 +1,7 @@
>> // SPDX-License-Identifier: BSD-3-Clause-Clear
>> /*
>> * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
>> - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
>> */
>>
>> #include <linux/types.h>
>> @@ -1049,7 +1049,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
>> BIT(NL80211_IFTYPE_AP) |
>> BIT(NL80211_IFT
YPE_MESH_POINT) |
>> BIT(NL80211_IFTYPE_AP_VLAN),
>> - .supports_monitor = false,
>> + .supports_monitor = true,
>>
>> .idle_ps = false,
>> .download_calib = true,
>> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
>> index abf7c7ed8967..27d44b508884 100644
>> --- a/drivers/net/wireless/ath/ath12k/mac.c
>> +++ b/drivers/net/wireless/ath/ath12k/mac.c
>> @@ -1264,6 +1264,12 @@ static int ath12k_mac_monitor_start(struct ath12k *ar)
>> return ret;
>> }
>>
>> + ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
> This is already done a few lines after. Shouldn't the one after be removed
yes, will remove in the next version of the patch.
--
Karthikeyan Periyasamy
--
கார்த்திகேயன் பெரியசாமி
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274
2025-01-17 13:06 ` Karthikeyan Periyasamy
@ 2025-01-17 13:20 ` Nicolas Escande
2025-01-21 9:12 ` Karthikeyan Periyasamy
0 siblings, 1 reply; 18+ messages in thread
From: Nicolas Escande @ 2025-01-17 13:20 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless, P Praneesh
On Fri Jan 17, 2025 at 2:06 PM CET, Karthikeyan Periyasamy wrote:
>
>
> On 1/17/2025 5:03 PM, Nicolas Escande wrote:
> > On Tue Jan 7, 2025 at 3:10 AM CET, Karthikeyan Periyasamy wrote:
> >> From: P Praneesh <quic_ppranees@quicinc.com>
> >>
> >> Currently, the monitor interface is not supported. To support the monitor
> >> interface, configure the monitor vdev state identifier, configure the HTT
> >> filter setup, subscribe the mac80211 WANT_MONITOR_VIF feature and prevent
> >> monitor interface to transmit packet. Therefore, add these procedures to
> >> add monitor interface support and enable the monitor interface support on
> >> the QCN9274 platform through the hardware parameter.
> >>
> >> 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: P Praneesh <quic_ppranees@quicinc.com>
> >> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> >> ---
> > [...]
> >> diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
> >> index b8f0df6f7a05..81d1ff918f48 100644
> >> --- a/drivers/net/wireless/ath/ath12k/dp_tx.c
> >> +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
> >> @@ -1,7 +1,7 @@
> >> // SPDX-License-Identifier: BSD-3-Clause-Clear
> >> /*
> >> * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
> >> - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> >> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
> >> */
> >>
> >> #include "core.h"
> >> @@ -1277,6 +1277,8 @@ int ath12k_dp_tx_htt_rx_monitor_mode_ring_config(struct ath12k *ar, bool reset)
> >> HTT_RX_MON_MO_CTRL_FILTER_FLASG3 |
> >> HTT_RX_MON_FP_DATA_FILTER_FLASG3 |
> >> HTT_RX_MON_MO_DATA_FILTER_FLASG3;
> >> + } else {
> >> + tlv_filter.rxmon_disable = true;
> > Shouldn't this be
> > tlv_filter = ath12k_mac_mon_status_filter_default;
> > To match de default value ?
>
> In standalone monitor case, this will enable the default filter
> unnecessary, no ?
I'm not too familiar with the driver but clearly this is the part that breaks
sta info update when running a monitor while an ap is running.
And as this is a valid interface combination it should work right ?
So this change works around the problem I reported earlier, I just confirmed it
on my setup. But maybe this is not the right fix indeed but hopefully it
points towards the culprit.
>
>
> >> }
> >>
> >> if (ab->hw_params->rxdma1_enable) {
> >> diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
> >> index a106ebed7870..021a4b565e8b 100644
> >> --- a/drivers/net/wireless/ath/ath12k/hw.c
> >> +++ b/drivers/net/wireless/ath/ath12k/hw.c
> >> @@ -1,7 +1,7 @@
> >> // SPDX-License-Identifier: BSD-3-Clause-Clear
> >> /*
> >> * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
> >> - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> >> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
> >> */
> >>
> >> #include <linux/types.h>
> >> @@ -1049,7 +1049,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
> >> BIT(NL80211_IFTYPE_AP) |
> >> BIT(NL80211_IFT
>
> YPE_MESH_POINT) |
> >> BIT(NL80211_IFTYPE_AP_VLAN),
> >> - .supports_monitor = false,
> >> + .supports_monitor = true,
> >>
> >> .idle_ps = false,
> >> .download_calib = true,
> >> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> >> index abf7c7ed8967..27d44b508884 100644
> >> --- a/drivers/net/wireless/ath/ath12k/mac.c
> >> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> >> @@ -1264,6 +1264,12 @@ static int ath12k_mac_monitor_start(struct ath12k *ar)
> >> return ret;
> >> }
> >>
> >> + ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
> > This is already done a few lines after. Shouldn't the one after be removed
>
> yes, will remove in the next version of the patch.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274
2025-01-17 13:20 ` Nicolas Escande
@ 2025-01-21 9:12 ` Karthikeyan Periyasamy
2025-01-21 9:49 ` Nicolas Escande
0 siblings, 1 reply; 18+ messages in thread
From: Karthikeyan Periyasamy @ 2025-01-21 9:12 UTC (permalink / raw)
To: Nicolas Escande, ath12k; +Cc: linux-wireless, P Praneesh
On 1/17/2025 6:50 PM, Nicolas Escande wrote:
> On Fri Jan 17, 2025 at 2:06 PM CET, Karthikeyan Periyasamy wrote:
>>
>>
>> On 1/17/2025 5:03 PM, Nicolas Escande wrote:
>>> On Tue Jan 7, 2025 at 3:10 AM CET, Karthikeyan Periyasamy wrote:
>>>> From: P Praneesh <quic_ppranees@quicinc.com>
>>>>
>>>> Currently, the monitor interface is not supported. To support the monitor
>>>> interface, configure the monitor vdev state identifier, configure the HTT
>>>> filter setup, subscribe the mac80211 WANT_MONITOR_VIF feature and prevent
>>>> monitor interface to transmit packet. Therefore, add these procedures to
>>>> add monitor interface support and enable the monitor interface support on
>>>> the QCN9274 platform through the hardware parameter.
>>>>
>>>> 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: P Praneesh <quic_ppranees@quicinc.com>
>>>> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
>>>> ---
>>> [...]
>>>> diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
>>>> index b8f0df6f7a05..81d1ff918f48 100644
>>>> --- a/drivers/net/wireless/ath/ath12k/dp_tx.c
>>>> +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
>>>> @@ -1,7 +1,7 @@
>>>> // SPDX-License-Identifier: BSD-3-Clause-Clear
>>>> /*
>>>> * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
>>>> - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>>>> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
>>>> */
>>>>
>>>> #include "core.h"
>>>> @@ -1277,6 +1277,8 @@ int ath12k_dp_tx_htt_rx_monitor_mode_ring_config(struct ath12k *ar, bool reset)
>>>> HTT_RX_MON_MO_CTRL_FILTER_FLASG3 |
>>>> HTT_RX_MON_FP_DATA_FILTER_FLASG3 |
>>>> HTT_RX_MON_MO_DATA_FILTER_FLASG3;
>>>> + } else {
>>>> + tlv_filter.rxmon_disable = true;
>>> Shouldn't this be
>>> tlv_filter = ath12k_mac_mon_status_filter_default;
>>> To match de default value ?
>>
>> In standalone monitor case, this will enable the default filter
>> unnecessary, no ?
>
> I'm not too familiar with the driver but clearly this is the part that breaks
> sta info update when running a monitor while an ap is running.
>
> And as this is a valid interface combination it should work right ?
>
> So this change works around the problem I reported earlier, I just confirmed it
> on my setup. But maybe this is not the right fix indeed but hopefully it
> points towards the culprit.
>
>>
Addressed in the next version of the patch.
--
Karthikeyan Periyasamy
--
கார்த்திகேயன் பெரியசாமி
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274
2025-01-21 9:12 ` Karthikeyan Periyasamy
@ 2025-01-21 9:49 ` Nicolas Escande
0 siblings, 0 replies; 18+ messages in thread
From: Nicolas Escande @ 2025-01-21 9:49 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless, P Praneesh
On Tue Jan 21, 2025 at 10:12 AM CET, Karthikeyan Periyasamy wrote:
> On 1/17/2025 6:50 PM, Nicolas Escande wrote:
[...]
>> I'm not too familiar with the driver but clearly this is the part that breaks
>> sta info update when running a monitor while an ap is running.
>>
>> And as this is a valid interface combination it should work right ?
>>
>> So this change works around the problem I reported earlier, I just confirmed it
>> on my setup. But maybe this is not the right fix indeed but hopefully it
>> points towards the culprit.
>>
>
> Addressed in the next version of the patch.
Yes thank you for that. Everything is working fine now.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2025-01-21 9:49 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 1/7] wifi: ath12k: fix link valid field initialization in the monitor Rx Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 2/7] wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 3/7] wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 4/7] wifi: ath12k: Replace band define G with GHZ where appropriate Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 5/7] wifi: ath12k: change the status update in the monitor Rx Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 6/7] wifi: ath12k: Avoid packet offset and FCS length from Rx TLV Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-01-17 11:33 ` Nicolas Escande
2025-01-17 13:06 ` Karthikeyan Periyasamy
2025-01-17 13:20 ` Nicolas Escande
2025-01-21 9:12 ` Karthikeyan Periyasamy
2025-01-21 9:49 ` Nicolas Escande
2025-01-15 17:55 ` [PATCH 0/7] wifi: ath12k: Add " Nicolas Escande
2025-01-15 19:56 ` Jeff Johnson
2025-01-16 13:51 ` Nicolas Escande
2025-01-17 4:37 ` Karthikeyan Periyasamy
2025-01-17 9:46 ` Nicolas Escande
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).