qcacmn: Add API to get phy_ppdu_id in RX pkt tlv enabled

In case of WORD MASK subscribtion enabled, get phy_ppdu_id
from RX pkt hdr tlv in case PKT_TLV_HDR is subscribed.

Change-Id: I40e1b01c2f52404872c39df6d9faa57a95dad5c2
CRs-Fixed: 3582126
This commit is contained in:
Chaithanya Garrepalli
2023-07-27 20:59:03 +05:30
committed by Rahul Choudhary
父節點 5a0e761ce4
當前提交 d1d1770bd9
共有 5 個文件被更改,包括 50 次插入9 次删除

查看文件

@@ -35,11 +35,24 @@
#define HAL_RX_BE_PKT_HDR_TLV_LEN 112
#ifndef BIG_ENDIAN_HOST
struct rx_pkt_hdr_tlv {
TLV_TAG_T tag; /* TLV_TAG_T B */
uint64_t phy_ppdu_id; /* 8 B */
char rx_pkt_hdr[HAL_RX_BE_PKT_HDR_TLV_LEN]; /* 112 B */
uint32_t reserved_0 : 16, /* 4 B */
phy_ppdu_id : 16;
uint32_t reserved_1a; /* 4 B */
char rx_pkt_hdr[HAL_RX_BE_PKT_HDR_TLV_LEN]; /* 112 B */
};
#else
struct rx_pkt_hdr_tlv {
TLV_TAG_T tag; /* TLV_TAG_T B */
uint32_t phy_ppdu_id : 16, /* 4 B */
reserved_0 : 16;
uint32_t reserved_1a; /* 4 B */
char rx_pkt_hdr[HAL_RX_BE_PKT_HDR_TLV_LEN]; /* 112 B */
};
#endif
#ifdef CONFIG_WORD_BASED_TLV
#ifndef BIG_ENDIAN_HOST
@@ -494,6 +507,14 @@ struct rx_pkt_tlvs {
#endif /* CONFIG_WORD_BASED_TLV */
#ifndef NO_RX_PKT_HDR_TLV
#define HAL_RX_PKT_HDR_TLV(_rx_pkt_tlv) \
(((struct rx_pkt_tlvs *)_rx_pkt_tlv)->pkt_hdr_tlv)
#define HAL_RX_PKT_HDR_TLV_PHY_PPDU_ID_GET(_rx_pkt_tlv) \
HAL_RX_PKT_HDR_TLV(_rx_pkt_tlv).phy_ppdu_id
#endif
/**
* struct rx_mon_pkt_tlvs - RX packet data structure for DEST ring in the
* monitor mode.
@@ -1217,6 +1238,26 @@ static inline void hal_rx_tlv_get_pn_num_be(uint8_t *buf, uint64_t *pn_num)
pn_num[1] = HAL_RX_TLV_MPDU_PN_95_64_GET(pkt_tlvs);
}
#ifdef NO_RX_PKT_HDR_TLV
static inline uint32_t
hal_rx_get_ppdu_id_be(uint8_t *buf)
{
/* If CONFIG_WORD_BASED_TLV and NO_RX_PKT_HDR_TLV are enabled
* phy_ppdu_id is not available
*/
hal_alert_rl("PPDU_ID is not subscribed check build flags");
return 0;
}
#else
static inline uint32_t
hal_rx_get_ppdu_id_be(uint8_t *buf)
{
struct rx_pkt_tlvs *rx_pkt_tlvs = (struct rx_pkt_tlvs *)buf;
return HAL_RX_PKT_HDR_TLV_PHY_PPDU_ID_GET(rx_pkt_tlvs);
}
#endif
#endif
/**