qcacmn: Add hal API to get L3 type field

In some cases we need to classify frames accordinging
to l3 type. This change mainly focus on this issue.

Change-Id: I4bc49a808a02b4bc8c65f920690922045d65e739
CRs-Fixed: 3198481
This commit is contained in:
jinbliu
2022-06-23 23:49:45 -07:00
committed by Madan Koyyalamudi
parent bf35825b9f
commit bb29a06aad
6 changed files with 49 additions and 0 deletions

View File

@@ -226,6 +226,9 @@ struct rx_pkt_tlvs {
HAL_RX_MSDU_END(_rx_pkt_tlv).window_size
#endif
#define HAL_RX_TLV_L3_TYPE_GET(_rx_pkt_tlv) \
HAL_RX_MSDU_END(_rx_pkt_tlv).l3_type
#define HAL_RX_GET_FILTER_CATEGORY(_rx_pkt_tlv) \
HAL_RX_MPDU_START(_rx_pkt_tlv).rxpcu_mpdu_filter_in_category
@@ -1994,4 +1997,17 @@ hal_rx_msdu_end_sa_sw_peer_id_get_be(uint8_t *buf)
return HAL_RX_MSDU_END_SA_SW_PEER_ID_GET(msdu_end);
}
/**
* hal_rx_tlv_l3_type_get_be(): API to get the l3 type
* from rx_msdu_start TLV
*
* @buf: pointer to the start of RX PKT TLV headers
* Return: uint32_t(l3 type)
*/
static inline uint32_t hal_rx_tlv_l3_type_get_be(uint8_t *buf)
{
struct rx_pkt_tlvs *rx_pkt_tlvs = (struct rx_pkt_tlvs *)buf;
return HAL_RX_TLV_L3_TYPE_GET(rx_pkt_tlvs);
}
#endif /* _HAL_BE_RX_TLV_H_ */