diff mbox series

wifi: iwlwifi: Provide extra info in link related WARN_ON

Message ID 20231113175202.1546994-1-greearb@candelatech.com
State New
Headers show
Series wifi: iwlwifi: Provide extra info in link related WARN_ON | expand

Commit Message

Ben Greear Nov. 13, 2023, 5:52 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

Provide some extra debug information to better understand why the
warning happened.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/link.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
index be48b0fc9cb6..a664b7112aee 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
@@ -102,8 +102,11 @@  int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 	int ret;
 
 	if (WARN_ON_ONCE(!link_info ||
-			 link_info->fw_link_id == IWL_MVM_FW_LINK_ID_INVALID))
+			 link_info->fw_link_id == IWL_MVM_FW_LINK_ID_INVALID)) {
+		IWL_ERR(mvm, "Invalid info in link-changed, link_info: %p NULL or LINK_ID_INVALID\n",
+			link_info);
 		return -EINVAL;
+	}
 
 	if (changes & LINK_CONTEXT_MODIFY_ACTIVE) {
 		/* When activating a link, phy context should be valid;