summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/cdc_ncm.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2013-04-11 04:40:33 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-11 15:57:16 -0400
commit8a34b0ae8778f6b42ed38857486b769a224e2536 (patch)
tree1278ed241a8d88417715281419c1e1b0dea7e9cc /drivers/net/usb/cdc_ncm.c
parent4be74c130d1c5c03bccef0ab8d7a6bb71c7de53a (diff)
downloadlinux-8a34b0ae8778f6b42ed38857486b769a224e2536.tar.bz2
usbnet: cdc_ncm: apply usbnet_link_change
Use the introduced usbnet_link_change to handle link change. Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/cdc_ncm.c')
-rw-r--r--drivers/net/usb/cdc_ncm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 67012cbd5582..43afde8f48d2 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -610,7 +610,7 @@ static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)
* (carrier is OFF) during attach, so the IP network stack does not
* start IPv6 negotiation and more.
*/
- netif_carrier_off(dev->net);
+ usbnet_link_change(dev, 0, 0);
return ret;
}
@@ -1106,12 +1106,9 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)
" %sconnected\n",
ctx->netdev->name, ctx->connected ? "" : "dis");
- if (ctx->connected)
- netif_carrier_on(dev->net);
- else {
- netif_carrier_off(dev->net);
+ usbnet_link_change(dev, ctx->connected, 0);
+ if (!ctx->connected)
ctx->tx_speed = ctx->rx_speed = 0;
- }
break;
case USB_CDC_NOTIFY_SPEED_CHANGE: