wifi: ath12k: Move ath12k_dp_rx_get_peer_id API to Wi-Fi 7

Move ath12k_dp_rx_get_peer_id() from common to Wi-Fi 7 as it operates on
arch specific peer metadata.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-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: Pavankumar Nandeshwar <quic_pnandesh@quicinc.com>
Signed-off-by: Ripan Deuri <quic_rdeuri@quicinc.com>
Reviewed-by: Karthikeyan Periyasamy <karthikeyan.periyasamy@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20251103112111.2260639-9-quic_rdeuri@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
Pavankumar Nandeshwar 2025-11-03 16:51:07 +05:30 committed by Jeff Johnson
parent d43133a38b
commit 147daefc59
3 changed files with 27 additions and 30 deletions

View File

@ -1269,29 +1269,6 @@ bool ath12k_dp_rx_check_nwifi_hdr_len_valid(struct ath12k_dp *dp,
return false;
}
u16 ath12k_dp_rx_get_peer_id(struct ath12k_base *ab,
enum ath12k_peer_metadata_version ver,
__le32 peer_metadata)
{
switch (ver) {
default:
ath12k_warn(ab, "Unknown peer metadata version: %d", ver);
fallthrough;
case ATH12K_PEER_METADATA_V0:
return le32_get_bits(peer_metadata,
RX_MPDU_DESC_META_DATA_V0_PEER_ID);
case ATH12K_PEER_METADATA_V1:
return le32_get_bits(peer_metadata,
RX_MPDU_DESC_META_DATA_V1_PEER_ID);
case ATH12K_PEER_METADATA_V1A:
return le32_get_bits(peer_metadata,
RX_MPDU_DESC_META_DATA_V1A_PEER_ID);
case ATH12K_PEER_METADATA_V1B:
return le32_get_bits(peer_metadata,
RX_MPDU_DESC_META_DATA_V1B_PEER_ID);
}
}
static void ath12k_dp_rx_frag_timer(struct timer_list *timer)
{
struct ath12k_dp_rx_tid *rx_tid = timer_container_of(rx_tid, timer,

View File

@ -186,9 +186,6 @@ void ath12k_dp_rx_h_undecap_frag(struct ath12k_pdev_dp *dp_pdev, struct sk_buff
int ath12k_dp_rx_h_michael_mic(struct crypto_shash *tfm, u8 *key,
struct ieee80211_hdr *hdr, u8 *data,
size_t data_len, u8 *mic);
u16 ath12k_dp_rx_get_peer_id(struct ath12k_base *ab,
enum ath12k_peer_metadata_version ver,
__le32 peer_metadata);
int ath12k_dp_rx_ampdu_start(struct ath12k *ar,
struct ieee80211_ampdu_params *params,
u8 link_id);

View File

@ -10,6 +10,29 @@
#include "hal_qcn9274.h"
#include "hal_wcn7850.h"
static u16 ath12k_wifi7_dp_rx_get_peer_id(struct ath12k_dp *dp,
enum ath12k_peer_metadata_version ver,
__le32 peer_metadata)
{
switch (ver) {
default:
ath12k_warn(dp->ab, "Unknown peer metadata version: %d", ver);
fallthrough;
case ATH12K_PEER_METADATA_V0:
return le32_get_bits(peer_metadata,
RX_MPDU_DESC_META_DATA_V0_PEER_ID);
case ATH12K_PEER_METADATA_V1:
return le32_get_bits(peer_metadata,
RX_MPDU_DESC_META_DATA_V1_PEER_ID);
case ATH12K_PEER_METADATA_V1A:
return le32_get_bits(peer_metadata,
RX_MPDU_DESC_META_DATA_V1A_PEER_ID);
case ATH12K_PEER_METADATA_V1B:
return le32_get_bits(peer_metadata,
RX_MPDU_DESC_META_DATA_V1B_PEER_ID);
}
}
void ath12k_wifi7_peer_rx_tid_qref_setup(struct ath12k_base *ab, u16 peer_id, u16 tid,
dma_addr_t paddr)
{
@ -731,8 +754,8 @@ int ath12k_wifi7_dp_rx_process(struct ath12k_base *ab, int ring_id,
rxcb->is_continuation = !!(le32_to_cpu(msdu_info->info0) &
RX_MSDU_DESC_INFO0_MSDU_CONTINUATION);
rxcb->hw_link_id = hw_link_id;
rxcb->peer_id = ath12k_dp_rx_get_peer_id(ab, dp->peer_metadata_ver,
mpdu_info->peer_meta_data);
rxcb->peer_id = ath12k_wifi7_dp_rx_get_peer_id(dp, dp->peer_metadata_ver,
mpdu_info->peer_meta_data);
rxcb->tid = le32_get_bits(mpdu_info->info0,
RX_MPDU_DESC_INFO0_TID);
@ -1855,8 +1878,8 @@ int ath12k_wifi7_dp_rx_process_wbm_err(struct ath12k_base *ab,
rxcb->is_last_msdu = err_info.last_msdu;
rxcb->is_continuation = err_info.continuation;
rxcb->rx_desc = msdu_data;
rxcb->peer_id = ath12k_dp_rx_get_peer_id(ab, dp->peer_metadata_ver,
err_info.peer_metadata);
rxcb->peer_id = ath12k_wifi7_dp_rx_get_peer_id(dp, dp->peer_metadata_ver,
err_info.peer_metadata);
if (err_info.continuation) {
__skb_queue_tail(&scatter_msdu_list, msdu);