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

@@ -975,6 +975,24 @@ uint16_t hal_rx_get_rx_sequence_6390(uint8_t *buf)
return HAL_RX_MPDU_GET_SEQUENCE_NUMBER(rx_mpdu_info);
}
/**
* hal_rx_mpdu_start_tlv_tag_valid_6390 () - 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_6390(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_get_window_address_6390(): Function to get hp/tp address
* @hal_soc: Pointer to hal_soc
@@ -1126,7 +1144,7 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
NULL,
NULL,
NULL,
NULL,
hal_rx_mpdu_start_tlv_tag_valid_6390,
NULL,
NULL,