Browse Source

cfg80211: clear wep keys after disconnection

When a low level driver calls cfg80211_disconnected(), wep keys are
not cleared. As a result, following connection requests will fail
since cfg80211 internal state shows a connection is still in progress.

Fix this by clearing the wep keys when disconnecting.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Avraham Stern 7 years ago
parent
commit
3027a8e799
1 changed files with 2 additions and 0 deletions
  1. 2 0
      net/wireless/sme.c

+ 2 - 0
net/wireless/sme.c

@@ -1032,6 +1032,8 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
 	wdev->current_bss = NULL;
 	wdev->current_bss = NULL;
 	wdev->ssid_len = 0;
 	wdev->ssid_len = 0;
 	wdev->conn_owner_nlportid = 0;
 	wdev->conn_owner_nlportid = 0;
+	kzfree(wdev->connect_keys);
+	wdev->connect_keys = NULL;
 
 
 	nl80211_send_disconnected(rdev, dev, reason, ie, ie_len, from_ap);
 	nl80211_send_disconnected(rdev, dev, reason, ie, ie_len, from_ap);