From: Avraham Stern Date: Mon, 19 Feb 2018 12:48:38 +0000 (+0200) Subject: cfg80211: clear wep keys after disconnection X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f6bfc88f14cc176d9dae7739ab19a3e59b101f57;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git cfg80211: clear wep keys after disconnection [ Upstream commit 3027a8e799b20fc922496a12f8ad2f9f36a8a696 ] 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 Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 3dd05a08c60a..d014aea07160 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -989,6 +989,8 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, wdev->current_bss = NULL; wdev->ssid_len = 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);