aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 21:09:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 21:09:01 -0400
commit1e30c1b3866968ff584ae3cd3909ef93957bb215 (patch)
tree0ee70a264f7bed4047f68ed3aeb68d6c4cf4e136 /drivers/net/usb
parenta1857ebe752d77d96c89d964500a9528df6d320e (diff)
parentc7109986db3c945f50ceed884a30e0fd8af3b89b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking updates and fixes from David Miller: 1) Reinstate the no-ref optimization for input route lookups in ipv4 to fix some routing cache removal perf regressions. 2) Make TCP socket pre-demux work on ipv6 side too, from Eric Dumazet. 3) Get RX hash value from correct place in be2net driver, from Sarveshwar Bandi. 4) Validation of FIB cached routes missing critical check, from Eric Dumazet. 5) EEH support in mlx4 driver, from Kleber Sacilotto de Souza. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (23 commits) ipv6: Early TCP socket demux ipv4: Fix input route performance regression. pch_gbe: vlan skb len fix pch_gbe: add extra clean tx pch_gbe: fix transmit watchdog timeout ixgbe: fix panic while dumping packets on Tx hang with IOMMU be2net: Fix to parse RSS hash from Receive completions correctly. net/mlx4_en: Limit the RFS filter IDs to be < RPS_NO_FILTER hyperv: Add error handling to rndis_filter_device_add() hyperv: Add a check for ring_size value ipv4: rt_cache_valid must check expired routes net/pch_gpe: Cannot disable ethernet autonegation qeth: repair crash in qeth_l3_vlan_rx_kill_vid() netiucv: cleanup attribute usage net: wiznet add missing HAS_IOMEM dependency be2net: Missing byteswap in be_get_fw_log_level causes oops on PowerPC mlx4: Add support for EEH error recovery cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN wanmain: comparing array with NULL caif: fix NULL pointer check ...
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/cdc_ncm.c68
1 files changed, 45 insertions, 23 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 4b9513fcf275..f4ce5957df32 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -138,20 +138,7 @@ struct cdc_ncm_ctx {
138static void cdc_ncm_txpath_bh(unsigned long param); 138static void cdc_ncm_txpath_bh(unsigned long param);
139static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx); 139static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx);
140static enum hrtimer_restart cdc_ncm_tx_timer_cb(struct hrtimer *hr_timer); 140static enum hrtimer_restart cdc_ncm_tx_timer_cb(struct hrtimer *hr_timer);
141static const struct driver_info cdc_ncm_info;
142static struct usb_driver cdc_ncm_driver; 141static struct usb_driver cdc_ncm_driver;
143static const struct ethtool_ops cdc_ncm_ethtool_ops;
144
145static const struct usb_device_id cdc_devs[] = {
146 { USB_INTERFACE_INFO(USB_CLASS_COMM,
147 USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
148 .driver_info = (unsigned long)&cdc_ncm_info,
149 },
150 {
151 },
152};
153
154MODULE_DEVICE_TABLE(usb, cdc_devs);
155 142
156static void 143static void
157cdc_ncm_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info) 144cdc_ncm_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info)
@@ -454,6 +441,16 @@ static void cdc_ncm_free(struct cdc_ncm_ctx *ctx)
454 kfree(ctx); 441 kfree(ctx);
455} 442}
456 443
444static const struct ethtool_ops cdc_ncm_ethtool_ops = {
445 .get_drvinfo = cdc_ncm_get_drvinfo,
446 .get_link = usbnet_get_link,
447 .get_msglevel = usbnet_get_msglevel,
448 .set_msglevel = usbnet_set_msglevel,
449 .get_settings = usbnet_get_settings,
450 .set_settings = usbnet_set_settings,
451 .nway_reset = usbnet_nway_reset,
452};
453
457static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) 454static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)
458{ 455{
459 struct cdc_ncm_ctx *ctx; 456 struct cdc_ncm_ctx *ctx;
@@ -1203,6 +1200,41 @@ static const struct driver_info cdc_ncm_info = {
1203 .tx_fixup = cdc_ncm_tx_fixup, 1200 .tx_fixup = cdc_ncm_tx_fixup,
1204}; 1201};
1205 1202
1203/* Same as cdc_ncm_info, but with FLAG_WWAN */
1204static const struct driver_info wwan_info = {
1205 .description = "Mobile Broadband Network Device",
1206 .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET
1207 | FLAG_WWAN,
1208 .bind = cdc_ncm_bind,
1209 .unbind = cdc_ncm_unbind,
1210 .check_connect = cdc_ncm_check_connect,
1211 .manage_power = cdc_ncm_manage_power,
1212 .status = cdc_ncm_status,
1213 .rx_fixup = cdc_ncm_rx_fixup,
1214 .tx_fixup = cdc_ncm_tx_fixup,
1215};
1216
1217static const struct usb_device_id cdc_devs[] = {
1218 /* Ericsson MBM devices like F5521gw */
1219 { .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
1220 | USB_DEVICE_ID_MATCH_VENDOR,
1221 .idVendor = 0x0bdb,
1222 .bInterfaceClass = USB_CLASS_COMM,
1223 .bInterfaceSubClass = USB_CDC_SUBCLASS_NCM,
1224 .bInterfaceProtocol = USB_CDC_PROTO_NONE,
1225 .driver_info = (unsigned long) &wwan_info,
1226 },
1227
1228 /* Generic CDC-NCM devices */
1229 { USB_INTERFACE_INFO(USB_CLASS_COMM,
1230 USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
1231 .driver_info = (unsigned long)&cdc_ncm_info,
1232 },
1233 {
1234 },
1235};
1236MODULE_DEVICE_TABLE(usb, cdc_devs);
1237
1206static struct usb_driver cdc_ncm_driver = { 1238static struct usb_driver cdc_ncm_driver = {
1207 .name = "cdc_ncm", 1239 .name = "cdc_ncm",
1208 .id_table = cdc_devs, 1240 .id_table = cdc_devs,
@@ -1215,16 +1247,6 @@ static struct usb_driver cdc_ncm_driver = {
1215 .disable_hub_initiated_lpm = 1, 1247 .disable_hub_initiated_lpm = 1,
1216}; 1248};
1217 1249
1218static const struct ethtool_ops cdc_ncm_ethtool_ops = {
1219 .get_drvinfo = cdc_ncm_get_drvinfo,
1220 .get_link = usbnet_get_link,
1221 .get_msglevel = usbnet_get_msglevel,
1222 .set_msglevel = usbnet_set_msglevel,
1223 .get_settings = usbnet_get_settings,
1224 .set_settings = usbnet_set_settings,
1225 .nway_reset = usbnet_nway_reset,
1226};
1227
1228module_usb_driver(cdc_ncm_driver); 1250module_usb_driver(cdc_ncm_driver);
1229 1251
1230MODULE_AUTHOR("Hans Petter Selasky"); 1252MODULE_AUTHOR("Hans Petter Selasky");