]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] softmac: Fixed handling of deassociation from AP
authorUlrich Kunitz <kune@deine-taler.de>
Sat, 30 Dec 2006 21:18:14 +0000 (16:18 -0500)
committerChris Wright <chrisw@sous-sol.org>
Wed, 10 Jan 2007 19:05:20 +0000 (11:05 -0800)
In 2.6.19 a deauthentication from the AP doesn't start a
reassociation by the softmac code. It appears that
mac->associnfo.associating must be set and the
ieee80211softmac_assoc_work function must be scheduled. This patch
fixes that.

Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
net/ieee80211/softmac/ieee80211softmac_assoc.c
net/ieee80211/softmac/ieee80211softmac_auth.c
net/ieee80211/softmac/ieee80211softmac_priv.h

index cf51c87a971d786f0035b7e5d34cc6076889cc23..614aa8d329851ba52558ab810258d586d64ee29a 100644 (file)
@@ -427,6 +427,17 @@ ieee80211softmac_handle_assoc_response(struct net_device * dev,
        return 0;
 }
 
+void
+ieee80211softmac_try_reassoc(struct ieee80211softmac_device *mac)
+{
+       unsigned long flags;
+
+       spin_lock_irqsave(&mac->lock, flags);
+       mac->associnfo.associating = 1;
+       schedule_work(&mac->associnfo.work);
+       spin_unlock_irqrestore(&mac->lock, flags);
+}
+
 int
 ieee80211softmac_handle_disassoc(struct net_device * dev,
                                 struct ieee80211_disassoc *disassoc)
@@ -445,8 +456,7 @@ ieee80211softmac_handle_disassoc(struct net_device * dev,
        dprintk(KERN_INFO PFX "got disassoc frame\n");
        ieee80211softmac_disassoc(mac);
 
-       /* try to reassociate */
-       schedule_work(&mac->associnfo.work);
+       ieee80211softmac_try_reassoc(mac);
 
        return 0;
 }
index 4cef39e171d007cf4570f28ae793070f5ccaf5ff..88897e403c07e7e60dc8b55de951ccaee8c33cde 100644 (file)
@@ -328,6 +328,8 @@ ieee80211softmac_deauth_from_net(struct ieee80211softmac_device *mac,
        /* can't transmit data right now... */
        netif_carrier_off(mac->dev);
        spin_unlock_irqrestore(&mac->lock, flags);
+
+       ieee80211softmac_try_reassoc(mac);
 }
 
 /* 
index 0642e090b8a7a177ce0bf63a56a3692e2e57c0a8..3ae894f0c8f7815d6fc461f34f868cc53cee9bf7 100644 (file)
@@ -238,4 +238,6 @@ void ieee80211softmac_call_events_locked(struct ieee80211softmac_device *mac, in
 int ieee80211softmac_notify_internal(struct ieee80211softmac_device *mac,
        int event, void *event_context, notify_function_ptr fun, void *context, gfp_t gfp_mask);
 
+void ieee80211softmac_try_reassoc(struct ieee80211softmac_device *mac);
+
 #endif /* IEEE80211SOFTMAC_PRIV_H_ */