Commit 418fc57a authored by Ming Lei's avatar Ming Lei Committed by David S. Miller

usbnet: cdc-ether: apply usbnet_link_change

Use usbnet_link_change to handle link change centrally.
Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7a97856e
...@@ -406,10 +406,7 @@ void usbnet_cdc_status(struct usbnet *dev, struct urb *urb) ...@@ -406,10 +406,7 @@ void usbnet_cdc_status(struct usbnet *dev, struct urb *urb)
case USB_CDC_NOTIFY_NETWORK_CONNECTION: case USB_CDC_NOTIFY_NETWORK_CONNECTION:
netif_dbg(dev, timer, dev->net, "CDC: carrier %s\n", netif_dbg(dev, timer, dev->net, "CDC: carrier %s\n",
event->wValue ? "on" : "off"); event->wValue ? "on" : "off");
if (event->wValue) usbnet_link_change(dev, event->wValue, 0);
netif_carrier_on(dev->net);
else
netif_carrier_off(dev->net);
break; break;
case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */ case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */
netif_dbg(dev, timer, dev->net, "CDC: speed change (len %d)\n", netif_dbg(dev, timer, dev->net, "CDC: speed change (len %d)\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment