diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 86bafdbf3b..997ca1b1df 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -5055,15 +5055,15 @@ dp_rxdma_ring_sel_cfg(struct dp_soc *soc) /*Not subscribing rx_pkt_header*/ htt_tlv_filter.rx_header_offset = 0; htt_tlv_filter.rx_mpdu_start_offset = - HAL_RX_PKT_TLV_MPDU_START_OFFSET(soc->hal_soc); + hal_rx_mpdu_start_offset_get(soc->hal_soc); htt_tlv_filter.rx_mpdu_end_offset = - HAL_RX_PKT_TLV_MPDU_END_OFFSET(soc->hal_soc); + hal_rx_mpdu_end_offset_get(soc->hal_soc); htt_tlv_filter.rx_msdu_start_offset = - HAL_RX_PKT_TLV_MSDU_START_OFFSET(soc->hal_soc); + hal_rx_msdu_start_offset_get(soc->hal_soc); htt_tlv_filter.rx_msdu_end_offset = - HAL_RX_PKT_TLV_MSDU_END_OFFSET(soc->hal_soc); + hal_rx_msdu_end_offset_get(soc->hal_soc); htt_tlv_filter.rx_attn_offset = - HAL_RX_PKT_TLV_ATTN_OFFSET(soc->hal_soc); + hal_rx_attn_offset_get(soc->hal_soc); for (i = 0; i < MAX_PDEV_CNT; i++) { struct dp_pdev *pdev = soc->pdev_list[i]; diff --git a/hal/wifi3.0/hal_generic_api.h b/hal/wifi3.0/hal_generic_api.h index 442f3fa249..308944e14f 100644 --- a/hal/wifi3.0/hal_generic_api.h +++ b/hal/wifi3.0/hal_generic_api.h @@ -2465,4 +2465,64 @@ hal_rx_msdu_packet_metadata_get_generic(uint8_t *buf, msdu_metadata->sa_sw_peer_id = HAL_RX_MSDU_END_SA_SW_PEER_ID_GET(msdu_end); } -#endif /* _HAL_GENERIC_API_H_ */ + +/** + * hal_rx_msdu_end_offset_get_generic(): API to get the + * msdu_end structure offset rx_pkt_tlv structure + * + * NOTE: API returns offset of msdu_end TLV from structure + * rx_pkt_tlvs + */ +static uint32_t hal_rx_msdu_end_offset_get_generic(void) +{ + return RX_PKT_TLV_OFFSET(msdu_end_tlv); +} + +/** + * hal_rx_attn_offset_get_generic(): API to get the + * msdu_end structure offset rx_pkt_tlv structure + * + * NOTE: API returns offset of attn TLV from structure + * rx_pkt_tlvs + */ +static uint32_t hal_rx_attn_offset_get_generic(void) +{ + return RX_PKT_TLV_OFFSET(attn_tlv); +} + +/** + * hal_rx_msdu_start_offset_get_generic(): API to get the + * msdu_start structure offset rx_pkt_tlv structure + * + * NOTE: API returns offset of attn TLV from structure + * rx_pkt_tlvs + */ +static uint32_t hal_rx_msdu_start_offset_get_generic(void) +{ + return RX_PKT_TLV_OFFSET(msdu_start_tlv); +} + +/** + * hal_rx_mpdu_start_offset_get_generic(): API to get the + * mpdu_start structure offset rx_pkt_tlv structure + * + * NOTE: API returns offset of attn TLV from structure + * rx_pkt_tlvs + */ +static uint32_t hal_rx_mpdu_start_offset_get_generic(void) +{ + return RX_PKT_TLV_OFFSET(mpdu_start_tlv); +} + +/** + * hal_rx_mpdu_end_offset_get_generic(): API to get the + * mpdu_end structure offset rx_pkt_tlv structure + * + * NOTE: API returns offset of attn TLV from structure + * rx_pkt_tlvs + */ +static uint32_t hal_rx_mpdu_end_offset_get_generic(void) +{ + return RX_PKT_TLV_OFFSET(mpdu_end_tlv); +} +#endif /* HAL_GENERIC_API_H_ */ diff --git a/hal/wifi3.0/hal_internal.h b/hal/wifi3.0/hal_internal.h index 2a7d86a876..60fc3f4e5a 100644 --- a/hal/wifi3.0/hal_internal.h +++ b/hal/wifi3.0/hal_internal.h @@ -594,6 +594,11 @@ struct hal_hw_txrx_ops { void (*hal_rx_sw_mon_desc_info_get)(hal_ring_desc_t rxdma_dst_ring_desc, hal_rx_mon_desc_info_t mon_desc_info); uint8_t (*hal_rx_wbm_err_msdu_continuation_get)(void *ring_desc); + uint32_t (*hal_rx_msdu_end_offset_get)(void); + uint32_t (*hal_rx_attn_offset_get)(void); + uint32_t (*hal_rx_msdu_start_offset_get)(void); + uint32_t (*hal_rx_mpdu_start_offset_get)(void); + uint32_t (*hal_rx_mpdu_end_offset_get)(void); }; /** diff --git a/hal/wifi3.0/hal_rx.h b/hal/wifi3.0/hal_rx.h index dce357375b..d23b458c37 100644 --- a/hal/wifi3.0/hal_rx.h +++ b/hal/wifi3.0/hal_rx.h @@ -3731,4 +3731,109 @@ bool hal_rx_is_buf_addr_info_valid( return (HAL_RX_BUFFER_ADDR_31_0_GET(buf_addr_info) == 0) ? false : true; } + +/** + * hal_rx_msdu_end_offset_get(): Get the MSDU end offset from + * rx_pkt_tlvs structure + * + * @hal_soc_hdl: HAL SOC handle + * return: msdu_end_tlv offset value + */ +static inline +uint32_t hal_rx_msdu_end_offset_get(hal_soc_handle_t hal_soc_hdl) +{ + struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; + + if (!hal_soc || !hal_soc->ops) { + hal_err("hal handle is NULL"); + QDF_BUG(0); + return 0; + } + + return hal_soc->ops->hal_rx_msdu_end_offset_get(); +} + +/** + * hal_rx_msdu_start_offset_get(): Get the MSDU start offset from + * rx_pkt_tlvs structure + * + * @hal_soc_hdl: HAL SOC handle + * return: msdu_start_tlv offset value + */ +static inline +uint32_t hal_rx_msdu_start_offset_get(hal_soc_handle_t hal_soc_hdl) +{ + struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; + + if (!hal_soc || !hal_soc->ops) { + hal_err("hal handle is NULL"); + QDF_BUG(0); + return 0; + } + + return hal_soc->ops->hal_rx_msdu_start_offset_get(); +} + +/** + * hal_rx_mpdu_start_offset_get(): Get the MPDU start offset from + * rx_pkt_tlvs structure + * + * @hal_soc_hdl: HAL SOC handle + * return: mpdu_start_tlv offset value + */ +static inline +uint32_t hal_rx_mpdu_start_offset_get(hal_soc_handle_t hal_soc_hdl) +{ + struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; + + if (!hal_soc || !hal_soc->ops) { + hal_err("hal handle is NULL"); + QDF_BUG(0); + return 0; + } + + return hal_soc->ops->hal_rx_mpdu_start_offset_get(); +} + +/** + * hal_rx_mpdu_end_offset_get(): Get the MPDU end offset from + * rx_pkt_tlvs structure + * + * @hal_soc_hdl: HAL SOC handle + * return: mpdu_end_tlv offset value + */ +static inline +uint32_t hal_rx_mpdu_end_offset_get(hal_soc_handle_t hal_soc_hdl) +{ + struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; + + if (!hal_soc || !hal_soc->ops) { + hal_err("hal handle is NULL"); + QDF_BUG(0); + return 0; + } + + return hal_soc->ops->hal_rx_mpdu_end_offset_get(); +} + +/** + * hal_rx_attn_offset_get(): Get the ATTENTION offset from + * rx_pkt_tlvs structure + * + * @hal_soc_hdl: HAL SOC handle + * return: attn_tlv offset value + */ +static inline +uint32_t hal_rx_attn_offset_get(hal_soc_handle_t hal_soc_hdl) +{ + struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; + + if (!hal_soc || !hal_soc->ops) { + hal_err("hal handle is NULL"); + QDF_BUG(0); + return 0; + } + + return hal_soc->ops->hal_rx_attn_offset_get(); +} #endif /* _HAL_RX_H */ diff --git a/hal/wifi3.0/qca5018/hal_5018.c b/hal/wifi3.0/qca5018/hal_5018.c index 620124ff23..fc96733621 100644 --- a/hal/wifi3.0/qca5018/hal_5018.c +++ b/hal/wifi3.0/qca5018/hal_5018.c @@ -1436,6 +1436,22 @@ struct hal_hw_txrx_ops qca5018_hal_hw_txrx_ops = { hal_rx_get_rx_sequence_5018, NULL, NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + /* rx - TLV struct offsets */ + hal_rx_msdu_end_offset_get_generic, + hal_rx_attn_offset_get_generic, + hal_rx_msdu_start_offset_get_generic, + hal_rx_mpdu_start_offset_get_generic, + hal_rx_mpdu_end_offset_get_generic }; struct hal_hw_srng_config hw_srng_table_5018[] = { diff --git a/hal/wifi3.0/qca6290/hal_6290.c b/hal/wifi3.0/qca6290/hal_6290.c index 798995b5f2..999d55b143 100644 --- a/hal/wifi3.0/qca6290/hal_6290.c +++ b/hal/wifi3.0/qca6290/hal_6290.c @@ -1092,6 +1092,15 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, + NULL, + NULL, + /* rx - TLV struct offsets */ + hal_rx_msdu_end_offset_get_generic, + hal_rx_attn_offset_get_generic, + hal_rx_msdu_start_offset_get_generic, + hal_rx_mpdu_start_offset_get_generic, + hal_rx_mpdu_end_offset_get_generic }; struct hal_hw_srng_config hw_srng_table_6290[] = { diff --git a/hal/wifi3.0/qca6390/hal_6390.c b/hal/wifi3.0/qca6390/hal_6390.c index ba967d6b21..dd7670d57e 100644 --- a/hal/wifi3.0/qca6390/hal_6390.c +++ b/hal/wifi3.0/qca6390/hal_6390.c @@ -1128,6 +1128,14 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, + + /* rx - TLV struct offsets */ + hal_rx_msdu_end_offset_get_generic, + hal_rx_attn_offset_get_generic, + hal_rx_msdu_start_offset_get_generic, + hal_rx_mpdu_start_offset_get_generic, + hal_rx_mpdu_end_offset_get_generic }; struct hal_hw_srng_config hw_srng_table_6390[] = { diff --git a/hal/wifi3.0/qca6490/hal_6490.c b/hal/wifi3.0/qca6490/hal_6490.c index 93aebbcde6..865ab3a901 100644 --- a/hal/wifi3.0/qca6490/hal_6490.c +++ b/hal/wifi3.0/qca6490/hal_6490.c @@ -1555,6 +1555,14 @@ struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = { hal_rx_get_fisa_timeout_6490, NULL, NULL, + NULL, + + /* rx - TLV struct offsets */ + hal_rx_msdu_end_offset_get_generic, + hal_rx_attn_offset_get_generic, + hal_rx_msdu_start_offset_get_generic, + hal_rx_mpdu_start_offset_get_generic, + hal_rx_mpdu_end_offset_get_generic }; struct hal_hw_srng_config hw_srng_table_6490[] = { diff --git a/hal/wifi3.0/qca6750/hal_6750.c b/hal/wifi3.0/qca6750/hal_6750.c index 25cd1e95d6..f2e5036226 100644 --- a/hal/wifi3.0/qca6750/hal_6750.c +++ b/hal/wifi3.0/qca6750/hal_6750.c @@ -1424,6 +1424,14 @@ struct hal_hw_txrx_ops qca6750_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, + + /* rx - TLV struct offsets */ + hal_rx_msdu_end_offset_get_generic, + hal_rx_attn_offset_get_generic, + hal_rx_msdu_start_offset_get_generic, + hal_rx_mpdu_start_offset_get_generic, + hal_rx_mpdu_end_offset_get_generic }; struct hal_hw_srng_config hw_srng_table_6750[] = { diff --git a/hal/wifi3.0/qca8074v1/hal_8074v1.c b/hal/wifi3.0/qca8074v1/hal_8074v1.c index 70182b2543..ddcfb2f026 100644 --- a/hal/wifi3.0/qca8074v1/hal_8074v1.c +++ b/hal/wifi3.0/qca8074v1/hal_8074v1.c @@ -1115,6 +1115,14 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = { NULL, hal_rx_mpdu_start_tlv_tag_valid_8074v1, NULL, + NULL, + + /* rx - TLV struct offsets */ + hal_rx_msdu_end_offset_get_generic, + hal_rx_attn_offset_get_generic, + hal_rx_msdu_start_offset_get_generic, + hal_rx_mpdu_start_offset_get_generic, + hal_rx_mpdu_end_offset_get_generic }; struct hal_hw_srng_config hw_srng_table_8074[] = { diff --git a/hal/wifi3.0/qca8074v2/hal_8074v2.c b/hal/wifi3.0/qca8074v2/hal_8074v2.c index 216dc67555..22da39541d 100644 --- a/hal/wifi3.0/qca8074v2/hal_8074v2.c +++ b/hal/wifi3.0/qca8074v2/hal_8074v2.c @@ -1118,6 +1118,14 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = { NULL, hal_rx_mpdu_start_tlv_tag_valid_8074v2, NULL, + NULL, + + /* rx - TLV struct offsets */ + hal_rx_msdu_end_offset_get_generic, + hal_rx_attn_offset_get_generic, + hal_rx_msdu_start_offset_get_generic, + hal_rx_mpdu_start_offset_get_generic, + hal_rx_mpdu_end_offset_get_generic }; struct hal_hw_srng_config hw_srng_table_8074v2[] = { diff --git a/hal/wifi3.0/qcn9000/hal_9000.c b/hal/wifi3.0/qcn9000/hal_9000.c index 9fb24edc0d..6b2c00f240 100644 --- a/hal/wifi3.0/qcn9000/hal_9000.c +++ b/hal/wifi3.0/qcn9000/hal_9000.c @@ -1568,6 +1568,13 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = { hal_rx_mpdu_start_tlv_tag_valid_9000, hal_rx_sw_mon_desc_info_get_9000, hal_rx_wbm_err_msdu_continuation_get_9000, + + /* rx - TLV struct offsets */ + hal_rx_msdu_end_offset_get_generic, + hal_rx_attn_offset_get_generic, + hal_rx_msdu_start_offset_get_generic, + hal_rx_mpdu_start_offset_get_generic, + hal_rx_mpdu_end_offset_get_generic }; struct hal_hw_srng_config hw_srng_table_9000[] = {