qcacmn: WBM msdu continuation for SG in QCN9000
In QCN9000, wbm release ring has msdu continuation bit support for invld peer MPDUs. Host needs to form SG buffer for packets with msdu continuation bit set Change-Id: Ica03c78068d32d2c8dc609b9a50298b91dd48c0a
This commit is contained in:
@@ -1157,6 +1157,24 @@ hal_srng_dst_num_valid_locked(hal_soc_handle_t hal_soc,
|
||||
return num_valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_srng_sync_cachedhp - sync cachehp pointer from hw hp
|
||||
*
|
||||
* @hal_soc: Opaque HAL SOC handle
|
||||
* @hal_ring_hdl: Destination ring pointer
|
||||
*
|
||||
*/
|
||||
static inline
|
||||
void hal_srng_sync_cachedhp(void *hal_soc,
|
||||
hal_ring_handle_t hal_ring_hdl)
|
||||
{
|
||||
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
|
||||
uint32_t hp;
|
||||
|
||||
hp = *(volatile uint32_t *)(srng->u.dst_ring.hp_addr);
|
||||
srng->u.dst_ring.cached_hp = hp;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_srng_src_reap_next - Reap next entry from a source ring and move reap
|
||||
* pointer. This can be used to release any buffers associated with completed
|
||||
|
@@ -590,6 +590,7 @@ struct hal_hw_txrx_ops {
|
||||
uint8_t (*hal_rx_mpdu_start_tlv_tag_valid)(void *rx_tlv_hdr);
|
||||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -69,7 +69,8 @@ struct hal_wbm_err_desc_info {
|
||||
reserved_1:2;
|
||||
uint8_t wbm_err_src:3,
|
||||
pool_id:2,
|
||||
reserved_2:3;
|
||||
msdu_continued:1,
|
||||
reserved_2:2;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2964,6 +2965,21 @@ static inline void hal_rx_wbm_err_info_get_from_tlv(uint8_t *buf,
|
||||
sizeof(struct hal_wbm_err_desc_info));
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_wbm_err_msdu_continuation_get(): Get wbm msdu continuation
|
||||
* bit from wbm release ring descriptor
|
||||
* @wbm_desc: wbm ring descriptor
|
||||
* Return: uint8_t
|
||||
*/
|
||||
static inline
|
||||
uint8_t hal_rx_wbm_err_msdu_continuation_get(hal_soc_handle_t hal_soc_hdl,
|
||||
void *wbm_desc)
|
||||
{
|
||||
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||
|
||||
return hal_soc->ops->hal_rx_wbm_err_msdu_continuation_get(wbm_desc);
|
||||
}
|
||||
|
||||
#define HAL_RX_MSDU_START_NSS_GET(_rx_msdu_start) \
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR((_rx_msdu_start), \
|
||||
RX_MSDU_START_5_NSS_OFFSET)), \
|
||||
|
@@ -1422,6 +1422,7 @@ struct hal_hw_txrx_ops qca6750_hal_hw_txrx_ops = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
struct hal_hw_srng_config hw_srng_table_6750[] = {
|
||||
|
@@ -268,6 +268,24 @@ uint8_t hal_rx_mpdu_start_tlv_tag_valid_9000(void *rx_tlv_hdr)
|
||||
return tlv_tag == WIFIRX_MPDU_START_E ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_wbm_err_msdu_continuation_get_9000 () - API to check if WBM
|
||||
* msdu continuation bit is set
|
||||
*
|
||||
*@wbm_desc: wbm release ring descriptor
|
||||
*
|
||||
* Return: true if msdu continuation bit is set.
|
||||
*/
|
||||
uint8_t hal_rx_wbm_err_msdu_continuation_get_9000(void *wbm_desc)
|
||||
{
|
||||
uint32_t comp_desc =
|
||||
*(uint32_t *)(((uint8_t *)wbm_desc) +
|
||||
WBM_RELEASE_RING_3_MSDU_CONTINUATION_OFFSET);
|
||||
|
||||
return (comp_desc & WBM_RELEASE_RING_3_MSDU_CONTINUATION_MASK) >>
|
||||
WBM_RELEASE_RING_3_MSDU_CONTINUATION_LSB;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_proc_phyrx_other_receive_info_tlv_9000(): API to get tlv info
|
||||
*
|
||||
@@ -1548,6 +1566,7 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
|
||||
NULL,
|
||||
hal_rx_mpdu_start_tlv_tag_valid_9000,
|
||||
hal_rx_sw_mon_desc_info_get_9000,
|
||||
hal_rx_wbm_err_msdu_continuation_get_9000,
|
||||
};
|
||||
|
||||
struct hal_hw_srng_config hw_srng_table_9000[] = {
|
||||
|
Reference in New Issue
Block a user