summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rndis_wlan.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2008-06-02 18:35:29 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:17:59 -0400
commit5331b96ce3a9f08d3a9e28386e193e8c78f8fdd1 (patch)
tree6ba27ab1ada0cace15fca79d3288680f74b0d415 /drivers/net/wireless/rndis_wlan.c
parent6010ce07a66cfed043879de31275f5b90b33c4fc (diff)
downloadlwn-5331b96ce3a9f08d3a9e28386e193e8c78f8fdd1.tar.gz
lwn-5331b96ce3a9f08d3a9e28386e193e8c78f8fdd1.zip
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.c5
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)
int ret, offset;
if (test_and_clear_bit(WORK_LINK_UP, &priv->work_pending)) {
+ netif_carrier_on(usbdev->net);
+
info = kzalloc(assoc_size, GFP_KERNEL);
if (!info)
goto get_bssid;
@@ -2253,6 +2255,8 @@ get_bssid:
}
if (test_and_clear_bit(WORK_LINK_DOWN, &priv->work_pending)) {
+ netif_carrier_off(usbdev->net);
+
evt.data.flags = 0;
evt.data.length = 0;
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)
/* turn radio on */
priv->radio_on = 1;
disassociate(dev, 1);
+ netif_carrier_off(dev->net);
/* because rndis_command() sleeps we need to use workqueue */
priv->workqueue = create_singlethread_workqueue("rndis_wlan");