aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2011-09-23 01:27:50 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-09-23 03:47:14 -0400
commit1de547d6dcc66f6d9d227de9f510acbbf88a654f (patch)
treedfc5646115649445d34cf44d99a376beb839ca53
parent5694f962964c5162f6b49ddb5d517180bd7d1d98 (diff)
ath6kl: Fix disconnect event reporting
Driver does not report disconnect event properly when in connecting state, this leads to issues failures in starting reconnection. 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 frimware 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. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index c3540bbfcac6..c84f53d6523b 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -602,22 +602,20 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason,
602 } 602 }
603 } 603 }
604 604
605 if (!test_bit(CONNECT_PEND, &ar->flag)) { 605 /*
606 if (reason != DISCONNECT_CMD) 606 * Send a disconnect command to target when a disconnect event is
607 ath6kl_wmi_disconnect_cmd(ar->wmi); 607 * received with reason code other than 3 (DISCONNECT_CMD - disconnect
608 608 * request from host) to make the firmware stop trying to connect even
609 return; 609 * after giving disconnect event. There will be one more disconnect
610 } 610 * event for this disconnect command with reason code DISCONNECT_CMD
611 * which will be notified to cfg80211.
612 */
611 613
612 if (reason == NO_NETWORK_AVAIL) { 614 if (reason != DISCONNECT_CMD) {
613 /* connect cmd failed */
614 ath6kl_wmi_disconnect_cmd(ar->wmi); 615 ath6kl_wmi_disconnect_cmd(ar->wmi);
615 return; 616 return;
616 } 617 }
617 618
618 if (reason != DISCONNECT_CMD)
619 return;
620
621 clear_bit(CONNECT_PEND, &ar->flag); 619 clear_bit(CONNECT_PEND, &ar->flag);
622 620
623 if (ar->sme_state == SME_CONNECTING) { 621 if (ar->sme_state == SME_CONNECTING) {