diff mbox

mac80211: auth retries if AP sends temporary deauth

Message ID AANLkTilhbYTH2gKJsvqDaMzLG2cIt2tNV-GW-X0K3pNJ@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Paul Stewart June 25, 2010, 7:33 a.m. UTC
None
diff mbox

Patch

--- a/compat-wireless/net/mac80211/work.c
+++ b/compat-wireless/net/mac80211/work.c
@@ -1030,6 +1030,23 @@  ieee80211_rx_result
ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
 			skb_queue_tail(&local->work_skb_queue, skb);
 			ieee80211_queue_work(&local->hw, &local->work_work);
 			return RX_QUEUED;
+		case IEEE80211_STYPE_DEAUTH:
+			/*
+			 * If we get sent a DEAUTH while we are
+			 * actively trying to authenticate to this
+			 * station, we shoot ourselves in the foot if
+			 * we fall through using RX_CONTINUE and allow
+			 * the bss context to disappear
+			 * (ieee80211_sta_rx_mgmt()).  This is
+			 * especially true if the reason for the
+			 * DEAUTH was a negative but temporary direct
+			 * response to an AUTH attempt. Let the retry
+			 * mechanism run its course instead.
+			 */
+			if (wk->type == IEEE80211_WORK_AUTH) {
+				return RX_DROP_MONITOR;
+			}
+			break;
 		}
 	}