diff options
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index d86fcf0a5ad5..1156be53df3f 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -30,6 +30,14 @@ static inline void lbs_postpone_association_work(struct lbs_private *priv) | |||
30 | queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2); | 30 | queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2); |
31 | } | 31 | } |
32 | 32 | ||
33 | static inline void lbs_do_association_work(struct lbs_private *priv) | ||
34 | { | ||
35 | if (priv->surpriseremoved) | ||
36 | return; | ||
37 | cancel_delayed_work(&priv->assoc_work); | ||
38 | queue_delayed_work(priv->work_thread, &priv->assoc_work, 0); | ||
39 | } | ||
40 | |||
33 | static inline void lbs_cancel_association_work(struct lbs_private *priv) | 41 | static inline void lbs_cancel_association_work(struct lbs_private *priv) |
34 | { | 42 | { |
35 | cancel_delayed_work(&priv->assoc_work); | 43 | cancel_delayed_work(&priv->assoc_work); |
@@ -1585,12 +1593,14 @@ static int lbs_set_encodeext(struct net_device *dev, | |||
1585 | set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags); | 1593 | set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags); |
1586 | } | 1594 | } |
1587 | 1595 | ||
1588 | disable_wep (assoc_req); | 1596 | /* Only disable wep if necessary: can't waste time here. */ |
1597 | if (priv->mac_control & CMD_ACT_MAC_WEP_ENABLE) | ||
1598 | disable_wep(assoc_req); | ||
1589 | } | 1599 | } |
1590 | 1600 | ||
1591 | out: | 1601 | out: |
1592 | if (ret == 0) { | 1602 | if (ret == 0) { /* key installation is time critical: postpone not! */ |
1593 | lbs_postpone_association_work(priv); | 1603 | lbs_do_association_work(priv); |
1594 | } else { | 1604 | } else { |
1595 | lbs_cancel_association_work(priv); | 1605 | lbs_cancel_association_work(priv); |
1596 | } | 1606 | } |