Pārlūkot izejas kodu

qcacld-3.0: Set self_peer to NULL in monitor mode if ref cnt is 0

In monitor mode, pdev->self_peer is not updated before deleting the
peer in ol_txrx_peer_release_ref when peer ref_cnt becomes 0. This
leads the stale peer stored in pdev->self_peer. The pdev->self_peer
is not updated during peer creation due to this stale peer.

Update the pdev->self_peer to NULL when peer ref cnt becomes 0

Change-Id: Id09771a1a7c5a363cf3251af829ac8ff50d38a5b
CRs-Fixed: 2356492
Alok Kumar 6 gadi atpakaļ
vecāks
revīzija
8df4c76c58
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      core/dp/txrx/ol_txrx.c

+ 4 - 0
core/dp/txrx/ol_txrx.c

@@ -3090,6 +3090,10 @@ int ol_txrx_peer_release_ref(ol_txrx_peer_handle peer,
 
 		ol_txrx_dump_peer_access_list(peer);
 
+		if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam() &&
+		    pdev->self_peer == peer)
+			pdev->self_peer = NULL;
+
 		qdf_mem_free(peer);
 	} else {
 		access_list = qdf_atomic_read(&peer->access_list[debug_id]);