qcacmn: Add hal_rx_get_rx_fragment_number API

Implement hal_rx_get_rx_fragment_number
based on the chipset as the macro
HAL_RX_MPDU_GET_SEQUENCE_NUMBER is
chipset specific.

Change-Id: I967190fa3a55d45f46760f58eab5007bf5fa908f
CRs-Fixed: 2522133
This commit is contained in:
Venkata Sharath Chandra Manchala
2019-09-20 10:01:21 -07:00
committed by nshrivas
parent c5068e341f
commit d1b7e4c326
14 changed files with 192 additions and 14 deletions

View File

@@ -105,6 +105,24 @@
#include <hal_wbm.h>
/**
* hal_rx_get_rx_fragment_number_8074v1(): Function to retrieve
* rx fragment number
*
* @nbuf: Network buffer
* Returns: rx fragment number
*/
static
uint8_t hal_rx_get_rx_fragment_number_8074v1(uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = hal_rx_get_pkt_tlvs(buf);
struct rx_mpdu_info *rx_mpdu_info = hal_rx_get_mpdu_info(pkt_tlvs);
/* Return first 4 bits as fragment number */
return (HAL_RX_MPDU_GET_SEQUENCE_NUMBER(rx_mpdu_info) &
DOT11_SEQ_FRAG_MASK);
}
struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
/* init and setup */
@@ -147,6 +165,7 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
hal_tx_set_pcp_tid_map_generic,
hal_tx_update_pcp_tid_generic,
hal_tx_update_tidmap_prty_generic,
hal_rx_get_rx_fragment_number_8074v1,
};
struct hal_hw_srng_config hw_srng_table_8074[] = {
@@ -601,3 +620,4 @@ void hal_qca8074_attach(struct hal_soc *hal_soc)
hal_soc->hal_hw_reg_offset = hal_hw_reg_offset_qca8074;
hal_soc->ops = &qca8074_hal_hw_txrx_ops;
}