Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abeb3db3 authored by Vevek Venkatesan's avatar Vevek Venkatesan
Browse files

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
parent 6bf2c473
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -5792,6 +5792,7 @@ static inline void dp_peer_delete_ast_entries(struct dp_soc *soc,
{
	struct dp_ast_entry *ast_entry, *temp_ast_entry;

	dp_debug("peer: %pK, self_ast: %pK", peer, peer->self_ast_entry);
	DP_PEER_ITERATE_ASE_LIST(peer, ast_entry, temp_ast_entry)
		dp_peer_del_ast(soc, ast_entry);

+17 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -286,6 +286,9 @@ static inline void dp_peer_ast_cleanup(struct dp_soc *soc,
	txrx_ast_free_cb cb = ast->callback;
	void *cookie = ast->cookie;

	dp_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;
@@ -314,6 +317,8 @@ static void dp_peer_ast_hash_detach(struct dp_soc *soc)
	if (!soc->ast_hash.bins)
		return;

	dp_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])) {
@@ -390,6 +395,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_debug("ast_idx: %u idx: %u mac_addr: " QDF_MAC_ADDR_FMT,
		 ase->ast_idx, 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;
@@ -881,6 +889,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_debug("type: %d ast_idx: %u mac_addr: " QDF_MAC_ADDR_FMT,
		 ast_entry->type, ast_entry->ast_idx,
		 QDF_MAC_ADDR_REF(ast_entry->mac_addr.raw));

	ast_entry->callback = NULL;
	ast_entry->cookie = NULL;

@@ -946,6 +958,10 @@ void dp_peer_del_ast(struct dp_soc *soc, struct dp_ast_entry *ast_entry)
	if (ast_entry->delete_in_progress)
		return;

	dp_debug("call by %ps: ast_idx: %u mac_addr: " QDF_MAC_ADDR_FMT,
		 (void *)_RET_IP_, ast_entry->ast_idx,
		 QDF_MAC_ADDR_REF(ast_entry->mac_addr.raw));

	ast_entry->delete_in_progress = true;

	peer = ast_entry->peer;