cfg80211: Ignore downstream DEAUTH for authtry_bsses
[linux-2.6.git] / net / wireless / mlme.c
index 493b939..3633ab6 100644 (file)
@@ -170,7 +170,9 @@ void __cfg80211_send_deauth(struct net_device *dev,
                        break;
                }
                if (wdev->authtry_bsses[i] &&
-                   memcmp(wdev->authtry_bsses[i]->pub.bssid, bssid, ETH_ALEN) == 0) {
+                   memcmp(wdev->authtry_bsses[i]->pub.bssid, bssid,
+                          ETH_ALEN) == 0 &&
+                   memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) == 0) {
                        cfg80211_unhold_bss(wdev->authtry_bsses[i]);
                        cfg80211_put_bss(&wdev->authtry_bsses[i]->pub);
                        wdev->authtry_bsses[i] = NULL;