usbnet.c (e1e499eef2200c2a7120c9ebf297d48b195cf887) usbnet.c (225794f8c33fd32721ae1cd3576db99810351d7b)
1/*
2 * USB Network driver infrastructure
3 * Copyright (C) 2000-2005 by David Brownell
4 * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 1196 unchanged lines hidden (view full) ---

1205 .ndo_set_mac_address = eth_mac_addr,
1206 .ndo_validate_addr = eth_validate_addr,
1207};
1208
1209/*-------------------------------------------------------------------------*/
1210
1211// precondition: never called in_interrupt
1212
1/*
2 * USB Network driver infrastructure
3 * Copyright (C) 2000-2005 by David Brownell
4 * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 1196 unchanged lines hidden (view full) ---

1205 .ndo_set_mac_address = eth_mac_addr,
1206 .ndo_validate_addr = eth_validate_addr,
1207};
1208
1209/*-------------------------------------------------------------------------*/
1210
1211// precondition: never called in_interrupt
1212
1213static struct device_type wlan_type = {
1214 .name = "wlan",
1215};
1216
1217static struct device_type wwan_type = {
1218 .name = "wwan",
1219};
1220
1213int
1214usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1215{
1216 struct usbnet *dev;
1217 struct net_device *net;
1218 struct usb_host_interface *interface;
1219 struct driver_info *info;
1220 struct usb_device *xdev;

--- 99 unchanged lines hidden (view full) ---

1320 if (status < 0)
1321 goto out3;
1322
1323 if (!dev->rx_urb_size)
1324 dev->rx_urb_size = dev->hard_mtu;
1325 dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
1326
1327 SET_NETDEV_DEV(net, &udev->dev);
1221int
1222usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1223{
1224 struct usbnet *dev;
1225 struct net_device *net;
1226 struct usb_host_interface *interface;
1227 struct driver_info *info;
1228 struct usb_device *xdev;

--- 99 unchanged lines hidden (view full) ---

1328 if (status < 0)
1329 goto out3;
1330
1331 if (!dev->rx_urb_size)
1332 dev->rx_urb_size = dev->hard_mtu;
1333 dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
1334
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);
1329 if (status)
1330 goto out3;
1331 if (netif_msg_probe (dev))
1332 devinfo (dev, "register '%s' at usb-%s-%s, %s, %pM",
1333 udev->dev.driver->name,
1334 xdev->bus->bus_name, xdev->devpath,
1335 dev->driver_info->description,

--- 83 unchanged lines hidden ---
1342 status = register_netdev (net);
1343 if (status)
1344 goto out3;
1345 if (netif_msg_probe (dev))
1346 devinfo (dev, "register '%s' at usb-%s-%s, %s, %pM",
1347 udev->dev.driver->name,
1348 xdev->bus->bus_name, xdev->devpath,
1349 dev->driver_info->description,

--- 83 unchanged lines hidden ---