ソースを参照

qcacmn: Set the peer ref count to one

For wlan stop modules any pending vdevs flush happens as part
of pdev deinit. If in case of any peer ref count leak, driver
is stuck in dp_pdev_flush_pending_vdevs as the vdev is not getting
cleaned up. This is due to vdev's peer is not deleted. So during
force flush of vdev's peers set the ref count to one before peer
unmap handler.

Change-Id: Ie54996522eac870d00ea7a75c8db40a1cce09d2d
CRs-Fixed: 2658032
Sravan Goud 5 年 前
コミット
b7f1c6fa92
1 ファイル変更13 行追加0 行削除
  1. 13 0
      dp/wifi3.0/dp_main.c

+ 13 - 0
dp/wifi3.0/dp_main.c

@@ -88,6 +88,13 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc)
 #define DEINIT_RX_HW_STATS_LOCK(_soc) /* no op */
 #endif
 
+#ifdef DP_PEER_EXTENDED_API
+#define SET_PEER_REF_CNT_ONE(_peer) \
+	qdf_atomic_set(&(_peer)->ref_cnt, 1)
+#else
+#define SET_PEER_REF_CNT_ONE(_peer)
+#endif
+
 /*
  * The max size of cdp_peer_stats_param_t is limited to 16 bytes.
  * If the buffer size is exceeding this size limit,
@@ -5516,6 +5523,12 @@ static void dp_vdev_flush_peers(struct cdp_vdev *vdev_handle, bool unmap_only)
 		if (!peer)
 			continue;
 
+		dp_info("peer ref cnt %d", qdf_atomic_read(&peer->ref_cnt));
+		/*
+		 * set ref count to one to force delete the peers
+		 * with ref count leak
+		 */
+		SET_PEER_REF_CNT_ONE(peer);
 		dp_info("peer: %pM is getting unmap",
 			peer->mac_addr.raw);
 		/* free AST entries of peer */