@@ -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;
}
}