Browse Source

qcacmn: add debug logs around peer AST cleanup

Currently there are no sufficient debug logs during
AST cleanup of peers, to conclude in which context
the AST got freed up, hence adding more debug logs.

Change-Id: I5603d856aed8cc3860a78d24d51cd8b5386d38bb
CRs-Fixed: 2956910
Vevek Venkatesan 4 years ago
parent
commit
e5b0e7e3a0
2 changed files with 17 additions and 0 deletions
  1. 16 0
      dp/wifi3.0/dp_peer.c
  2. 1 0
      dp/wifi3.0/dp_peer.h

+ 16 - 0
dp/wifi3.0/dp_peer.c

@@ -763,6 +763,9 @@ static inline void dp_peer_ast_cleanup(struct dp_soc *soc,
 	txrx_ast_free_cb cb = ast->callback;
 	void *cookie = ast->cookie;
 
+	dp_peer_debug("mac_addr: " QDF_MAC_ADDR_FMT ", cb: %pK, cookie: %pK",
+		      QDF_MAC_ADDR_REF(ast->mac_addr.raw), cb, cookie);
+
 	/* Call the callbacks to free up the cookie */
 	if (cb) {
 		ast->callback = NULL;
@@ -791,6 +794,8 @@ static void dp_peer_ast_hash_detach(struct dp_soc *soc)
 	if (!soc->ast_hash.bins)
 		return;
 
+	dp_peer_debug("%pK: num_ast_entries: %u", soc, soc->num_ast_entries);
+
 	qdf_spin_lock_bh(&soc->ast_lock);
 	for (index = 0; index <= soc->ast_hash.mask; index++) {
 		if (!TAILQ_EMPTY(&soc->ast_hash.bins[index])) {
@@ -868,6 +873,9 @@ void dp_peer_ast_hash_remove(struct dp_soc *soc,
 	/* Check if tail is not empty before delete*/
 	QDF_ASSERT(!TAILQ_EMPTY(&soc->ast_hash.bins[index]));
 
+	dp_peer_debug("ID: %u idx: %u mac_addr: " QDF_MAC_ADDR_FMT,
+		      ase->peer_id, index, QDF_MAC_ADDR_REF(ase->mac_addr.raw));
+
 	TAILQ_FOREACH(tmpase, &soc->ast_hash.bins[index], hash_list_elem) {
 		if (tmpase == ase) {
 			found = 1;
@@ -1408,6 +1416,10 @@ void dp_peer_free_ast_entry(struct dp_soc *soc,
 	 * NOTE: Ensure that call to this API is done
 	 * after soc->ast_lock is taken
 	 */
+	dp_peer_debug("type: %d ID: %u vid: %u mac_addr: " QDF_MAC_ADDR_FMT,
+		      ast_entry->type, ast_entry->peer_id, ast_entry->vdev_id,
+		      QDF_MAC_ADDR_REF(ast_entry->mac_addr.raw));
+
 	ast_entry->callback = NULL;
 	ast_entry->cookie = NULL;
 
@@ -1492,6 +1504,10 @@ void dp_peer_del_ast(struct dp_soc *soc, struct dp_ast_entry *ast_entry)
 		return;
 	}
 
+	dp_peer_debug("call by %ps: ID: %u vid: %u mac_addr: " QDF_MAC_ADDR_FMT,
+		      (void *)_RET_IP_, ast_entry->peer_id, ast_entry->vdev_id,
+		      QDF_MAC_ADDR_REF(ast_entry->mac_addr.raw));
+
 	ast_entry->delete_in_progress = true;
 
 	/* In teardown del ast is called after setting logical delete state

+ 1 - 0
dp/wifi3.0/dp_peer.h

@@ -904,6 +904,7 @@ static inline void dp_peer_delete_ast_entries(struct dp_soc *soc,
 {
 	struct dp_ast_entry *ast_entry, *temp_ast_entry;
 
+	dp_peer_debug("peer: %pK, self_ast: %pK", peer, peer->self_ast_entry);
 	/*
 	 * Delete peer self ast entry. This is done to handle scenarios
 	 * where peer is freed before peer map is received(for ex in case