qcacmn: Create monitor mode spinlock and add null check

Due to changes in datapath init/deinit path, mon_lock spinlock was not
getting created. Create mon_lock spinlock during
dp_rx_pdev_mon_cmn_desc_pool_init.

Add null check to validate rx_tlv_header before calling
hal_rx_mpdu_start_tlv_tag_valid.

Change-Id: I41c781de29f2c8c05ec1bfa90f9c8f742f2539bf
CRs-Fixed: 2693687
This commit is contained in:
Saket Jha
2020-05-22 17:36:50 -07:00
committed by nshrivas
parent d7ec6fab20
commit d30eab103c
5 changed files with 64 additions and 7 deletions

View File

@@ -1435,6 +1435,24 @@ bool hal_rx_get_fisa_timeout_6750(uint8_t *buf)
return HAL_RX_TLV_GET_FISA_TIMEOUT(buf);
}
/**
* hal_rx_mpdu_start_tlv_tag_valid_6750 () - API to check if RX_MPDU_START
* tlv tag is valid
*
*@rx_tlv_hdr: start address of rx_pkt_tlvs
*
* Return: true if RX_MPDU_START is valied, else false.
*/
static uint8_t hal_rx_mpdu_start_tlv_tag_valid_6750(void *rx_tlv_hdr)
{
struct rx_pkt_tlvs *rx_desc = (struct rx_pkt_tlvs *)rx_tlv_hdr;
uint32_t tlv_tag;
tlv_tag = HAL_RX_GET_USER_TLV32_TYPE(&rx_desc->mpdu_start_tlv);
return tlv_tag == WIFIRX_MPDU_START_E ? true : false;
}
/**
* hal_reo_set_err_dst_remap_6750(): Function to set REO error destination
* ring remap register
@@ -1577,7 +1595,7 @@ struct hal_hw_txrx_ops qca6750_hal_hw_txrx_ops = {
hal_rx_get_flow_agg_continuation_6750,
hal_rx_get_flow_agg_count_6750,
hal_rx_get_fisa_timeout_6750,
NULL,
hal_rx_mpdu_start_tlv_tag_valid_6750,
NULL,
NULL,