[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>
This commit is contained in:
Ulrich Kunitz
2006-12-03 16:32:00 +01:00
committed by John W. Linville
parent e6e3f12ad7
commit 2b50c24554
3 changed files with 16 additions and 2 deletions

View File

@@ -427,6 +427,17 @@ ieee80211softmac_handle_assoc_response(struct net_device * dev,
return 0; 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 int
ieee80211softmac_handle_disassoc(struct net_device * dev, ieee80211softmac_handle_disassoc(struct net_device * dev,
struct ieee80211_disassoc *disassoc) struct ieee80211_disassoc *disassoc)
@@ -445,8 +456,7 @@ ieee80211softmac_handle_disassoc(struct net_device * dev,
dprintk(KERN_INFO PFX "got disassoc frame\n"); dprintk(KERN_INFO PFX "got disassoc frame\n");
ieee80211softmac_disassoc(mac); ieee80211softmac_disassoc(mac);
/* try to reassociate */ ieee80211softmac_try_reassoc(mac);
schedule_work(&mac->associnfo.work);
return 0; return 0;
} }

View File

@@ -334,6 +334,8 @@ ieee80211softmac_deauth_from_net(struct ieee80211softmac_device *mac,
/* can't transmit data right now... */ /* can't transmit data right now... */
netif_carrier_off(mac->dev); netif_carrier_off(mac->dev);
spin_unlock_irqrestore(&mac->lock, flags); spin_unlock_irqrestore(&mac->lock, flags);
ieee80211softmac_try_reassoc(mac);
} }
/* /*

View File

@@ -238,4 +238,6 @@ void ieee80211softmac_call_events_locked(struct ieee80211softmac_device *mac, in
int ieee80211softmac_notify_internal(struct ieee80211softmac_device *mac, int ieee80211softmac_notify_internal(struct ieee80211softmac_device *mac,
int event, void *event_context, notify_function_ptr fun, void *context, gfp_t gfp_mask); 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_ */ #endif /* IEEE80211SOFTMAC_PRIV_H_ */