From 1c46a4d9ee2c5a17717c2a1a695d92650046b792 Mon Sep 17 00:00:00 2001 From: Thomas Pedersen Date: Wed, 16 May 2012 13:41:13 -0700 Subject: [PATCH] --- yaml --- r: 314735 b: refs/heads/master c: 33a6664a6e4b45814ef6e3129842f3fd7e5d1117 h: refs/heads/master i: 314733: 8c28872bd10774161ea594f5933480a25fb28f02 314731: 37d67e10fcf6ab64e99dcd29e58116a75bc8cfa6 314727: 72a8b7bcb94fe733cedab1dd06d52484551d2855 314719: 88d4a56a05f7daea71bfc7ecfcc60467d9958f7b v: v3 --- [refs] | 2 +- .../net/wireless/ath/ath6kl/cfg80211.c | 27 +++++++++---------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index fde0f55badbd..c2625bd86280 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dd45b7598f1c52933f276ba7ce175fa1305b8ba0 +refs/heads/master: 33a6664a6e4b45814ef6e3129842f3fd7e5d1117 diff --git a/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c b/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c index f3a6cfc0ddc8..7845d33deed9 100644 --- a/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -860,20 +860,6 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason, } } - /* - * 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 != DISCONNECT_CMD) { - ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx); - return; - } - clear_bit(CONNECT_PEND, &vif->flags); if (vif->sme_state == SME_CONNECTING) { @@ -883,11 +869,22 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason, WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_KERNEL); } else if (vif->sme_state == SME_CONNECTED) { - cfg80211_disconnected(vif->ndev, reason, + cfg80211_disconnected(vif->ndev, proto_reason, NULL, 0, GFP_KERNEL); } vif->sme_state = SME_DISCONNECTED; + + /* + * 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 won't be notified to cfg80211. + */ + if (reason != DISCONNECT_CMD) + ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx); } static int ath6kl_set_probed_ssids(struct ath6kl *ar,