From 0e5cc8e606ed89a4a58260c88474c74348230bed Mon Sep 17 00:00:00 2001 From: Raja Mani Date: Fri, 12 Aug 2011 17:52:24 +0530 Subject: [PATCH] ath6kl: Check sme state before delivering disconnect event to cfg80211 In some random cases, the firmware is sending two disconnect event to the host. In the current model, both diconnect events are passed to cfg80211 without checking local sme state machine, which is screwing cfg80211 layer state. Signed-off-by: Raja Mani Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index e88b519ed1b..b2b70e6618f 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -643,7 +643,7 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, NULL, 0, WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_KERNEL); - } else { + } else if (ar->sme_state == SME_CONNECTED) { cfg80211_disconnected(ar->net_dev, reason, NULL, 0, GFP_KERNEL); } -- 2.41.0