diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2008-06-02 11:35:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-14 12:17:59 -0400 |
commit | 5331b96ce3a9f08d3a9e28386e193e8c78f8fdd1 (patch) | |
tree | 6ba27ab1ada0cace15fca79d3288680f74b0d415 /drivers/net/wireless/rndis_wlan.c | |
parent | 6010ce07a66cfed043879de31275f5b90b33c4fc (diff) |
rndis_wlan: update carrier flag when link state changes
Driver wasn't updating netif_carrier on link state changes but assumed
link layer was always up.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index aaeeec803974..c281c0b35ed4 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -2215,6 +2215,8 @@ static void rndis_wext_worker(struct work_struct *work) | |||
2215 | int ret, offset; | 2215 | int ret, offset; |
2216 | 2216 | ||
2217 | if (test_and_clear_bit(WORK_LINK_UP, &priv->work_pending)) { | 2217 | if (test_and_clear_bit(WORK_LINK_UP, &priv->work_pending)) { |
2218 | netif_carrier_on(usbdev->net); | ||
2219 | |||
2218 | info = kzalloc(assoc_size, GFP_KERNEL); | 2220 | info = kzalloc(assoc_size, GFP_KERNEL); |
2219 | if (!info) | 2221 | if (!info) |
2220 | goto get_bssid; | 2222 | goto get_bssid; |
@@ -2253,6 +2255,8 @@ get_bssid: | |||
2253 | } | 2255 | } |
2254 | 2256 | ||
2255 | if (test_and_clear_bit(WORK_LINK_DOWN, &priv->work_pending)) { | 2257 | if (test_and_clear_bit(WORK_LINK_DOWN, &priv->work_pending)) { |
2258 | netif_carrier_off(usbdev->net); | ||
2259 | |||
2256 | evt.data.flags = 0; | 2260 | evt.data.flags = 0; |
2257 | evt.data.length = 0; | 2261 | evt.data.length = 0; |
2258 | memset(evt.ap_addr.sa_data, 0, ETH_ALEN); | 2262 | memset(evt.ap_addr.sa_data, 0, ETH_ALEN); |
@@ -2574,6 +2578,7 @@ static int rndis_wext_bind(struct usbnet *dev, struct usb_interface *intf) | |||
2574 | /* turn radio on */ | 2578 | /* turn radio on */ |
2575 | priv->radio_on = 1; | 2579 | priv->radio_on = 1; |
2576 | disassociate(dev, 1); | 2580 | disassociate(dev, 1); |
2581 | netif_carrier_off(dev->net); | ||
2577 | 2582 | ||
2578 | /* because rndis_command() sleeps we need to use workqueue */ | 2583 | /* because rndis_command() sleeps we need to use workqueue */ |
2579 | priv->workqueue = create_singlethread_workqueue("rndis_wlan"); | 2584 | priv->workqueue = create_singlethread_workqueue("rndis_wlan"); |