Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
zaurus: add usb id for motomagx phones
usbnet: make usbnet_get_link() fall back to ethtool_op_get_link()
veth: Fix carrier detect
cdc_ether: add usb id for Ericsson F3507g
r8169: read MAC address from EEPROM on init (2nd attempt)
tcp: fix retrans_out leaks
net headers: export dcbnl.h
net headers: cleanup dcbnl.h
netpoll: Add drop checks to all entry points
gianfar: Do right check on num_txbdfree
pkt_sched: sch_drr: Fix oops in drr_change_class.
b44: Disable device on shutdown
b44: Unconditionally enable interrupt routing on reset
net: fix hp-plus build error
libertas: fix misuse of netdev_priv() and dev->ml_priv
ipv6: don't use tw net when accounting for recycled tw
asix: new device ids
tcp_scalable: Update malformed & dead url
netfilter: xt_recent: fix proc-file addition/removal of IPv4 addresses
netxen: handle pci bar 0 mapping failure
...

+470 -212
+9 -4
drivers/net/b44.c
··· 1264 1264 static void b44_chip_reset(struct b44 *bp, int reset_kind) 1265 1265 { 1266 1266 struct ssb_device *sdev = bp->sdev; 1267 + bool was_enabled; 1267 1268 1268 - if (ssb_device_is_enabled(bp->sdev)) { 1269 + was_enabled = ssb_device_is_enabled(bp->sdev); 1270 + 1271 + ssb_device_enable(bp->sdev, 0); 1272 + ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev); 1273 + 1274 + if (was_enabled) { 1269 1275 bw32(bp, B44_RCV_LAZY, 0); 1270 1276 bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE); 1271 1277 b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1); ··· 1283 1277 } 1284 1278 bw32(bp, B44_DMARX_CTRL, 0); 1285 1279 bp->rx_prod = bp->rx_cons = 0; 1286 - } else 1287 - ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev); 1280 + } 1288 1281 1289 - ssb_device_enable(bp->sdev, 0); 1290 1282 b44_clear_stats(bp); 1291 1283 1292 1284 /* ··· 2240 2236 struct net_device *dev = ssb_get_drvdata(sdev); 2241 2237 2242 2238 unregister_netdev(dev); 2239 + ssb_device_disable(sdev, 0); 2243 2240 ssb_bus_may_powerdown(sdev->bus); 2244 2241 free_netdev(dev); 2245 2242 ssb_pcihost_set_power_state(sdev, PCI_D3hot);
+1 -1
drivers/net/gianfar.c
··· 1284 1284 spin_lock_irqsave(&priv->txlock, flags); 1285 1285 1286 1286 /* check if there is space to queue this packet */ 1287 - if (nr_frags > priv->num_txbdfree) { 1287 + if ((nr_frags+1) > priv->num_txbdfree) { 1288 1288 /* no space, stop the queue */ 1289 1289 netif_stop_queue(dev); 1290 1290 dev->stats.tx_fifo_errors++;
+1 -1
drivers/net/hp-plus.c
··· 467 467 if (this_dev != 0) break; /* only autoprobe 1st one */ 468 468 printk(KERN_NOTICE "hp-plus.c: Presently autoprobing (not recommended) for a single card.\n"); 469 469 } 470 - dev = alloc_ei_netdev(); 470 + dev = alloc_eip_netdev(); 471 471 if (!dev) 472 472 break; 473 473 dev->irq = irq[this_dev];
+12 -4
drivers/net/netxen/netxen_nic_main.c
··· 588 588 adapter->pci_mem_read = netxen_nic_pci_mem_read_2M; 589 589 adapter->pci_mem_write = netxen_nic_pci_mem_write_2M; 590 590 591 - mem_ptr0 = ioremap(mem_base, mem_len); 591 + mem_ptr0 = pci_ioremap_bar(pdev, 0); 592 + if (mem_ptr0 == NULL) { 593 + dev_err(&pdev->dev, "failed to map PCI bar 0\n"); 594 + return -EIO; 595 + } 596 + 592 597 pci_len0 = mem_len; 593 598 first_page_group_start = 0; 594 599 first_page_group_end = 0; ··· 800 795 * See if the firmware gave us a virtual-physical port mapping. 801 796 */ 802 797 adapter->physical_port = adapter->portnum; 803 - i = adapter->pci_read_normalize(adapter, CRB_V2P(adapter->portnum)); 804 - if (i != 0x55555555) 805 - adapter->physical_port = i; 798 + if (adapter->fw_major < 4) { 799 + i = adapter->pci_read_normalize(adapter, 800 + CRB_V2P(adapter->portnum)); 801 + if (i != 0x55555555) 802 + adapter->physical_port = i; 803 + } 806 804 807 805 adapter->flags &= ~(NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED); 808 806
+112 -2
drivers/net/r8169.c
··· 81 81 #define RTL8169_TX_TIMEOUT (6*HZ) 82 82 #define RTL8169_PHY_TIMEOUT (10*HZ) 83 83 84 - #define RTL_EEPROM_SIG cpu_to_le32(0x8129) 85 - #define RTL_EEPROM_SIG_MASK cpu_to_le32(0xffff) 84 + #define RTL_EEPROM_SIG 0x8129 86 85 #define RTL_EEPROM_SIG_ADDR 0x0000 86 + #define RTL_EEPROM_MAC_ADDR 0x0007 87 87 88 88 /* write/read MMIO register */ 89 89 #define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) ··· 293 293 /* Cfg9346Bits */ 294 294 Cfg9346_Lock = 0x00, 295 295 Cfg9346_Unlock = 0xc0, 296 + Cfg9346_Program = 0x80, /* Programming mode */ 297 + Cfg9346_EECS = 0x08, /* Chip select */ 298 + Cfg9346_EESK = 0x04, /* Serial data clock */ 299 + Cfg9346_EEDI = 0x02, /* Data input */ 300 + Cfg9346_EEDO = 0x01, /* Data output */ 296 301 297 302 /* rx_mode_bits */ 298 303 AcceptErr = 0x20, ··· 310 305 /* RxConfigBits */ 311 306 RxCfgFIFOShift = 13, 312 307 RxCfgDMAShift = 8, 308 + RxCfg9356SEL = 6, /* EEPROM type: 0 = 9346, 1 = 9356 */ 313 309 314 310 /* TxConfigBits */ 315 311 TxInterFrameGapShift = 24, ··· 1969 1963 1970 1964 }; 1971 1965 1966 + /* Delay between EEPROM clock transitions. Force out buffered PCI writes. */ 1967 + #define RTL_EEPROM_DELAY() RTL_R8(Cfg9346) 1968 + #define RTL_EEPROM_READ_CMD 6 1969 + 1970 + /* read 16bit word stored in EEPROM. EEPROM is addressed by words. */ 1971 + static u16 rtl_eeprom_read(void __iomem *ioaddr, int addr) 1972 + { 1973 + u16 result = 0; 1974 + int cmd, cmd_len, i; 1975 + 1976 + /* check for EEPROM address size (in bits) */ 1977 + if (RTL_R32(RxConfig) & (1 << RxCfg9356SEL)) { 1978 + /* EEPROM is 93C56 */ 1979 + cmd_len = 3 + 8; /* 3 bits for command id and 8 for address */ 1980 + cmd = (RTL_EEPROM_READ_CMD << 8) | (addr & 0xff); 1981 + } else { 1982 + /* EEPROM is 93C46 */ 1983 + cmd_len = 3 + 6; /* 3 bits for command id and 6 for address */ 1984 + cmd = (RTL_EEPROM_READ_CMD << 6) | (addr & 0x3f); 1985 + } 1986 + 1987 + /* enter programming mode */ 1988 + RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); 1989 + RTL_EEPROM_DELAY(); 1990 + 1991 + /* write command and requested address */ 1992 + while (cmd_len--) { 1993 + u8 x = Cfg9346_Program | Cfg9346_EECS; 1994 + 1995 + x |= (cmd & (1 << cmd_len)) ? Cfg9346_EEDI : 0; 1996 + 1997 + /* write a bit */ 1998 + RTL_W8(Cfg9346, x); 1999 + RTL_EEPROM_DELAY(); 2000 + 2001 + /* raise clock */ 2002 + RTL_W8(Cfg9346, x | Cfg9346_EESK); 2003 + RTL_EEPROM_DELAY(); 2004 + } 2005 + 2006 + /* lower clock */ 2007 + RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); 2008 + RTL_EEPROM_DELAY(); 2009 + 2010 + /* read back 16bit value */ 2011 + for (i = 16; i > 0; i--) { 2012 + /* raise clock */ 2013 + RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS | Cfg9346_EESK); 2014 + RTL_EEPROM_DELAY(); 2015 + 2016 + result <<= 1; 2017 + result |= (RTL_R8(Cfg9346) & Cfg9346_EEDO) ? 1 : 0; 2018 + 2019 + /* lower clock */ 2020 + RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); 2021 + RTL_EEPROM_DELAY(); 2022 + } 2023 + 2024 + RTL_W8(Cfg9346, Cfg9346_Program); 2025 + /* leave programming mode */ 2026 + RTL_W8(Cfg9346, Cfg9346_Lock); 2027 + 2028 + return result; 2029 + } 2030 + 2031 + static void rtl_init_mac_address(struct rtl8169_private *tp, 2032 + void __iomem *ioaddr) 2033 + { 2034 + struct pci_dev *pdev = tp->pci_dev; 2035 + u16 x; 2036 + u8 mac[8]; 2037 + 2038 + /* read EEPROM signature */ 2039 + x = rtl_eeprom_read(ioaddr, RTL_EEPROM_SIG_ADDR); 2040 + 2041 + if (x != RTL_EEPROM_SIG) { 2042 + dev_info(&pdev->dev, "Missing EEPROM signature: %04x\n", x); 2043 + return; 2044 + } 2045 + 2046 + /* read MAC address */ 2047 + x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR); 2048 + mac[0] = x & 0xff; 2049 + mac[1] = x >> 8; 2050 + x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR + 1); 2051 + mac[2] = x & 0xff; 2052 + mac[3] = x >> 8; 2053 + x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR + 2); 2054 + mac[4] = x & 0xff; 2055 + mac[5] = x >> 8; 2056 + 2057 + if (netif_msg_probe(tp)) { 2058 + DECLARE_MAC_BUF(buf); 2059 + 2060 + dev_info(&pdev->dev, "MAC address found in EEPROM: %s\n", 2061 + print_mac(buf, mac)); 2062 + } 2063 + 2064 + if (is_valid_ether_addr(mac)) 2065 + rtl_rar_set(tp, mac); 2066 + } 2067 + 1972 2068 static int __devinit 1973 2069 rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 1974 2070 { ··· 2248 2140 spin_lock_init(&tp->lock); 2249 2141 2250 2142 tp->mmio_addr = ioaddr; 2143 + 2144 + rtl_init_mac_address(tp, ioaddr); 2251 2145 2252 2146 /* Get MAC address */ 2253 2147 for (i = 0; i < MAC_ADDR_LEN; i++)
+8
drivers/net/usb/asix.c
··· 1451 1451 // Cables-to-Go USB Ethernet Adapter 1452 1452 USB_DEVICE(0x0b95, 0x772a), 1453 1453 .driver_info = (unsigned long) &ax88772_info, 1454 + }, { 1455 + // ABOCOM for pci 1456 + USB_DEVICE(0x14ea, 0xab11), 1457 + .driver_info = (unsigned long) &ax88178_info, 1458 + }, { 1459 + // ASIX 88772a 1460 + USB_DEVICE(0x0db0, 0xa877), 1461 + .driver_info = (unsigned long) &ax88772_info, 1454 1462 }, 1455 1463 { }, // END 1456 1464 };
+5
drivers/net/usb/cdc_ether.c
··· 559 559 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET, 560 560 USB_CDC_PROTO_NONE), 561 561 .driver_info = (unsigned long) &cdc_info, 562 + }, { 563 + /* Ericsson F3507g */ 564 + USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1900, USB_CLASS_COMM, 565 + USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), 566 + .driver_info = (unsigned long) &cdc_info, 562 567 }, 563 568 { }, // END 564 569 };
+2 -2
drivers/net/usb/usbnet.c
··· 723 723 if (dev->mii.mdio_read) 724 724 return mii_link_ok(&dev->mii); 725 725 726 - /* Otherwise, say we're up (to avoid breaking scripts) */ 727 - return 1; 726 + /* Otherwise, dtrt for drivers calling netif_carrier_{on,off} */ 727 + return ethtool_op_get_link(net); 728 728 } 729 729 EXPORT_SYMBOL_GPL(usbnet_get_link); 730 730
+5
drivers/net/usb/zaurus.c
··· 341 341 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, 342 342 USB_CDC_PROTO_NONE), 343 343 .driver_info = (unsigned long) &bogus_mdlm_info, 344 + }, { 345 + /* Motorola MOTOMAGX phones */ 346 + USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6425, USB_CLASS_COMM, 347 + USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), 348 + .driver_info = (unsigned long) &bogus_mdlm_info, 344 349 }, 345 350 346 351 /* Olympus has some models with a Zaurus-compatible option.
+11 -40
drivers/net/veth.c
··· 239 239 return 0; 240 240 } 241 241 242 + static int veth_close(struct net_device *dev) 243 + { 244 + struct veth_priv *priv = netdev_priv(dev); 245 + 246 + netif_carrier_off(dev); 247 + netif_carrier_off(priv->peer); 248 + 249 + return 0; 250 + } 251 + 242 252 static int veth_dev_init(struct net_device *dev) 243 253 { 244 254 struct veth_net_stats *stats; ··· 275 265 static const struct net_device_ops veth_netdev_ops = { 276 266 .ndo_init = veth_dev_init, 277 267 .ndo_open = veth_open, 268 + .ndo_stop = veth_close, 278 269 .ndo_start_xmit = veth_xmit, 279 270 .ndo_get_stats = veth_get_stats, 280 271 .ndo_set_mac_address = eth_mac_addr, ··· 290 279 dev->features |= NETIF_F_LLTX; 291 280 dev->destructor = veth_dev_free; 292 281 } 293 - 294 - static void veth_change_state(struct net_device *dev) 295 - { 296 - struct net_device *peer; 297 - struct veth_priv *priv; 298 - 299 - priv = netdev_priv(dev); 300 - peer = priv->peer; 301 - 302 - if (netif_carrier_ok(peer)) { 303 - if (!netif_carrier_ok(dev)) 304 - netif_carrier_on(dev); 305 - } else { 306 - if (netif_carrier_ok(dev)) 307 - netif_carrier_off(dev); 308 - } 309 - } 310 - 311 - static int veth_device_event(struct notifier_block *unused, 312 - unsigned long event, void *ptr) 313 - { 314 - struct net_device *dev = ptr; 315 - 316 - if (dev->netdev_ops->ndo_open != veth_open) 317 - goto out; 318 - 319 - switch (event) { 320 - case NETDEV_CHANGE: 321 - veth_change_state(dev); 322 - break; 323 - } 324 - out: 325 - return NOTIFY_DONE; 326 - } 327 - 328 - static struct notifier_block veth_notifier_block __read_mostly = { 329 - .notifier_call = veth_device_event, 330 - }; 331 282 332 283 /* 333 284 * netlink interface ··· 441 468 442 469 static __init int veth_init(void) 443 470 { 444 - register_netdevice_notifier(&veth_notifier_block); 445 471 return rtnl_link_register(&veth_link_ops); 446 472 } 447 473 448 474 static __exit void veth_exit(void) 449 475 { 450 476 rtnl_link_unregister(&veth_link_ops); 451 - unregister_netdevice_notifier(&veth_notifier_block); 452 477 } 453 478 454 479 module_init(veth_init);
+17 -7
drivers/net/wireless/ath9k/main.c
··· 1538 1538 bad: 1539 1539 if (ah) 1540 1540 ath9k_hw_detach(ah); 1541 + ath9k_exit_debug(sc); 1541 1542 1542 1543 return error; 1543 1544 } ··· 1546 1545 static int ath_attach(u16 devid, struct ath_softc *sc) 1547 1546 { 1548 1547 struct ieee80211_hw *hw = sc->hw; 1549 - int error = 0; 1548 + int error = 0, i; 1550 1549 1551 1550 DPRINTF(sc, ATH_DBG_CONFIG, "Attach ATH hw\n"); 1552 1551 ··· 1590 1589 /* initialize tx/rx engine */ 1591 1590 error = ath_tx_init(sc, ATH_TXBUF); 1592 1591 if (error != 0) 1593 - goto detach; 1592 + goto error_attach; 1594 1593 1595 1594 error = ath_rx_init(sc, ATH_RXBUF); 1596 1595 if (error != 0) 1597 - goto detach; 1596 + goto error_attach; 1598 1597 1599 1598 #if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE) 1600 1599 /* Initialze h/w Rfkill */ ··· 1602 1601 INIT_DELAYED_WORK(&sc->rf_kill.rfkill_poll, ath_rfkill_poll); 1603 1602 1604 1603 /* Initialize s/w rfkill */ 1605 - if (ath_init_sw_rfkill(sc)) 1606 - goto detach; 1604 + error = ath_init_sw_rfkill(sc); 1605 + if (error) 1606 + goto error_attach; 1607 1607 #endif 1608 1608 1609 1609 error = ieee80211_register_hw(hw); ··· 1613 1611 ath_init_leds(sc); 1614 1612 1615 1613 return 0; 1616 - detach: 1617 - ath_detach(sc); 1614 + 1615 + error_attach: 1616 + /* cleanup tx queues */ 1617 + for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) 1618 + if (ATH_TXQ_SETUP(sc, i)) 1619 + ath_tx_cleanupq(sc, &sc->tx.txq[i]); 1620 + 1621 + ath9k_hw_detach(sc->sc_ah); 1622 + ath9k_exit_debug(sc); 1623 + 1618 1624 return error; 1619 1625 } 1620 1626
+6 -6
drivers/net/wireless/libertas/ethtool.c
··· 23 23 static void lbs_ethtool_get_drvinfo(struct net_device *dev, 24 24 struct ethtool_drvinfo *info) 25 25 { 26 - struct lbs_private *priv = netdev_priv(dev); 26 + struct lbs_private *priv = dev->ml_priv; 27 27 28 28 snprintf(info->fw_version, 32, "%u.%u.%u.p%u", 29 29 priv->fwrelease >> 24 & 0xff, ··· 47 47 static int lbs_ethtool_get_eeprom(struct net_device *dev, 48 48 struct ethtool_eeprom *eeprom, u8 * bytes) 49 49 { 50 - struct lbs_private *priv = netdev_priv(dev); 50 + struct lbs_private *priv = dev->ml_priv; 51 51 struct cmd_ds_802_11_eeprom_access cmd; 52 52 int ret; 53 53 ··· 76 76 static void lbs_ethtool_get_stats(struct net_device *dev, 77 77 struct ethtool_stats *stats, uint64_t *data) 78 78 { 79 - struct lbs_private *priv = netdev_priv(dev); 79 + struct lbs_private *priv = dev->ml_priv; 80 80 struct cmd_ds_mesh_access mesh_access; 81 81 int ret; 82 82 ··· 113 113 114 114 static int lbs_ethtool_get_sset_count(struct net_device *dev, int sset) 115 115 { 116 - struct lbs_private *priv = netdev_priv(dev); 116 + struct lbs_private *priv = dev->ml_priv; 117 117 118 118 if (sset == ETH_SS_STATS && dev == priv->mesh_dev) 119 119 return MESH_STATS_NUM; ··· 143 143 static void lbs_ethtool_get_wol(struct net_device *dev, 144 144 struct ethtool_wolinfo *wol) 145 145 { 146 - struct lbs_private *priv = netdev_priv(dev); 146 + struct lbs_private *priv = dev->ml_priv; 147 147 148 148 if (priv->wol_criteria == 0xffffffff) { 149 149 /* Interface driver didn't configure wake */ ··· 166 166 static int lbs_ethtool_set_wol(struct net_device *dev, 167 167 struct ethtool_wolinfo *wol) 168 168 { 169 - struct lbs_private *priv = netdev_priv(dev); 169 + struct lbs_private *priv = dev->ml_priv; 170 170 uint32_t criteria = 0; 171 171 172 172 if (priv->wol_criteria == 0xffffffff && wol->wolopts)
+2 -2
drivers/net/wireless/libertas/if_usb.c
··· 59 59 static ssize_t if_usb_firmware_set(struct device *dev, 60 60 struct device_attribute *attr, const char *buf, size_t count) 61 61 { 62 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 62 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 63 63 struct if_usb_card *cardp = priv->card; 64 64 char fwname[FIRMWARE_NAME_MAX]; 65 65 int ret; ··· 86 86 static ssize_t if_usb_boot2_set(struct device *dev, 87 87 struct device_attribute *attr, const char *buf, size_t count) 88 88 { 89 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 89 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 90 90 struct if_usb_card *cardp = priv->card; 91 91 char fwname[FIRMWARE_NAME_MAX]; 92 92 int ret;
+16 -15
drivers/net/wireless/libertas/main.c
··· 222 222 static ssize_t lbs_anycast_get(struct device *dev, 223 223 struct device_attribute *attr, char * buf) 224 224 { 225 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 225 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 226 226 struct cmd_ds_mesh_access mesh_access; 227 227 int ret; 228 228 ··· 241 241 static ssize_t lbs_anycast_set(struct device *dev, 242 242 struct device_attribute *attr, const char * buf, size_t count) 243 243 { 244 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 244 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 245 245 struct cmd_ds_mesh_access mesh_access; 246 246 uint32_t datum; 247 247 int ret; ··· 263 263 static ssize_t lbs_prb_rsp_limit_get(struct device *dev, 264 264 struct device_attribute *attr, char *buf) 265 265 { 266 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 266 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 267 267 struct cmd_ds_mesh_access mesh_access; 268 268 int ret; 269 269 u32 retry_limit; ··· 286 286 static ssize_t lbs_prb_rsp_limit_set(struct device *dev, 287 287 struct device_attribute *attr, const char *buf, size_t count) 288 288 { 289 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 289 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 290 290 struct cmd_ds_mesh_access mesh_access; 291 291 int ret; 292 292 unsigned long retry_limit; ··· 321 321 static ssize_t lbs_rtap_get(struct device *dev, 322 322 struct device_attribute *attr, char * buf) 323 323 { 324 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 324 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 325 325 return snprintf(buf, 5, "0x%X\n", priv->monitormode); 326 326 } 327 327 ··· 332 332 struct device_attribute *attr, const char * buf, size_t count) 333 333 { 334 334 int monitor_mode; 335 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 335 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 336 336 337 337 sscanf(buf, "%x", &monitor_mode); 338 338 if (monitor_mode) { ··· 383 383 static ssize_t lbs_mesh_get(struct device *dev, 384 384 struct device_attribute *attr, char * buf) 385 385 { 386 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 386 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 387 387 return snprintf(buf, 5, "0x%X\n", !!priv->mesh_dev); 388 388 } 389 389 ··· 393 393 static ssize_t lbs_mesh_set(struct device *dev, 394 394 struct device_attribute *attr, const char * buf, size_t count) 395 395 { 396 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 396 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 397 397 int enable; 398 398 int ret, action = CMD_ACT_MESH_CONFIG_STOP; 399 399 ··· 452 452 */ 453 453 static int lbs_dev_open(struct net_device *dev) 454 454 { 455 - struct lbs_private *priv = netdev_priv(dev) ; 455 + struct lbs_private *priv = dev->ml_priv; 456 456 int ret = 0; 457 457 458 458 lbs_deb_enter(LBS_DEB_NET); ··· 521 521 */ 522 522 static int lbs_eth_stop(struct net_device *dev) 523 523 { 524 - struct lbs_private *priv = netdev_priv(dev); 524 + struct lbs_private *priv = dev->ml_priv; 525 525 526 526 lbs_deb_enter(LBS_DEB_NET); 527 527 ··· 538 538 539 539 static void lbs_tx_timeout(struct net_device *dev) 540 540 { 541 - struct lbs_private *priv = netdev_priv(dev); 541 + struct lbs_private *priv = dev->ml_priv; 542 542 543 543 lbs_deb_enter(LBS_DEB_TX); 544 544 ··· 590 590 */ 591 591 static struct net_device_stats *lbs_get_stats(struct net_device *dev) 592 592 { 593 - struct lbs_private *priv = netdev_priv(dev); 593 + struct lbs_private *priv = dev->ml_priv; 594 594 595 595 lbs_deb_enter(LBS_DEB_NET); 596 596 return &priv->stats; ··· 599 599 static int lbs_set_mac_address(struct net_device *dev, void *addr) 600 600 { 601 601 int ret = 0; 602 - struct lbs_private *priv = netdev_priv(dev); 602 + struct lbs_private *priv = dev->ml_priv; 603 603 struct sockaddr *phwaddr = addr; 604 604 struct cmd_ds_802_11_mac_address cmd; 605 605 ··· 732 732 733 733 static void lbs_set_multicast_list(struct net_device *dev) 734 734 { 735 - struct lbs_private *priv = netdev_priv(dev); 735 + struct lbs_private *priv = dev->ml_priv; 736 736 737 737 schedule_work(&priv->mcast_work); 738 738 } ··· 748 748 static int lbs_thread(void *data) 749 749 { 750 750 struct net_device *dev = data; 751 - struct lbs_private *priv = netdev_priv(dev); 751 + struct lbs_private *priv = dev->ml_priv; 752 752 wait_queue_t wait; 753 753 754 754 lbs_deb_enter(LBS_DEB_THREAD); ··· 1184 1184 goto done; 1185 1185 } 1186 1186 priv = netdev_priv(dev); 1187 + dev->ml_priv = priv; 1187 1188 1188 1189 if (lbs_init_adapter(priv)) { 1189 1190 lbs_pr_err("failed to initialize adapter structure.\n");
+8 -8
drivers/net/wireless/libertas/persistcfg.c
··· 18 18 static int mesh_get_default_parameters(struct device *dev, 19 19 struct mrvl_mesh_defaults *defs) 20 20 { 21 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 21 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 22 22 struct cmd_ds_mesh_config cmd; 23 23 int ret; 24 24 ··· 57 57 static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr, 58 58 const char *buf, size_t count) 59 59 { 60 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 60 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 61 61 struct cmd_ds_mesh_config cmd; 62 62 uint32_t datum; 63 63 int ret; ··· 100 100 static ssize_t boottime_set(struct device *dev, 101 101 struct device_attribute *attr, const char *buf, size_t count) 102 102 { 103 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 103 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 104 104 struct cmd_ds_mesh_config cmd; 105 105 uint32_t datum; 106 106 int ret; ··· 152 152 static ssize_t channel_set(struct device *dev, struct device_attribute *attr, 153 153 const char *buf, size_t count) 154 154 { 155 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 155 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 156 156 struct cmd_ds_mesh_config cmd; 157 157 uint32_t datum; 158 158 int ret; ··· 210 210 struct cmd_ds_mesh_config cmd; 211 211 struct mrvl_mesh_defaults defs; 212 212 struct mrvl_meshie *ie; 213 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 213 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 214 214 int len; 215 215 int ret; 216 216 ··· 269 269 struct cmd_ds_mesh_config cmd; 270 270 struct mrvl_mesh_defaults defs; 271 271 struct mrvl_meshie *ie; 272 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 272 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 273 273 uint32_t datum; 274 274 int ret; 275 275 ··· 323 323 struct cmd_ds_mesh_config cmd; 324 324 struct mrvl_mesh_defaults defs; 325 325 struct mrvl_meshie *ie; 326 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 326 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 327 327 uint32_t datum; 328 328 int ret; 329 329 ··· 377 377 struct cmd_ds_mesh_config cmd; 378 378 struct mrvl_mesh_defaults defs; 379 379 struct mrvl_meshie *ie; 380 - struct lbs_private *priv = netdev_priv(to_net_dev(dev)); 380 + struct lbs_private *priv = to_net_dev(dev)->ml_priv; 381 381 uint32_t datum; 382 382 int ret; 383 383
+2 -2
drivers/net/wireless/libertas/scan.c
··· 945 945 union iwreq_data *wrqu, char *extra) 946 946 { 947 947 DECLARE_SSID_BUF(ssid); 948 - struct lbs_private *priv = netdev_priv(dev); 948 + struct lbs_private *priv = dev->ml_priv; 949 949 int ret = 0; 950 950 951 951 lbs_deb_enter(LBS_DEB_WEXT); ··· 1008 1008 struct iw_point *dwrq, char *extra) 1009 1009 { 1010 1010 #define SCAN_ITEM_SIZE 128 1011 - struct lbs_private *priv = netdev_priv(dev); 1011 + struct lbs_private *priv = dev->ml_priv; 1012 1012 int err = 0; 1013 1013 char *ev = extra; 1014 1014 char *stop = ev + dwrq->length;
+1 -1
drivers/net/wireless/libertas/tx.c
··· 60 60 int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 61 61 { 62 62 unsigned long flags; 63 - struct lbs_private *priv = netdev_priv(dev); 63 + struct lbs_private *priv = dev->ml_priv; 64 64 struct txpd *txpd; 65 65 char *p802x_hdr; 66 66 uint16_t pkt_len;
+36 -36
drivers/net/wireless/libertas/wext.c
··· 163 163 static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, 164 164 struct iw_freq *fwrq, char *extra) 165 165 { 166 - struct lbs_private *priv = netdev_priv(dev); 166 + struct lbs_private *priv = dev->ml_priv; 167 167 struct chan_freq_power *cfp; 168 168 169 169 lbs_deb_enter(LBS_DEB_WEXT); ··· 189 189 static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, 190 190 struct sockaddr *awrq, char *extra) 191 191 { 192 - struct lbs_private *priv = netdev_priv(dev); 192 + struct lbs_private *priv = dev->ml_priv; 193 193 194 194 lbs_deb_enter(LBS_DEB_WEXT); 195 195 ··· 207 207 static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, 208 208 struct iw_point *dwrq, char *extra) 209 209 { 210 - struct lbs_private *priv = netdev_priv(dev); 210 + struct lbs_private *priv = dev->ml_priv; 211 211 212 212 lbs_deb_enter(LBS_DEB_WEXT); 213 213 ··· 231 231 static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, 232 232 struct iw_point *dwrq, char *extra) 233 233 { 234 - struct lbs_private *priv = netdev_priv(dev); 234 + struct lbs_private *priv = dev->ml_priv; 235 235 236 236 lbs_deb_enter(LBS_DEB_WEXT); 237 237 ··· 248 248 static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, 249 249 struct iw_point *dwrq, char *extra) 250 250 { 251 - struct lbs_private *priv = netdev_priv(dev); 251 + struct lbs_private *priv = dev->ml_priv; 252 252 253 253 lbs_deb_enter(LBS_DEB_WEXT); 254 254 ··· 273 273 struct iw_param *vwrq, char *extra) 274 274 { 275 275 int ret = 0; 276 - struct lbs_private *priv = netdev_priv(dev); 276 + struct lbs_private *priv = dev->ml_priv; 277 277 u32 val = vwrq->value; 278 278 279 279 lbs_deb_enter(LBS_DEB_WEXT); ··· 293 293 static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, 294 294 struct iw_param *vwrq, char *extra) 295 295 { 296 - struct lbs_private *priv = netdev_priv(dev); 296 + struct lbs_private *priv = dev->ml_priv; 297 297 int ret = 0; 298 298 u16 val = 0; 299 299 ··· 315 315 static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, 316 316 struct iw_param *vwrq, char *extra) 317 317 { 318 - struct lbs_private *priv = netdev_priv(dev); 318 + struct lbs_private *priv = dev->ml_priv; 319 319 int ret = 0; 320 320 u32 val = vwrq->value; 321 321 ··· 336 336 static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, 337 337 struct iw_param *vwrq, char *extra) 338 338 { 339 - struct lbs_private *priv = netdev_priv(dev); 339 + struct lbs_private *priv = dev->ml_priv; 340 340 int ret = 0; 341 341 u16 val = 0; 342 342 ··· 359 359 static int lbs_get_mode(struct net_device *dev, 360 360 struct iw_request_info *info, u32 * uwrq, char *extra) 361 361 { 362 - struct lbs_private *priv = netdev_priv(dev); 362 + struct lbs_private *priv = dev->ml_priv; 363 363 364 364 lbs_deb_enter(LBS_DEB_WEXT); 365 365 ··· 385 385 struct iw_request_info *info, 386 386 struct iw_param *vwrq, char *extra) 387 387 { 388 - struct lbs_private *priv = netdev_priv(dev); 388 + struct lbs_private *priv = dev->ml_priv; 389 389 s16 curlevel = 0; 390 390 int ret = 0; 391 391 ··· 418 418 static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, 419 419 struct iw_param *vwrq, char *extra) 420 420 { 421 - struct lbs_private *priv = netdev_priv(dev); 421 + struct lbs_private *priv = dev->ml_priv; 422 422 int ret = 0; 423 423 u16 slimit = 0, llimit = 0; 424 424 ··· 466 466 static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info, 467 467 struct iw_param *vwrq, char *extra) 468 468 { 469 - struct lbs_private *priv = netdev_priv(dev); 469 + struct lbs_private *priv = dev->ml_priv; 470 470 int ret = 0; 471 471 u16 val = 0; 472 472 ··· 542 542 struct iw_point *dwrq, char *extra) 543 543 { 544 544 int i, j; 545 - struct lbs_private *priv = netdev_priv(dev); 545 + struct lbs_private *priv = dev->ml_priv; 546 546 struct iw_range *range = (struct iw_range *)extra; 547 547 struct chan_freq_power *cfp; 548 548 u8 rates[MAX_RATES + 1]; ··· 708 708 static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, 709 709 struct iw_param *vwrq, char *extra) 710 710 { 711 - struct lbs_private *priv = netdev_priv(dev); 711 + struct lbs_private *priv = dev->ml_priv; 712 712 713 713 lbs_deb_enter(LBS_DEB_WEXT); 714 714 ··· 758 758 static int lbs_get_power(struct net_device *dev, struct iw_request_info *info, 759 759 struct iw_param *vwrq, char *extra) 760 760 { 761 - struct lbs_private *priv = netdev_priv(dev); 761 + struct lbs_private *priv = dev->ml_priv; 762 762 763 763 lbs_deb_enter(LBS_DEB_WEXT); 764 764 ··· 781 781 EXCELLENT = 95, 782 782 PERFECT = 100 783 783 }; 784 - struct lbs_private *priv = netdev_priv(dev); 784 + struct lbs_private *priv = dev->ml_priv; 785 785 u32 rssi_qual; 786 786 u32 tx_qual; 787 787 u32 quality = 0; ··· 886 886 struct iw_freq *fwrq, char *extra) 887 887 { 888 888 int ret = -EINVAL; 889 - struct lbs_private *priv = netdev_priv(dev); 889 + struct lbs_private *priv = dev->ml_priv; 890 890 struct chan_freq_power *cfp; 891 891 struct assoc_request * assoc_req; 892 892 ··· 943 943 struct iw_request_info *info, 944 944 struct iw_freq *fwrq, char *extra) 945 945 { 946 - struct lbs_private *priv = netdev_priv(dev); 946 + struct lbs_private *priv = dev->ml_priv; 947 947 struct chan_freq_power *cfp; 948 948 int ret = -EINVAL; 949 949 ··· 994 994 static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, 995 995 struct iw_param *vwrq, char *extra) 996 996 { 997 - struct lbs_private *priv = netdev_priv(dev); 997 + struct lbs_private *priv = dev->ml_priv; 998 998 u8 new_rate = 0; 999 999 int ret = -EINVAL; 1000 1000 u8 rates[MAX_RATES + 1]; ··· 1054 1054 static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info, 1055 1055 struct iw_param *vwrq, char *extra) 1056 1056 { 1057 - struct lbs_private *priv = netdev_priv(dev); 1057 + struct lbs_private *priv = dev->ml_priv; 1058 1058 1059 1059 lbs_deb_enter(LBS_DEB_WEXT); 1060 1060 ··· 1079 1079 struct iw_request_info *info, u32 * uwrq, char *extra) 1080 1080 { 1081 1081 int ret = 0; 1082 - struct lbs_private *priv = netdev_priv(dev); 1082 + struct lbs_private *priv = dev->ml_priv; 1083 1083 struct assoc_request * assoc_req; 1084 1084 1085 1085 lbs_deb_enter(LBS_DEB_WEXT); ··· 1124 1124 struct iw_request_info *info, 1125 1125 struct iw_point *dwrq, u8 * extra) 1126 1126 { 1127 - struct lbs_private *priv = netdev_priv(dev); 1127 + struct lbs_private *priv = dev->ml_priv; 1128 1128 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; 1129 1129 1130 1130 lbs_deb_enter(LBS_DEB_WEXT); ··· 1319 1319 struct iw_point *dwrq, char *extra) 1320 1320 { 1321 1321 int ret = 0; 1322 - struct lbs_private *priv = netdev_priv(dev); 1322 + struct lbs_private *priv = dev->ml_priv; 1323 1323 struct assoc_request * assoc_req; 1324 1324 u16 is_default = 0, index = 0, set_tx_key = 0; 1325 1325 ··· 1395 1395 char *extra) 1396 1396 { 1397 1397 int ret = -EINVAL; 1398 - struct lbs_private *priv = netdev_priv(dev); 1398 + struct lbs_private *priv = dev->ml_priv; 1399 1399 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; 1400 1400 int index, max_key_len; 1401 1401 ··· 1501 1501 char *extra) 1502 1502 { 1503 1503 int ret = 0; 1504 - struct lbs_private *priv = netdev_priv(dev); 1504 + struct lbs_private *priv = dev->ml_priv; 1505 1505 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; 1506 1506 int alg = ext->alg; 1507 1507 struct assoc_request * assoc_req; ··· 1639 1639 struct iw_point *dwrq, 1640 1640 char *extra) 1641 1641 { 1642 - struct lbs_private *priv = netdev_priv(dev); 1642 + struct lbs_private *priv = dev->ml_priv; 1643 1643 int ret = 0; 1644 1644 struct assoc_request * assoc_req; 1645 1645 ··· 1685 1685 char *extra) 1686 1686 { 1687 1687 int ret = 0; 1688 - struct lbs_private *priv = netdev_priv(dev); 1688 + struct lbs_private *priv = dev->ml_priv; 1689 1689 1690 1690 lbs_deb_enter(LBS_DEB_WEXT); 1691 1691 ··· 1713 1713 struct iw_param *dwrq, 1714 1714 char *extra) 1715 1715 { 1716 - struct lbs_private *priv = netdev_priv(dev); 1716 + struct lbs_private *priv = dev->ml_priv; 1717 1717 struct assoc_request * assoc_req; 1718 1718 int ret = 0; 1719 1719 int updated = 0; ··· 1816 1816 char *extra) 1817 1817 { 1818 1818 int ret = 0; 1819 - struct lbs_private *priv = netdev_priv(dev); 1819 + struct lbs_private *priv = dev->ml_priv; 1820 1820 1821 1821 lbs_deb_enter(LBS_DEB_WEXT); 1822 1822 ··· 1857 1857 struct iw_param *vwrq, char *extra) 1858 1858 { 1859 1859 int ret = 0; 1860 - struct lbs_private *priv = netdev_priv(dev); 1860 + struct lbs_private *priv = dev->ml_priv; 1861 1861 s16 dbm = (s16) vwrq->value; 1862 1862 1863 1863 lbs_deb_enter(LBS_DEB_WEXT); ··· 1936 1936 static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, 1937 1937 struct iw_point *dwrq, char *extra) 1938 1938 { 1939 - struct lbs_private *priv = netdev_priv(dev); 1939 + struct lbs_private *priv = dev->ml_priv; 1940 1940 1941 1941 lbs_deb_enter(LBS_DEB_WEXT); 1942 1942 ··· 1971 1971 static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, 1972 1972 struct iw_point *dwrq, char *extra) 1973 1973 { 1974 - struct lbs_private *priv = netdev_priv(dev); 1974 + struct lbs_private *priv = dev->ml_priv; 1975 1975 int ret = 0; 1976 1976 u8 ssid[IW_ESSID_MAX_SIZE]; 1977 1977 u8 ssid_len = 0; ··· 2040 2040 struct iw_request_info *info, 2041 2041 struct iw_point *dwrq, char *extra) 2042 2042 { 2043 - struct lbs_private *priv = netdev_priv(dev); 2043 + struct lbs_private *priv = dev->ml_priv; 2044 2044 2045 2045 lbs_deb_enter(LBS_DEB_WEXT); 2046 2046 ··· 2058 2058 struct iw_request_info *info, 2059 2059 struct iw_point *dwrq, char *extra) 2060 2060 { 2061 - struct lbs_private *priv = netdev_priv(dev); 2061 + struct lbs_private *priv = dev->ml_priv; 2062 2062 int ret = 0; 2063 2063 2064 2064 lbs_deb_enter(LBS_DEB_WEXT); ··· 2102 2102 static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, 2103 2103 struct sockaddr *awrq, char *extra) 2104 2104 { 2105 - struct lbs_private *priv = netdev_priv(dev); 2105 + struct lbs_private *priv = dev->ml_priv; 2106 2106 struct assoc_request * assoc_req; 2107 2107 int ret = 0; 2108 2108
+15 -4
drivers/net/wireless/orinoco/orinoco.c
··· 3157 3157 3158 3158 return NOTIFY_DONE; 3159 3159 } 3160 + 3161 + static void orinoco_register_pm_notifier(struct orinoco_private *priv) 3162 + { 3163 + priv->pm_notifier.notifier_call = orinoco_pm_notifier; 3164 + register_pm_notifier(&priv->pm_notifier); 3165 + } 3166 + 3167 + static void orinoco_unregister_pm_notifier(struct orinoco_private *priv) 3168 + { 3169 + unregister_pm_notifier(&priv->pm_notifier); 3170 + } 3160 3171 #else /* !PM_SLEEP || HERMES_CACHE_FW_ON_INIT */ 3161 - #define orinoco_pm_notifier NULL 3172 + #define orinoco_register_pm_notifier(priv) do { } while(0) 3173 + #define orinoco_unregister_pm_notifier(priv) do { } while(0) 3162 3174 #endif 3163 3175 3164 3176 /********************************************************************/ ··· 3660 3648 priv->cached_fw = NULL; 3661 3649 3662 3650 /* Register PM notifiers */ 3663 - priv->pm_notifier.notifier_call = orinoco_pm_notifier; 3664 - register_pm_notifier(&priv->pm_notifier); 3651 + orinoco_register_pm_notifier(priv); 3665 3652 3666 3653 return dev; 3667 3654 } ··· 3684 3673 kfree(rx_data); 3685 3674 } 3686 3675 3687 - unregister_pm_notifier(&priv->pm_notifier); 3676 + orinoco_unregister_pm_notifier(priv); 3688 3677 orinoco_uncache_fw(priv); 3689 3678 3690 3679 priv->wpa_ie_len = 0;
+12
drivers/net/wireless/rtl818x/rtl8187_dev.c
··· 48 48 {USB_DEVICE(0x0bda, 0x8189), .driver_info = DEVICE_RTL8187B}, 49 49 {USB_DEVICE(0x0bda, 0x8197), .driver_info = DEVICE_RTL8187B}, 50 50 {USB_DEVICE(0x0bda, 0x8198), .driver_info = DEVICE_RTL8187B}, 51 + /* Surecom */ 52 + {USB_DEVICE(0x0769, 0x11F2), .driver_info = DEVICE_RTL8187}, 53 + /* Logitech */ 54 + {USB_DEVICE(0x0789, 0x010C), .driver_info = DEVICE_RTL8187}, 51 55 /* Netgear */ 52 56 {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187}, 53 57 {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187}, ··· 61 57 /* Sitecom */ 62 58 {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, 63 59 {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, 60 + /* Sphairon Access Systems GmbH */ 61 + {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, 62 + /* Dick Smith Electronics */ 63 + {USB_DEVICE(0x1371, 0x9401), .driver_info = DEVICE_RTL8187}, 64 64 /* Abocom */ 65 65 {USB_DEVICE(0x13d1, 0xabe6), .driver_info = DEVICE_RTL8187}, 66 + /* Qcom */ 67 + {USB_DEVICE(0x18E8, 0x6232), .driver_info = DEVICE_RTL8187}, 68 + /* AirLive */ 69 + {USB_DEVICE(0x1b75, 0x8187), .driver_info = DEVICE_RTL8187}, 66 70 {} 67 71 }; 68 72
+1
include/linux/Kbuild
··· 52 52 header-y += cgroupstats.h 53 53 header-y += cramfs_fs.h 54 54 header-y += cycx_cfm.h 55 + header-y += dcbnl.h 55 56 header-y += dlmconstants.h 56 57 header-y += dlm_device.h 57 58 header-y += dlm_netlink.h
+3 -1
include/linux/dcbnl.h
··· 20 20 #ifndef __LINUX_DCBNL_H__ 21 21 #define __LINUX_DCBNL_H__ 22 22 23 + #include <linux/types.h> 24 + 23 25 #define DCB_PROTO_VERSION 1 24 26 25 27 struct dcbmsg { 26 - unsigned char dcb_family; 28 + __u8 dcb_family; 27 29 __u8 cmd; 28 30 __u16 dcb_pad; 29 31 };
+1 -1
include/linux/netfilter/xt_NFLOG.h
··· 2 2 #define _XT_NFLOG_TARGET 3 3 4 4 #define XT_NFLOG_DEFAULT_GROUP 0x1 5 - #define XT_NFLOG_DEFAULT_THRESHOLD 1 5 + #define XT_NFLOG_DEFAULT_THRESHOLD 0 6 6 7 7 #define XT_NFLOG_MASK 0x0 8 8
+1 -1
include/net/netfilter/nf_conntrack_core.h
··· 59 59 struct nf_conn *ct = (struct nf_conn *)skb->nfct; 60 60 int ret = NF_ACCEPT; 61 61 62 - if (ct) { 62 + if (ct && ct != &nf_conntrack_untracked) { 63 63 if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) 64 64 ret = __nf_conntrack_confirm(skb); 65 65 nf_ct_deliver_cached_events(ct);
+10
net/8021q/vlan_core.c
··· 1 1 #include <linux/skbuff.h> 2 2 #include <linux/netdevice.h> 3 3 #include <linux/if_vlan.h> 4 + #include <linux/netpoll.h> 4 5 #include "vlan.h" 5 6 6 7 /* VLAN rx hw acceleration helper. This acts like netif_{rx,receive_skb}(). */ 7 8 int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, 8 9 u16 vlan_tci, int polling) 9 10 { 11 + if (netpoll_rx(skb)) 12 + return NET_RX_DROP; 13 + 10 14 if (skb_bond_should_drop(skb)) 11 15 goto drop; 12 16 ··· 104 100 { 105 101 int err = NET_RX_SUCCESS; 106 102 103 + if (netpoll_receive_skb(skb)) 104 + return NET_RX_DROP; 105 + 107 106 switch (vlan_gro_common(napi, grp, vlan_tci, skb)) { 108 107 case -1: 109 108 return netif_receive_skb(skb); ··· 131 124 int err = NET_RX_DROP; 132 125 133 126 if (!skb) 127 + goto out; 128 + 129 + if (netpoll_receive_skb(skb)) 134 130 goto out; 135 131 136 132 err = NET_RX_SUCCESS;
+6
net/core/dev.c
··· 2488 2488 2489 2489 int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) 2490 2490 { 2491 + if (netpoll_receive_skb(skb)) 2492 + return NET_RX_DROP; 2493 + 2491 2494 switch (__napi_gro_receive(napi, skb)) { 2492 2495 case -1: 2493 2496 return netif_receive_skb(skb); ··· 2559 2556 int err = NET_RX_DROP; 2560 2557 2561 2558 if (!skb) 2559 + goto out; 2560 + 2561 + if (netpoll_receive_skb(skb)) 2562 2562 goto out; 2563 2563 2564 2564 err = NET_RX_SUCCESS;
+5 -4
net/ipv4/tcp_input.c
··· 1374 1374 1375 1375 static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, 1376 1376 struct tcp_sacktag_state *state, 1377 - unsigned int pcount, int shifted, int mss) 1377 + unsigned int pcount, int shifted, int mss, 1378 + int dup_sack) 1378 1379 { 1379 1380 struct tcp_sock *tp = tcp_sk(sk); 1380 1381 struct sk_buff *prev = tcp_write_queue_prev(sk, skb); ··· 1411 1410 } 1412 1411 1413 1412 /* We discard results */ 1414 - tcp_sacktag_one(skb, sk, state, 0, pcount); 1413 + tcp_sacktag_one(skb, sk, state, dup_sack, pcount); 1415 1414 1416 1415 /* Difference in this won't matter, both ACKed by the same cumul. ACK */ 1417 1416 TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS); ··· 1562 1561 1563 1562 if (!skb_shift(prev, skb, len)) 1564 1563 goto fallback; 1565 - if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss)) 1564 + if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss, dup_sack)) 1566 1565 goto out; 1567 1566 1568 1567 /* Hole filled allows collapsing with the next as well, this is very ··· 1581 1580 len = skb->len; 1582 1581 if (skb_shift(prev, skb, len)) { 1583 1582 pcount += tcp_skb_pcount(skb); 1584 - tcp_shifted_skb(sk, skb, state, tcp_skb_pcount(skb), len, mss); 1583 + tcp_shifted_skb(sk, skb, state, tcp_skb_pcount(skb), len, mss, 0); 1585 1584 } 1586 1585 1587 1586 out:
+1 -1
net/ipv4/tcp_scalable.c
··· 1 1 /* Tom Kelly's Scalable TCP 2 2 * 3 - * See htt://www-lce.eng.cam.ac.uk/~ctk21/scalable/ 3 + * See http://www.deneholme.net/tom/scalable/ 4 4 * 5 5 * John Heffner <jheffner@sc.edu> 6 6 */
+2 -2
net/ipv6/inet6_hashtables.c
··· 258 258 259 259 if (twp != NULL) { 260 260 *twp = tw; 261 - NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED); 261 + NET_INC_STATS_BH(net, LINUX_MIB_TIMEWAITRECYCLED); 262 262 } else if (tw != NULL) { 263 263 /* Silly. Should hash-dance instead... */ 264 264 inet_twsk_deschedule(tw, death_row); 265 - NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED); 265 + NET_INC_STATS_BH(net, LINUX_MIB_TIMEWAITRECYCLED); 266 266 267 267 inet_twsk_put(tw); 268 268 }
+3 -2
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
··· 201 201 202 202 if (net->ct.sysctl_checksum && hooknum == NF_INET_PRE_ROUTING && 203 203 nf_ip6_checksum(skb, hooknum, dataoff, IPPROTO_ICMPV6)) { 204 - nf_log_packet(PF_INET6, 0, skb, NULL, NULL, NULL, 205 - "nf_ct_icmpv6: ICMPv6 checksum failed\n"); 204 + if (LOG_INVALID(net, IPPROTO_ICMPV6)) 205 + nf_log_packet(PF_INET6, 0, skb, NULL, NULL, NULL, 206 + "nf_ct_icmpv6: ICMPv6 checksum failed "); 206 207 return -NF_ACCEPT; 207 208 } 208 209
+145 -60
net/netfilter/x_tables.c
··· 827 827 .release = seq_release_net, 828 828 }; 829 829 830 + /* 831 + * Traverse state for ip{,6}_{tables,matches} for helping crossing 832 + * the multi-AF mutexes. 833 + */ 834 + struct nf_mttg_trav { 835 + struct list_head *head, *curr; 836 + uint8_t class, nfproto; 837 + }; 838 + 839 + enum { 840 + MTTG_TRAV_INIT, 841 + MTTG_TRAV_NFP_UNSPEC, 842 + MTTG_TRAV_NFP_SPEC, 843 + MTTG_TRAV_DONE, 844 + }; 845 + 846 + static void *xt_mttg_seq_next(struct seq_file *seq, void *v, loff_t *ppos, 847 + bool is_target) 848 + { 849 + static const uint8_t next_class[] = { 850 + [MTTG_TRAV_NFP_UNSPEC] = MTTG_TRAV_NFP_SPEC, 851 + [MTTG_TRAV_NFP_SPEC] = MTTG_TRAV_DONE, 852 + }; 853 + struct nf_mttg_trav *trav = seq->private; 854 + 855 + switch (trav->class) { 856 + case MTTG_TRAV_INIT: 857 + trav->class = MTTG_TRAV_NFP_UNSPEC; 858 + mutex_lock(&xt[NFPROTO_UNSPEC].mutex); 859 + trav->head = trav->curr = is_target ? 860 + &xt[NFPROTO_UNSPEC].target : &xt[NFPROTO_UNSPEC].match; 861 + break; 862 + case MTTG_TRAV_NFP_UNSPEC: 863 + trav->curr = trav->curr->next; 864 + if (trav->curr != trav->head) 865 + break; 866 + mutex_unlock(&xt[NFPROTO_UNSPEC].mutex); 867 + mutex_lock(&xt[trav->nfproto].mutex); 868 + trav->head = trav->curr = is_target ? 869 + &xt[trav->nfproto].target : &xt[trav->nfproto].match; 870 + trav->class = next_class[trav->class]; 871 + break; 872 + case MTTG_TRAV_NFP_SPEC: 873 + trav->curr = trav->curr->next; 874 + if (trav->curr != trav->head) 875 + break; 876 + /* fallthru, _stop will unlock */ 877 + default: 878 + return NULL; 879 + } 880 + 881 + if (ppos != NULL) 882 + ++*ppos; 883 + return trav; 884 + } 885 + 886 + static void *xt_mttg_seq_start(struct seq_file *seq, loff_t *pos, 887 + bool is_target) 888 + { 889 + struct nf_mttg_trav *trav = seq->private; 890 + unsigned int j; 891 + 892 + trav->class = MTTG_TRAV_INIT; 893 + for (j = 0; j < *pos; ++j) 894 + if (xt_mttg_seq_next(seq, NULL, NULL, is_target) == NULL) 895 + return NULL; 896 + return trav; 897 + } 898 + 899 + static void xt_mttg_seq_stop(struct seq_file *seq, void *v) 900 + { 901 + struct nf_mttg_trav *trav = seq->private; 902 + 903 + switch (trav->class) { 904 + case MTTG_TRAV_NFP_UNSPEC: 905 + mutex_unlock(&xt[NFPROTO_UNSPEC].mutex); 906 + break; 907 + case MTTG_TRAV_NFP_SPEC: 908 + mutex_unlock(&xt[trav->nfproto].mutex); 909 + break; 910 + } 911 + } 912 + 830 913 static void *xt_match_seq_start(struct seq_file *seq, loff_t *pos) 831 914 { 832 - struct proc_dir_entry *pde = (struct proc_dir_entry *)seq->private; 833 - u_int16_t af = (unsigned long)pde->data; 834 - 835 - mutex_lock(&xt[af].mutex); 836 - return seq_list_start(&xt[af].match, *pos); 915 + return xt_mttg_seq_start(seq, pos, false); 837 916 } 838 917 839 - static void *xt_match_seq_next(struct seq_file *seq, void *v, loff_t *pos) 918 + static void *xt_match_seq_next(struct seq_file *seq, void *v, loff_t *ppos) 840 919 { 841 - struct proc_dir_entry *pde = (struct proc_dir_entry *)seq->private; 842 - u_int16_t af = (unsigned long)pde->data; 843 - 844 - return seq_list_next(v, &xt[af].match, pos); 845 - } 846 - 847 - static void xt_match_seq_stop(struct seq_file *seq, void *v) 848 - { 849 - struct proc_dir_entry *pde = seq->private; 850 - u_int16_t af = (unsigned long)pde->data; 851 - 852 - mutex_unlock(&xt[af].mutex); 920 + return xt_mttg_seq_next(seq, v, ppos, false); 853 921 } 854 922 855 923 static int xt_match_seq_show(struct seq_file *seq, void *v) 856 924 { 857 - struct xt_match *match = list_entry(v, struct xt_match, list); 925 + const struct nf_mttg_trav *trav = seq->private; 926 + const struct xt_match *match; 858 927 859 - if (strlen(match->name)) 860 - return seq_printf(seq, "%s\n", match->name); 861 - else 862 - return 0; 928 + switch (trav->class) { 929 + case MTTG_TRAV_NFP_UNSPEC: 930 + case MTTG_TRAV_NFP_SPEC: 931 + if (trav->curr == trav->head) 932 + return 0; 933 + match = list_entry(trav->curr, struct xt_match, list); 934 + return (*match->name == '\0') ? 0 : 935 + seq_printf(seq, "%s\n", match->name); 936 + } 937 + return 0; 863 938 } 864 939 865 940 static const struct seq_operations xt_match_seq_ops = { 866 941 .start = xt_match_seq_start, 867 942 .next = xt_match_seq_next, 868 - .stop = xt_match_seq_stop, 943 + .stop = xt_mttg_seq_stop, 869 944 .show = xt_match_seq_show, 870 945 }; 871 946 872 947 static int xt_match_open(struct inode *inode, struct file *file) 873 948 { 949 + struct seq_file *seq; 950 + struct nf_mttg_trav *trav; 874 951 int ret; 875 952 876 - ret = seq_open(file, &xt_match_seq_ops); 877 - if (!ret) { 878 - struct seq_file *seq = file->private_data; 953 + trav = kmalloc(sizeof(*trav), GFP_KERNEL); 954 + if (trav == NULL) 955 + return -ENOMEM; 879 956 880 - seq->private = PDE(inode); 957 + ret = seq_open(file, &xt_match_seq_ops); 958 + if (ret < 0) { 959 + kfree(trav); 960 + return ret; 881 961 } 882 - return ret; 962 + 963 + seq = file->private_data; 964 + seq->private = trav; 965 + trav->nfproto = (unsigned long)PDE(inode)->data; 966 + return 0; 883 967 } 884 968 885 969 static const struct file_operations xt_match_ops = { ··· 971 887 .open = xt_match_open, 972 888 .read = seq_read, 973 889 .llseek = seq_lseek, 974 - .release = seq_release, 890 + .release = seq_release_private, 975 891 }; 976 892 977 893 static void *xt_target_seq_start(struct seq_file *seq, loff_t *pos) 978 894 { 979 - struct proc_dir_entry *pde = (struct proc_dir_entry *)seq->private; 980 - u_int16_t af = (unsigned long)pde->data; 981 - 982 - mutex_lock(&xt[af].mutex); 983 - return seq_list_start(&xt[af].target, *pos); 895 + return xt_mttg_seq_start(seq, pos, true); 984 896 } 985 897 986 - static void *xt_target_seq_next(struct seq_file *seq, void *v, loff_t *pos) 898 + static void *xt_target_seq_next(struct seq_file *seq, void *v, loff_t *ppos) 987 899 { 988 - struct proc_dir_entry *pde = (struct proc_dir_entry *)seq->private; 989 - u_int16_t af = (unsigned long)pde->data; 990 - 991 - return seq_list_next(v, &xt[af].target, pos); 992 - } 993 - 994 - static void xt_target_seq_stop(struct seq_file *seq, void *v) 995 - { 996 - struct proc_dir_entry *pde = seq->private; 997 - u_int16_t af = (unsigned long)pde->data; 998 - 999 - mutex_unlock(&xt[af].mutex); 900 + return xt_mttg_seq_next(seq, v, ppos, true); 1000 901 } 1001 902 1002 903 static int xt_target_seq_show(struct seq_file *seq, void *v) 1003 904 { 1004 - struct xt_target *target = list_entry(v, struct xt_target, list); 905 + const struct nf_mttg_trav *trav = seq->private; 906 + const struct xt_target *target; 1005 907 1006 - if (strlen(target->name)) 1007 - return seq_printf(seq, "%s\n", target->name); 1008 - else 1009 - return 0; 908 + switch (trav->class) { 909 + case MTTG_TRAV_NFP_UNSPEC: 910 + case MTTG_TRAV_NFP_SPEC: 911 + if (trav->curr == trav->head) 912 + return 0; 913 + target = list_entry(trav->curr, struct xt_target, list); 914 + return (*target->name == '\0') ? 0 : 915 + seq_printf(seq, "%s\n", target->name); 916 + } 917 + return 0; 1010 918 } 1011 919 1012 920 static const struct seq_operations xt_target_seq_ops = { 1013 921 .start = xt_target_seq_start, 1014 922 .next = xt_target_seq_next, 1015 - .stop = xt_target_seq_stop, 923 + .stop = xt_mttg_seq_stop, 1016 924 .show = xt_target_seq_show, 1017 925 }; 1018 926 1019 927 static int xt_target_open(struct inode *inode, struct file *file) 1020 928 { 929 + struct seq_file *seq; 930 + struct nf_mttg_trav *trav; 1021 931 int ret; 1022 932 1023 - ret = seq_open(file, &xt_target_seq_ops); 1024 - if (!ret) { 1025 - struct seq_file *seq = file->private_data; 933 + trav = kmalloc(sizeof(*trav), GFP_KERNEL); 934 + if (trav == NULL) 935 + return -ENOMEM; 1026 936 1027 - seq->private = PDE(inode); 937 + ret = seq_open(file, &xt_target_seq_ops); 938 + if (ret < 0) { 939 + kfree(trav); 940 + return ret; 1028 941 } 1029 - return ret; 942 + 943 + seq = file->private_data; 944 + seq->private = trav; 945 + trav->nfproto = (unsigned long)PDE(inode)->data; 946 + return 0; 1030 947 } 1031 948 1032 949 static const struct file_operations xt_target_ops = { ··· 1035 950 .open = xt_target_open, 1036 951 .read = seq_read, 1037 952 .llseek = seq_lseek, 1038 - .release = seq_release, 953 + .release = seq_release_private, 1039 954 }; 1040 955 1041 956 #define FORMAT_TABLES "_tables_names"
+1 -1
net/netfilter/xt_recent.c
··· 542 542 struct recent_entry *e; 543 543 char buf[sizeof("+b335:1d35:1e55:dead:c0de:1715:5afe:c0de")]; 544 544 const char *c = buf; 545 - union nf_inet_addr addr; 545 + union nf_inet_addr addr = {}; 546 546 u_int16_t family; 547 547 bool add, succ; 548 548
+5 -1
net/sched/sch_drr.c
··· 66 66 { 67 67 struct drr_sched *q = qdisc_priv(sch); 68 68 struct drr_class *cl = (struct drr_class *)*arg; 69 + struct nlattr *opt = tca[TCA_OPTIONS]; 69 70 struct nlattr *tb[TCA_DRR_MAX + 1]; 70 71 u32 quantum; 71 72 int err; 72 73 73 - err = nla_parse_nested(tb, TCA_DRR_MAX, tca[TCA_OPTIONS], drr_policy); 74 + if (!opt) 75 + return -EINVAL; 76 + 77 + err = nla_parse_nested(tb, TCA_DRR_MAX, opt, drr_policy); 74 78 if (err < 0) 75 79 return err; 76 80