diff mbox

[2/4] mac80211: Add debug print on unexpect authentication state

Message ID 20120930163042.322136336@w1.fi (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jouni Malinen Sept. 30, 2012, 4:29 p.m. UTC
This is useful when debugging authentication process issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
---
 net/mac80211/mlme.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: wireless-testing/net/mac80211/mlme.c
===================================================================
--- wireless-testing.orig/net/mac80211/mlme.c	2012-09-30 19:16:52.591842581 +0300
+++ wireless-testing/net/mac80211/mlme.c	2012-09-30 19:16:55.831842519 +0300
@@ -1858,8 +1858,13 @@  ieee80211_rx_mgmt_auth(struct ieee80211_
 	status_code = le16_to_cpu(mgmt->u.auth.status_code);
 
 	if (auth_alg != ifmgd->auth_data->algorithm ||
-	    auth_transaction != ifmgd->auth_data->expected_transaction)
+	    auth_transaction != ifmgd->auth_data->expected_transaction) {
+		sdata_info(sdata, "%pM unexpected authentication state: alg %d (expected %d) transact %d (expected %d)\n",
+			   mgmt->sa, auth_alg, ifmgd->auth_data->algorithm,
+			   auth_transaction,
+			   ifmgd->auth_data->expected_transaction);
 		return RX_MGMT_NONE;
+	}
 
 	if (status_code != WLAN_STATUS_SUCCESS) {
 		sdata_info(sdata, "%pM denied authentication (status %d)\n",