summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-06-10 16:54:18 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-22 14:46:19 -0700
commitae67b584b40883cf63492b9df2b06c035da84780 (patch)
tree0c23e5a4a5edf1ac56c9e89b8cb6dc707002c5dc /drivers/staging/rtl8192e
parent96bd55bd67de2dddb1d917b7631e23b86a8b1cd4 (diff)
downloadlinux-stable-ae67b584b40883cf63492b9df2b06c035da84780.tar.gz
linux-stable-ae67b584b40883cf63492b9df2b06c035da84780.tar.bz2
linux-stable-ae67b584b40883cf63492b9df2b06c035da84780.zip
Staging: rtl8192e: Do not send NULL BSSID events when not associated
If we're not associated, we should not send wireless events to let userspace know that we just left an ESSID, simply because we havent yet joined it. If we keep on doing that, wpa_supplicant could receive such events while actually trying to join an ESSID, and thus decide to stop trying. This leads to a lot of connection failures as this driver seems to be sending GIWAP events quite a lot. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r--drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
index 46b6e8c900e9..d2a243a71824 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
@@ -2873,11 +2873,16 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)
if(IS_DOT11D_ENABLE(ieee))
Dot11d_Reset(ieee);
#endif
- ieee->state = IEEE80211_NOLINK;
ieee->is_set_key = false;
ieee->link_change(ieee->dev);
//HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
- notify_wx_assoc_event(ieee);
+ if (ieee->state == IEEE80211_LINKED ||
+ ieee->state == IEEE80211_ASSOCIATING) {
+ ieee->state = IEEE80211_NOLINK;
+ notify_wx_assoc_event(ieee);
+ }
+
+ ieee->state = IEEE80211_NOLINK;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))