Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Oct 2009 22:03:17 +0000 (15:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Oct 2009 22:03:17 +0000 (15:03 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (53 commits)
  vmxnet: fix 2 build problems
  net: add support for STMicroelectronics Ethernet controllers.
  net: ks8851_mll uses mii interfaces
  net/fec_mpc52xx: Fix kernel panic on FEC error
  net: Fix OF platform drivers coldplug/hotplug when compiled as modules
  TI DaVinci EMAC: Clear statistics register properly.
  r8169: partial support and phy init for the 8168d
  irda/sa1100_ir: check return value of startup hook
  udp: Fix udp_poll() and ioctl()
  WAN: fix Cisco HDLC handshaking.
  tcp: fix tcp_defer_accept to consider the timeout
  3c574_cs: spin_lock the set_multicast_list function
  net: Teach pegasus driver to ignore bluetoother adapters with clashing Vendor:Product IDs
  netxen: fix pci bar mapping
  ethoc: fix warning from 32bit build
  libertas: fix build
  net: VMware virtual Ethernet NIC driver: vmxnet3
  net: Fix IXP 2000 network driver building.
  libertas: fix build
  mac80211: document ieee80211_rx() context requirement
  ...

1  2 
MAINTAINERS
drivers/net/ethoc.c
drivers/net/wireless/b43/pio.c
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

diff --combined MAINTAINERS
@@@ -257,13 -257,6 +257,13 @@@ W:       http://www.lesswatts.org/projects/ac
  S:    Supported
  F:    drivers/acpi/fan.c
  
 +ACPI PROCESSOR AGGREGATOR DRIVER
 +M:    Shaohua Li <shaohua.li@intel.com>
 +L:    linux-acpi@vger.kernel.org
 +W:    http://www.lesswatts.org/projects/acpi/
 +S:    Supported
 +F:    drivers/acpi/acpi_pad.c
 +
  ACPI THERMAL DRIVER
  M:    Zhang Rui <rui.zhang@intel.com>
  L:    linux-acpi@vger.kernel.org
@@@ -577,11 -570,6 +577,11 @@@ M:       Mike Rapoport <mike@compulab.co.il
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  
 +ARM/CONTEC MICRO9 MACHINE SUPPORT
 +M:    Hubert Feurstein <hubert.feurstein@contec.at>
 +S:    Maintained
 +F:    arch/arm/mach-ep93xx/micro9.c
 +
  ARM/CORGI MACHINE SUPPORT
  M:    Richard Purdie <rpurdie@rpsys.net>
  S:    Maintained
@@@ -658,24 -646,24 +658,24 @@@ ARM/INTEL IOP32X ARM ARCHITECTUR
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  M:    Dan Williams <dan.j.williams@intel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Supported
 +S:    Maintained
  
  ARM/INTEL IOP33X ARM ARCHITECTURE
  M:    Dan Williams <dan.j.williams@intel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Supported
 +S:    Maintained
  
  ARM/INTEL IOP13XX ARM ARCHITECTURE
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  M:    Dan Williams <dan.j.williams@intel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Supported
 +S:    Maintained
  
  ARM/INTEL IQ81342EX MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  M:    Dan Williams <dan.j.williams@intel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Supported
 +S:    Maintained
  
  ARM/INTEL IXP2000 ARM ARCHITECTURE
  M:    Lennert Buytenhek <kernel@wantstofly.org>
@@@ -695,7 -683,7 +695,7 @@@ S: Maintaine
  ARM/INTEL IXP4XX ARM ARCHITECTURE
  M:    Imre Kaloz <kaloz@openwrt.org>
  M:    Krzysztof Halasa <khc@pm.waw.pl>
 -L:    linux-arm-kernel@lists.infradead.org
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-ixp4xx/
  
@@@ -703,7 -691,7 +703,7 @@@ ARM/INTEL XSC3 (MANZANO) ARM COR
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  M:    Dan Williams <dan.j.williams@intel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Supported
 +S:    Maintained
  
  ARM/IP FABRICS DOUBLE ESPRESSO MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
@@@ -752,37 -740,20 +752,37 @@@ M:      Dmitry Eremin-Solenikov <dbaryshkov@
  M:    Dirk Opfer <dirk@opfer-online.de>
  S:    Maintained
  
 -ARM/PALMTX,PALMT5,PALMLD,PALMTE2 SUPPORT
 +ARM/PALMTX,PALMT5,PALMLD,PALMTE2,PALMTC SUPPORT
  M:    Marek Vasut <marek.vasut@gmail.com>
 +L:    linux-arm-kernel@lists.infradead.org
  W:    http://hackndev.com
  S:    Maintained
 +F:    arch/arm/mach-pxa/include/mach/palmtx.h
 +F:    arch/arm/mach-pxa/palmtx.c
 +F:    arch/arm/mach-pxa/include/mach/palmt5.h
 +F:    arch/arm/mach-pxa/palmt5.c
 +F:    arch/arm/mach-pxa/include/mach/palmld.h
 +F:    arch/arm/mach-pxa/palmld.c
 +F:    arch/arm/mach-pxa/include/mach/palmte2.h
 +F:    arch/arm/mach-pxa/palmte2.c
 +F:    arch/arm/mach-pxa/include/mach/palmtc.h
 +F:    arch/arm/mach-pxa/palmtc.c
  
  ARM/PALM TREO 680 SUPPORT
  M:    Tomas Cech <sleep_walker@suse.cz>
 +L:    linux-arm-kernel@lists.infradead.org
  W:    http://hackndev.com
  S:    Maintained
 +F:    arch/arm/mach-pxa/include/mach/treo680.h
 +F:    arch/arm/mach-pxa/treo680.c
  
  ARM/PALMZ72 SUPPORT
  M:    Sergey Lapin <slapin@ossfans.org>
 +L:    linux-arm-kernel@lists.infradead.org
  W:    http://hackndev.com
  S:    Maintained
 +F:    arch/arm/mach-pxa/include/mach/palmz72.h
 +F:    arch/arm/mach-pxa/palmz72.c
  
  ARM/PLEB SUPPORT
  M:    Peter Chubb <pleb@gelato.unsw.edu.au>
@@@ -1236,13 -1207,6 +1236,13 @@@ L:    netdev@vger.kernel.or
  S:    Supported
  F:    drivers/net/tg3.*
  
 +BROCADE BFA FC SCSI DRIVER
 +P:      Jing Huang
 +M:      huangj@brocade.com
 +L:      linux-scsi@vger.kernel.org
 +S:      Supported
 +F:      drivers/scsi/bfa/
 +
  BSG (block layer generic sg v4 driver)
  M:    FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
  L:    linux-scsi@vger.kernel.org
@@@ -2070,7 -2034,7 +2070,7 @@@ S:      Maintaine
  F:    fs/*
  
  FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER
 -M:    Riku Voipio <riku.vipio@iki.fi>
 +M:    Riku Voipio <riku.voipio@iki.fi>
  L:    lm-sensors@lm-sensors.org
  S:    Maintained
  F:    drivers/hwmon/f75375s.c
@@@ -2615,7 -2579,6 +2615,7 @@@ L:      linux1394-devel@lists.sourceforge.ne
  W:    http://www.linux1394.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
  S:    Maintained
 +F:    Documentation/debugging-via-ohci1394.txt
  F:    drivers/ieee1394/
  
  IEEE 1394 RAW I/O DRIVER
@@@ -2715,7 -2678,7 +2715,7 @@@ F:      include/linux/intel-iommu.
  
  INTEL IOP-ADMA DMA DRIVER
  M:    Dan Williams <dan.j.williams@intel.com>
 -S:    Supported
 +S:    Maintained
  F:    drivers/dma/iop-adma.c
  
  INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT
@@@ -3667,6 -3630,7 +3667,7 @@@ NETWORKING [GENERAL
  M:    "David S. Miller" <davem@davemloft.net>
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net
+ W:    http://patchwork.ozlabs.org/project/netdev/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
  S:    Maintained
  F:    net/
@@@ -3993,7 -3957,6 +3994,7 @@@ F:      drivers/block/paride
  PARISC ARCHITECTURE
  M:    Kyle McMartin <kyle@mcmartin.ca>
  M:    Helge Deller <deller@gmx.de>
 +M:    "James E.J. Bottomley" <jejb@parisc-linux.org>
  L:    linux-parisc@vger.kernel.org
  W:    http://www.parisc-linux.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6.git
@@@ -4077,13 -4040,6 +4078,13 @@@ M:    Peter Zijlstra <a.p.zijlstra@chello.
  M:    Paul Mackerras <paulus@samba.org>
  M:    Ingo Molnar <mingo@elte.hu>
  S:    Supported
 +F:    kernel/perf_event.c
 +F:    include/linux/perf_event.h
 +F:    arch/*/*/kernel/perf_event.c
 +F:    arch/*/include/asm/perf_event.h
 +F:    arch/*/lib/perf_event.c
 +F:    arch/*/kernel/perf_callchain.c
 +F:    tools/perf/
  
  PERSONALITY HANDLING
  M:    Christoph Hellwig <hch@infradead.org>
@@@ -4666,14 -4622,6 +4667,14 @@@ F:    drivers/ata
  F:    include/linux/ata.h
  F:    include/linux/libata.h
  
 +SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
 +P:     Jayamohan Kallickal
 +M:     jayamohank@serverengines.com
 +L:     linux-scsi@vger.kernel.org
 +W:     http://www.serverengines.com
 +S:     Supported
 +F:     drivers/scsi/be2iscsi/
 +
  SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER
  M:    Sathya Perla <sathyap@serverengines.com>
  M:    Subbu Seetharaman <subbus@serverengines.com>
@@@ -5664,6 -5612,13 +5665,13 @@@ S:    Maintaine
  F:    drivers/vlynq/vlynq.c
  F:    include/linux/vlynq.h
  
+ VMWARE VMXNET3 ETHERNET DRIVER
+ M:     Shreyas Bhatewara <sbhatewara@vmware.com>
+ M:     VMware, Inc. <pv-drivers@vmware.com>
+ L:     netdev@vger.kernel.org
+ S:     Maintained
+ F:     drivers/net/vmxnet3/
  VOLTAGE AND CURRENT REGULATOR FRAMEWORK
  M:    Liam Girdwood <lrg@slimlogic.co.uk>
  M:    Mark Brown <broonie@opensource.wolfsonmicro.com>
diff --combined drivers/net/ethoc.c
@@@ -17,7 -17,6 +17,7 @@@
  #include <linux/mii.h>
  #include <linux/phy.h>
  #include <linux/platform_device.h>
 +#include <linux/sched.h>
  #include <net/ethoc.h>
  
  static int buffer_size = 0x8000; /* 32 KBytes */
@@@ -664,7 -663,8 +664,8 @@@ static int ethoc_open(struct net_devic
                return ret;
  
        /* calculate the number of TX/RX buffers, maximum 128 supported */
-       num_bd = min(128, (dev->mem_end - dev->mem_start + 1) / ETHOC_BUFSIZ);
+       num_bd = min_t(unsigned int,
+               128, (dev->mem_end - dev->mem_start + 1) / ETHOC_BUFSIZ);
        priv->num_tx = max(min_tx, num_bd / 4);
        priv->num_rx = num_bd - priv->num_tx;
        ethoc_write(priv, TX_BD_NUM, priv->num_tx);
@@@ -30,7 -30,6 +30,7 @@@
  #include "xmit.h"
  
  #include <linux/delay.h>
 +#include <linux/sched.h>
  
  
  static u16 generate_cookie(struct b43_pio_txqueue *q,
@@@ -332,6 -331,7 +332,7 @@@ static u16 tx_write_2byte_queue(struct 
                                unsigned int data_len)
  {
        struct b43_wldev *dev = q->dev;
+       struct b43_wl *wl = dev->wl;
        const u8 *data = _data;
  
        ctl |= B43_PIO_TXCTL_WRITELO | B43_PIO_TXCTL_WRITEHI;
                        q->mmio_base + B43_PIO_TXDATA,
                        sizeof(u16));
        if (data_len & 1) {
                /* Write the last byte. */
                ctl &= ~B43_PIO_TXCTL_WRITEHI;
                b43_piotx_write16(q, B43_PIO_TXCTL, ctl);
-               tail[0] = data[data_len - 1];
-               ssb_block_write(dev->dev, tail, 2,
+               wl->tx_tail[0] = data[data_len - 1];
+               wl->tx_tail[1] = 0;
+               ssb_block_write(dev->dev, wl->tx_tail, 2,
                                q->mmio_base + B43_PIO_TXDATA,
                                sizeof(u16));
        }
@@@ -382,6 -381,7 +382,7 @@@ static u32 tx_write_4byte_queue(struct 
                                unsigned int data_len)
  {
        struct b43_wldev *dev = q->dev;
+       struct b43_wl *wl = dev->wl;
        const u8 *data = _data;
  
        ctl |= B43_PIO8_TXCTL_0_7 | B43_PIO8_TXCTL_8_15 |
                        q->mmio_base + B43_PIO8_TXDATA,
                        sizeof(u32));
        if (data_len & 3) {
-               u8 tail[4] = { 0, };
+               wl->tx_tail[3] = 0;
                /* Write the last few bytes. */
                ctl &= ~(B43_PIO8_TXCTL_8_15 | B43_PIO8_TXCTL_16_23 |
                         B43_PIO8_TXCTL_24_31);
                switch (data_len & 3) {
                case 3:
                        ctl |= B43_PIO8_TXCTL_16_23 | B43_PIO8_TXCTL_8_15;
-                       tail[0] = data[data_len - 3];
-                       tail[1] = data[data_len - 2];
-                       tail[2] = data[data_len - 1];
+                       wl->tx_tail[0] = data[data_len - 3];
+                       wl->tx_tail[1] = data[data_len - 2];
+                       wl->tx_tail[2] = data[data_len - 1];
                        break;
                case 2:
                        ctl |= B43_PIO8_TXCTL_8_15;
-                       tail[0] = data[data_len - 2];
-                       tail[1] = data[data_len - 1];
+                       wl->tx_tail[0] = data[data_len - 2];
+                       wl->tx_tail[1] = data[data_len - 1];
+                       wl->tx_tail[2] = 0;
                        break;
                case 1:
-                       tail[0] = data[data_len - 1];
+                       wl->tx_tail[0] = data[data_len - 1];
+                       wl->tx_tail[1] = 0;
+                       wl->tx_tail[2] = 0;
                        break;
                }
                b43_piotx_write32(q, B43_PIO8_TXCTL, ctl);
-               ssb_block_write(dev->dev, tail, 4,
+               ssb_block_write(dev->dev, wl->tx_tail, 4,
                                q->mmio_base + B43_PIO8_TXDATA,
                                sizeof(u32));
        }
@@@ -446,8 -448,9 +449,9 @@@ static void pio_tx_frame_4byte_queue(st
  static int pio_tx_frame(struct b43_pio_txqueue *q,
                        struct sk_buff *skb)
  {
+       struct b43_wldev *dev = q->dev;
+       struct b43_wl *wl = dev->wl;
        struct b43_pio_txpacket *pack;
-       struct b43_txhdr txhdr;
        u16 cookie;
        int err;
        unsigned int hdrlen;
                          struct b43_pio_txpacket, list);
  
        cookie = generate_cookie(q, pack);
-       hdrlen = b43_txhdr_size(q->dev);
-       err = b43_generate_txhdr(q->dev, (u8 *)&txhdr, skb,
+       hdrlen = b43_txhdr_size(dev);
+       err = b43_generate_txhdr(dev, (u8 *)&wl->txhdr, skb,
                                 info, cookie);
        if (err)
                return err;
        if (info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) {
                /* Tell the firmware about the cookie of the last
                 * mcast frame, so it can clear the more-data bit in it. */
-               b43_shm_write16(q->dev, B43_SHM_SHARED,
+               b43_shm_write16(dev, B43_SHM_SHARED,
                                B43_SHM_SH_MCASTCOOKIE, cookie);
        }
  
        pack->skb = skb;
        if (q->rev >= 8)
-               pio_tx_frame_4byte_queue(pack, (const u8 *)&txhdr, hdrlen);
+               pio_tx_frame_4byte_queue(pack, (const u8 *)&wl->txhdr, hdrlen);
        else
-               pio_tx_frame_2byte_queue(pack, (const u8 *)&txhdr, hdrlen);
+               pio_tx_frame_2byte_queue(pack, (const u8 *)&wl->txhdr, hdrlen);
  
        /* Remove it from the list of available packet slots.
         * It will be put back when we receive the status report. */
@@@ -615,14 -618,14 +619,14 @@@ void b43_pio_get_tx_stats(struct b43_wl
  static bool pio_rx_frame(struct b43_pio_rxqueue *q)
  {
        struct b43_wldev *dev = q->dev;
-       struct b43_rxhdr_fw4 rxhdr;
+       struct b43_wl *wl = dev->wl;
        u16 len;
        u32 macstat;
        unsigned int i, padding;
        struct sk_buff *skb;
        const char *err_msg = NULL;
  
-       memset(&rxhdr, 0, sizeof(rxhdr));
+       memset(&wl->rxhdr, 0, sizeof(wl->rxhdr));
  
        /* Check if we have data and wait for it to get ready. */
        if (q->rev >= 8) {
@@@ -660,16 -663,16 +664,16 @@@ data_ready
  
        /* Get the preamble (RX header) */
        if (q->rev >= 8) {
-               ssb_block_read(dev->dev, &rxhdr, sizeof(rxhdr),
+               ssb_block_read(dev->dev, &wl->rxhdr, sizeof(wl->rxhdr),
                               q->mmio_base + B43_PIO8_RXDATA,
                               sizeof(u32));
        } else {
-               ssb_block_read(dev->dev, &rxhdr, sizeof(rxhdr),
+               ssb_block_read(dev->dev, &wl->rxhdr, sizeof(wl->rxhdr),
                               q->mmio_base + B43_PIO_RXDATA,
                               sizeof(u16));
        }
        /* Sanity checks. */
-       len = le16_to_cpu(rxhdr.frame_len);
+       len = le16_to_cpu(wl->rxhdr.frame_len);
        if (unlikely(len > 0x700)) {
                err_msg = "len > 0x700";
                goto rx_error;
                goto rx_error;
        }
  
-       macstat = le32_to_cpu(rxhdr.mac_status);
+       macstat = le32_to_cpu(wl->rxhdr.mac_status);
        if (macstat & B43_RX_MAC_FCSERR) {
                if (!(q->dev->wl->filter_flags & FIF_FCSFAIL)) {
                        /* Drop frames with failed FCS. */
                               q->mmio_base + B43_PIO8_RXDATA,
                               sizeof(u32));
                if (len & 3) {
-                       u8 tail[4] = { 0, };
                        /* Read the last few bytes. */
-                       ssb_block_read(dev->dev, tail, 4,
+                       ssb_block_read(dev->dev, wl->rx_tail, 4,
                                       q->mmio_base + B43_PIO8_RXDATA,
                                       sizeof(u32));
                        switch (len & 3) {
                        case 3:
-                               skb->data[len + padding - 3] = tail[0];
-                               skb->data[len + padding - 2] = tail[1];
-                               skb->data[len + padding - 1] = tail[2];
+                               skb->data[len + padding - 3] = wl->rx_tail[0];
+                               skb->data[len + padding - 2] = wl->rx_tail[1];
+                               skb->data[len + padding - 1] = wl->rx_tail[2];
                                break;
                        case 2:
-                               skb->data[len + padding - 2] = tail[0];
-                               skb->data[len + padding - 1] = tail[1];
+                               skb->data[len + padding - 2] = wl->rx_tail[0];
+                               skb->data[len + padding - 1] = wl->rx_tail[1];
                                break;
                        case 1:
-                               skb->data[len + padding - 1] = tail[0];
+                               skb->data[len + padding - 1] = wl->rx_tail[0];
                                break;
                        }
                }
                               q->mmio_base + B43_PIO_RXDATA,
                               sizeof(u16));
                if (len & 1) {
-                       u8 tail[2] = { 0, };
                        /* Read the last byte. */
-                       ssb_block_read(dev->dev, tail, 2,
+                       ssb_block_read(dev->dev, wl->rx_tail, 2,
                                       q->mmio_base + B43_PIO_RXDATA,
                                       sizeof(u16));
-                       skb->data[len + padding - 1] = tail[0];
+                       skb->data[len + padding - 1] = wl->rx_tail[0];
                }
        }
  
-       b43_rx(q->dev, skb, &rxhdr);
+       b43_rx(q->dev, skb, &wl->rxhdr);
  
        return 1;
  
@@@ -30,7 -30,6 +30,7 @@@
  #include <linux/pci.h>
  #include <linux/dma-mapping.h>
  #include <linux/delay.h>
 +#include <linux/sched.h>
  #include <linux/skbuff.h>
  #include <linux/netdevice.h>
  #include <linux/wireless.h>
@@@ -611,7 -610,7 +611,7 @@@ static void iwl3945_rx_reply_rx(struct 
        if (rx_status.band == IEEE80211_BAND_5GHZ)
                rx_status.rate_idx -= IWL_FIRST_OFDM_RATE;
  
-       rx_status.antenna = le16_to_cpu(rx_hdr->phy_flags &
+       rx_status.antenna = (le16_to_cpu(rx_hdr->phy_flags) &
                                        RX_RES_PHY_FLAGS_ANTENNA_MSK) >> 4;
  
        /* set the preamble flag if appropriate */
@@@ -29,7 -29,6 +29,7 @@@
  #include <linux/pci.h>
  #include <linux/dma-mapping.h>
  #include <linux/delay.h>
 +#include <linux/sched.h>
  #include <linux/skbuff.h>
  #include <linux/netdevice.h>
  #include <linux/wireless.h>
@@@ -318,7 -317,7 +318,7 @@@ static void iwl5000_gain_computation(st
                        (s32)average_noise[i])) / 1500;
                /* bound gain by 2 bits value max, 3rd bit is sign */
                data->delta_gain_code[i] =
-                       min(abs(delta_g), CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
+                       min(abs(delta_g), (long) CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
  
                if (delta_g < 0)
                        /* set negative sign */
@@@ -33,7 -33,6 +33,7 @@@
  #include <linux/pci.h>
  #include <linux/dma-mapping.h>
  #include <linux/delay.h>
 +#include <linux/sched.h>
  #include <linux/skbuff.h>
  #include <linux/netdevice.h>
  #include <linux/wireless.h>
@@@ -3106,8 -3105,8 +3106,8 @@@ static int iwl_pci_probe(struct pci_de
   out_pci_disable_device:
        pci_disable_device(pdev);
   out_ieee80211_free_hw:
-       ieee80211_free_hw(priv->hw);
        iwl_free_traffic_mem(priv);
+       ieee80211_free_hw(priv->hw);
   out:
        return err;
  }
@@@ -33,7 -33,6 +33,7 @@@
  #include <linux/pci.h>
  #include <linux/dma-mapping.h>
  #include <linux/delay.h>
 +#include <linux/sched.h>
  #include <linux/skbuff.h>
  #include <linux/netdevice.h>
  #include <linux/wireless.h>
@@@ -4097,8 -4096,8 +4097,8 @@@ static int iwl3945_pci_probe(struct pci
        pci_set_drvdata(pdev, NULL);
        pci_disable_device(pdev);
   out_ieee80211_free_hw:
-       ieee80211_free_hw(priv->hw);
        iwl_free_traffic_mem(priv);
+       ieee80211_free_hw(priv->hw);
   out:
        return err;
  }