From c4571c6cbe5426b40f787ce5ac92deb4572967e9 Mon Sep 17 00:00:00 2001 From: Vasanthakumar Thiagarajan Date: Fri, 23 Sep 2011 10:57:50 +0530 Subject: [PATCH] --- yaml --- r: 266619 b: refs/heads/master c: 1de547d6dcc66f6d9d227de9f510acbbf88a654f h: refs/heads/master i: 266617: 8f15d0ecccc726477d1e4de465269613b31d0922 266615: 8907944a863806ea1af8786dc3be5c9a0ba017d2 v: v3 --- [refs] | 2 +- .../net/wireless/ath/ath6kl/cfg80211.c | 20 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 3ee8036df9a8..8718caf64add 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5694f962964c5162f6b49ddb5d517180bd7d1d98 +refs/heads/master: 1de547d6dcc66f6d9d227de9f510acbbf88a654f diff --git a/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c b/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c index c3540bbfcac6..c84f53d6523b 100644 --- a/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -602,22 +602,20 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, } } - if (!test_bit(CONNECT_PEND, &ar->flag)) { - if (reason != DISCONNECT_CMD) - ath6kl_wmi_disconnect_cmd(ar->wmi); - - return; - } + /* + * Send a disconnect command to target when a disconnect event is + * received with reason code other than 3 (DISCONNECT_CMD - disconnect + * request from host) to make the firmware stop trying to connect even + * after giving disconnect event. There will be one more disconnect + * event for this disconnect command with reason code DISCONNECT_CMD + * which will be notified to cfg80211. + */ - if (reason == NO_NETWORK_AVAIL) { - /* connect cmd failed */ + if (reason != DISCONNECT_CMD) { ath6kl_wmi_disconnect_cmd(ar->wmi); return; } - if (reason != DISCONNECT_CMD) - return; - clear_bit(CONNECT_PEND, &ar->flag); if (ar->sme_state == SME_CONNECTING) {