diff options
-rw-r--r-- | drivers/net/usb/usbnet.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 8124cf16259f..378da8c938fe 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1210,6 +1210,14 @@ static const struct net_device_ops usbnet_netdev_ops = { | |||
1210 | 1210 | ||
1211 | // precondition: never called in_interrupt | 1211 | // precondition: never called in_interrupt |
1212 | 1212 | ||
1213 | static struct device_type wlan_type = { | ||
1214 | .name = "wlan", | ||
1215 | }; | ||
1216 | |||
1217 | static struct device_type wwan_type = { | ||
1218 | .name = "wwan", | ||
1219 | }; | ||
1220 | |||
1213 | int | 1221 | int |
1214 | usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | 1222 | usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) |
1215 | { | 1223 | { |
@@ -1325,6 +1333,12 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1325 | dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); | 1333 | dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); |
1326 | 1334 | ||
1327 | SET_NETDEV_DEV(net, &udev->dev); | 1335 | SET_NETDEV_DEV(net, &udev->dev); |
1336 | |||
1337 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) | ||
1338 | SET_NETDEV_DEVTYPE(net, &wlan_type); | ||
1339 | if ((dev->driver_info->flags & FLAG_WWAN) != 0) | ||
1340 | SET_NETDEV_DEVTYPE(net, &wwan_type); | ||
1341 | |||
1328 | status = register_netdev (net); | 1342 | status = register_netdev (net); |
1329 | if (status) | 1343 | if (status) |
1330 | goto out3; | 1344 | goto out3; |