qcacmn: Add API to get reo destination indication for QCA6750

Add hal_rx_msdu_get_reo_destination_indication API for QCA6750
target. Add NULL check to avoid possible null pointer dereference
for targets API is not supported.

Change-Id: I2c78e16a6796b0b09834cb91749244357f3de753
CRs-Fixed: 2793284
This commit is contained in:
Karthik Kantamneni 2020-10-08 17:00:27 +05:30 • committed by Gerrit - the friendly Code Review server
commit 7a14068866
2 changed files with 25 additions and 1 deletions

View file

@ -1740,6 +1740,24 @@ hal_rx_flow_get_cmem_fse_6750(struct hal_soc *hal_soc, uint32_t fse_offset,
fse[i] = HAL_CMEM_READ(hal_soc, fse_offset + i * 4);
}
/**
* hal_rx_msdu_get_reo_destination_indication_6750: API to get
* reo_destination_indication from rx_msdu_end TLV
* @buf: pointer to the start of RX PKT TLV headers
* @reo_destination_indication: pointer to return value of reo_destination_indication
*
* Return: none
*/
static void
hal_rx_msdu_get_reo_destination_indication_6750(uint8_t *buf,
uint32_t *reo_destination_indication)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
*reo_destination_indication = HAL_RX_MSDU_END_REO_DEST_IND_GET(msdu_end);
}
static
void hal_compute_reo_remap_ix2_ix3_6750(uint32_t *ring, uint32_t num_rings,
uint32_t *remap1, uint32_t *remap2)
@ -1909,7 +1927,7 @@ struct hal_hw_txrx_ops qca6750_hal_hw_txrx_ops = {
hal_rx_flow_setup_cmem_fse_6750,
hal_rx_flow_get_cmem_fse_ts_6750,
hal_rx_flow_get_cmem_fse_6750,
NULL
hal_rx_msdu_get_reo_destination_indication_6750
};
struct hal_hw_srng_config hw_srng_table_6750[] = {

View file

@ -325,6 +325,12 @@ RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_RESERVED_0A_OFFSET))
RX_MSDU_END_12_FLOW_IDX_MASK, \
RX_MSDU_END_12_FLOW_IDX_LSB))
#define HAL_RX_MSDU_END_REO_DEST_IND_GET(_rx_msdu_end) \
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
RX_MSDU_END_12_REO_DESTINATION_INDICATION_OFFSET)), \
RX_MSDU_END_12_REO_DESTINATION_INDICATION_MASK, \
RX_MSDU_END_12_REO_DESTINATION_INDICATION_LSB))
#define HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(_rx_msdu_end) \
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
RX_MSDU_END_10_FLOW_IDX_INVALID_OFFSET)), \