diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/arm/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/arm/etherh.c | 10 | ||||
-rw-r--r-- | drivers/net/b44.c | 13 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 2 | ||||
-rw-r--r-- | drivers/net/hp-plus.c | 2 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 16 | ||||
-rw-r--r-- | drivers/net/r8169.c | 114 | ||||
-rw-r--r-- | drivers/net/usb/asix.c | 8 | ||||
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 5 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 4 | ||||
-rw-r--r-- | drivers/net/usb/zaurus.c | 5 | ||||
-rw-r--r-- | drivers/net/veth.c | 51 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/ethtool.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/persistcfg.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 72 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8187_dev.c | 12 |
22 files changed, 287 insertions, 141 deletions
diff --git a/drivers/net/arm/Makefile b/drivers/net/arm/Makefile index c69c0cdba4a2..811a3ccd14c1 100644 --- a/drivers/net/arm/Makefile +++ b/drivers/net/arm/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | # | 4 | # |
5 | 5 | ||
6 | obj-$(CONFIG_ARM_AM79C961A) += am79c961a.o | 6 | obj-$(CONFIG_ARM_AM79C961A) += am79c961a.o |
7 | obj-$(CONFIG_ARM_ETHERH) += etherh.o ../8390.o | 7 | obj-$(CONFIG_ARM_ETHERH) += etherh.o |
8 | obj-$(CONFIG_ARM_ETHER3) += ether3.o | 8 | obj-$(CONFIG_ARM_ETHER3) += ether3.o |
9 | obj-$(CONFIG_ARM_ETHER1) += ether1.o | 9 | obj-$(CONFIG_ARM_ETHER1) += ether1.o |
10 | obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o | 10 | obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o |
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index 54b52e5b1821..f52f668c49bf 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c | |||
@@ -641,15 +641,15 @@ static const struct net_device_ops etherh_netdev_ops = { | |||
641 | .ndo_open = etherh_open, | 641 | .ndo_open = etherh_open, |
642 | .ndo_stop = etherh_close, | 642 | .ndo_stop = etherh_close, |
643 | .ndo_set_config = etherh_set_config, | 643 | .ndo_set_config = etherh_set_config, |
644 | .ndo_start_xmit = ei_start_xmit, | 644 | .ndo_start_xmit = __ei_start_xmit, |
645 | .ndo_tx_timeout = ei_tx_timeout, | 645 | .ndo_tx_timeout = __ei_tx_timeout, |
646 | .ndo_get_stats = ei_get_stats, | 646 | .ndo_get_stats = __ei_get_stats, |
647 | .ndo_set_multicast_list = ei_set_multicast_list, | 647 | .ndo_set_multicast_list = __ei_set_multicast_list, |
648 | .ndo_validate_addr = eth_validate_addr, | 648 | .ndo_validate_addr = eth_validate_addr, |
649 | .ndo_set_mac_address = eth_mac_addr, | 649 | .ndo_set_mac_address = eth_mac_addr, |
650 | .ndo_change_mtu = eth_change_mtu, | 650 | .ndo_change_mtu = eth_change_mtu, |
651 | #ifdef CONFIG_NET_POLL_CONTROLLER | 651 | #ifdef CONFIG_NET_POLL_CONTROLLER |
652 | .ndo_poll_controller = ei_poll, | 652 | .ndo_poll_controller = __ei_poll, |
653 | #endif | 653 | #endif |
654 | }; | 654 | }; |
655 | 655 | ||
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index c38512ebcea6..dc5f051005fa 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -1264,8 +1264,14 @@ static void b44_clear_stats(struct b44 *bp) | |||
1264 | static void b44_chip_reset(struct b44 *bp, int reset_kind) | 1264 | static void b44_chip_reset(struct b44 *bp, int reset_kind) |
1265 | { | 1265 | { |
1266 | struct ssb_device *sdev = bp->sdev; | 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 | bw32(bp, B44_RCV_LAZY, 0); | 1275 | bw32(bp, B44_RCV_LAZY, 0); |
1270 | bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE); | 1276 | bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE); |
1271 | b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1); | 1277 | b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1); |
@@ -1277,10 +1283,8 @@ static void b44_chip_reset(struct b44 *bp, int reset_kind) | |||
1277 | } | 1283 | } |
1278 | bw32(bp, B44_DMARX_CTRL, 0); | 1284 | bw32(bp, B44_DMARX_CTRL, 0); |
1279 | bp->rx_prod = bp->rx_cons = 0; | 1285 | bp->rx_prod = bp->rx_cons = 0; |
1280 | } else | 1286 | } |
1281 | ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev); | ||
1282 | 1287 | ||
1283 | ssb_device_enable(bp->sdev, 0); | ||
1284 | b44_clear_stats(bp); | 1288 | b44_clear_stats(bp); |
1285 | 1289 | ||
1286 | /* | 1290 | /* |
@@ -2236,6 +2240,7 @@ static void __devexit b44_remove_one(struct ssb_device *sdev) | |||
2236 | struct net_device *dev = ssb_get_drvdata(sdev); | 2240 | struct net_device *dev = ssb_get_drvdata(sdev); |
2237 | 2241 | ||
2238 | unregister_netdev(dev); | 2242 | unregister_netdev(dev); |
2243 | ssb_device_disable(sdev, 0); | ||
2239 | ssb_bus_may_powerdown(sdev->bus); | 2244 | ssb_bus_may_powerdown(sdev->bus); |
2240 | free_netdev(dev); | 2245 | free_netdev(dev); |
2241 | ssb_pcihost_set_power_state(sdev, PCI_D3hot); | 2246 | ssb_pcihost_set_power_state(sdev, PCI_D3hot); |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 9b12a13a640f..9831b3f408aa 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1284,7 +1284,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1284 | spin_lock_irqsave(&priv->txlock, flags); | 1284 | spin_lock_irqsave(&priv->txlock, flags); |
1285 | 1285 | ||
1286 | /* check if there is space to queue this packet */ | 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 | /* no space, stop the queue */ | 1288 | /* no space, stop the queue */ |
1289 | netif_stop_queue(dev); | 1289 | netif_stop_queue(dev); |
1290 | dev->stats.tx_fifo_errors++; | 1290 | dev->stats.tx_fifo_errors++; |
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index 5e070f446635..0486cbe01adb 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c | |||
@@ -467,7 +467,7 @@ init_module(void) | |||
467 | if (this_dev != 0) break; /* only autoprobe 1st one */ | 467 | if (this_dev != 0) break; /* only autoprobe 1st one */ |
468 | printk(KERN_NOTICE "hp-plus.c: Presently autoprobing (not recommended) for a single card.\n"); | 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 | if (!dev) | 471 | if (!dev) |
472 | break; | 472 | break; |
473 | dev->irq = irq[this_dev]; | 473 | dev->irq = irq[this_dev]; |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 9f33e442f403..13087782ac40 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -588,7 +588,12 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
588 | adapter->pci_mem_read = netxen_nic_pci_mem_read_2M; | 588 | adapter->pci_mem_read = netxen_nic_pci_mem_read_2M; |
589 | adapter->pci_mem_write = netxen_nic_pci_mem_write_2M; | 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 | pci_len0 = mem_len; | 597 | pci_len0 = mem_len; |
593 | first_page_group_start = 0; | 598 | first_page_group_start = 0; |
594 | first_page_group_end = 0; | 599 | first_page_group_end = 0; |
@@ -795,9 +800,12 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
795 | * See if the firmware gave us a virtual-physical port mapping. | 800 | * See if the firmware gave us a virtual-physical port mapping. |
796 | */ | 801 | */ |
797 | adapter->physical_port = adapter->portnum; | 802 | adapter->physical_port = adapter->portnum; |
798 | i = adapter->pci_read_normalize(adapter, CRB_V2P(adapter->portnum)); | 803 | if (adapter->fw_major < 4) { |
799 | if (i != 0x55555555) | 804 | i = adapter->pci_read_normalize(adapter, |
800 | adapter->physical_port = i; | 805 | CRB_V2P(adapter->portnum)); |
806 | if (i != 0x55555555) | ||
807 | adapter->physical_port = i; | ||
808 | } | ||
801 | 809 | ||
802 | adapter->flags &= ~(NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED); | 810 | adapter->flags &= ~(NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED); |
803 | 811 | ||
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 0771eb6fc6eb..b3473401c83a 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -81,9 +81,9 @@ static const int multicast_filter_limit = 32; | |||
81 | #define RTL8169_TX_TIMEOUT (6*HZ) | 81 | #define RTL8169_TX_TIMEOUT (6*HZ) |
82 | #define RTL8169_PHY_TIMEOUT (10*HZ) | 82 | #define RTL8169_PHY_TIMEOUT (10*HZ) |
83 | 83 | ||
84 | #define RTL_EEPROM_SIG cpu_to_le32(0x8129) | 84 | #define RTL_EEPROM_SIG 0x8129 |
85 | #define RTL_EEPROM_SIG_MASK cpu_to_le32(0xffff) | ||
86 | #define RTL_EEPROM_SIG_ADDR 0x0000 | 85 | #define RTL_EEPROM_SIG_ADDR 0x0000 |
86 | #define RTL_EEPROM_MAC_ADDR 0x0007 | ||
87 | 87 | ||
88 | /* write/read MMIO register */ | 88 | /* write/read MMIO register */ |
89 | #define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) | 89 | #define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) |
@@ -293,6 +293,11 @@ enum rtl_register_content { | |||
293 | /* Cfg9346Bits */ | 293 | /* Cfg9346Bits */ |
294 | Cfg9346_Lock = 0x00, | 294 | Cfg9346_Lock = 0x00, |
295 | Cfg9346_Unlock = 0xc0, | 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 | /* rx_mode_bits */ | 302 | /* rx_mode_bits */ |
298 | AcceptErr = 0x20, | 303 | AcceptErr = 0x20, |
@@ -305,6 +310,7 @@ enum rtl_register_content { | |||
305 | /* RxConfigBits */ | 310 | /* RxConfigBits */ |
306 | RxCfgFIFOShift = 13, | 311 | RxCfgFIFOShift = 13, |
307 | RxCfgDMAShift = 8, | 312 | RxCfgDMAShift = 8, |
313 | RxCfg9356SEL = 6, /* EEPROM type: 0 = 9346, 1 = 9356 */ | ||
308 | 314 | ||
309 | /* TxConfigBits */ | 315 | /* TxConfigBits */ |
310 | TxInterFrameGapShift = 24, | 316 | TxInterFrameGapShift = 24, |
@@ -1963,6 +1969,108 @@ static const struct net_device_ops rtl8169_netdev_ops = { | |||
1963 | 1969 | ||
1964 | }; | 1970 | }; |
1965 | 1971 | ||
1972 | /* Delay between EEPROM clock transitions. Force out buffered PCI writes. */ | ||
1973 | #define RTL_EEPROM_DELAY() RTL_R8(Cfg9346) | ||
1974 | #define RTL_EEPROM_READ_CMD 6 | ||
1975 | |||
1976 | /* read 16bit word stored in EEPROM. EEPROM is addressed by words. */ | ||
1977 | static u16 rtl_eeprom_read(void __iomem *ioaddr, int addr) | ||
1978 | { | ||
1979 | u16 result = 0; | ||
1980 | int cmd, cmd_len, i; | ||
1981 | |||
1982 | /* check for EEPROM address size (in bits) */ | ||
1983 | if (RTL_R32(RxConfig) & (1 << RxCfg9356SEL)) { | ||
1984 | /* EEPROM is 93C56 */ | ||
1985 | cmd_len = 3 + 8; /* 3 bits for command id and 8 for address */ | ||
1986 | cmd = (RTL_EEPROM_READ_CMD << 8) | (addr & 0xff); | ||
1987 | } else { | ||
1988 | /* EEPROM is 93C46 */ | ||
1989 | cmd_len = 3 + 6; /* 3 bits for command id and 6 for address */ | ||
1990 | cmd = (RTL_EEPROM_READ_CMD << 6) | (addr & 0x3f); | ||
1991 | } | ||
1992 | |||
1993 | /* enter programming mode */ | ||
1994 | RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); | ||
1995 | RTL_EEPROM_DELAY(); | ||
1996 | |||
1997 | /* write command and requested address */ | ||
1998 | while (cmd_len--) { | ||
1999 | u8 x = Cfg9346_Program | Cfg9346_EECS; | ||
2000 | |||
2001 | x |= (cmd & (1 << cmd_len)) ? Cfg9346_EEDI : 0; | ||
2002 | |||
2003 | /* write a bit */ | ||
2004 | RTL_W8(Cfg9346, x); | ||
2005 | RTL_EEPROM_DELAY(); | ||
2006 | |||
2007 | /* raise clock */ | ||
2008 | RTL_W8(Cfg9346, x | Cfg9346_EESK); | ||
2009 | RTL_EEPROM_DELAY(); | ||
2010 | } | ||
2011 | |||
2012 | /* lower clock */ | ||
2013 | RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); | ||
2014 | RTL_EEPROM_DELAY(); | ||
2015 | |||
2016 | /* read back 16bit value */ | ||
2017 | for (i = 16; i > 0; i--) { | ||
2018 | /* raise clock */ | ||
2019 | RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS | Cfg9346_EESK); | ||
2020 | RTL_EEPROM_DELAY(); | ||
2021 | |||
2022 | result <<= 1; | ||
2023 | result |= (RTL_R8(Cfg9346) & Cfg9346_EEDO) ? 1 : 0; | ||
2024 | |||
2025 | /* lower clock */ | ||
2026 | RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); | ||
2027 | RTL_EEPROM_DELAY(); | ||
2028 | } | ||
2029 | |||
2030 | RTL_W8(Cfg9346, Cfg9346_Program); | ||
2031 | /* leave programming mode */ | ||
2032 | RTL_W8(Cfg9346, Cfg9346_Lock); | ||
2033 | |||
2034 | return result; | ||
2035 | } | ||
2036 | |||
2037 | static void rtl_init_mac_address(struct rtl8169_private *tp, | ||
2038 | void __iomem *ioaddr) | ||
2039 | { | ||
2040 | struct pci_dev *pdev = tp->pci_dev; | ||
2041 | u16 x; | ||
2042 | u8 mac[8]; | ||
2043 | |||
2044 | /* read EEPROM signature */ | ||
2045 | x = rtl_eeprom_read(ioaddr, RTL_EEPROM_SIG_ADDR); | ||
2046 | |||
2047 | if (x != RTL_EEPROM_SIG) { | ||
2048 | dev_info(&pdev->dev, "Missing EEPROM signature: %04x\n", x); | ||
2049 | return; | ||
2050 | } | ||
2051 | |||
2052 | /* read MAC address */ | ||
2053 | x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR); | ||
2054 | mac[0] = x & 0xff; | ||
2055 | mac[1] = x >> 8; | ||
2056 | x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR + 1); | ||
2057 | mac[2] = x & 0xff; | ||
2058 | mac[3] = x >> 8; | ||
2059 | x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR + 2); | ||
2060 | mac[4] = x & 0xff; | ||
2061 | mac[5] = x >> 8; | ||
2062 | |||
2063 | if (netif_msg_probe(tp)) { | ||
2064 | DECLARE_MAC_BUF(buf); | ||
2065 | |||
2066 | dev_info(&pdev->dev, "MAC address found in EEPROM: %s\n", | ||
2067 | print_mac(buf, mac)); | ||
2068 | } | ||
2069 | |||
2070 | if (is_valid_ether_addr(mac)) | ||
2071 | rtl_rar_set(tp, mac); | ||
2072 | } | ||
2073 | |||
1966 | static int __devinit | 2074 | static int __devinit |
1967 | rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 2075 | rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
1968 | { | 2076 | { |
@@ -2141,6 +2249,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2141 | 2249 | ||
2142 | tp->mmio_addr = ioaddr; | 2250 | tp->mmio_addr = ioaddr; |
2143 | 2251 | ||
2252 | rtl_init_mac_address(tp, ioaddr); | ||
2253 | |||
2144 | /* Get MAC address */ | 2254 | /* Get MAC address */ |
2145 | for (i = 0; i < MAC_ADDR_LEN; i++) | 2255 | for (i = 0; i < MAC_ADDR_LEN; i++) |
2146 | dev->dev_addr[i] = RTL_R8(MAC0 + i); | 2256 | dev->dev_addr[i] = RTL_R8(MAC0 + i); |
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index e009481c606c..396f821b5ff0 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -1451,6 +1451,14 @@ static const struct usb_device_id products [] = { | |||
1451 | // Cables-to-Go USB Ethernet Adapter | 1451 | // Cables-to-Go USB Ethernet Adapter |
1452 | USB_DEVICE(0x0b95, 0x772a), | 1452 | USB_DEVICE(0x0b95, 0x772a), |
1453 | .driver_info = (unsigned long) &ax88772_info, | 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 | { }, // END | 1463 | { }, // END |
1456 | }; | 1464 | }; |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 0e061dfea78d..55e8ecc3a9e5 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -559,6 +559,11 @@ static const struct usb_device_id products [] = { | |||
559 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET, | 559 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET, |
560 | USB_CDC_PROTO_NONE), | 560 | USB_CDC_PROTO_NONE), |
561 | .driver_info = (unsigned long) &cdc_info, | 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 | { }, // END | 568 | { }, // END |
564 | }; | 569 | }; |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index aa3149078888..c32284ff3f54 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -723,8 +723,8 @@ u32 usbnet_get_link (struct net_device *net) | |||
723 | if (dev->mii.mdio_read) | 723 | if (dev->mii.mdio_read) |
724 | return mii_link_ok(&dev->mii); | 724 | return mii_link_ok(&dev->mii); |
725 | 725 | ||
726 | /* Otherwise, say we're up (to avoid breaking scripts) */ | 726 | /* Otherwise, dtrt for drivers calling netif_carrier_{on,off} */ |
727 | return 1; | 727 | return ethtool_op_get_link(net); |
728 | } | 728 | } |
729 | EXPORT_SYMBOL_GPL(usbnet_get_link); | 729 | EXPORT_SYMBOL_GPL(usbnet_get_link); |
730 | 730 | ||
diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c index e24f7b3ace4b..04882c8f9bf1 100644 --- a/drivers/net/usb/zaurus.c +++ b/drivers/net/usb/zaurus.c | |||
@@ -341,6 +341,11 @@ static const struct usb_device_id products [] = { | |||
341 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, | 341 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, |
342 | USB_CDC_PROTO_NONE), | 342 | USB_CDC_PROTO_NONE), |
343 | .driver_info = (unsigned long) &bogus_mdlm_info, | 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 | /* Olympus has some models with a Zaurus-compatible option. | 351 | /* Olympus has some models with a Zaurus-compatible option. |
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 108bbbeacfb6..124fe75b8a8a 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -239,6 +239,16 @@ static int veth_open(struct net_device *dev) | |||
239 | return 0; | 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 | static int veth_dev_init(struct net_device *dev) | 252 | static int veth_dev_init(struct net_device *dev) |
243 | { | 253 | { |
244 | struct veth_net_stats *stats; | 254 | struct veth_net_stats *stats; |
@@ -265,6 +275,7 @@ static void veth_dev_free(struct net_device *dev) | |||
265 | static const struct net_device_ops veth_netdev_ops = { | 275 | static const struct net_device_ops veth_netdev_ops = { |
266 | .ndo_init = veth_dev_init, | 276 | .ndo_init = veth_dev_init, |
267 | .ndo_open = veth_open, | 277 | .ndo_open = veth_open, |
278 | .ndo_stop = veth_close, | ||
268 | .ndo_start_xmit = veth_xmit, | 279 | .ndo_start_xmit = veth_xmit, |
269 | .ndo_get_stats = veth_get_stats, | 280 | .ndo_get_stats = veth_get_stats, |
270 | .ndo_set_mac_address = eth_mac_addr, | 281 | .ndo_set_mac_address = eth_mac_addr, |
@@ -280,44 +291,6 @@ static void veth_setup(struct net_device *dev) | |||
280 | dev->destructor = veth_dev_free; | 291 | dev->destructor = veth_dev_free; |
281 | } | 292 | } |
282 | 293 | ||
283 | static void veth_change_state(struct net_device *dev) | ||
284 | { | ||
285 | struct net_device *peer; | ||
286 | struct veth_priv *priv; | ||
287 | |||
288 | priv = netdev_priv(dev); | ||
289 | peer = priv->peer; | ||
290 | |||
291 | if (netif_carrier_ok(peer)) { | ||
292 | if (!netif_carrier_ok(dev)) | ||
293 | netif_carrier_on(dev); | ||
294 | } else { | ||
295 | if (netif_carrier_ok(dev)) | ||
296 | netif_carrier_off(dev); | ||
297 | } | ||
298 | } | ||
299 | |||
300 | static int veth_device_event(struct notifier_block *unused, | ||
301 | unsigned long event, void *ptr) | ||
302 | { | ||
303 | struct net_device *dev = ptr; | ||
304 | |||
305 | if (dev->netdev_ops->ndo_open != veth_open) | ||
306 | goto out; | ||
307 | |||
308 | switch (event) { | ||
309 | case NETDEV_CHANGE: | ||
310 | veth_change_state(dev); | ||
311 | break; | ||
312 | } | ||
313 | out: | ||
314 | return NOTIFY_DONE; | ||
315 | } | ||
316 | |||
317 | static struct notifier_block veth_notifier_block __read_mostly = { | ||
318 | .notifier_call = veth_device_event, | ||
319 | }; | ||
320 | |||
321 | /* | 294 | /* |
322 | * netlink interface | 295 | * netlink interface |
323 | */ | 296 | */ |
@@ -468,14 +441,12 @@ static struct rtnl_link_ops veth_link_ops = { | |||
468 | 441 | ||
469 | static __init int veth_init(void) | 442 | static __init int veth_init(void) |
470 | { | 443 | { |
471 | register_netdevice_notifier(&veth_notifier_block); | ||
472 | return rtnl_link_register(&veth_link_ops); | 444 | return rtnl_link_register(&veth_link_ops); |
473 | } | 445 | } |
474 | 446 | ||
475 | static __exit void veth_exit(void) | 447 | static __exit void veth_exit(void) |
476 | { | 448 | { |
477 | rtnl_link_unregister(&veth_link_ops); | 449 | rtnl_link_unregister(&veth_link_ops); |
478 | unregister_netdevice_notifier(&veth_notifier_block); | ||
479 | } | 450 | } |
480 | 451 | ||
481 | module_init(veth_init); | 452 | module_init(veth_init); |
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 727f067aca4f..0e80990d8e84 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -1538,6 +1538,7 @@ bad2: | |||
1538 | bad: | 1538 | bad: |
1539 | if (ah) | 1539 | if (ah) |
1540 | ath9k_hw_detach(ah); | 1540 | ath9k_hw_detach(ah); |
1541 | ath9k_exit_debug(sc); | ||
1541 | 1542 | ||
1542 | return error; | 1543 | return error; |
1543 | } | 1544 | } |
@@ -1545,7 +1546,7 @@ bad: | |||
1545 | static int ath_attach(u16 devid, struct ath_softc *sc) | 1546 | static int ath_attach(u16 devid, struct ath_softc *sc) |
1546 | { | 1547 | { |
1547 | struct ieee80211_hw *hw = sc->hw; | 1548 | struct ieee80211_hw *hw = sc->hw; |
1548 | int error = 0; | 1549 | int error = 0, i; |
1549 | 1550 | ||
1550 | DPRINTF(sc, ATH_DBG_CONFIG, "Attach ATH hw\n"); | 1551 | DPRINTF(sc, ATH_DBG_CONFIG, "Attach ATH hw\n"); |
1551 | 1552 | ||
@@ -1589,11 +1590,11 @@ static int ath_attach(u16 devid, struct ath_softc *sc) | |||
1589 | /* initialize tx/rx engine */ | 1590 | /* initialize tx/rx engine */ |
1590 | error = ath_tx_init(sc, ATH_TXBUF); | 1591 | error = ath_tx_init(sc, ATH_TXBUF); |
1591 | if (error != 0) | 1592 | if (error != 0) |
1592 | goto detach; | 1593 | goto error_attach; |
1593 | 1594 | ||
1594 | error = ath_rx_init(sc, ATH_RXBUF); | 1595 | error = ath_rx_init(sc, ATH_RXBUF); |
1595 | if (error != 0) | 1596 | if (error != 0) |
1596 | goto detach; | 1597 | goto error_attach; |
1597 | 1598 | ||
1598 | #if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE) | 1599 | #if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE) |
1599 | /* Initialze h/w Rfkill */ | 1600 | /* Initialze h/w Rfkill */ |
@@ -1601,8 +1602,9 @@ static int ath_attach(u16 devid, struct ath_softc *sc) | |||
1601 | INIT_DELAYED_WORK(&sc->rf_kill.rfkill_poll, ath_rfkill_poll); | 1602 | INIT_DELAYED_WORK(&sc->rf_kill.rfkill_poll, ath_rfkill_poll); |
1602 | 1603 | ||
1603 | /* Initialize s/w rfkill */ | 1604 | /* Initialize s/w rfkill */ |
1604 | if (ath_init_sw_rfkill(sc)) | 1605 | error = ath_init_sw_rfkill(sc); |
1605 | goto detach; | 1606 | if (error) |
1607 | goto error_attach; | ||
1606 | #endif | 1608 | #endif |
1607 | 1609 | ||
1608 | error = ieee80211_register_hw(hw); | 1610 | error = ieee80211_register_hw(hw); |
@@ -1611,8 +1613,16 @@ static int ath_attach(u16 devid, struct ath_softc *sc) | |||
1611 | ath_init_leds(sc); | 1613 | ath_init_leds(sc); |
1612 | 1614 | ||
1613 | return 0; | 1615 | return 0; |
1614 | detach: | 1616 | |
1615 | ath_detach(sc); | 1617 | error_attach: |
1618 | /* cleanup tx queues */ | ||
1619 | for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) | ||
1620 | if (ATH_TXQ_SETUP(sc, i)) | ||
1621 | ath_tx_cleanupq(sc, &sc->tx.txq[i]); | ||
1622 | |||
1623 | ath9k_hw_detach(sc->sc_ah); | ||
1624 | ath9k_exit_debug(sc); | ||
1625 | |||
1616 | return error; | 1626 | return error; |
1617 | } | 1627 | } |
1618 | 1628 | ||
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c index 61d2f50470c8..b118a35ec605 100644 --- a/drivers/net/wireless/libertas/ethtool.c +++ b/drivers/net/wireless/libertas/ethtool.c | |||
@@ -23,7 +23,7 @@ static const char * mesh_stat_strings[]= { | |||
23 | static void lbs_ethtool_get_drvinfo(struct net_device *dev, | 23 | static void lbs_ethtool_get_drvinfo(struct net_device *dev, |
24 | struct ethtool_drvinfo *info) | 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 | snprintf(info->fw_version, 32, "%u.%u.%u.p%u", | 28 | snprintf(info->fw_version, 32, "%u.%u.%u.p%u", |
29 | priv->fwrelease >> 24 & 0xff, | 29 | priv->fwrelease >> 24 & 0xff, |
@@ -47,7 +47,7 @@ static int lbs_ethtool_get_eeprom_len(struct net_device *dev) | |||
47 | static int lbs_ethtool_get_eeprom(struct net_device *dev, | 47 | static int lbs_ethtool_get_eeprom(struct net_device *dev, |
48 | struct ethtool_eeprom *eeprom, u8 * bytes) | 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 | struct cmd_ds_802_11_eeprom_access cmd; | 51 | struct cmd_ds_802_11_eeprom_access cmd; |
52 | int ret; | 52 | int ret; |
53 | 53 | ||
@@ -76,7 +76,7 @@ out: | |||
76 | static void lbs_ethtool_get_stats(struct net_device *dev, | 76 | static void lbs_ethtool_get_stats(struct net_device *dev, |
77 | struct ethtool_stats *stats, uint64_t *data) | 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 | struct cmd_ds_mesh_access mesh_access; | 80 | struct cmd_ds_mesh_access mesh_access; |
81 | int ret; | 81 | int ret; |
82 | 82 | ||
@@ -113,7 +113,7 @@ static void lbs_ethtool_get_stats(struct net_device *dev, | |||
113 | 113 | ||
114 | static int lbs_ethtool_get_sset_count(struct net_device *dev, int sset) | 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 | if (sset == ETH_SS_STATS && dev == priv->mesh_dev) | 118 | if (sset == ETH_SS_STATS && dev == priv->mesh_dev) |
119 | return MESH_STATS_NUM; | 119 | return MESH_STATS_NUM; |
@@ -143,7 +143,7 @@ static void lbs_ethtool_get_strings(struct net_device *dev, | |||
143 | static void lbs_ethtool_get_wol(struct net_device *dev, | 143 | static void lbs_ethtool_get_wol(struct net_device *dev, |
144 | struct ethtool_wolinfo *wol) | 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 | if (priv->wol_criteria == 0xffffffff) { | 148 | if (priv->wol_criteria == 0xffffffff) { |
149 | /* Interface driver didn't configure wake */ | 149 | /* Interface driver didn't configure wake */ |
@@ -166,7 +166,7 @@ static void lbs_ethtool_get_wol(struct net_device *dev, | |||
166 | static int lbs_ethtool_set_wol(struct net_device *dev, | 166 | static int lbs_ethtool_set_wol(struct net_device *dev, |
167 | struct ethtool_wolinfo *wol) | 167 | struct ethtool_wolinfo *wol) |
168 | { | 168 | { |
169 | struct lbs_private *priv = netdev_priv(dev); | 169 | struct lbs_private *priv = dev->ml_priv; |
170 | uint32_t criteria = 0; | 170 | uint32_t criteria = 0; |
171 | 171 | ||
172 | if (priv->wol_criteria == 0xffffffff && wol->wolopts) | 172 | if (priv->wol_criteria == 0xffffffff && wol->wolopts) |
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 2fc637ad85c7..ea3dc038be76 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -59,7 +59,7 @@ static int if_usb_reset_device(struct if_usb_card *cardp); | |||
59 | static ssize_t if_usb_firmware_set(struct device *dev, | 59 | static ssize_t if_usb_firmware_set(struct device *dev, |
60 | struct device_attribute *attr, const char *buf, size_t count) | 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 | struct if_usb_card *cardp = priv->card; | 63 | struct if_usb_card *cardp = priv->card; |
64 | char fwname[FIRMWARE_NAME_MAX]; | 64 | char fwname[FIRMWARE_NAME_MAX]; |
65 | int ret; | 65 | int ret; |
@@ -86,7 +86,7 @@ static DEVICE_ATTR(lbs_flash_fw, 0200, NULL, if_usb_firmware_set); | |||
86 | static ssize_t if_usb_boot2_set(struct device *dev, | 86 | static ssize_t if_usb_boot2_set(struct device *dev, |
87 | struct device_attribute *attr, const char *buf, size_t count) | 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 | struct if_usb_card *cardp = priv->card; | 90 | struct if_usb_card *cardp = priv->card; |
91 | char fwname[FIRMWARE_NAME_MAX]; | 91 | char fwname[FIRMWARE_NAME_MAX]; |
92 | int ret; | 92 | int ret; |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 4e0007d20030..f76623e0ff9a 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -222,7 +222,7 @@ u8 lbs_data_rate_to_fw_index(u32 rate) | |||
222 | static ssize_t lbs_anycast_get(struct device *dev, | 222 | static ssize_t lbs_anycast_get(struct device *dev, |
223 | struct device_attribute *attr, char * buf) | 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 | struct cmd_ds_mesh_access mesh_access; | 226 | struct cmd_ds_mesh_access mesh_access; |
227 | int ret; | 227 | int ret; |
228 | 228 | ||
@@ -241,7 +241,7 @@ static ssize_t lbs_anycast_get(struct device *dev, | |||
241 | static ssize_t lbs_anycast_set(struct device *dev, | 241 | static ssize_t lbs_anycast_set(struct device *dev, |
242 | struct device_attribute *attr, const char * buf, size_t count) | 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 | struct cmd_ds_mesh_access mesh_access; | 245 | struct cmd_ds_mesh_access mesh_access; |
246 | uint32_t datum; | 246 | uint32_t datum; |
247 | int ret; | 247 | int ret; |
@@ -263,7 +263,7 @@ static ssize_t lbs_anycast_set(struct device *dev, | |||
263 | static ssize_t lbs_prb_rsp_limit_get(struct device *dev, | 263 | static ssize_t lbs_prb_rsp_limit_get(struct device *dev, |
264 | struct device_attribute *attr, char *buf) | 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 | struct cmd_ds_mesh_access mesh_access; | 267 | struct cmd_ds_mesh_access mesh_access; |
268 | int ret; | 268 | int ret; |
269 | u32 retry_limit; | 269 | u32 retry_limit; |
@@ -286,7 +286,7 @@ static ssize_t lbs_prb_rsp_limit_get(struct device *dev, | |||
286 | static ssize_t lbs_prb_rsp_limit_set(struct device *dev, | 286 | static ssize_t lbs_prb_rsp_limit_set(struct device *dev, |
287 | struct device_attribute *attr, const char *buf, size_t count) | 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 | struct cmd_ds_mesh_access mesh_access; | 290 | struct cmd_ds_mesh_access mesh_access; |
291 | int ret; | 291 | int ret; |
292 | unsigned long retry_limit; | 292 | unsigned long retry_limit; |
@@ -321,7 +321,7 @@ static void lbs_remove_mesh(struct lbs_private *priv); | |||
321 | static ssize_t lbs_rtap_get(struct device *dev, | 321 | static ssize_t lbs_rtap_get(struct device *dev, |
322 | struct device_attribute *attr, char * buf) | 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 | return snprintf(buf, 5, "0x%X\n", priv->monitormode); | 325 | return snprintf(buf, 5, "0x%X\n", priv->monitormode); |
326 | } | 326 | } |
327 | 327 | ||
@@ -332,7 +332,7 @@ static ssize_t lbs_rtap_set(struct device *dev, | |||
332 | struct device_attribute *attr, const char * buf, size_t count) | 332 | struct device_attribute *attr, const char * buf, size_t count) |
333 | { | 333 | { |
334 | int monitor_mode; | 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 | sscanf(buf, "%x", &monitor_mode); | 337 | sscanf(buf, "%x", &monitor_mode); |
338 | if (monitor_mode) { | 338 | if (monitor_mode) { |
@@ -383,7 +383,7 @@ static DEVICE_ATTR(lbs_rtap, 0644, lbs_rtap_get, lbs_rtap_set ); | |||
383 | static ssize_t lbs_mesh_get(struct device *dev, | 383 | static ssize_t lbs_mesh_get(struct device *dev, |
384 | struct device_attribute *attr, char * buf) | 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 | return snprintf(buf, 5, "0x%X\n", !!priv->mesh_dev); | 387 | return snprintf(buf, 5, "0x%X\n", !!priv->mesh_dev); |
388 | } | 388 | } |
389 | 389 | ||
@@ -393,7 +393,7 @@ static ssize_t lbs_mesh_get(struct device *dev, | |||
393 | static ssize_t lbs_mesh_set(struct device *dev, | 393 | static ssize_t lbs_mesh_set(struct device *dev, |
394 | struct device_attribute *attr, const char * buf, size_t count) | 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 | int enable; | 397 | int enable; |
398 | int ret, action = CMD_ACT_MESH_CONFIG_STOP; | 398 | int ret, action = CMD_ACT_MESH_CONFIG_STOP; |
399 | 399 | ||
@@ -452,7 +452,7 @@ static struct attribute_group lbs_mesh_attr_group = { | |||
452 | */ | 452 | */ |
453 | static int lbs_dev_open(struct net_device *dev) | 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 | int ret = 0; | 456 | int ret = 0; |
457 | 457 | ||
458 | lbs_deb_enter(LBS_DEB_NET); | 458 | lbs_deb_enter(LBS_DEB_NET); |
@@ -521,7 +521,7 @@ static int lbs_mesh_stop(struct net_device *dev) | |||
521 | */ | 521 | */ |
522 | static int lbs_eth_stop(struct net_device *dev) | 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 | lbs_deb_enter(LBS_DEB_NET); | 526 | lbs_deb_enter(LBS_DEB_NET); |
527 | 527 | ||
@@ -538,7 +538,7 @@ static int lbs_eth_stop(struct net_device *dev) | |||
538 | 538 | ||
539 | static void lbs_tx_timeout(struct net_device *dev) | 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 | lbs_deb_enter(LBS_DEB_TX); | 543 | lbs_deb_enter(LBS_DEB_TX); |
544 | 544 | ||
@@ -590,7 +590,7 @@ EXPORT_SYMBOL_GPL(lbs_host_to_card_done); | |||
590 | */ | 590 | */ |
591 | static struct net_device_stats *lbs_get_stats(struct net_device *dev) | 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 | lbs_deb_enter(LBS_DEB_NET); | 595 | lbs_deb_enter(LBS_DEB_NET); |
596 | return &priv->stats; | 596 | return &priv->stats; |
@@ -599,7 +599,7 @@ static struct net_device_stats *lbs_get_stats(struct net_device *dev) | |||
599 | static int lbs_set_mac_address(struct net_device *dev, void *addr) | 599 | static int lbs_set_mac_address(struct net_device *dev, void *addr) |
600 | { | 600 | { |
601 | int ret = 0; | 601 | int ret = 0; |
602 | struct lbs_private *priv = netdev_priv(dev); | 602 | struct lbs_private *priv = dev->ml_priv; |
603 | struct sockaddr *phwaddr = addr; | 603 | struct sockaddr *phwaddr = addr; |
604 | struct cmd_ds_802_11_mac_address cmd; | 604 | struct cmd_ds_802_11_mac_address cmd; |
605 | 605 | ||
@@ -732,7 +732,7 @@ static void lbs_set_mcast_worker(struct work_struct *work) | |||
732 | 732 | ||
733 | static void lbs_set_multicast_list(struct net_device *dev) | 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 | schedule_work(&priv->mcast_work); | 737 | schedule_work(&priv->mcast_work); |
738 | } | 738 | } |
@@ -748,7 +748,7 @@ static void lbs_set_multicast_list(struct net_device *dev) | |||
748 | static int lbs_thread(void *data) | 748 | static int lbs_thread(void *data) |
749 | { | 749 | { |
750 | struct net_device *dev = data; | 750 | struct net_device *dev = data; |
751 | struct lbs_private *priv = netdev_priv(dev); | 751 | struct lbs_private *priv = dev->ml_priv; |
752 | wait_queue_t wait; | 752 | wait_queue_t wait; |
753 | 753 | ||
754 | lbs_deb_enter(LBS_DEB_THREAD); | 754 | lbs_deb_enter(LBS_DEB_THREAD); |
@@ -1184,6 +1184,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev) | |||
1184 | goto done; | 1184 | goto done; |
1185 | } | 1185 | } |
1186 | priv = netdev_priv(dev); | 1186 | priv = netdev_priv(dev); |
1187 | dev->ml_priv = priv; | ||
1187 | 1188 | ||
1188 | if (lbs_init_adapter(priv)) { | 1189 | if (lbs_init_adapter(priv)) { |
1189 | lbs_pr_err("failed to initialize adapter structure.\n"); | 1190 | lbs_pr_err("failed to initialize adapter structure.\n"); |
diff --git a/drivers/net/wireless/libertas/persistcfg.c b/drivers/net/wireless/libertas/persistcfg.c index d42b7a5a1b3f..18fe29faf99b 100644 --- a/drivers/net/wireless/libertas/persistcfg.c +++ b/drivers/net/wireless/libertas/persistcfg.c | |||
@@ -18,7 +18,7 @@ | |||
18 | static int mesh_get_default_parameters(struct device *dev, | 18 | static int mesh_get_default_parameters(struct device *dev, |
19 | struct mrvl_mesh_defaults *defs) | 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 | struct cmd_ds_mesh_config cmd; | 22 | struct cmd_ds_mesh_config cmd; |
23 | int ret; | 23 | int ret; |
24 | 24 | ||
@@ -57,7 +57,7 @@ static ssize_t bootflag_get(struct device *dev, | |||
57 | static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr, | 57 | static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr, |
58 | const char *buf, size_t count) | 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 | struct cmd_ds_mesh_config cmd; | 61 | struct cmd_ds_mesh_config cmd; |
62 | uint32_t datum; | 62 | uint32_t datum; |
63 | int ret; | 63 | int ret; |
@@ -100,7 +100,7 @@ static ssize_t boottime_get(struct device *dev, | |||
100 | static ssize_t boottime_set(struct device *dev, | 100 | static ssize_t boottime_set(struct device *dev, |
101 | struct device_attribute *attr, const char *buf, size_t count) | 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 | struct cmd_ds_mesh_config cmd; | 104 | struct cmd_ds_mesh_config cmd; |
105 | uint32_t datum; | 105 | uint32_t datum; |
106 | int ret; | 106 | int ret; |
@@ -152,7 +152,7 @@ static ssize_t channel_get(struct device *dev, | |||
152 | static ssize_t channel_set(struct device *dev, struct device_attribute *attr, | 152 | static ssize_t channel_set(struct device *dev, struct device_attribute *attr, |
153 | const char *buf, size_t count) | 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 | struct cmd_ds_mesh_config cmd; | 156 | struct cmd_ds_mesh_config cmd; |
157 | uint32_t datum; | 157 | uint32_t datum; |
158 | int ret; | 158 | int ret; |
@@ -210,7 +210,7 @@ static ssize_t mesh_id_set(struct device *dev, struct device_attribute *attr, | |||
210 | struct cmd_ds_mesh_config cmd; | 210 | struct cmd_ds_mesh_config cmd; |
211 | struct mrvl_mesh_defaults defs; | 211 | struct mrvl_mesh_defaults defs; |
212 | struct mrvl_meshie *ie; | 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 | int len; | 214 | int len; |
215 | int ret; | 215 | int ret; |
216 | 216 | ||
@@ -269,7 +269,7 @@ static ssize_t protocol_id_set(struct device *dev, | |||
269 | struct cmd_ds_mesh_config cmd; | 269 | struct cmd_ds_mesh_config cmd; |
270 | struct mrvl_mesh_defaults defs; | 270 | struct mrvl_mesh_defaults defs; |
271 | struct mrvl_meshie *ie; | 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 | uint32_t datum; | 273 | uint32_t datum; |
274 | int ret; | 274 | int ret; |
275 | 275 | ||
@@ -323,7 +323,7 @@ static ssize_t metric_id_set(struct device *dev, struct device_attribute *attr, | |||
323 | struct cmd_ds_mesh_config cmd; | 323 | struct cmd_ds_mesh_config cmd; |
324 | struct mrvl_mesh_defaults defs; | 324 | struct mrvl_mesh_defaults defs; |
325 | struct mrvl_meshie *ie; | 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 | uint32_t datum; | 327 | uint32_t datum; |
328 | int ret; | 328 | int ret; |
329 | 329 | ||
@@ -377,7 +377,7 @@ static ssize_t capability_set(struct device *dev, struct device_attribute *attr, | |||
377 | struct cmd_ds_mesh_config cmd; | 377 | struct cmd_ds_mesh_config cmd; |
378 | struct mrvl_mesh_defaults defs; | 378 | struct mrvl_mesh_defaults defs; |
379 | struct mrvl_meshie *ie; | 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 | uint32_t datum; | 381 | uint32_t datum; |
382 | int ret; | 382 | int ret; |
383 | 383 | ||
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 57f6c12cda20..9014950f4328 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -945,7 +945,7 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, | |||
945 | union iwreq_data *wrqu, char *extra) | 945 | union iwreq_data *wrqu, char *extra) |
946 | { | 946 | { |
947 | DECLARE_SSID_BUF(ssid); | 947 | DECLARE_SSID_BUF(ssid); |
948 | struct lbs_private *priv = netdev_priv(dev); | 948 | struct lbs_private *priv = dev->ml_priv; |
949 | int ret = 0; | 949 | int ret = 0; |
950 | 950 | ||
951 | lbs_deb_enter(LBS_DEB_WEXT); | 951 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1008,7 +1008,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, | |||
1008 | struct iw_point *dwrq, char *extra) | 1008 | struct iw_point *dwrq, char *extra) |
1009 | { | 1009 | { |
1010 | #define SCAN_ITEM_SIZE 128 | 1010 | #define SCAN_ITEM_SIZE 128 |
1011 | struct lbs_private *priv = netdev_priv(dev); | 1011 | struct lbs_private *priv = dev->ml_priv; |
1012 | int err = 0; | 1012 | int err = 0; |
1013 | char *ev = extra; | 1013 | char *ev = extra; |
1014 | char *stop = ev + dwrq->length; | 1014 | char *stop = ev + dwrq->length; |
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index dac462641170..68bec31ae03b 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -60,7 +60,7 @@ static u32 convert_radiotap_rate_to_mv(u8 rate) | |||
60 | int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 60 | int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) |
61 | { | 61 | { |
62 | unsigned long flags; | 62 | unsigned long flags; |
63 | struct lbs_private *priv = netdev_priv(dev); | 63 | struct lbs_private *priv = dev->ml_priv; |
64 | struct txpd *txpd; | 64 | struct txpd *txpd; |
65 | char *p802x_hdr; | 65 | char *p802x_hdr; |
66 | uint16_t pkt_len; | 66 | uint16_t pkt_len; |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index c6102e08179e..f16d136ab4bb 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -163,7 +163,7 @@ static int lbs_get_name(struct net_device *dev, struct iw_request_info *info, | |||
163 | static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, | 163 | static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, |
164 | struct iw_freq *fwrq, char *extra) | 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 | struct chan_freq_power *cfp; | 167 | struct chan_freq_power *cfp; |
168 | 168 | ||
169 | lbs_deb_enter(LBS_DEB_WEXT); | 169 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -189,7 +189,7 @@ static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, | |||
189 | static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, | 189 | static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, |
190 | struct sockaddr *awrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 194 | lbs_deb_enter(LBS_DEB_WEXT); |
195 | 195 | ||
@@ -207,7 +207,7 @@ static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, | |||
207 | static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, | 207 | static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, |
208 | struct iw_point *dwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 212 | lbs_deb_enter(LBS_DEB_WEXT); |
213 | 213 | ||
@@ -231,7 +231,7 @@ static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, | |||
231 | static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, | 231 | static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, |
232 | struct iw_point *dwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 236 | lbs_deb_enter(LBS_DEB_WEXT); |
237 | 237 | ||
@@ -248,7 +248,7 @@ static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, | |||
248 | static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, | 248 | static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, |
249 | struct iw_point *dwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 253 | lbs_deb_enter(LBS_DEB_WEXT); |
254 | 254 | ||
@@ -273,7 +273,7 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info, | |||
273 | struct iw_param *vwrq, char *extra) | 273 | struct iw_param *vwrq, char *extra) |
274 | { | 274 | { |
275 | int ret = 0; | 275 | int ret = 0; |
276 | struct lbs_private *priv = netdev_priv(dev); | 276 | struct lbs_private *priv = dev->ml_priv; |
277 | u32 val = vwrq->value; | 277 | u32 val = vwrq->value; |
278 | 278 | ||
279 | lbs_deb_enter(LBS_DEB_WEXT); | 279 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -293,7 +293,7 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info, | |||
293 | static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, | 293 | static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, |
294 | struct iw_param *vwrq, char *extra) | 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 | int ret = 0; | 297 | int ret = 0; |
298 | u16 val = 0; | 298 | u16 val = 0; |
299 | 299 | ||
@@ -315,7 +315,7 @@ out: | |||
315 | static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, | 315 | static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, |
316 | struct iw_param *vwrq, char *extra) | 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 | int ret = 0; | 319 | int ret = 0; |
320 | u32 val = vwrq->value; | 320 | u32 val = vwrq->value; |
321 | 321 | ||
@@ -336,7 +336,7 @@ static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, | |||
336 | static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, | 336 | static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, |
337 | struct iw_param *vwrq, char *extra) | 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 | int ret = 0; | 340 | int ret = 0; |
341 | u16 val = 0; | 341 | u16 val = 0; |
342 | 342 | ||
@@ -359,7 +359,7 @@ out: | |||
359 | static int lbs_get_mode(struct net_device *dev, | 359 | static int lbs_get_mode(struct net_device *dev, |
360 | struct iw_request_info *info, u32 * uwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 364 | lbs_deb_enter(LBS_DEB_WEXT); |
365 | 365 | ||
@@ -385,7 +385,7 @@ static int lbs_get_txpow(struct net_device *dev, | |||
385 | struct iw_request_info *info, | 385 | struct iw_request_info *info, |
386 | struct iw_param *vwrq, char *extra) | 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 | s16 curlevel = 0; | 389 | s16 curlevel = 0; |
390 | int ret = 0; | 390 | int ret = 0; |
391 | 391 | ||
@@ -418,7 +418,7 @@ out: | |||
418 | static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, | 418 | static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, |
419 | struct iw_param *vwrq, char *extra) | 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 | int ret = 0; | 422 | int ret = 0; |
423 | u16 slimit = 0, llimit = 0; | 423 | u16 slimit = 0, llimit = 0; |
424 | 424 | ||
@@ -466,7 +466,7 @@ out: | |||
466 | static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info, | 466 | static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info, |
467 | struct iw_param *vwrq, char *extra) | 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 | int ret = 0; | 470 | int ret = 0; |
471 | u16 val = 0; | 471 | u16 val = 0; |
472 | 472 | ||
@@ -542,7 +542,7 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, | |||
542 | struct iw_point *dwrq, char *extra) | 542 | struct iw_point *dwrq, char *extra) |
543 | { | 543 | { |
544 | int i, j; | 544 | int i, j; |
545 | struct lbs_private *priv = netdev_priv(dev); | 545 | struct lbs_private *priv = dev->ml_priv; |
546 | struct iw_range *range = (struct iw_range *)extra; | 546 | struct iw_range *range = (struct iw_range *)extra; |
547 | struct chan_freq_power *cfp; | 547 | struct chan_freq_power *cfp; |
548 | u8 rates[MAX_RATES + 1]; | 548 | u8 rates[MAX_RATES + 1]; |
@@ -708,7 +708,7 @@ out: | |||
708 | static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, | 708 | static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, |
709 | struct iw_param *vwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 713 | lbs_deb_enter(LBS_DEB_WEXT); |
714 | 714 | ||
@@ -758,7 +758,7 @@ static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, | |||
758 | static int lbs_get_power(struct net_device *dev, struct iw_request_info *info, | 758 | static int lbs_get_power(struct net_device *dev, struct iw_request_info *info, |
759 | struct iw_param *vwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 763 | lbs_deb_enter(LBS_DEB_WEXT); |
764 | 764 | ||
@@ -781,7 +781,7 @@ static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev) | |||
781 | EXCELLENT = 95, | 781 | EXCELLENT = 95, |
782 | PERFECT = 100 | 782 | PERFECT = 100 |
783 | }; | 783 | }; |
784 | struct lbs_private *priv = netdev_priv(dev); | 784 | struct lbs_private *priv = dev->ml_priv; |
785 | u32 rssi_qual; | 785 | u32 rssi_qual; |
786 | u32 tx_qual; | 786 | u32 tx_qual; |
787 | u32 quality = 0; | 787 | u32 quality = 0; |
@@ -886,7 +886,7 @@ static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info, | |||
886 | struct iw_freq *fwrq, char *extra) | 886 | struct iw_freq *fwrq, char *extra) |
887 | { | 887 | { |
888 | int ret = -EINVAL; | 888 | int ret = -EINVAL; |
889 | struct lbs_private *priv = netdev_priv(dev); | 889 | struct lbs_private *priv = dev->ml_priv; |
890 | struct chan_freq_power *cfp; | 890 | struct chan_freq_power *cfp; |
891 | struct assoc_request * assoc_req; | 891 | struct assoc_request * assoc_req; |
892 | 892 | ||
@@ -943,7 +943,7 @@ static int lbs_mesh_set_freq(struct net_device *dev, | |||
943 | struct iw_request_info *info, | 943 | struct iw_request_info *info, |
944 | struct iw_freq *fwrq, char *extra) | 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 | struct chan_freq_power *cfp; | 947 | struct chan_freq_power *cfp; |
948 | int ret = -EINVAL; | 948 | int ret = -EINVAL; |
949 | 949 | ||
@@ -994,7 +994,7 @@ out: | |||
994 | static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, | 994 | static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, |
995 | struct iw_param *vwrq, char *extra) | 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 | u8 new_rate = 0; | 998 | u8 new_rate = 0; |
999 | int ret = -EINVAL; | 999 | int ret = -EINVAL; |
1000 | u8 rates[MAX_RATES + 1]; | 1000 | u8 rates[MAX_RATES + 1]; |
@@ -1054,7 +1054,7 @@ out: | |||
1054 | static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info, | 1054 | static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info, |
1055 | struct iw_param *vwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 1059 | lbs_deb_enter(LBS_DEB_WEXT); |
1060 | 1060 | ||
@@ -1079,7 +1079,7 @@ static int lbs_set_mode(struct net_device *dev, | |||
1079 | struct iw_request_info *info, u32 * uwrq, char *extra) | 1079 | struct iw_request_info *info, u32 * uwrq, char *extra) |
1080 | { | 1080 | { |
1081 | int ret = 0; | 1081 | int ret = 0; |
1082 | struct lbs_private *priv = netdev_priv(dev); | 1082 | struct lbs_private *priv = dev->ml_priv; |
1083 | struct assoc_request * assoc_req; | 1083 | struct assoc_request * assoc_req; |
1084 | 1084 | ||
1085 | lbs_deb_enter(LBS_DEB_WEXT); | 1085 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1124,7 +1124,7 @@ static int lbs_get_encode(struct net_device *dev, | |||
1124 | struct iw_request_info *info, | 1124 | struct iw_request_info *info, |
1125 | struct iw_point *dwrq, u8 * extra) | 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 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; | 1128 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; |
1129 | 1129 | ||
1130 | lbs_deb_enter(LBS_DEB_WEXT); | 1130 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1319,7 +1319,7 @@ static int lbs_set_encode(struct net_device *dev, | |||
1319 | struct iw_point *dwrq, char *extra) | 1319 | struct iw_point *dwrq, char *extra) |
1320 | { | 1320 | { |
1321 | int ret = 0; | 1321 | int ret = 0; |
1322 | struct lbs_private *priv = netdev_priv(dev); | 1322 | struct lbs_private *priv = dev->ml_priv; |
1323 | struct assoc_request * assoc_req; | 1323 | struct assoc_request * assoc_req; |
1324 | u16 is_default = 0, index = 0, set_tx_key = 0; | 1324 | u16 is_default = 0, index = 0, set_tx_key = 0; |
1325 | 1325 | ||
@@ -1395,7 +1395,7 @@ static int lbs_get_encodeext(struct net_device *dev, | |||
1395 | char *extra) | 1395 | char *extra) |
1396 | { | 1396 | { |
1397 | int ret = -EINVAL; | 1397 | int ret = -EINVAL; |
1398 | struct lbs_private *priv = netdev_priv(dev); | 1398 | struct lbs_private *priv = dev->ml_priv; |
1399 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1399 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1400 | int index, max_key_len; | 1400 | int index, max_key_len; |
1401 | 1401 | ||
@@ -1501,7 +1501,7 @@ static int lbs_set_encodeext(struct net_device *dev, | |||
1501 | char *extra) | 1501 | char *extra) |
1502 | { | 1502 | { |
1503 | int ret = 0; | 1503 | int ret = 0; |
1504 | struct lbs_private *priv = netdev_priv(dev); | 1504 | struct lbs_private *priv = dev->ml_priv; |
1505 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1505 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1506 | int alg = ext->alg; | 1506 | int alg = ext->alg; |
1507 | struct assoc_request * assoc_req; | 1507 | struct assoc_request * assoc_req; |
@@ -1639,7 +1639,7 @@ static int lbs_set_genie(struct net_device *dev, | |||
1639 | struct iw_point *dwrq, | 1639 | struct iw_point *dwrq, |
1640 | char *extra) | 1640 | char *extra) |
1641 | { | 1641 | { |
1642 | struct lbs_private *priv = netdev_priv(dev); | 1642 | struct lbs_private *priv = dev->ml_priv; |
1643 | int ret = 0; | 1643 | int ret = 0; |
1644 | struct assoc_request * assoc_req; | 1644 | struct assoc_request * assoc_req; |
1645 | 1645 | ||
@@ -1685,7 +1685,7 @@ static int lbs_get_genie(struct net_device *dev, | |||
1685 | char *extra) | 1685 | char *extra) |
1686 | { | 1686 | { |
1687 | int ret = 0; | 1687 | int ret = 0; |
1688 | struct lbs_private *priv = netdev_priv(dev); | 1688 | struct lbs_private *priv = dev->ml_priv; |
1689 | 1689 | ||
1690 | lbs_deb_enter(LBS_DEB_WEXT); | 1690 | lbs_deb_enter(LBS_DEB_WEXT); |
1691 | 1691 | ||
@@ -1713,7 +1713,7 @@ static int lbs_set_auth(struct net_device *dev, | |||
1713 | struct iw_param *dwrq, | 1713 | struct iw_param *dwrq, |
1714 | char *extra) | 1714 | char *extra) |
1715 | { | 1715 | { |
1716 | struct lbs_private *priv = netdev_priv(dev); | 1716 | struct lbs_private *priv = dev->ml_priv; |
1717 | struct assoc_request * assoc_req; | 1717 | struct assoc_request * assoc_req; |
1718 | int ret = 0; | 1718 | int ret = 0; |
1719 | int updated = 0; | 1719 | int updated = 0; |
@@ -1816,7 +1816,7 @@ static int lbs_get_auth(struct net_device *dev, | |||
1816 | char *extra) | 1816 | char *extra) |
1817 | { | 1817 | { |
1818 | int ret = 0; | 1818 | int ret = 0; |
1819 | struct lbs_private *priv = netdev_priv(dev); | 1819 | struct lbs_private *priv = dev->ml_priv; |
1820 | 1820 | ||
1821 | lbs_deb_enter(LBS_DEB_WEXT); | 1821 | lbs_deb_enter(LBS_DEB_WEXT); |
1822 | 1822 | ||
@@ -1857,7 +1857,7 @@ static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info, | |||
1857 | struct iw_param *vwrq, char *extra) | 1857 | struct iw_param *vwrq, char *extra) |
1858 | { | 1858 | { |
1859 | int ret = 0; | 1859 | int ret = 0; |
1860 | struct lbs_private *priv = netdev_priv(dev); | 1860 | struct lbs_private *priv = dev->ml_priv; |
1861 | s16 dbm = (s16) vwrq->value; | 1861 | s16 dbm = (s16) vwrq->value; |
1862 | 1862 | ||
1863 | lbs_deb_enter(LBS_DEB_WEXT); | 1863 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1936,7 +1936,7 @@ out: | |||
1936 | static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, | 1936 | static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, |
1937 | struct iw_point *dwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 1941 | lbs_deb_enter(LBS_DEB_WEXT); |
1942 | 1942 | ||
@@ -1971,7 +1971,7 @@ static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, | |||
1971 | static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, | 1971 | static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, |
1972 | struct iw_point *dwrq, char *extra) | 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 | int ret = 0; | 1975 | int ret = 0; |
1976 | u8 ssid[IW_ESSID_MAX_SIZE]; | 1976 | u8 ssid[IW_ESSID_MAX_SIZE]; |
1977 | u8 ssid_len = 0; | 1977 | u8 ssid_len = 0; |
@@ -2040,7 +2040,7 @@ static int lbs_mesh_get_essid(struct net_device *dev, | |||
2040 | struct iw_request_info *info, | 2040 | struct iw_request_info *info, |
2041 | struct iw_point *dwrq, char *extra) | 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 | lbs_deb_enter(LBS_DEB_WEXT); | 2045 | lbs_deb_enter(LBS_DEB_WEXT); |
2046 | 2046 | ||
@@ -2058,7 +2058,7 @@ static int lbs_mesh_set_essid(struct net_device *dev, | |||
2058 | struct iw_request_info *info, | 2058 | struct iw_request_info *info, |
2059 | struct iw_point *dwrq, char *extra) | 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 | int ret = 0; | 2062 | int ret = 0; |
2063 | 2063 | ||
2064 | lbs_deb_enter(LBS_DEB_WEXT); | 2064 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -2102,7 +2102,7 @@ static int lbs_mesh_set_essid(struct net_device *dev, | |||
2102 | static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, | 2102 | static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, |
2103 | struct sockaddr *awrq, char *extra) | 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 | struct assoc_request * assoc_req; | 2106 | struct assoc_request * assoc_req; |
2107 | int ret = 0; | 2107 | int ret = 0; |
2108 | 2108 | ||
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c index 45a04faa7818..067d1a9c728b 100644 --- a/drivers/net/wireless/orinoco/orinoco.c +++ b/drivers/net/wireless/orinoco/orinoco.c | |||
@@ -3157,8 +3157,20 @@ static int orinoco_pm_notifier(struct notifier_block *notifier, | |||
3157 | 3157 | ||
3158 | return NOTIFY_DONE; | 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 | #else /* !PM_SLEEP || HERMES_CACHE_FW_ON_INIT */ | 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 | #endif | 3174 | #endif |
3163 | 3175 | ||
3164 | /********************************************************************/ | 3176 | /********************************************************************/ |
@@ -3648,8 +3660,7 @@ struct net_device | |||
3648 | priv->cached_fw = NULL; | 3660 | priv->cached_fw = NULL; |
3649 | 3661 | ||
3650 | /* Register PM notifiers */ | 3662 | /* Register PM notifiers */ |
3651 | priv->pm_notifier.notifier_call = orinoco_pm_notifier; | 3663 | orinoco_register_pm_notifier(priv); |
3652 | register_pm_notifier(&priv->pm_notifier); | ||
3653 | 3664 | ||
3654 | return dev; | 3665 | return dev; |
3655 | } | 3666 | } |
@@ -3673,7 +3684,7 @@ void free_orinocodev(struct net_device *dev) | |||
3673 | kfree(rx_data); | 3684 | kfree(rx_data); |
3674 | } | 3685 | } |
3675 | 3686 | ||
3676 | unregister_pm_notifier(&priv->pm_notifier); | 3687 | orinoco_unregister_pm_notifier(priv); |
3677 | orinoco_uncache_fw(priv); | 3688 | orinoco_uncache_fw(priv); |
3678 | 3689 | ||
3679 | priv->wpa_ie_len = 0; | 3690 | priv->wpa_ie_len = 0; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 22bc07ef2f37..f4747a1134ba 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
@@ -48,6 +48,10 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { | |||
48 | {USB_DEVICE(0x0bda, 0x8189), .driver_info = DEVICE_RTL8187B}, | 48 | {USB_DEVICE(0x0bda, 0x8189), .driver_info = DEVICE_RTL8187B}, |
49 | {USB_DEVICE(0x0bda, 0x8197), .driver_info = DEVICE_RTL8187B}, | 49 | {USB_DEVICE(0x0bda, 0x8197), .driver_info = DEVICE_RTL8187B}, |
50 | {USB_DEVICE(0x0bda, 0x8198), .driver_info = DEVICE_RTL8187B}, | 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 | /* Netgear */ | 55 | /* Netgear */ |
52 | {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187}, | 56 | {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187}, |
53 | {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187}, | 57 | {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187}, |
@@ -57,8 +61,16 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { | |||
57 | /* Sitecom */ | 61 | /* Sitecom */ |
58 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, | 62 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, |
59 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, | 63 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, |
64 | /* Sphairon Access Systems GmbH */ | ||
65 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, | ||
66 | /* Dick Smith Electronics */ | ||
67 | {USB_DEVICE(0x1371, 0x9401), .driver_info = DEVICE_RTL8187}, | ||
60 | /* Abocom */ | 68 | /* Abocom */ |
61 | {USB_DEVICE(0x13d1, 0xabe6), .driver_info = DEVICE_RTL8187}, | 69 | {USB_DEVICE(0x13d1, 0xabe6), .driver_info = DEVICE_RTL8187}, |
70 | /* Qcom */ | ||
71 | {USB_DEVICE(0x18E8, 0x6232), .driver_info = DEVICE_RTL8187}, | ||
72 | /* AirLive */ | ||
73 | {USB_DEVICE(0x1b75, 0x8187), .driver_info = DEVICE_RTL8187}, | ||
62 | {} | 74 | {} |
63 | }; | 75 | }; |
64 | 76 | ||