diff options
| author | Ulrich Kunitz <kune@deine-taler.de> | 2006-12-03 10:32:00 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-12-05 19:31:33 -0500 |
| commit | 2b50c24554d31c2db2f93b1151b5991e62f96594 (patch) | |
| tree | 82e45711b6da33aa390981e2336c1d13a1b72241 | |
| parent | e6e3f12ad713fb878baa8e8b5456874a7ac714d3 (diff) | |
[PATCH] softmac: Fixed handling of deassociation from AP
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>
| -rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_assoc.c | 14 | ||||
| -rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_auth.c | 2 | ||||
| -rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_priv.h | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c index cf51c87a971d..614aa8d32985 100644 --- a/net/ieee80211/softmac/ieee80211softmac_assoc.c +++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c | |||
| @@ -427,6 +427,17 @@ ieee80211softmac_handle_assoc_response(struct net_device * dev, | |||
| 427 | return 0; | 427 | return 0; |
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | void | ||
| 431 | ieee80211softmac_try_reassoc(struct ieee80211softmac_device *mac) | ||
| 432 | { | ||
| 433 | unsigned long flags; | ||
| 434 | |||
| 435 | spin_lock_irqsave(&mac->lock, flags); | ||
| 436 | mac->associnfo.associating = 1; | ||
| 437 | schedule_work(&mac->associnfo.work); | ||
| 438 | spin_unlock_irqrestore(&mac->lock, flags); | ||
| 439 | } | ||
| 440 | |||
| 430 | int | 441 | int |
| 431 | ieee80211softmac_handle_disassoc(struct net_device * dev, | 442 | ieee80211softmac_handle_disassoc(struct net_device * dev, |
| 432 | struct ieee80211_disassoc *disassoc) | 443 | struct ieee80211_disassoc *disassoc) |
| @@ -445,8 +456,7 @@ ieee80211softmac_handle_disassoc(struct net_device * dev, | |||
| 445 | dprintk(KERN_INFO PFX "got disassoc frame\n"); | 456 | dprintk(KERN_INFO PFX "got disassoc frame\n"); |
| 446 | ieee80211softmac_disassoc(mac); | 457 | ieee80211softmac_disassoc(mac); |
| 447 | 458 | ||
| 448 | /* try to reassociate */ | 459 | ieee80211softmac_try_reassoc(mac); |
| 449 | schedule_work(&mac->associnfo.work); | ||
| 450 | 460 | ||
| 451 | return 0; | 461 | return 0; |
| 452 | } | 462 | } |
diff --git a/net/ieee80211/softmac/ieee80211softmac_auth.c b/net/ieee80211/softmac/ieee80211softmac_auth.c index 0612015f1c78..ec449009c3cb 100644 --- a/net/ieee80211/softmac/ieee80211softmac_auth.c +++ b/net/ieee80211/softmac/ieee80211softmac_auth.c | |||
| @@ -334,6 +334,8 @@ ieee80211softmac_deauth_from_net(struct ieee80211softmac_device *mac, | |||
| 334 | /* can't transmit data right now... */ | 334 | /* can't transmit data right now... */ |
| 335 | netif_carrier_off(mac->dev); | 335 | netif_carrier_off(mac->dev); |
| 336 | spin_unlock_irqrestore(&mac->lock, flags); | 336 | spin_unlock_irqrestore(&mac->lock, flags); |
| 337 | |||
| 338 | ieee80211softmac_try_reassoc(mac); | ||
| 337 | } | 339 | } |
| 338 | 340 | ||
| 339 | /* | 341 | /* |
diff --git a/net/ieee80211/softmac/ieee80211softmac_priv.h b/net/ieee80211/softmac/ieee80211softmac_priv.h index 0642e090b8a7..3ae894f0c8f7 100644 --- a/net/ieee80211/softmac/ieee80211softmac_priv.h +++ b/net/ieee80211/softmac/ieee80211softmac_priv.h | |||
| @@ -238,4 +238,6 @@ void ieee80211softmac_call_events_locked(struct ieee80211softmac_device *mac, in | |||
| 238 | int ieee80211softmac_notify_internal(struct ieee80211softmac_device *mac, | 238 | int ieee80211softmac_notify_internal(struct ieee80211softmac_device *mac, |
| 239 | int event, void *event_context, notify_function_ptr fun, void *context, gfp_t gfp_mask); | 239 | int event, void *event_context, notify_function_ptr fun, void *context, gfp_t gfp_mask); |
| 240 | 240 | ||
| 241 | void ieee80211softmac_try_reassoc(struct ieee80211softmac_device *mac); | ||
| 242 | |||
| 241 | #endif /* IEEE80211SOFTMAC_PRIV_H_ */ | 243 | #endif /* IEEE80211SOFTMAC_PRIV_H_ */ |
