qcacmn: Use mon_lock while accessing monitor vap

Use monitor mode lock to prevent vap down while monitor
vap is still delivering all MPDUs to radiotap Api.

Change-Id: I908d8048afbf3210bddaafc2c19b177ec8209085
CRs-fixed: 2212004
This commit is contained in:
Sumedh Baikady
2018-03-05 16:50:58 -08:00
committed by nshrivas
parent bef3b1b9b2
commit 12b2b2c897
3 changed files with 19 additions and 4 deletions

View File

@@ -4158,7 +4158,8 @@ static int dp_reset_monitor_mode(struct cdp_pdev *pdev_handle)
pdev_id = pdev->pdev_id;
soc = pdev->soc;
pdev->monitor_vdev = NULL;
qdf_spin_lock_bh(&pdev->mon_lock);
qdf_mem_set(&(htt_tlv_filter), sizeof(htt_tlv_filter), 0x0);
for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
@@ -4173,6 +4174,10 @@ static int dp_reset_monitor_mode(struct cdp_pdev *pdev_handle)
RXDMA_MONITOR_STATUS, RX_BUFFER_SIZE, &htt_tlv_filter);
}
pdev->monitor_vdev = NULL;
qdf_spin_unlock_bh(&pdev->mon_lock);
return 0;
}