Kaynağa Gözat

qcacmn: Fix double destroy operation about mon_lock

mon_lock is created only once for each PDEV, but is destroyed
according to the RXDMA number. Need to ensure this lock is freed
only once.

CRs-Fixed: 2338573
Change-Id: I3630dd0a3aaf808fa910cd40864042bf23ecc79e
chenguo 6 yıl önce
ebeveyn
işleme
5f7f131a9d
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      dp/wifi3.0/dp_rx_mon_dest.c

+ 1 - 1
dp/wifi3.0/dp_rx_mon_dest.c

@@ -1431,10 +1431,10 @@ dp_rx_pdev_mon_detach(struct dp_pdev *pdev) {
 	struct dp_soc *soc = pdev->soc;
 	int mac_id;
 
+	qdf_spinlock_destroy(&pdev->mon_lock);
 	for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
 		int mac_for_pdev = dp_get_mac_id_for_pdev(mac_id, pdev_id);
 
-		qdf_spinlock_destroy(&pdev->mon_lock);
 		dp_mon_link_desc_pool_cleanup(soc, mac_for_pdev);
 		dp_rx_pdev_mon_status_detach(pdev, mac_for_pdev);
 		dp_rx_pdev_mon_buf_detach(pdev, mac_for_pdev);