]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorDavid S. Miller <davem@davemloft.net>
Fri, 26 Feb 2010 07:26:21 +0000 (23:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Feb 2010 07:26:21 +0000 (23:26 -0800)
Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/rt2x00/rt2800pci.c

25 files changed:
1  2 
MAINTAINERS
drivers/net/wireless/airo.c
drivers/net/wireless/ath/ath9k/rc.c
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-3945.h
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-rx.c
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/rt2x00/rt2400pci.c
drivers/net/wireless/rt2x00/rt2400pci.h
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt2500pci.h
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt61pci.h
drivers/net/wireless/rt2x00/rt73usb.h
drivers/staging/rtl8192su/ieee80211/ieee80211.h
drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192su/r8192U_core.c
net/wireless/nl80211.c

diff --combined MAINTAINERS
index 2a479c7005b82187437a64b74c75fe16a361f0da,2b4a4d2f2eceef4b42dd1900881bd7dbcf85ca8e..6bd1cd5c60df74404ae32e9f623606195dcd120a
@@@ -327,13 -327,6 +327,13 @@@ M:       Colin Leroy <colin@colino.net
  S:    Maintained
  F:    drivers/macintosh/therm_adt746x.c
  
 +ADT7475 HARDWARE MONITOR DRIVER
 +M:    Jean Delvare <khali@linux-fr.org>
 +L:    lm-sensors@lm-sensors.org
 +S:    Maintained
 +F:    Documentation/hwmon/adt7475
 +F:    drivers/hwmon/adt7475.c
 +
  ADVANSYS SCSI DRIVER
  M:    Matthew Wilcox <matthew@wil.cx>
  L:    linux-scsi@vger.kernel.org
@@@ -410,8 -403,9 +410,8 @@@ F: drivers/i2c/busses/i2c-ali1563.
  
  ALPHA PORT
  M:    Richard Henderson <rth@twiddle.net>
 -S:    Odd Fixes for 2.4; Maintained for 2.6.
  M:    Ivan Kokshaysky <ink@jurassic.park.msu.ru>
 -S:    Maintained for 2.4; PCI support for 2.6.
 +M:    Matt Turner <mattst88@gmail.com>
  L:    linux-alpha@vger.kernel.org
  F:    arch/alpha/
  
@@@ -492,6 -486,13 +492,6 @@@ S:        Maintaine
  F:    drivers/net/appletalk/
  F:    net/appletalk/
  
 -APPLETOUCH TOUCHPAD DRIVER
 -M:    Johannes Berg <johannes@sipsolutions.net>
 -L:    linux-input@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/input/appletouch.txt
 -F:    drivers/input/mouse/appletouch.c
 -
  ARC FRAMEBUFFER DRIVER
  M:    Jaya Kumar <jayalk@intworks.biz>
  S:    Maintained
@@@ -800,19 -801,6 +800,19 @@@ L:       openmoko-kernel@lists.openmoko.org (
  W:    http://wiki.openmoko.org/wiki/Neo_FreeRunner
  S:    Supported
  
 +ARM/QUALCOMM MSM MACHINE SUPPORT
 +M:    David Brown <davidb@codeaurora.org>
 +M:    Daniel Walker <dwalker@codeaurora.org>
 +M:    Bryan Huntsman <bryanh@codeaurora.org>
 +F:    arch/arm/mach-msm/
 +F:    drivers/video/msm/
 +F:    drivers/mmc/host/msm_sdcc.c
 +F:    drivers/mmc/host/msm_sdcc.h
 +F:    drivers/serial/msm_serial.h
 +F:    drivers/serial/msm_serial.c
 +T:    git git://codeaurora.org/quic/kernel/dwalker/linux-msm.git
 +S:    Maintained
 +
  ARM/TOSA MACHINE SUPPORT
  M:    Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
  M:    Dirk Opfer <dirk@opfer-online.de>
@@@ -834,13 -822,13 +834,13 @@@ F:      arch/arm/mach-pxa/palmte2.
  F:    arch/arm/mach-pxa/include/mach/palmtc.h
  F:    arch/arm/mach-pxa/palmtc.c
  
 -ARM/PALM TREO 680 SUPPORT
 +ARM/PALM TREO 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
 +F:    arch/arm/mach-pxa/include/mach/palmtreo.h
 +F:    arch/arm/mach-pxa/palmtreo.c
  
  ARM/PALMZ72 SUPPORT
  M:    Sergey Lapin <slapin@ossfans.org>
@@@ -987,6 -975,7 +987,6 @@@ F: drivers/platform/x86/asus-laptop.
  
  ASYNCHRONOUS TRANSFERS/TRANSFORMS (IOAT) API
  M:    Dan Williams <dan.j.williams@intel.com>
 -M:    Maciej Sosnowski <maciej.sosnowski@intel.com>
  W:    http://sourceforge.net/projects/xscaleiop
  S:    Supported
  F:    Documentation/crypto/async-tx-api.txt
@@@ -1400,8 -1389,6 +1400,8 @@@ L:      linux-usb@vger.kernel.or
  S:    Supported
  F:    Documentation/usb/WUSB-Design-overview.txt
  F:    Documentation/usb/wusb-cbaf
 +F:    drivers/usb/host/hwa-hc.c
 +F:    drivers/usb/host/whci/
  F:    drivers/usb/wusbcore/
  F:    include/linux/usb/wusb*
  
@@@ -1470,12 -1457,6 +1470,12 @@@ L:    linux-scsi@vger.kernel.or
  S:    Supported
  F:    drivers/scsi/fnic/
  
 +CMPC ACPI DRIVER
 +M:    Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
 +M:    Daniel Oliveira Nascimento <don@syst.com.br>
 +S:    Supported
 +F:    drivers/platform/x86/classmate-laptop.c
 +
  CODA FILE SYSTEM
  M:    Jan Harkes <jaharkes@cs.cmu.edu>
  M:    coda@cs.cmu.edu
@@@ -1488,8 -1469,8 +1488,8 @@@ F:      include/linux/coda*.
  
  COMMON INTERNET FILE SYSTEM (CIFS)
  M:    Steve French <sfrench@samba.org>
 -L:    linux-cifs-client@lists.samba.org
 -L:    samba-technical@lists.samba.org
 +L:    linux-cifs-client@lists.samba.org (moderated for non-subscribers)
 +L:    samba-technical@lists.samba.org (moderated for non-subscribers)
  W:    http://linux-cifs.samba.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
  S:    Supported
@@@ -1636,8 -1617,9 +1636,8 @@@ S:      Maintaine
  F:    sound/pci/cs5535audio/
  
  CX18 VIDEO4LINUX DRIVER
 -M:    Hans Verkuil <hverkuil@xs4all.nl>
  M:    Andy Walls <awalls@radix.net>
 -L:    ivtv-devel@ivtvdriver.org
 +L:    ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
  L:    linux-media@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
  W:    http://linuxtv.org
@@@ -1733,9 -1715,10 +1733,9 @@@ F:     include/linux/tfrc.
  F:    net/dccp/
  
  DECnet NETWORK LAYER
 -M:    Christine Caulfield <christine.caulfield@googlemail.com>
  W:    http://linux-decnet.sourceforge.net
  L:    linux-decnet-user@lists.sourceforge.net
 -S:    Maintained
 +S:    Orphan
  F:    Documentation/networking/decnet.txt
  F:    net/decnet/
  
@@@ -1821,6 -1804,7 +1821,6 @@@ S:      Supporte
  F:    fs/dlm/
  
  DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
 -M:    Maciej Sosnowski <maciej.sosnowski@intel.com>
  M:    Dan Williams <dan.j.williams@intel.com>
  S:    Supported
  F:    drivers/dma/
@@@ -2164,9 -2148,10 +2164,9 @@@ F:     drivers/hwmon/f75375s.
  F:    include/linux/f75375s.h
  
  FIREWIRE SUBSYSTEM
 -M:    Kristian Hoegsberg <krh@redhat.com>
  M:    Stefan Richter <stefanr@s5r6.in-berlin.de>
  L:    linux1394-devel@lists.sourceforge.net
 -W:    http://www.linux1394.org/
 +W:    http://ieee1394.wiki.kernel.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
  S:    Maintained
  F:    drivers/firewire/
@@@ -2372,12 -2357,6 +2372,12 @@@ F:    Documentation/isdn/README.gigase
  F:    drivers/isdn/gigaset/
  F:    include/linux/gigaset_dev.h
  
 +GRETH 10/100/1G Ethernet MAC device driver
 +M:    Kristoffer Glembo <kristoffer@gaisler.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/greth*
 +
  HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER
  M:    Frank Seidel <frank@f-seidel.de>
  L:    lm-sensors@lm-sensors.org
@@@ -2385,15 -2364,6 +2385,15 @@@ W:    http://www.kernel.org/pub/linux/kern
  S:    Maintained
  F:    drivers/hwmon/hdaps.c
  
 +HWPOISON MEMORY FAILURE HANDLING
 +M:    Andi Kleen <andi@firstfloor.org>
 +L:    linux-mm@kvack.org
 +L:    linux-kernel@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6.git hwpoison
 +S:    Maintained
 +F:    mm/memory-failure.c
 +F:    mm/hwpoison-inject.c
 +
  HYPERVISOR VIRTUAL CONSOLE DRIVER
  L:    linuxppc-dev@ozlabs.org
  S:    Odd Fixes
@@@ -2453,9 -2423,7 +2453,9 @@@ HARDWARE MONITORIN
  L:    lm-sensors@lm-sensors.org
  W:    http://www.lm-sensors.org/
  S:    Orphan
 +F:    Documentation/hwmon/
  F:    drivers/hwmon/
 +F:    include/linux/hwmon*.h
  
  HARDWARE RANDOM NUMBER GENERATOR CORE
  M:    Matt Mackall <mpm@selenic.com>
@@@ -2705,14 -2673,22 +2705,14 @@@ S:   Supporte
  F:    drivers/idle/i7300_idle.c
  
  IEEE 1394 SUBSYSTEM
 -M:    Ben Collins <ben.collins@ubuntu.com>
  M:    Stefan Richter <stefanr@s5r6.in-berlin.de>
  L:    linux1394-devel@lists.sourceforge.net
 -W:    http://www.linux1394.org/
 +W:    http://ieee1394.wiki.kernel.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
 -S:    Maintained
 +S:    Obsolete
  F:    Documentation/debugging-via-ohci1394.txt
  F:    drivers/ieee1394/
  
 -IEEE 1394 RAW I/O DRIVER
 -M:    Dan Dennedy <dan@dennedy.org>
 -M:    Stefan Richter <stefanr@s5r6.in-berlin.de>
 -L:    linux1394-devel@lists.sourceforge.net
 -S:    Maintained
 -F:    drivers/ieee1394/raw1394*
 -
  IEEE 802.15.4 SUBSYSTEM
  M:    Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
  M:    Sergey Lapin <slapin@ossfans.org>
@@@ -2789,7 -2765,7 +2789,7 @@@ F:      arch/x86/kernel/microcode_core.
  F:    arch/x86/kernel/microcode_intel.c
  
  INTEL I/OAT DMA DRIVER
 -M:    Maciej Sosnowski <maciej.sosnowski@intel.com>
 +M:    Dan Williams <dan.j.williams@intel.com>
  S:    Supported
  F:    drivers/dma/ioat*
  
@@@ -2827,11 -2803,10 +2827,11 @@@ L:   netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/ixp2000/
  
 -INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/ixgb/ixgbe)
 +INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/igbvf/ixgb/ixgbe)
  M:    Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  M:    Jesse Brandeburg <jesse.brandeburg@intel.com>
  M:    Bruce Allan <bruce.w.allan@intel.com>
 +M:    Alex Duyck <alexander.h.duyck@intel.com>
  M:    PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
  M:    John Ronciak <john.ronciak@intel.com>
  L:    e1000-devel@lists.sourceforge.net
@@@ -2841,7 -2816,6 +2841,7 @@@ F:      drivers/net/e100.
  F:    drivers/net/e1000/
  F:    drivers/net/e1000e/
  F:    drivers/net/igb/
 +F:    drivers/net/igbvf/
  F:    drivers/net/ixgb/
  F:    drivers/net/ixgbe/
  
@@@ -3015,8 -2989,8 +3015,8 @@@ S:      Maintaine
  F:    drivers/isdn/hardware/eicon/
  
  IVTV VIDEO4LINUX DRIVER
 -M:    Hans Verkuil <hverkuil@xs4all.nl>
 -L:    ivtv-devel@ivtvdriver.org
 +M:    Andy Walls <awalls@radix.net>
 +L:    ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
  L:    linux-media@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
  W:    http://www.ivtvdriver.org
@@@ -3092,11 -3066,8 +3092,11 @@@ S:    Maintaine
  F:    fs/autofs4/
  
  KERNEL BUILD
 +M:    Michal Marek <mmarek@suse.cz>
 +T:    git git://repo.or.cz/linux-kbuild.git for-next
 +T:    git git://repo.or.cz/linux-kbuild.git for-linus
  L:    linux-kbuild@vger.kernel.org
 -S:    Orphan
 +S:    Maintained
  F:    Documentation/kbuild/
  F:    Makefile
  F:    scripts/Makefile.*
@@@ -3138,6 -3109,7 +3138,6 @@@ L:      kvm@vger.kernel.or
  W:    http://kvm.qumranet.com
  S:    Supported
  F:    arch/x86/include/asm/svm.h
 -F:    arch/x86/kvm/kvm_svm.h
  F:    arch/x86/kvm/svm.c
  
  KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC
@@@ -3167,7 -3139,6 +3167,7 @@@ S:      Supporte
  F:    Documentation/s390/kvm.txt
  F:    arch/s390/include/asm/kvm*
  F:    arch/s390/kvm/
 +F:    drivers/s390/kvm/
  
  KEXEC
  M:    Eric Biederman <ebiederm@xmission.com>
@@@ -3273,7 -3244,6 +3273,7 @@@ LINUX FOR IBM pSERIES (RS/6000
  M:    Paul Mackerras <paulus@au.ibm.com>
  W:    http://www.ibm.com/linux/ltc/projects/ppc
  S:    Supported
 +F:    arch/powerpc/boot/rs6000.h
  
  LINUX FOR POWERPC (32-BIT AND 64-BIT)
  M:    Benjamin Herrenschmidt <benh@kernel.crashing.org>
@@@ -3282,24 -3252,18 +3282,24 @@@ W:   http://www.penguinppc.org
  L:    linuxppc-dev@ozlabs.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  S:    Supported
 +F:    Documentation/powerpc/
 +F:    arch/powerpc/
  
  LINUX FOR POWER MACINTOSH
  M:    Benjamin Herrenschmidt <benh@kernel.crashing.org>
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@ozlabs.org
  S:    Maintained
 +F:    arch/powerpc/platforms/powermac/
 +F:    drivers/macintosh/
  
  LINUX FOR POWERPC EMBEDDED MPC5XXX
  M:    Grant Likely <grant.likely@secretlab.ca>
  L:    linuxppc-dev@ozlabs.org
  T:    git git://git.secretlab.ca/git/linux-2.6.git
  S:    Maintained
 +F:    arch/powerpc/platforms/512x/
 +F:    arch/powerpc/platforms/52xx/
  
  LINUX FOR POWERPC EMBEDDED PPC4XX
  M:    Josh Boyer <jwboyer@linux.vnet.ibm.com>
@@@ -3308,8 -3272,6 +3308,8 @@@ W:      http://www.penguinppc.org
  L:    linuxppc-dev@ozlabs.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
  S:    Maintained
 +F:    arch/powerpc/platforms/40x/
 +F:    arch/powerpc/platforms/44x/
  
  LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
  M:    Grant Likely <grant.likely@secretlab.ca>
@@@ -3317,8 -3279,6 +3317,8 @@@ W:      http://wiki.secretlab.ca/index.php/L
  L:    linuxppc-dev@ozlabs.org
  T:    git git://git.secretlab.ca/git/linux-2.6.git
  S:    Maintained
 +F:    arch/powerpc/*/*virtex*
 +F:    arch/powerpc/*/*/*virtex*
  
  LINUX FOR POWERPC EMBEDDED PPC8XX
  M:    Vitaly Bordug <vitb@kernel.crashing.org>
@@@ -3332,16 -3292,12 +3332,16 @@@ M:   Kumar Gala <galak@kernel.crashing.or
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@ozlabs.org
  S:    Maintained
 +F:    arch/powerpc/platforms/83xx/
  
  LINUX FOR POWERPC PA SEMI PWRFICIENT
  M:    Olof Johansson <olof@lixom.net>
  W:    http://www.pasemi.com/
  L:    linuxppc-dev@ozlabs.org
  S:    Supported
 +F:    arch/powerpc/platforms/pasemi/
 +F:    drivers/*/*pasemi*
 +F:    drivers/*/*/*pasemi*
  
  LINUX SECURITY MODULE (LSM) FRAMEWORK
  M:    Chris Wright <chrisw@sous-sol.org>
@@@ -3362,12 -3318,6 +3362,12 @@@ S:    Maintaine
  F:    Documentation/hwmon/lis3lv02d
  F:    drivers/hwmon/lis3lv02d.*
  
 +LM73 HARDWARE MONITOR DRIVER
 +M:    Guillaume Ligneul <guillaume.ligneul@gmail.com>
 +L:    lm-sensors@lm-sensors.org
 +S:    Maintained
 +F:    drivers/hwmon/lm73.c
 +
  LM83 HARDWARE MONITOR DRIVER
  M:    Jean Delvare <khali@linux-fr.org>
  L:    lm-sensors@lm-sensors.org
@@@ -3416,10 -3366,8 +3416,10 @@@ S:    Maintaine
  F:    drivers/scsi/sym53c8xx_2/
  
  LTP (Linux Test Project)
 -M:    Subrata Modak <subrata@linux.vnet.ibm.com>
 -M:    Mike Frysinger <vapier@gentoo.org>
 +M:    Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
 +M:    Garrett Cooper <yanegomi@gmail.com>
 +M:     Mike Frysinger <vapier@gentoo.org>
 +M:     Subrata Modak <subrata@linux.vnet.ibm.com>
  L:    ltp-list@lists.sourceforge.net (subscribers-only)
  W:    http://ltp.sourceforge.net/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git
@@@ -3495,9 -3443,9 +3495,9 @@@ S:      Maintaine
  F:    drivers/net/wireless/libertas/
  
  MARVELL MV643XX ETHERNET DRIVER
 -M:    Lennert Buytenhek <buytenh@marvell.com>
 +M:    Lennert Buytenhek <buytenh@wantstofly.org>
  L:    netdev@vger.kernel.org
 -S:    Supported
 +S:    Maintained
  F:    drivers/net/mv643xx_eth.*
  F:    include/linux/mv643xx.h
  
@@@ -3648,11 -3596,6 +3648,11 @@@ W:    http://0pointer.de/lennart/tchibo.ht
  S:    Maintained
  F:    drivers/platform/x86/msi-laptop.c
  
 +MSI WMI SUPPORT
 +M:    Anisse Astier <anisse@astier.eu>
 +S:    Supported
 +F:    drivers/platform/x86/msi-wmi.c
 +
  MULTIFUNCTION DEVICES (MFD)
  M:    Samuel Ortiz <sameo@linux.intel.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git
@@@ -3686,7 -3629,7 +3686,7 @@@ F:      include/linux/isicom.
  MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
  M:    Felipe Balbi <felipe.balbi@nokia.com>
  L:    linux-usb@vger.kernel.org
 -T:    git git://gitorious.org/musb/mainline.git
 +T:    git git://gitorious.org/usb/usb.git
  S:    Maintained
  F:    drivers/usb/musb/
  
@@@ -3843,7 -3786,6 +3843,7 @@@ NETWORKING DRIVER
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6.git
  S:    Odd Fixes
  F:    drivers/net/
  F:    include/linux/if_*
@@@ -3879,7 -3821,7 +3879,7 @@@ F:      drivers/net/ni5010.
  
  NILFS2 FILESYSTEM
  M:    KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
 -L:    users@nilfs.org
 +L:    linux-nilfs@vger.kernel.org
  W:    http://www.nilfs.org/en/
  S:    Supported
  F:    Documentation/filesystems/nilfs2.txt
@@@ -3946,20 -3888,12 +3946,20 @@@ S:   Maintaine
  F:    sound/soc/omap/
  
  OMAP FRAMEBUFFER SUPPORT
 -M:    Imre Deak <imre.deak@nokia.com>
 +M:    Tomi Valkeinen <tomi.valkeinen@nokia.com>
  L:    linux-fbdev@vger.kernel.org
  L:    linux-omap@vger.kernel.org
  S:    Maintained
  F:    drivers/video/omap/
  
 +OMAP DISPLAY SUBSYSTEM and FRAMEBUFFER SUPPORT (DSS2)
 +M:    Tomi Valkeinen <tomi.valkeinen@nokia.com>
 +L:    linux-omap@vger.kernel.org
 +L:    linux-fbdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/video/omap2/
 +F:    Documentation/arm/OMAP/DSS
 +
  OMAP MMC SUPPORT
  M:    Jarkko Lavinen <jarkko.lavinen@nokia.com>
  L:    linux-omap@vger.kernel.org
@@@ -4261,13 -4195,6 +4261,13 @@@ W:    http://www.pmc-sierra.com
  S:    Supported
  F:    drivers/scsi/pmcraid.*
  
 +PMC SIERRA PM8001 DRIVER
 +M:    jack_wang@usish.com
 +M:    lindar_liu@usish.com
 +L:    linux-scsi@vger.kernel.org
 +S:    Supported
 +F:    drivers/scsi/pm8001/
 +
  POSIX CLOCKS and TIMERS
  M:    Thomas Gleixner <tglx@linutronix.de>
  S:    Supported
@@@ -4451,13 -4378,6 +4451,13 @@@ S:    Supporte
  F:    Documentation/networking/LICENSE.qla3xxx
  F:    drivers/net/qla3xxx.*
  
 +QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
 +M:    Amit Kumar Salecha <amit.salecha@qlogic.com>
 +M:    linux-driver@qlogic.com
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/qlcnic/
 +
  QLOGIC QLGE 10Gb ETHERNET DRIVER
  M:    Ron Mercer <ron.mercer@qlogic.com>
  M:    linux-driver@qlogic.com
@@@ -4633,7 -4553,6 +4633,7 @@@ L:      linux-s390@vger.kernel.or
  W:    http://www.ibm.com/developerworks/linux/linux390/
  S:    Supported
  F:    arch/s390/
 +F:    drivers/s390/
  
  S390 NETWORK DRIVERS
  M:    Ursula Braun <ursula.braun@de.ibm.com>
@@@ -4649,7 -4568,6 +4649,7 @@@ M:      Felix Beck <felix.beck@de.ibm.com
  M:    Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
  M:    linux390@de.ibm.com
  L:    linux-s390@vger.kernel.org
 +W:    http://www.ibm.com/developerworks/linux/linux390/
  S:    Supported
  F:    drivers/s390/crypto/
  
@@@ -4844,8 -4762,6 +4844,8 @@@ F:      drivers/scsi/be2iscsi
  SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER
  M:    Sathya Perla <sathyap@serverengines.com>
  M:    Subbu Seetharaman <subbus@serverengines.com>
 +M:    Sarveshwar Bandi <sarveshwarb@serverengines.com>
 +M:    Ajit Khaparde <ajitk@serverengines.com>
  L:    netdev@vger.kernel.org
  W:    http://www.serverengines.com
  S:    Supported
@@@ -5101,7 -5017,6 +5101,7 @@@ F:      drivers/char/specialix
  
  SPI SUBSYSTEM
  M:    David Brownell <dbrownell@users.sourceforge.net>
 +M:    Grant Likely <grant.likely@secretlab.ca>
  L:    spi-devel-general@lists.sourceforge.net
  S:    Maintained
  F:    Documentation/spi/
@@@ -5402,7 -5317,7 +5402,7 @@@ S:      Maintaine
  F:    drivers/scsi/u14-34f.c
  
  UBI FILE SYSTEM (UBIFS)
 -M:    Artem Bityutskiy <dedekind@infradead.org>
 +M:    Artem Bityutskiy <dedekind1@gmail.com>
  M:    Adrian Hunter <adrian.hunter@nokia.com>
  L:    linux-mtd@lists.infradead.org
  T:    git git://git.infradead.org/ubifs-2.6.git
@@@ -5440,19 -5355,10 +5440,19 @@@ ULTRA-WIDEBAND (UWB) SUBSYSTEM
  M:    David Vrabel <david.vrabel@csr.com>
  L:    linux-usb@vger.kernel.org
  S:    Supported
 -F:    drivers/uwb/*
 +F:    drivers/uwb/
 +X:    drivers/uwb/wlp/
 +X:    drivers/uwb/i1480/i1480u-wlp/
 +X:    drivers/uwb/i1480/i1480-wlp.h
  F:    include/linux/uwb.h
  F:    include/linux/uwb/
  
 +UNIFDEF
 +M:    Tony Finch <dot@dotat.at>
 +W:    http://dotat.at/prog/unifdef
 +S:    Maintained
 +F:    scripts/unifdef.c
 +
  UNIFORM CDROM DRIVER
  M:    Jens Axboe <axboe@kernel.dk>
  W:    http://www.kernel.dk
@@@ -5462,7 -5368,7 +5462,7 @@@ F:      drivers/cdrom/cdrom.
  F:    include/linux/cdrom.h
  
  UNSORTED BLOCK IMAGES (UBI)
 -M:    Artem Bityutskiy <dedekind@infradead.org>
 +M:    Artem Bityutskiy <dedekind1@gmail.com>
  W:    http://www.linux-mtd.infradead.org/
  L:    linux-mtd@lists.infradead.org
  T:    git git://git.infradead.org/ubi-2.6.git
@@@ -5485,9 -5391,10 +5485,9 @@@ S:     Supporte
  F:    drivers/block/ub.c
  
  USB CDC ETHERNET DRIVER
 -M:    Greg Kroah-Hartman <greg@kroah.com>
 +M:    Oliver Neukum <oliver@neukum.name>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
 -W:    http://www.kroah.com/linux-usb/
  F:    drivers/net/usb/cdc_*.c
  F:    include/linux/usb/cdc.h
  
@@@ -5738,11 -5645,9 +5738,11 @@@ S:    Maintaine
  F:    drivers/net/wireless/rndis_wlan.c
  
  USB XHCI DRIVER
 -M:    Sarah Sharp <sarah.a.sharp@intel.com>
 +M:    Sarah Sharp <sarah.a.sharp@linux.intel.com>
  L:    linux-usb@vger.kernel.org
  S:    Supported
 +F:    drivers/usb/host/xhci*
 +F:    drivers/usb/host/pci-quirks*
  
  USB ZC0301 DRIVER
  M:    Luca Risolia <luca.risolia@studio.unibo.it>
@@@ -5811,15 -5716,6 +5811,15 @@@ S:    Maintaine
  F:    Documentation/filesystems/vfat.txt
  F:    fs/fat/
  
 +VIRTIO HOST (VHOST)
 +M:    "Michael S. Tsirkin" <mst@redhat.com>
 +L:    kvm@vger.kernel.org
 +L:    virtualization@lists.osdl.org
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/vhost/
 +F:    include/linux/vhost.h
 +
  VIA RHINE NETWORK DRIVER
  M:    Roger Luethi <rl@hellgate.ch>
  S:    Maintained
@@@ -5873,14 -5769,6 +5873,14 @@@ L:    netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/vmxnet3/
  
 +VMware PVSCSI driver
 +M:    Alok Kataria <akataria@vmware.com>
 +M:    VMware PV-Drivers <pv-drivers@vmware.com>
 +L:    linux-scsi@vger.kernel.org
 +S:    Maintained
 +F:    drivers/scsi/vmw_pvscsi.c
 +F:    drivers/scsi/vmw_pvscsi.h
 +
  VOLTAGE AND CURRENT REGULATOR FRAMEWORK
  M:    Liam Girdwood <lrg@slimlogic.co.uk>
  M:    Mark Brown <broonie@opensource.wolfsonmicro.com>
@@@ -5965,12 -5853,9 +5965,12 @@@ W:    http://linuxwimax.or
  
  WIMEDIA LLC PROTOCOL (WLP) SUBSYSTEM
  M:    David Vrabel <david.vrabel@csr.com>
 +L:    netdev@vger.kernel.org
  S:    Maintained
  F:    include/linux/wlp.h
  F:    drivers/uwb/wlp/
 +F:    drivers/uwb/i1480/i1480u-wlp/
 +F:    drivers/uwb/i1480/i1480-wlp.h
  
  WISTRON LAPTOP BUTTON DRIVER
  M:    Miloslav Trmac <mitr@volny.cz>
@@@ -5978,7 -5863,7 +5978,7 @@@ S:      Maintaine
  F:    drivers/input/misc/wistron_btns.c
  
  WL1251 WIRELESS DRIVER
- M:    Kalle Valo <kalle.valo@nokia.com>
+ M:    Kalle Valo <kalle.valo@iki.fi>
  L:    linux-wireless@vger.kernel.org
  W:    http://wireless.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
@@@ -6016,7 -5901,6 +6016,7 @@@ M:      Mark Brown <broonie@opensource.wolfs
  T:    git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
  W:    http://opensource.wolfsonmicro.com/node/8
  S:    Supported
 +F:    Documentation/hwmon/wm83??
  F:    drivers/leds/leds-wm83*.c
  F:    drivers/mfd/wm8*.c
  F:    drivers/power/wm83*.c
@@@ -6026,14 -5910,14 +6026,14 @@@ F:   drivers/video/backlight/wm83*_bl.
  F:    drivers/watchdog/wm83*_wdt.c
  F:    include/linux/mfd/wm831x/
  F:    include/linux/mfd/wm8350/
 -F:    include/linux/mfd/wm8400/
 -F:    sound/soc/codecs/wm8350.c
 -F:    sound/soc/codecs/wm8400.c
 +F:    include/linux/mfd/wm8400*
 +F:    sound/soc/codecs/wm8350.*
 +F:    sound/soc/codecs/wm8400.*
  
  X.25 NETWORK LAYER
 -M:    Henner Eisen <eis@baty.hanse.de>
 +M:    Andrew Hendry <andrew.hendry@gmail.com>
  L:    linux-x25@vger.kernel.org
 -S:    Maintained
 +S:    Odd Fixes
  F:    Documentation/networking/x25*
  F:    include/net/x25*
  F:    net/x25/
index c22a34c7639c362264309848d42eb9bca47dfb44,260fb9905e97f82222901242d6c9117767f511ae..698d5672a070e785d1c090eb39947b89acf0d7d5
  #include <linux/freezer.h>
  
  #include <linux/ieee80211.h>
+ #include <net/iw_handler.h>
  
  #include "airo.h"
  
  #define DRV_NAME "airo"
  
  #ifdef CONFIG_PCI
 -static struct pci_device_id card_ids[] = {
 +static DEFINE_PCI_DEVICE_TABLE(card_ids) = {
        { 0x14b9, 1, PCI_ANY_ID, PCI_ANY_ID, },
        { 0x14b9, 0x4500, PCI_ANY_ID, PCI_ANY_ID },
        { 0x14b9, 0x4800, PCI_ANY_ID, PCI_ANY_ID, },
@@@ -2310,7 -2311,7 +2311,7 @@@ static void airo_set_multicast_list(str
                        airo_set_promisc(ai);
        }
  
 -      if ((dev->flags&IFF_ALLMULTI)||dev->mc_count>0) {
 +      if ((dev->flags&IFF_ALLMULTI) || !netdev_mc_empty(dev)) {
                /* Turn on multicast.  (Should be already setup...) */
        }
  }
index 11968843c7735c646e3e488a40f9eba0d4f6beea,2880507f9d3fa76cfe50919dc2501029b906cffd..ac34a055c713269c1b6b3cd50aeeb209dbbaedad
@@@ -668,7 -668,7 +668,7 @@@ static void ath_get_rate(void *priv, st
        struct ieee80211_tx_rate *rates = tx_info->control.rates;
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
        __le16 fc = hdr->frame_control;
-       u8 try_per_rate, i = 0, rix, nrix;
+       u8 try_per_rate, i = 0, rix;
        int is_probe = 0;
  
        if (rate_control_send_low(sta, priv_sta, txrc))
  
        rate_table = sc->cur_rate_table;
        rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe);
-       nrix = rix;
  
        if (is_probe) {
                /* set one try for probe rates. For the
                 * probes don't enable rts */
                ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
-                                      1, nrix, 0);
+                                      1, rix, 0);
  
                /* Get the next tried/allowed rate. No RTS for the next series
                 * after the probe rate
                 */
-               ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix);
+               ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &rix);
                ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
-                                      try_per_rate, nrix, 0);
+                                      try_per_rate, rix, 0);
  
                tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
        } else {
                /* Set the choosen rate. No RTS for first series entry. */
                ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
-                                      try_per_rate, nrix, 0);
+                                      try_per_rate, rix, 0);
        }
  
        /* Fill in the other rates for multirate retry */
                if (i + 1 == 4)
                        try_per_rate = 8;
  
-               ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix);
+               ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &rix);
                /* All other rates in the series have RTS enabled */
                ath_rc_rate_set_series(rate_table, &rates[i], txrc,
-                                      try_per_rate, nrix, 1);
+                                      try_per_rate, rix, 1);
        }
  
        /*
@@@ -880,7 -879,7 +879,7 @@@ static bool ath_rc_update_per(struct at
                                 * Since this probe succeeded, we allow the next
                                 * probe twice as soon.  This allows the maxRate
                                 * to move up faster if the probes are
 -                               * succesful.
 +                               * successful.
                                 */
                                ath_rc_priv->probe_time =
                                        now_msec - rate_table->probe_interval / 2;
index 6940f086823c97b825d2f1c1cb904dfab52a1619,521584b99fd196087fa964d1fe0a5d2cb20a749f..303cc8193adc976204d2fd60c9583ce0167ad6ed
@@@ -45,8 -45,8 +45,8 @@@
  #include "iwl-sta.h"
  #include "iwl-3945.h"
  #include "iwl-eeprom.h"
- #include "iwl-helpers.h"
  #include "iwl-core.h"
+ #include "iwl-helpers.h"
  #include "iwl-led.h"
  #include "iwl-3945-led.h"
  
@@@ -2470,11 -2470,9 +2470,9 @@@ int iwl3945_hw_set_hw_params(struct iwl
        memset((void *)&priv->hw_params, 0,
               sizeof(struct iwl_hw_params));
  
-       priv->shared_virt =
-           pci_alloc_consistent(priv->pci_dev,
-                                sizeof(struct iwl3945_shared),
-                                &priv->shared_phys);
+       priv->shared_virt = dma_alloc_coherent(&priv->pci_dev->dev,
+                                              sizeof(struct iwl3945_shared),
+                                              &priv->shared_phys, GFP_KERNEL);
        if (!priv->shared_virt) {
                IWL_ERR(priv, "failed to allocate pci memory\n");
                mutex_unlock(&priv->mutex);
@@@ -2848,7 -2846,7 +2846,7 @@@ static struct iwl_cfg iwl3945_abg_cfg 
        .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  };
  
 -struct pci_device_id iwl3945_hw_card_ids[] = {
 +DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = {
        {IWL_PCI_DEVICE(0x4222, 0x1005, iwl3945_bg_cfg)},
        {IWL_PCI_DEVICE(0x4222, 0x1034, iwl3945_bg_cfg)},
        {IWL_PCI_DEVICE(0x4222, 0x1044, iwl3945_bg_cfg)},
index 8f553f36d2704e0eeac919544b279cc6d1f59f62,ae94babe595b5203b3257810c02116e7634ed162..452dfd5456c6ed5506a1efbcc3a6e281c8d39240
@@@ -37,7 -37,7 +37,7 @@@
  #include <net/ieee80211_radiotap.h>
  
  /* Hardware specific file defines the PCI IDs table for that hardware module */
 -extern struct pci_device_id iwl3945_hw_card_ids[];
 +extern const struct pci_device_id iwl3945_hw_card_ids[];
  
  #include "iwl-csr.h"
  #include "iwl-prph.h"
@@@ -171,24 -171,6 +171,6 @@@ struct iwl3945_frame 
  
  #define SCAN_INTERVAL 100
  
- #define STATUS_HCMD_ACTIVE    0       /* host command in progress */
- #define STATUS_HCMD_SYNC_ACTIVE       1       /* sync host command in progress */
- #define STATUS_INT_ENABLED    2
- #define STATUS_RF_KILL_HW     3
- #define STATUS_INIT           5
- #define STATUS_ALIVE          6
- #define STATUS_READY          7
- #define STATUS_TEMPERATURE    8
- #define STATUS_GEO_CONFIGURED 9
- #define STATUS_EXIT_PENDING   10
- #define STATUS_STATISTICS     12
- #define STATUS_SCANNING               13
- #define STATUS_SCAN_ABORTING  14
- #define STATUS_SCAN_HW                15
- #define STATUS_POWER_PMI      16
- #define STATUS_FW_ERROR               17
- #define STATUS_CONF_PENDING   18
  #define MAX_TID_COUNT        9
  
  #define IWL_INVALID_RATE     0xFF
index b07874f7da7ff1876de6affdaf01139151ce5686,17e91ad3496c2b7186b909efad2c4189be35d1db..1bd2cd8360262f265ec329a174a9f4fa23476442
@@@ -581,6 -581,13 +581,13 @@@ static int iwl4965_alive_notify(struct 
  
        iwl4965_set_wr_ptrs(priv, IWL_CMD_QUEUE_NUM, 0);
  
+       /* make sure all queue are not stopped */
+       memset(&priv->queue_stopped[0], 0, sizeof(priv->queue_stopped));
+       for (i = 0; i < 4; i++)
+               atomic_set(&priv->queue_stop_count[i], 0);
+       /* reset to 0 to enable all the queue first */
+       priv->txq_ctx_active_msk = 0;
        /* Map each Tx/cmd queue to its corresponding fifo */
        for (i = 0; i < ARRAY_SIZE(default_queue_to_tx_fifo); i++) {
                int ac = default_queue_to_tx_fifo[i];
@@@ -2008,7 -2015,7 +2015,7 @@@ static void iwl4965_rx_reply_tx(struct 
                        IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn "
                                           "%d index %d\n", scd_ssn , index);
                        freed = iwl_tx_queue_reclaim(priv, txq_id, index);
 -                      priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
 +                      iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
  
                        if (priv->mac80211_registered &&
                            (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
index 2cf92a51f041d0eeac7b88361707ac7fc5d93c13,94fc83671f20d5f42c43a91d1cf3617f3082407c..e476acb53aa7a56e193a5b8b418a5659c8372e33
@@@ -648,6 -648,13 +648,13 @@@ int iwl5000_alive_notify(struct iwl_pri
  
        iwl5000_set_wr_ptrs(priv, IWL_CMD_QUEUE_NUM, 0);
  
+       /* make sure all queue are not stopped */
+       memset(&priv->queue_stopped[0], 0, sizeof(priv->queue_stopped));
+       for (i = 0; i < 4; i++)
+               atomic_set(&priv->queue_stop_count[i], 0);
+       /* reset to 0 to enable all the queue first */
+       priv->txq_ctx_active_msk = 0;
        /* map qos queues to fifos one-to-one */
        for (i = 0; i < ARRAY_SIZE(iwl5000_default_queue_to_tx_fifo); i++) {
                int ac = iwl5000_default_queue_to_tx_fifo[i];
@@@ -1116,7 -1123,7 +1123,7 @@@ static void iwl5000_rx_reply_tx(struct 
                                        scd_ssn , index, txq_id, txq->swq_id);
  
                        freed = iwl_tx_queue_reclaim(priv, txq_id, index);
 -                      priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
 +                      iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
  
                        if (priv->mac80211_registered &&
                            (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
                                   tx_resp->failure_frame);
  
                freed = iwl_tx_queue_reclaim(priv, txq_id, index);
 -              if (ieee80211_is_data_qos(tx_resp->frame_ctrl))
 -                      priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
 +              iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
  
                if (priv->mac80211_registered &&
                    (iwl_queue_space(&txq->q) > txq->q.low_mark))
                        iwl_wake_queue(priv, txq_id);
        }
  
 -      if (ieee80211_is_data_qos(tx_resp->frame_ctrl))
 -              iwl_txq_check_empty(priv, sta_id, tid, txq_id);
 +      iwl_txq_check_empty(priv, sta_id, tid, txq_id);
  
        if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
                IWL_ERR(priv, "TODO:  Implement Tx ABORT REQUIRED!!!\n");
index 1854c720b5e09afb02c0ae04f26a7f8fbd330112,c5b724eaf3065f495a96b92bd090154b753a6732..af60b178ad4bfc993137df51386fdae1e6988f8c
@@@ -2941,10 -2941,21 +2941,21 @@@ static int iwl_mac_ampdu_action(struct 
                        return ret;
        case IEEE80211_AMPDU_TX_START:
                IWL_DEBUG_HT(priv, "start Tx\n");
-               return iwl_tx_agg_start(priv, sta->addr, tid, ssn);
+               ret = iwl_tx_agg_start(priv, sta->addr, tid, ssn);
+               if (ret == 0) {
+                       priv->agg_tids_count++;
+                       IWL_DEBUG_HT(priv, "priv->agg_tids_count = %u\n",
+                               priv->agg_tids_count);
+               }
+               return ret;
        case IEEE80211_AMPDU_TX_STOP:
                IWL_DEBUG_HT(priv, "stop Tx\n");
                ret = iwl_tx_agg_stop(priv, sta->addr, tid);
+               if ((ret == 0) && (priv->agg_tids_count > 0)) {
+                       priv->agg_tids_count--;
+                       IWL_DEBUG_HT(priv, "priv->agg_tids_count = %u\n",
+                               priv->agg_tids_count);
+               }
                if (test_bit(STATUS_EXIT_PENDING, &priv->status))
                        return 0;
                else
@@@ -3353,6 -3364,7 +3364,7 @@@ static int iwl_init_drv(struct iwl_pri
        INIT_LIST_HEAD(&priv->free_frames);
  
        mutex_init(&priv->mutex);
+       mutex_init(&priv->sync_cmd_mutex);
  
        /* Clear the driver's (not device's) station table */
        iwl_clear_stations_table(priv);
        priv->iw_mode = NL80211_IFTYPE_STATION;
        priv->current_ht_config.smps = IEEE80211_SMPS_STATIC;
        priv->missed_beacon_threshold = IWL_MISSED_BEACON_THRESHOLD_DEF;
+       priv->agg_tids_count = 0;
+       /* initialize force reset */
+       priv->force_reset[IWL_RF_RESET].reset_duration =
+               IWL_DELAY_NEXT_FORCE_RF_RESET;
+       priv->force_reset[IWL_FW_RESET].reset_duration =
+               IWL_DELAY_NEXT_FORCE_FW_RELOAD;
  
        /* Choose which receivers/antennas to use */
        if (priv->cfg->ops->hcmd->set_rxon_chain)
@@@ -3540,6 -3559,14 +3559,14 @@@ static int iwl_pci_probe(struct pci_de
         */
        spin_lock_init(&priv->reg_lock);
        spin_lock_init(&priv->lock);
+       /*
+        * stop and reset the on-board processor just in case it is in a
+        * strange state ... like being left stranded by a primary kernel
+        * and this is now the kdump kernel trying to start up
+        */
+       iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);
        iwl_hw_detect(priv);
        IWL_INFO(priv, "Detected Intel Wireless WiFi Link %s REV=0x%X\n",
                priv->cfg->name, priv->hw_rev);
@@@ -3768,7 -3795,7 +3795,7 @@@ static void __devexit iwl_pci_remove(st
   *****************************************************************************/
  
  /* Hardware specific file defines the PCI IDs table for that hardware module */
 -static struct pci_device_id iwl_hw_card_ids[] = {
 +static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
  #ifdef CONFIG_IWL4965
        {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)},
        {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)},
index 728410083cb826229d56850ccee62b6eaa67eab5,55252a692de7ea430baac4a05f9e673af8d16bbc..112149e9b31e40d9951ddd25581b2df1c2a1e780
@@@ -1670,9 -1670,9 +1670,9 @@@ EXPORT_SYMBOL(iwl_set_tx_power)
  void iwl_free_isr_ict(struct iwl_priv *priv)
  {
        if (priv->ict_tbl_vir) {
-               pci_free_consistent(priv->pci_dev, (sizeof(u32) * ICT_COUNT) +
-                                       PAGE_SIZE, priv->ict_tbl_vir,
-                                       priv->ict_tbl_dma);
+               dma_free_coherent(&priv->pci_dev->dev,
+                                 (sizeof(u32) * ICT_COUNT) + PAGE_SIZE,
+                                 priv->ict_tbl_vir, priv->ict_tbl_dma);
                priv->ict_tbl_vir = NULL;
        }
  }
@@@ -1688,9 -1688,9 +1688,9 @@@ int iwl_alloc_isr_ict(struct iwl_priv *
        if (priv->cfg->use_isr_legacy)
                return 0;
        /* allocate shrared data table */
-       priv->ict_tbl_vir = pci_alloc_consistent(priv->pci_dev, (sizeof(u32) *
-                                                 ICT_COUNT) + PAGE_SIZE,
-                                                 &priv->ict_tbl_dma);
+       priv->ict_tbl_vir = dma_alloc_coherent(&priv->pci_dev->dev,
+                                       (sizeof(u32) * ICT_COUNT) + PAGE_SIZE,
+                                       &priv->ict_tbl_dma, GFP_KERNEL);
        if (!priv->ict_tbl_vir)
                return -ENOMEM;
  
@@@ -2787,8 -2787,8 +2787,8 @@@ int iwl_mac_config(struct ieee80211_hw 
                if ((le16_to_cpu(priv->staging_rxon.channel) != ch))
                        priv->staging_rxon.flags = 0;
  
 -              iwl_set_rxon_ht(priv, ht_conf);
                iwl_set_rxon_channel(priv, conf->channel);
 +              iwl_set_rxon_ht(priv, ht_conf);
  
                iwl_set_flags_for_band(priv, conf->channel->band);
                spin_unlock_irqrestore(&priv->lock, flags);
@@@ -3334,7 -3334,7 +3334,7 @@@ int iwl_dump_fh(struct iwl_priv *priv, 
  }
  EXPORT_SYMBOL(iwl_dump_fh);
  
- void iwl_force_rf_reset(struct iwl_priv *priv)
static void iwl_force_rf_reset(struct iwl_priv *priv)
  {
        if (test_bit(STATUS_EXIT_PENDING, &priv->status))
                return;
        iwl_internal_short_hw_scan(priv);
        return;
  }
- EXPORT_SYMBOL(iwl_force_rf_reset);
+ int iwl_force_reset(struct iwl_priv *priv, int mode)
+ {
+       struct iwl_force_reset *force_reset;
+       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+               return -EINVAL;
+       if (mode >= IWL_MAX_FORCE_RESET) {
+               IWL_DEBUG_INFO(priv, "invalid reset request.\n");
+               return -EINVAL;
+       }
+       force_reset = &priv->force_reset[mode];
+       force_reset->reset_request_count++;
+       if (force_reset->last_force_reset_jiffies &&
+           time_after(force_reset->last_force_reset_jiffies +
+           force_reset->reset_duration, jiffies)) {
+               IWL_DEBUG_INFO(priv, "force reset rejected\n");
+               force_reset->reset_reject_count++;
+               return -EAGAIN;
+       }
+       force_reset->reset_success_count++;
+       force_reset->last_force_reset_jiffies = jiffies;
+       IWL_DEBUG_INFO(priv, "perform force reset (%d)\n", mode);
+       switch (mode) {
+       case IWL_RF_RESET:
+               iwl_force_rf_reset(priv);
+               break;
+       case IWL_FW_RESET:
+               IWL_ERR(priv, "On demand firmware reload\n");
+               /* Set the FW error flag -- cleared on iwl_down */
+               set_bit(STATUS_FW_ERROR, &priv->status);
+               wake_up_interruptible(&priv->wait_command_queue);
+               /*
+                * Keep the restart process from trying to send host
+                * commands by clearing the INIT status bit
+                */
+               clear_bit(STATUS_READY, &priv->status);
+               queue_work(priv->workqueue, &priv->restart);
+               break;
+       }
+       return 0;
+ }
  
  #ifdef CONFIG_PM
  
index 1b0701b876c34cd37a5d5b7bacef688768e30bc1,3df79331039c2fb741e10fdb7c260a42b6472cb9..4ef7739f9e8e614c99293b9904039ad7bfa965cc
@@@ -117,6 -117,7 +117,7 @@@ struct iwl_apm_ops 
  struct iwl_temp_ops {
        void (*temperature)(struct iwl_priv *priv);
        void (*set_ct_kill)(struct iwl_priv *priv);
+       void (*set_calib_version)(struct iwl_priv *priv);
  };
  
  struct iwl_ucode_ops {
@@@ -414,13 -415,13 +415,13 @@@ void iwl_rx_queue_free(struct iwl_priv 
  void iwl_cmd_queue_free(struct iwl_priv *priv);
  int iwl_rx_queue_alloc(struct iwl_priv *priv);
  void iwl_rx_handle(struct iwl_priv *priv);
int iwl_rx_queue_update_write_ptr(struct iwl_priv *priv,
void iwl_rx_queue_update_write_ptr(struct iwl_priv *priv,
                                  struct iwl_rx_queue *q);
  void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
  void iwl_rx_replenish(struct iwl_priv *priv);
  void iwl_rx_replenish_now(struct iwl_priv *priv);
  int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
int iwl_rx_queue_restock(struct iwl_priv *priv);
void iwl_rx_queue_restock(struct iwl_priv *priv);
  int iwl_rx_queue_space(const struct iwl_rx_queue *q);
  void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority);
  void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb);
@@@ -450,9 -451,7 +451,9 @@@ int iwl_tx_skb(struct iwl_priv *priv, s
  void iwl_hw_txq_ctx_free(struct iwl_priv *priv);
  int iwl_hw_tx_queue_init(struct iwl_priv *priv,
                         struct iwl_tx_queue *txq);
- int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq);
 +void iwl_free_tfds_in_queue(struct iwl_priv *priv,
 +                          int sta_id, int tid, int freed);
+ void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq);
  int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
                      int slots_num, u32 txq_id);
  void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id);
@@@ -503,7 -502,7 +504,7 @@@ int iwl_scan_cancel(struct iwl_priv *pr
  int iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms);
  int iwl_mac_hw_scan(struct ieee80211_hw *hw, struct cfg80211_scan_request *req);
  int iwl_internal_short_hw_scan(struct iwl_priv *priv);
void iwl_force_rf_reset(struct iwl_priv *priv);
int iwl_force_reset(struct iwl_priv *priv, int mode);
  u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
                       const u8 *ie, int ie_len, int left);
  void iwl_setup_rx_scan_handlers(struct iwl_priv *priv);
@@@ -605,7 -604,7 +606,7 @@@ void iwlcore_free_geos(struct iwl_priv 
  /*************** DRIVER STATUS FUNCTIONS   *****/
  
  #define STATUS_HCMD_ACTIVE    0       /* host command in progress */
#define STATUS_HCMD_SYNC_ACTIVE       1       /* sync host command in progress */
/* 1 is unused (used to be STATUS_HCMD_SYNC_ACTIVE) */
  #define STATUS_INT_ENABLED    2
  #define STATUS_RF_KILL_HW     3
  #define STATUS_CT_KILL                4
index 0f718f6df5fd3cdb100611eb2067fa7f02723a37,fed554accedce1d2514e56ae48dfa2a3fdb149ad..0d09f571e185166643512a774e2268103fb8d8eb
@@@ -123,12 -123,11 +123,11 @@@ EXPORT_SYMBOL(iwl_rx_queue_space)
  /**
   * iwl_rx_queue_update_write_ptr - Update the write pointer for the RX queue
   */
int iwl_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl_rx_queue *q)
void iwl_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl_rx_queue *q)
  {
        unsigned long flags;
        u32 rx_wrt_ptr_reg = priv->hw_params.rx_wrt_ptr_reg;
        u32 reg;
-       int ret = 0;
  
        spin_lock_irqsave(&q->lock, flags);
  
  
   exit_unlock:
        spin_unlock_irqrestore(&q->lock, flags);
-       return ret;
  }
  EXPORT_SYMBOL(iwl_rx_queue_update_write_ptr);
  /**
@@@ -184,14 -182,13 +182,13 @@@ static inline __le32 iwl_dma_addr2rbd_p
   * also updates the memory address in the firmware to reference the new
   * target buffer.
   */
int iwl_rx_queue_restock(struct iwl_priv *priv)
void iwl_rx_queue_restock(struct iwl_priv *priv)
  {
        struct iwl_rx_queue *rxq = &priv->rxq;
        struct list_head *element;
        struct iwl_rx_mem_buffer *rxb;
        unsigned long flags;
        int write;
-       int ret = 0;
  
        spin_lock_irqsave(&rxq->lock, flags);
        write = rxq->write & ~0x7;
                spin_lock_irqsave(&rxq->lock, flags);
                rxq->need_update = 1;
                spin_unlock_irqrestore(&rxq->lock, flags);
-               ret = iwl_rx_queue_update_write_ptr(priv, rxq);
+               iwl_rx_queue_update_write_ptr(priv, rxq);
        }
-       return ret;
  }
  EXPORT_SYMBOL(iwl_rx_queue_restock);
  
@@@ -350,10 -345,10 +345,10 @@@ void iwl_rx_queue_free(struct iwl_priv 
                }
        }
  
-       pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd,
-                           rxq->dma_addr);
-       pci_free_consistent(priv->pci_dev, sizeof(struct iwl_rb_status),
-                           rxq->rb_stts, rxq->rb_stts_dma);
+       dma_free_coherent(&priv->pci_dev->dev, 4 * RX_QUEUE_SIZE, rxq->bd,
+                         rxq->dma_addr);
+       dma_free_coherent(&priv->pci_dev->dev, sizeof(struct iwl_rb_status),
+                         rxq->rb_stts, rxq->rb_stts_dma);
        rxq->bd = NULL;
        rxq->rb_stts  = NULL;
  }
@@@ -362,7 -357,7 +357,7 @@@ EXPORT_SYMBOL(iwl_rx_queue_free)
  int iwl_rx_queue_alloc(struct iwl_priv *priv)
  {
        struct iwl_rx_queue *rxq = &priv->rxq;
-       struct pci_dev *dev = priv->pci_dev;
+       struct device *dev = &priv->pci_dev->dev;
        int i;
  
        spin_lock_init(&rxq->lock);
        INIT_LIST_HEAD(&rxq->rx_used);
  
        /* Alloc the circular buffer of Read Buffer Descriptors (RBDs) */
-       rxq->bd = pci_alloc_consistent(dev, 4 * RX_QUEUE_SIZE, &rxq->dma_addr);
+       rxq->bd = dma_alloc_coherent(dev, 4 * RX_QUEUE_SIZE, &rxq->dma_addr,
+                                    GFP_KERNEL);
        if (!rxq->bd)
                goto err_bd;
  
-       rxq->rb_stts = pci_alloc_consistent(dev, sizeof(struct iwl_rb_status),
-                                       &rxq->rb_stts_dma);
+       rxq->rb_stts = dma_alloc_coherent(dev, sizeof(struct iwl_rb_status),
+                                         &rxq->rb_stts_dma, GFP_KERNEL);
        if (!rxq->rb_stts)
                goto err_rb;
  
        return 0;
  
  err_rb:
-       pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd,
-                           rxq->dma_addr);
+       dma_free_coherent(&priv->pci_dev->dev, 4 * RX_QUEUE_SIZE, rxq->bd,
+                         rxq->dma_addr);
  err_bd:
        return -ENOMEM;
  }
@@@ -620,6 -616,11 +616,11 @@@ static void iwl_accumulative_statistics
  
  #define REG_RECALIB_PERIOD (60)
  
+ /* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */
+ #define ACK_CNT_RATIO (50)
+ #define BA_TIMEOUT_CNT (5)
+ #define BA_TIMEOUT_MAX (16)
  #define PLCP_MSG "plcp_err exceeded %u, %u, %u, %u, %u, %d, %u mSecs\n"
  void iwl_rx_statistics(struct iwl_priv *priv,
                              struct iwl_rx_mem_buffer *rxb)
        int combined_plcp_delta;
        unsigned int plcp_msec;
        unsigned long plcp_received_jiffies;
+       int actual_ack_cnt_delta;
+       int expected_ack_cnt_delta;
+       int ba_timeout_delta;
  
        IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n",
                     (int)sizeof(priv->statistics),
  #ifdef CONFIG_IWLWIFI_DEBUG
        iwl_accumulative_statistics(priv, (__le32 *)&pkt->u.stats);
  #endif
+       actual_ack_cnt_delta = le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) -
+               le32_to_cpu(priv->statistics.tx.actual_ack_cnt);
+       expected_ack_cnt_delta = le32_to_cpu(
+                       pkt->u.stats.tx.expected_ack_cnt) -
+               le32_to_cpu(priv->statistics.tx.expected_ack_cnt);
+       ba_timeout_delta = le32_to_cpu(
+                       pkt->u.stats.tx.agg.ba_timeout) -
+               le32_to_cpu(priv->statistics.tx.agg.ba_timeout);
+       if ((priv->agg_tids_count > 0) &&
+               (expected_ack_cnt_delta > 0) &&
+               (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta) <
+                       ACK_CNT_RATIO) &&
+               (ba_timeout_delta > BA_TIMEOUT_CNT)) {
+               IWL_DEBUG_RADIO(priv,
+                       "actual_ack_cnt delta = %d, expected_ack_cnt = %d\n",
+                       actual_ack_cnt_delta, expected_ack_cnt_delta);
+ #ifdef CONFIG_IWLWIFI_DEBUG
+               IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n",
+                       priv->delta_statistics.tx.rx_detected_cnt);
+               IWL_DEBUG_RADIO(priv,
+                       "ack_or_ba_timeout_collision delta = %d\n",
+                       priv->delta_statistics.tx.ack_or_ba_timeout_collision);
+ #endif
+               IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n",
+                       ba_timeout_delta);
+               if ((actual_ack_cnt_delta == 0) &&
+                       (ba_timeout_delta >=
+                               BA_TIMEOUT_MAX)) {
+                       IWL_DEBUG_RADIO(priv,
+                               "call iwl_force_reset(IWL_FW_RESET)\n");
+                       iwl_force_reset(priv, IWL_FW_RESET);
+               } else {
+                       IWL_DEBUG_RADIO(priv,
+                               "call iwl_force_reset(IWL_RF_RESET)\n");
+                       iwl_force_reset(priv, IWL_RF_RESET);
+               }
+       }
        /*
         * check for plcp_err and trigger radio reset if it exceeds
         * the plcp error threshold plcp_delta.
                         * Reset the RF radio due to the high plcp
                         * error rate
                         */
-                       iwl_force_rf_reset(priv);
+                       iwl_force_reset(priv, IWL_RF_RESET);
                }
        }
  
@@@ -1012,10 -1054,7 +1054,10 @@@ static void iwl_pass_packet_to_mac80211
        if (ieee80211_is_mgmt(fc) ||
            ieee80211_has_protected(fc) ||
            ieee80211_has_morefrags(fc) ||
 -          le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG)
 +          le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG ||
 +          (ieee80211_is_data_qos(fc) &&
 +           *ieee80211_get_qos_ctl(hdr) &
 +           IEEE80211_QOS_CONTROL_A_MSDU_PRESENT))
                ret = skb_linearize(skb);
        else
                ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ?
index 6eff3d4d061672e097724a68493e95020a22354d,38655ad8f43cd85f12b16eadeb1e96f0ff93f89e..10701b8eef23fab98df67a736bef25a4d244e53f
@@@ -60,7 -60,8 +60,8 @@@ static const u16 default_tid_to_tx_fifo
  static inline int iwl_alloc_dma_ptr(struct iwl_priv *priv,
                                    struct iwl_dma_ptr *ptr, size_t size)
  {
-       ptr->addr = pci_alloc_consistent(priv->pci_dev, size, &ptr->dma);
+       ptr->addr = dma_alloc_coherent(&priv->pci_dev->dev, size, &ptr->dma,
+                                      GFP_KERNEL);
        if (!ptr->addr)
                return -ENOMEM;
        ptr->size = size;
@@@ -73,21 -74,20 +74,20 @@@ static inline void iwl_free_dma_ptr(str
        if (unlikely(!ptr->addr))
                return;
  
-       pci_free_consistent(priv->pci_dev, ptr->size, ptr->addr, ptr->dma);
+       dma_free_coherent(&priv->pci_dev->dev, ptr->size, ptr->addr, ptr->dma);
        memset(ptr, 0, sizeof(*ptr));
  }
  
  /**
   * iwl_txq_update_write_ptr - Send new write index to hardware
   */
int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
  {
        u32 reg = 0;
-       int ret = 0;
        int txq_id = txq->q.id;
  
        if (txq->need_update == 0)
-               return ret;
+               return;
  
        /* if we're trying to save power */
        if (test_bit(STATUS_POWER_PMI, &priv->status)) {
                                      txq_id, reg);
                        iwl_set_bit(priv, CSR_GP_CNTRL,
                                    CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
-                       return ret;
+                       return;
                }
  
                iwl_write_direct32(priv, HBUS_TARG_WRPTR,
                            txq->q.write_ptr | (txq_id << 8));
  
        txq->need_update = 0;
-       return ret;
  }
  EXPORT_SYMBOL(iwl_txq_update_write_ptr);
  
  
 +void iwl_free_tfds_in_queue(struct iwl_priv *priv,
 +                          int sta_id, int tid, int freed)
 +{
 +      if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed)
 +              priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
 +      else {
 +              IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n",
 +                      priv->stations[sta_id].tid[tid].tfds_in_queue,
 +                      freed);
 +              priv->stations[sta_id].tid[tid].tfds_in_queue = 0;
 +      }
 +}
 +EXPORT_SYMBOL(iwl_free_tfds_in_queue);
 +
  /**
   * iwl_tx_queue_free - Deallocate DMA queue.
   * @txq: Transmit queue to deallocate.
@@@ -146,7 -130,7 +144,7 @@@ void iwl_tx_queue_free(struct iwl_priv 
  {
        struct iwl_tx_queue *txq = &priv->txq[txq_id];
        struct iwl_queue *q = &txq->q;
-       struct pci_dev *dev = priv->pci_dev;
+       struct device *dev = &priv->pci_dev->dev;
        int i;
  
        if (q->n_bd == 0)
  
        /* De-alloc circular buffer of TFDs */
        if (txq->q.n_bd)
-               pci_free_consistent(dev, priv->hw_params.tfd_size *
-                                   txq->q.n_bd, txq->tfds, txq->q.dma_addr);
+               dma_free_coherent(dev, priv->hw_params.tfd_size *
+                                 txq->q.n_bd, txq->tfds, txq->q.dma_addr);
  
        /* De-alloc array of per-TFD driver data */
        kfree(txq->txb);
@@@ -193,7 -177,7 +191,7 @@@ void iwl_cmd_queue_free(struct iwl_pri
  {
        struct iwl_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM];
        struct iwl_queue *q = &txq->q;
-       struct pci_dev *dev = priv->pci_dev;
+       struct device *dev = &priv->pci_dev->dev;
        int i;
  
        if (q->n_bd == 0)
  
        /* De-alloc circular buffer of TFDs */
        if (txq->q.n_bd)
-               pci_free_consistent(dev, priv->hw_params.tfd_size *
-                                   txq->q.n_bd, txq->tfds, txq->q.dma_addr);
+               dma_free_coherent(dev, priv->hw_params.tfd_size * txq->q.n_bd,
+                                 txq->tfds, txq->q.dma_addr);
  
        /* deallocate arrays */
        kfree(txq->cmd);
@@@ -297,7 -281,7 +295,7 @@@ static int iwl_queue_init(struct iwl_pr
  static int iwl_tx_queue_alloc(struct iwl_priv *priv,
                              struct iwl_tx_queue *txq, u32 id)
  {
-       struct pci_dev *dev = priv->pci_dev;
+       struct device *dev = &priv->pci_dev->dev;
        size_t tfd_sz = priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX;
  
        /* Driver private data, only for Tx (not command) queues,
  
        /* Circular buffer of transmit frame descriptors (TFDs),
         * shared with device */
-       txq->tfds = pci_alloc_consistent(dev, tfd_sz, &txq->q.dma_addr);
+       txq->tfds = dma_alloc_coherent(dev, tfd_sz, &txq->q.dma_addr,
+                                      GFP_KERNEL);
        if (!txq->tfds) {
                IWL_ERR(priv, "pci_alloc_consistent(%zd) failed\n", tfd_sz);
                goto error;
@@@ -745,7 -729,6 +743,6 @@@ int iwl_tx_skb(struct iwl_priv *priv, s
        u8 tid = 0;
        u8 *qc = NULL;
        unsigned long flags;
-       int ret;
  
        spin_lock_irqsave(&priv->lock, flags);
        if (iwl_is_rfkill(priv)) {
                hdr->seq_ctrl |= cpu_to_le16(seq_number);
                seq_number += 0x10;
                /* aggregation is on for this <sta,tid> */
-               if (info->flags & IEEE80211_TX_CTL_AMPDU)
+               if (info->flags & IEEE80211_TX_CTL_AMPDU &&
+                   priv->stations[sta_id].tid[tid].agg.state == IWL_AGG_ON) {
                        txq_id = priv->stations[sta_id].tid[tid].agg.txq_id;
+               }
        }
  
        txq = &priv->txq[txq_id];
  
        /* Tell device the write index *just past* this latest filled TFD */
        q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd);
-       ret = iwl_txq_update_write_ptr(priv, txq);
+       iwl_txq_update_write_ptr(priv, txq);
        spin_unlock_irqrestore(&priv->lock, flags);
  
        /*
        if (sta_priv && sta_priv->client)
                atomic_inc(&sta_priv->pending_frames);
  
-       if (ret)
-               return ret;
        if ((iwl_queue_space(q) < q->high_mark) && priv->mac80211_registered) {
                if (wait_write_ptr) {
                        spin_lock_irqsave(&priv->lock, flags);
@@@ -1018,7 -1000,7 +1014,7 @@@ int iwl_enqueue_hcmd(struct iwl_priv *p
        struct iwl_cmd_meta *out_meta;
        dma_addr_t phys_addr;
        unsigned long flags;
-       int len, ret;
+       int len;
        u32 idx;
        u16 fix_size;
  
  
        /* Increment and update queue's write index */
        q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd);
-       ret = iwl_txq_update_write_ptr(priv, txq);
+       iwl_txq_update_write_ptr(priv, txq);
  
        spin_unlock_irqrestore(&priv->hcmd_lock, flags);
-       return ret ? ret : idx;
+       return idx;
  }
  
  static void iwl_tx_status(struct iwl_priv *priv, struct sk_buff *skb)
@@@ -1145,7 -1127,6 +1141,7 @@@ int iwl_tx_queue_reclaim(struct iwl_pri
        struct iwl_queue *q = &txq->q;
        struct iwl_tx_info *tx_info;
        int nfreed = 0;
 +      struct ieee80211_hdr *hdr;
  
        if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) {
                IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
  
                tx_info = &txq->txb[txq->q.read_ptr];
                iwl_tx_status(priv, tx_info->skb[0]);
 +
 +              hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data;
 +              if (hdr && ieee80211_is_data_qos(hdr->frame_control))
 +                      nfreed++;
                tx_info->skb[0] = NULL;
  
                if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl)
                        priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq);
  
                priv->cfg->ops->lib->txq_free_tfd(priv, txq);
 -              nfreed++;
        }
        return nfreed;
  }
@@@ -1260,6 -1238,8 +1256,8 @@@ void iwl_tx_cmd_complete(struct iwl_pri
  
        if (!(meta->flags & CMD_ASYNC)) {
                clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
+               IWL_DEBUG_INFO(priv, "Clearing HCMD_ACTIVE for command %s \n",
+                              get_cmd_string(cmd->hdr.cmd));
                wake_up_interruptible(&priv->wait_command_queue);
        }
  }
@@@ -1346,7 -1326,7 +1344,7 @@@ int iwl_tx_agg_stop(struct iwl_priv *pr
  {
        int tx_fifo_id, txq_id, sta_id, ssn = -1;
        struct iwl_tid_data *tid_data;
-       int ret, write_ptr, read_ptr;
+       int write_ptr, read_ptr;
        unsigned long flags;
  
        if (!ra) {
        priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF;
  
        spin_lock_irqsave(&priv->lock, flags);
-       ret = priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, ssn,
+       /*
+        * the only reason this call can fail is queue number out of range,
+        * which can happen if uCode is reloaded and all the station
+        * information are lost. if it is outside the range, there is no need
+        * to deactivate the uCode queue, just return "success" to allow
+        *  mac80211 to clean up it own data.
+        */
+       priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, ssn,
                                                   tx_fifo_id);
        spin_unlock_irqrestore(&priv->lock, flags);
  
-       if (ret)
-               return ret;
        ieee80211_stop_tx_ba_cb_irqsafe(priv->vif, ra, tid);
  
        return 0;
@@@ -1577,7 -1561,7 +1579,7 @@@ void iwl_rx_reply_compressed_ba(struct 
        if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) {
                /* calculate mac80211 ampdu sw queue to wake */
                int freed = iwl_tx_queue_reclaim(priv, scd_flow, index);
 -              priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
 +              iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
  
                if ((iwl_queue_space(&txq->q) > txq->q.low_mark) &&
                    priv->mac80211_registered &&
index 108982762d45b77bbec9904242db597babe2aaca,676814d3a81bd305b76882a8e91e329bd58757f3..c22b04042d5cacc8f4813f2445fa908045227e57
@@@ -1340,8 -1340,8 +1340,8 @@@ static int rt2400pci_init_eeprom(struc
         */
        value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE);
        rt2x00pci_register_read(rt2x00dev, CSR0, &reg);
-       rt2x00_set_chip_rf(rt2x00dev, value, reg);
-       rt2x00_print_chip(rt2x00dev);
+       rt2x00_set_chip(rt2x00dev, RT2460, value,
+                       rt2x00_get_field32(reg, CSR0_REVISION));
  
        if (!rt2x00_rf(rt2x00dev, RF2420) && !rt2x00_rf(rt2x00dev, RF2421)) {
                ERROR(rt2x00dev, "Invalid RF chipset detected.\n");
@@@ -1641,7 -1641,7 +1641,7 @@@ static const struct rt2x00_ops rt2400pc
  /*
   * RT2400pci module information.
   */
 -static struct pci_device_id rt2400pci_device_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(rt2400pci_device_table) = {
        { PCI_DEVICE(0x1814, 0x0101), PCI_DEVICE_DATA(&rt2400pci_ops) },
        { 0, }
  };
index c3dea697b90776ad1918f8d81d73a1977b654b3e,606137738848a6157e5fd542e84f7b0131a19f5e..c048b18f41331e747c152ffeb4f7a18b8d35b56a
@@@ -35,7 -35,7 +35,7 @@@
  
  /*
   * Signal information.
 - * Defaul offset is required for RSSI <-> dBm conversion.
 + * Default offset is required for RSSI <-> dBm conversion.
   */
  #define DEFAULT_RSSI_OFFSET           100
  
@@@ -65,6 -65,7 +65,7 @@@
   * CSR0: ASIC revision number.
   */
  #define CSR0                          0x0000
+ #define CSR0_REVISION                 FIELD32(0x0000ffff)
  
  /*
   * CSR1: System control register.
index f6440bb0e5f64d1a0889ac529978f1c7c71c6ec7,c71266142ae9fafb0a0719bbecba6d43beb7ebfe..52bbcf1bd17c4f51d1114ffb9213518908c730f6
@@@ -1503,8 -1503,8 +1503,8 @@@ static int rt2500pci_init_eeprom(struc
         */
        value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE);
        rt2x00pci_register_read(rt2x00dev, CSR0, &reg);
-       rt2x00_set_chip_rf(rt2x00dev, value, reg);
-       rt2x00_print_chip(rt2x00dev);
+       rt2x00_set_chip(rt2x00dev, RT2560, value,
+                       rt2x00_get_field32(reg, CSR0_REVISION));
  
        if (!rt2x00_rf(rt2x00dev, RF2522) &&
            !rt2x00_rf(rt2x00dev, RF2523) &&
@@@ -1939,7 -1939,7 +1939,7 @@@ static const struct rt2x00_ops rt2500pc
  /*
   * RT2500pci module information.
   */
 -static struct pci_device_id rt2500pci_device_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(rt2500pci_device_table) = {
        { PCI_DEVICE(0x1814, 0x0201), PCI_DEVICE_DATA(&rt2500pci_ops) },
        { 0, }
  };
index c6bd1fcae7eb9806342b0cb8210b9e3cb1fd93bc,6471f8e74b35d021b344e17be6d6ca035f75023d..d708031361ac4d8fb257314f8df6b36ba6333385
@@@ -46,7 -46,7 +46,7 @@@
  
  /*
   * Signal information.
 - * Defaul offset is required for RSSI <-> dBm conversion.
 + * Default offset is required for RSSI <-> dBm conversion.
   */
  #define DEFAULT_RSSI_OFFSET           121
  
@@@ -76,6 -76,7 +76,7 @@@
   * CSR0: ASIC revision number.
   */
  #define CSR0                          0x0000
+ #define CSR0_REVISION                 FIELD32(0x0000ffff)
  
  /*
   * CSR1: System control register.
index d64181cbc9cb0910b3888df8bab986aae02c7e61,0e4c41766edcebd78c9f6dc8e4d5f9a87a3a089d..aca8c124f43458952275d72cbc51e460ce63a827
@@@ -1041,18 -1041,12 +1041,12 @@@ static int rt2800pci_validate_eeprom(st
        /*
         * Read EEPROM into buffer
         */
-       switch (rt2x00dev->chip.rt) {
-       case RT2880:
-       case RT3052:
+       if (rt2x00_is_soc(rt2x00dev))
                rt2800pci_read_eeprom_soc(rt2x00dev);
-               break;
-       default:
-               if (rt2800pci_efuse_detect(rt2x00dev))
-                       rt2800pci_read_eeprom_efuse(rt2x00dev);
-               else
-                       rt2800pci_read_eeprom_pci(rt2x00dev);
-               break;
-       }
+       else if (rt2800pci_efuse_detect(rt2x00dev))
+               rt2800pci_read_eeprom_efuse(rt2x00dev);
+       else
+               rt2800pci_read_eeprom_pci(rt2x00dev);
  
        return rt2800_validate_eeprom(rt2x00dev);
  }
@@@ -1103,7 -1097,7 +1097,7 @@@ static int rt2800pci_probe_hw(struct rt
        /*
         * This device requires firmware.
         */
-       if (!rt2x00_rt(rt2x00dev, RT2880) && !rt2x00_rt(rt2x00dev, RT3052))
+       if (!rt2x00_is_soc(rt2x00dev))
                __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
        __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags);
        __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
@@@ -1190,8 -1184,11 +1184,11 @@@ static const struct rt2x00_ops rt2800pc
  /*
   * RT2800pci module information.
   */
 -static struct pci_device_id rt2800pci_device_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = {
-       { PCI_DEVICE(0x1462, 0x891a), PCI_DEVICE_DATA(&rt2800pci_ops) },
+       { PCI_DEVICE(0x1814, 0x0601), PCI_DEVICE_DATA(&rt2800pci_ops) },
+       { PCI_DEVICE(0x1814, 0x0681), PCI_DEVICE_DATA(&rt2800pci_ops) },
+       { PCI_DEVICE(0x1814, 0x0701), PCI_DEVICE_DATA(&rt2800pci_ops) },
+       { PCI_DEVICE(0x1814, 0x0781), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1432, 0x7708), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1432, 0x7727), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1432, 0x7728), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1432, 0x7748), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1432, 0x7758), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1432, 0x7768), PCI_DEVICE_DATA(&rt2800pci_ops) },
-       { PCI_DEVICE(0x1814, 0x0601), PCI_DEVICE_DATA(&rt2800pci_ops) },
-       { PCI_DEVICE(0x1814, 0x0681), PCI_DEVICE_DATA(&rt2800pci_ops) },
-       { PCI_DEVICE(0x1814, 0x0701), PCI_DEVICE_DATA(&rt2800pci_ops) },
-       { PCI_DEVICE(0x1814, 0x0781), PCI_DEVICE_DATA(&rt2800pci_ops) },
-       { PCI_DEVICE(0x1814, 0x3060), PCI_DEVICE_DATA(&rt2800pci_ops) },
-       { PCI_DEVICE(0x1814, 0x3062), PCI_DEVICE_DATA(&rt2800pci_ops) },
+       { PCI_DEVICE(0x1a3b, 0x1059), PCI_DEVICE_DATA(&rt2800pci_ops) },
+ #ifdef CONFIG_RT2800PCI_RT30XX
        { PCI_DEVICE(0x1814, 0x3090), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1814, 0x3091), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1814, 0x3092), PCI_DEVICE_DATA(&rt2800pci_ops) },
+       { PCI_DEVICE(0x1462, 0x891a), PCI_DEVICE_DATA(&rt2800pci_ops) },
+ #endif
+ #ifdef CONFIG_RT2800PCI_RT35XX
+       { PCI_DEVICE(0x1814, 0x3060), PCI_DEVICE_DATA(&rt2800pci_ops) },
+       { PCI_DEVICE(0x1814, 0x3062), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1814, 0x3562), PCI_DEVICE_DATA(&rt2800pci_ops) },
        { PCI_DEVICE(0x1814, 0x3592), PCI_DEVICE_DATA(&rt2800pci_ops) },
-       { PCI_DEVICE(0x1a3b, 0x1059), PCI_DEVICE_DATA(&rt2800pci_ops) },
+ #endif
        { 0, }
  };
  
@@@ -1225,11 -1223,10 +1223,10 @@@ MODULE_DEVICE_TABLE(pci, rt2800pci_devi
  MODULE_LICENSE("GPL");
  
  #ifdef CONFIG_RT2800PCI_SOC
- #if defined(CONFIG_RALINK_RT288X)
- __rt2x00soc_probe(RT2880, &rt2800pci_ops);
- #elif defined(CONFIG_RALINK_RT305X)
- __rt2x00soc_probe(RT3052, &rt2800pci_ops);
- #endif
+ static int rt2800soc_probe(struct platform_device *pdev)
+ {
+       return rt2x00soc_probe(pdev, rt2800pci_ops);
+ }
  
  static struct platform_driver rt2800soc_driver = {
        .driver         = {
                .owner          = THIS_MODULE,
                .mod_name       = KBUILD_MODNAME,
        },
-       .probe          = __rt2x00soc_probe,
+       .probe          = rt2800soc_probe,
        .remove         = __devexit_p(rt2x00soc_remove),
        .suspend        = rt2x00soc_suspend,
        .resume         = rt2x00soc_resume,
index 74de53e68b4e503011e15010cb73b35a9b8eebec,ee9c696fe1d42bdad59fe2bd451e56f03a7f0df3..e2da928dd9f067b3008ae510be2b9806b1919517
@@@ -1131,16 -1131,18 +1131,18 @@@ dynamic_cca_tune
   */
  static char *rt61pci_get_firmware_name(struct rt2x00_dev *rt2x00dev)
  {
+       u16 chip;
        char *fw_name;
  
-       switch (rt2x00dev->chip.rt) {
-       case RT2561:
+       pci_read_config_word(to_pci_dev(rt2x00dev->dev), PCI_DEVICE_ID, &chip);
+       switch (chip) {
+       case RT2561_PCI_ID:
                fw_name = FIRMWARE_RT2561;
                break;
-       case RT2561s:
+       case RT2561s_PCI_ID:
                fw_name = FIRMWARE_RT2561s;
                break;
-       case RT2661:
+       case RT2661_PCI_ID:
                fw_name = FIRMWARE_RT2661;
                break;
        default:
@@@ -2295,8 -2297,8 +2297,8 @@@ static int rt61pci_init_eeprom(struct r
         */
        value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE);
        rt2x00pci_register_read(rt2x00dev, MAC_CSR0, &reg);
-       rt2x00_set_chip_rf(rt2x00dev, value, reg);
-       rt2x00_print_chip(rt2x00dev);
+       rt2x00_set_chip(rt2x00dev, rt2x00_get_field32(reg, MAC_CSR0_CHIPSET),
+                       value, rt2x00_get_field32(reg, MAC_CSR0_REVISION));
  
        if (!rt2x00_rf(rt2x00dev, RF5225) &&
            !rt2x00_rf(rt2x00dev, RF5325) &&
@@@ -2806,7 -2808,7 +2808,7 @@@ static const struct rt2x00_ops rt61pci_
  /*
   * RT61pci module information.
   */
 -static struct pci_device_id rt61pci_device_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(rt61pci_device_table) = {
        /* RT2561s */
        { PCI_DEVICE(0x1814, 0x0301), PCI_DEVICE_DATA(&rt61pci_ops) },
        /* RT2561 v2 */
index 8f13810622bda1ff7513be55e6857f2c55a6b5a9,ab20c775882412bb5aaf264c37fbf77e41cb403a..df80f1af22a43208abbb4ee84ab6319dd3747186
  #ifndef RT61PCI_H
  #define RT61PCI_H
  
+ /*
+  * RT chip PCI IDs.
+  */
+ #define RT2561s_PCI_ID                        0x0301
+ #define RT2561_PCI_ID                 0x0302
+ #define RT2661_PCI_ID                 0x0401
  /*
   * RF chip defines.
   */
@@@ -37,7 -44,7 +44,7 @@@
  
  /*
   * Signal information.
 - * Defaul offset is required for RSSI <-> dBm conversion.
 + * Default offset is required for RSSI <-> dBm conversion.
   */
  #define DEFAULT_RSSI_OFFSET           120
  
@@@ -225,6 -232,8 +232,8 @@@ struct hw_pairwise_ta_entry 
   * MAC_CSR0: ASIC revision number.
   */
  #define MAC_CSR0                      0x3000
+ #define MAC_CSR0_REVISION             FIELD32(0x0000000f)
+ #define MAC_CSR0_CHIPSET              FIELD32(0x000ffff0)
  
  /*
   * MAC_CSR1: System control register.
index 7942f810e9288c020c32165f7594cfb804b76954,b4e3ddda06cf8e8bd9d57a079f68da6452745488..7abe7eb14555d7e88ed205ca2eb90c1547c90928
@@@ -37,7 -37,7 +37,7 @@@
  
  /*
   * Signal information.
 - * Defaul offset is required for RSSI <-> dBm conversion.
 + * Default offset is required for RSSI <-> dBm conversion.
   */
  #define DEFAULT_RSSI_OFFSET           120
  
@@@ -142,6 -142,8 +142,8 @@@ struct hw_pairwise_ta_entry 
   * MAC_CSR0: ASIC revision number.
   */
  #define MAC_CSR0                      0x3000
+ #define MAC_CSR0_REVISION             FIELD32(0x0000000f)
+ #define MAC_CSR0_CHIPSET              FIELD32(0x000ffff0)
  
  /*
   * MAC_CSR1: System control register.
index 9a4c858b0666695d9bb81bb734cb18109881259c,6963e5448f340cdcdf04ad4e13fb92e0c28e1a63..2b8c85556dcbd3f3a1693f23c13a348ca7d606af
@@@ -609,16 -609,6 +609,6 @@@ struct ieee80211_hdr_2addr 
          u8 payload[0];
  } __attribute__ ((packed));
  
- struct ieee80211_hdr_3addr {
-       __le16 frame_ctl;
-       __le16 duration_id;
-       u8 addr1[ETH_ALEN];
-       u8 addr2[ETH_ALEN];
-       u8 addr3[ETH_ALEN];
-       __le16 seq_ctl;
-         u8 payload[0];
- } __attribute__ ((packed));
  struct ieee80211_hdr_4addr {
        __le16 frame_ctl;
        __le16 duration_id;
@@@ -1672,7 -1662,7 +1662,7 @@@ static inline u8 *ieee80211_get_payload
          case IEEE80211_2ADDR_LEN:
                  return ((struct ieee80211_hdr_2addr *)hdr)->payload;
          case IEEE80211_3ADDR_LEN:
-                 return ((struct ieee80211_hdr_3addr *)hdr)->payload;
+                 return (void *)hdr+sizeof(struct ieee80211_hdr_3addr);
          case IEEE80211_4ADDR_LEN:
                  return ((struct ieee80211_hdr_4addr *)hdr)->payload;
          }
@@@ -1721,13 -1711,13 +1711,13 @@@ extern int ieee80211_encrypt_fragment
        struct sk_buff *frag,
        int hdr_len);
  
 -extern int rtl8192_ieee80211_xmit(struct sk_buff *skb,
 +extern int rtl8192_ieee80211_rtl_xmit(struct sk_buff *skb,
                          struct net_device *dev);
  extern void ieee80211_txb_free(struct ieee80211_txb *);
  
  
  /* ieee80211_rx.c */
 -extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 +extern int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                        struct ieee80211_rx_stats *rx_stats);
  extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
                             struct ieee80211_hdr_4addr *header,
@@@ -1783,8 -1773,8 +1773,8 @@@ extern void ieee80211_stop_protocol(str
  extern void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee);
  extern void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee);
  extern void ieee80211_reset_queue(struct ieee80211_device *ieee);
 -extern void ieee80211_wake_queue(struct ieee80211_device *ieee);
 -extern void ieee80211_stop_queue(struct ieee80211_device *ieee);
 +extern void ieee80211_rtl_wake_queue(struct ieee80211_device *ieee);
 +extern void ieee80211_rtl_stop_queue(struct ieee80211_device *ieee);
  extern struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee);
  extern void ieee80211_start_send_beacons(struct ieee80211_device *ieee);
  extern void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
index fecfa120ff488b8fd956ce850cd2eefd6bf4bbe8,72498e8e0dedfe2ae4561af59ff5c6fc606b7dbe..095b8c643146cbd670f1bcd6b5ecf905086952eb
@@@ -37,6 -37,7 +37,6 @@@
  #include <linux/slab.h>
  #include <linux/tcp.h>
  #include <linux/types.h>
 -#include <linux/version.h>
  #include <linux/wireless.h>
  #include <linux/etherdevice.h>
  #include <asm/uaccess.h>
@@@ -208,7 -209,7 +208,7 @@@ static int ieee80211_frag_cache_invalid
   *
   * Responsible for handling management control frames
   *
 - * Called by ieee80211_rx */
 + * Called by ieee80211_rtl_rx */
  static inline int
  ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
                        struct ieee80211_rx_stats *rx_stats, u16 type,
@@@ -289,7 -290,7 +289,7 @@@ static int ieee80211_is_eapol_frame(str
        return 0;
  }
  
 -/* Called only as a tasklet (software IRQ), by ieee80211_rx */
 +/* Called only as a tasklet (software IRQ), by ieee80211_rtl_rx */
  static inline int
  ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
                           struct ieee80211_crypt_data *crypt)
@@@ -744,7 -745,7 +744,7 @@@ u8 parse_subframe(struct sk_buff *skb
                  struct ieee80211_rxb *rxb,u8* src,u8* dst)
  {
        struct ieee80211_hdr_3addr  *hdr = (struct ieee80211_hdr_3addr* )skb->data;
-       u16             fc = le16_to_cpu(hdr->frame_ctl);
+       u16             fc = le16_to_cpu(hdr->frame_control);
  
        u16             LLCOffset= sizeof(struct ieee80211_hdr_3addr);
        u16             ChkLength;
        struct sk_buff *sub_skb;
        u8             *data_ptr;
        /* just for debug purpose */
-       SeqNum = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctl));
+       SeqNum = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctrl));
  
        if((IEEE80211_QOS_HAS_SEQ(fc))&&\
                        (((frameqos *)(skb->data + IEEE80211_3ADDR_LEN))->field.reserved)) {
  /* All received frames are sent to this function. @skb contains the frame in
   * IEEE 802.11 format, i.e., in the format it was sent over air.
   * This function is called only as a tasklet (software IRQ). */
 -int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 +int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                 struct ieee80211_rx_stats *rx_stats)
  {
        struct net_device *dev = ieee->dev;
@@@ -2370,7 -2371,7 +2370,7 @@@ static inline void ieee80211_process_pr
                                     escape_essid(info_element->data,
                                                  info_element->len),
                                     MAC_ARG(beacon->header.addr3),
-                                    WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
+                                    WLAN_FC_GET_STYPE(beacon->header.frame_control) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
                return;
                return;
        if(ieee->bGlobalDomain)
        {
-               if (WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP)
+               if (WLAN_FC_GET_STYPE(beacon->header.frame_control) == IEEE80211_STYPE_PROBE_RESP)
                {
                        // Case 1: Country code
                        if(IS_COUNTRY_IE_VALID(ieee) )
                else
                        ieee->current_network.buseprotection = false;
                }
-               if(is_beacon(beacon->header.frame_ctl))
+               if(is_beacon(beacon->header.frame_control))
                {
                        if(ieee->state == IEEE80211_LINKED)
                                ieee->LinkDetectInfo.NumRecvBcnInPeriod++;
                                     escape_essid(network.ssid,
                                                  network.ssid_len),
                                     MAC_ARG(network.bssid),
-                                    WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
+                                    WLAN_FC_GET_STYPE(beacon->header.frame_control) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
  #endif
                                     escape_essid(target->ssid,
                                                  target->ssid_len),
                                     MAC_ARG(target->bssid),
-                                    WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
+                                    WLAN_FC_GET_STYPE(beacon->header.frame_control) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
  
                 */
                renew = !time_after(target->last_scanned + ieee->scan_age, jiffies);
                //YJ,add,080819,for hidden ap
-               if(is_beacon(beacon->header.frame_ctl) == 0)
+               if(is_beacon(beacon->header.frame_control) == 0)
                        network.flags = (~NETWORK_EMPTY_ESSID & network.flags)|(NETWORK_EMPTY_ESSID & target->flags);
                //if(strncmp(network.ssid, "linksys-c",9) == 0)
                //      printk("====>2 network.ssid=%s FLAG=%d target.ssid=%s FLAG=%d\n", network.ssid, network.flags, target->ssid, target->flags);
        }
  
        spin_unlock_irqrestore(&ieee->lock, flags);
-       if (is_beacon(beacon->header.frame_ctl)&&is_same_network(&ieee->current_network, &network, ieee)&&\
+       if (is_beacon(beacon->header.frame_control)&&is_same_network(&ieee->current_network, &network, ieee)&&\
                (ieee->state == IEEE80211_LINKED)) {
                if(ieee->handle_beacon != NULL) {
                        ieee->handle_beacon(ieee->dev,beacon,&ieee->current_network);
index 95d4f84dcf3fff9d360b4ee37d20c91b631c86ce,8da0c4c83673216990ba9486fd18aab400220581..0ba2a01a06a1ad2cbc64ea5ae8df5d7b60dcd0ad
@@@ -242,7 -242,7 +242,7 @@@ inline void softmac_mgmt_xmit(struct sk
                if(ieee->queue_stop){
                        enqueue_mgmt(ieee,skb);
                }else{
-                       header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0]<<4);
+                       header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0]<<4);
  
                        if (ieee->seq_ctrl[0] == 0xFFF)
                                ieee->seq_ctrl[0] = 0;
                spin_unlock_irqrestore(&ieee->lock, flags);
                spin_lock_irqsave(&ieee->mgmt_tx_lock, flags);
  
-               header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
+               header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
  
                if (ieee->seq_ctrl[0] == 0xFFF)
                        ieee->seq_ctrl[0] = 0;
@@@ -302,7 -302,7 +302,7 @@@ inline void softmac_ps_mgmt_xmit(struc
        //printk("=============>%s()\n", __FUNCTION__);
        if(single){
  
-               header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
+               header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
  
                if (ieee->seq_ctrl[0] == 0xFFF)
                        ieee->seq_ctrl[0] = 0;
  
        }else{
  
-               header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
+               header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
  
                if (ieee->seq_ctrl[0] == 0xFFF)
                        ieee->seq_ctrl[0] = 0;
@@@ -347,7 -347,7 +347,7 @@@ inline struct sk_buff *ieee80211_probe_
        skb_reserve(skb, ieee->tx_headroom);
  
        req = (struct ieee80211_probe_request *) skb_put(skb,sizeof(struct ieee80211_probe_request));
-       req->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_PROBE_REQ);
+       req->header.frame_control = cpu_to_le16(IEEE80211_STYPE_PROBE_REQ);
        req->header.duration_id = 0; //FIXME: is this OK ?
  
        memset(req->header.addr1, 0xff, ETH_ALEN);
@@@ -610,7 -610,7 +610,7 @@@ void ieee80211_stop_scan(struct ieee802
  }
  
  /* called with ieee->lock held */
 -void ieee80211_start_scan(struct ieee80211_device *ieee)
 +void ieee80211_rtl_start_scan(struct ieee80211_device *ieee)
  {
        if(IS_DOT11D_ENABLE(ieee) )
        {
@@@ -662,8 -662,8 +662,8 @@@ inline struct sk_buff *ieee80211_authen
        auth = (struct ieee80211_authentication *)
                skb_put(skb, sizeof(struct ieee80211_authentication));
  
-       auth->header.frame_ctl = IEEE80211_STYPE_AUTH;
-       if (challengelen) auth->header.frame_ctl |= IEEE80211_FCTL_WEP;
+       auth->header.frame_control = IEEE80211_STYPE_AUTH;
+       if (challengelen) auth->header.frame_control |= IEEE80211_FCTL_WEP;
  
        auth->header.duration_id = 0x013a; //FIXME
  
@@@ -801,7 -801,7 +801,7 @@@ static struct sk_buff* ieee80211_probe_
                beacon_buf->capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
  
  
-       beacon_buf->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_PROBE_RESP);
+       beacon_buf->header.frame_control = cpu_to_le16(IEEE80211_STYPE_PROBE_RESP);
        beacon_buf->info_element[0].id = MFIE_TYPE_SSID;
        beacon_buf->info_element[0].len = ssid_len;
  
@@@ -880,7 -880,7 +880,7 @@@ struct sk_buff* ieee80211_assoc_resp(st
        assoc = (struct ieee80211_assoc_response_frame *)
                skb_put(skb,sizeof(struct ieee80211_assoc_response_frame));
  
-       assoc->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP);
+       assoc->header.frame_control = cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP);
        memcpy(assoc->header.addr1, dest,ETH_ALEN);
        memcpy(assoc->header.addr3, ieee->dev->dev_addr, ETH_ALEN);
        memcpy(assoc->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
@@@ -935,7 -935,7 +935,7 @@@ struct sk_buff* ieee80211_auth_resp(str
        memcpy(auth->header.addr3, ieee->dev->dev_addr, ETH_ALEN);
        memcpy(auth->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
        memcpy(auth->header.addr1, dest, ETH_ALEN);
-       auth->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_AUTH);
+       auth->header.frame_control = cpu_to_le16(IEEE80211_STYPE_AUTH);
        return skb;
  
  
@@@ -957,7 -957,7 +957,7 @@@ struct sk_buff* ieee80211_null_func(str
        memcpy(hdr->addr2, ieee->dev->dev_addr, ETH_ALEN);
        memcpy(hdr->addr3, ieee->current_network.bssid, ETH_ALEN);
  
-       hdr->frame_ctl = cpu_to_le16(IEEE80211_FTYPE_DATA |
+       hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
                IEEE80211_STYPE_NULLFUNC | IEEE80211_FCTL_TODS |
                (pwr ? IEEE80211_FCTL_PM:0));
  
@@@ -1083,7 -1083,7 +1083,7 @@@ inline struct sk_buff *ieee80211_associ
                skb_put(skb, sizeof(struct ieee80211_assoc_request_frame)+2);
  
  
-       hdr->header.frame_ctl = IEEE80211_STYPE_ASSOC_REQ;
+       hdr->header.frame_control = IEEE80211_STYPE_ASSOC_REQ;
        hdr->header.duration_id= 37; //FIXME
        memcpy(hdr->header.addr1, beacon->bssid, ETH_ALEN);
        memcpy(hdr->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
@@@ -1281,7 -1281,7 +1281,7 @@@ void ieee80211_associate_step1(struct i
        }
  }
  
 -void ieee80211_auth_challenge(struct ieee80211_device *ieee, u8 *challenge, int chlen)
 +void ieee80211_rtl_auth_challenge(struct ieee80211_device *ieee, u8 *challenge, int chlen)
  {
        u8 *c;
        struct sk_buff *skb;
@@@ -1940,13 -1940,13 +1940,13 @@@ ieee80211_rx_frame_softmac(struct ieee8
        if(!ieee->proto_started)
                return 0;
  
-       switch (WLAN_FC_GET_STYPE(header->frame_ctl)) {
+       switch (WLAN_FC_GET_STYPE(header->frame_control)) {
  
                case IEEE80211_STYPE_ASSOC_RESP:
                case IEEE80211_STYPE_REASSOC_RESP:
  
                        IEEE80211_DEBUG_MGMT("received [RE]ASSOCIATION RESPONSE (%d)\n",
-                                       WLAN_FC_GET_STYPE(header->frame_ctl));
+                                       WLAN_FC_GET_STYPE(header->frame_control));
                        if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) &&
                                ieee->state == IEEE80211_ASSOCIATING_AUTHENTICATED &&
                                ieee->iw_mode == IW_MODE_INFRA){
  
                                                                ieee80211_associate_step2(ieee);
                                                        }else{
 -                                                              ieee80211_auth_challenge(ieee, challenge, chlen);
 +                                                              ieee80211_rtl_auth_challenge(ieee, challenge, chlen);
                                                        }
                                                }else{
                                                        ieee->softmac_stats.rx_auth_rs_err++;
                        if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) &&
                                ieee->state == IEEE80211_LINKED &&
                                ieee->iw_mode == IW_MODE_INFRA){
-                               printk("==========>received disassoc/deauth(%x) frame, reason code:%x\n",WLAN_FC_GET_STYPE(header->frame_ctl), ((struct ieee80211_disassoc*)skb->data)->reason);
+                               printk("==========>received disassoc/deauth(%x) frame, reason code:%x\n",WLAN_FC_GET_STYPE(header->frame_control), ((struct ieee80211_disassoc*)skb->data)->reason);
                                ieee->state = IEEE80211_ASSOCIATING;
                                ieee->softmac_stats.reassoc++;
                                ieee->is_roaming = true;
   * care of the ieee802.11 fragmentation.
   * So the driver receives a fragment per time and might
   * call the stop function when it want without take care
 - * to have enought room to TX an entire packet.
 + * to have enough room to TX an entire packet.
   * This might be useful if each fragment need it's own
   * descriptor, thus just keep a total free memory > than
 - * the max fragmentation treshold is not enought.. If the
 + * the max fragmentation threshold is not enough.. If the
   * ieee802.11 stack passed a TXB struct then you needed
   * to keep N free descriptors where
   * N = MAX_PACKET_SIZE / MIN_FRAG_TRESHOLD
@@@ -2162,7 -2162,7 +2162,7 @@@ void ieee80211_softmac_xmit(struct ieee
                         * to check it any more.
                         * */
                        //printk("error:no descriptor left@queue_index %d, %d, %d\n", queue_index, skb_queue_len(&ieee->skb_waitQ[queue_index]), ieee->check_nic_enough_desc(ieee->dev,queue_index));
 -                      //ieee80211_stop_queue(ieee);
 +                      //ieee80211_rtl_stop_queue(ieee);
                        skb_queue_tail(&ieee->skb_waitQ[queue_index], txb->fragments[i]);
                }else{
                        ieee->softmac_data_hard_start_xmit(
@@@ -2222,7 -2222,7 +2222,7 @@@ void ieee80211_reset_queue(struct ieee8
  
  }
  
 -void ieee80211_wake_queue(struct ieee80211_device *ieee)
 +void ieee80211_rtl_wake_queue(struct ieee80211_device *ieee)
  {
  
        unsigned long flags;
  
                        header = (struct ieee80211_hdr_3addr  *) skb->data;
  
-                       header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
+                       header->seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
  
                        if (ieee->seq_ctrl[0] == 0xFFF)
                                ieee->seq_ctrl[0] = 0;
@@@ -2263,7 -2263,7 +2263,7 @@@ exit 
  }
  
  
 -void ieee80211_stop_queue(struct ieee80211_device *ieee)
 +void ieee80211_rtl_stop_queue(struct ieee80211_device *ieee)
  {
        //unsigned long flags;
        //spin_lock_irqsave(&ieee->lock,flags);
@@@ -2479,7 -2479,7 +2479,7 @@@ void ieee80211_start_bss(struct ieee802
  
        if (ieee->state == IEEE80211_NOLINK){
                ieee->actscanning = true;
 -              ieee80211_start_scan(ieee);
 +              ieee80211_rtl_start_scan(ieee);
        }
        spin_unlock_irqrestore(&ieee->lock, flags);
  }
@@@ -2552,7 -2552,7 +2552,7 @@@ void ieee80211_associate_retry_wq(struc
        if(ieee->state == IEEE80211_NOLINK)
        {
                ieee->actscanning = true;
 -              ieee80211_start_scan(ieee);
 +              ieee80211_rtl_start_scan(ieee);
        }
        spin_unlock_irqrestore(&ieee->lock, flags);
  
@@@ -2574,7 -2574,7 +2574,7 @@@ struct sk_buff *ieee80211_get_beacon_(s
                return NULL;
  
        b = (struct ieee80211_probe_response *) skb->data;
-       b->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_BEACON);
+       b->header.frame_control = cpu_to_le16(IEEE80211_STYPE_BEACON);
  
        return skb;
  
@@@ -2590,7 -2590,7 +2590,7 @@@ struct sk_buff *ieee80211_get_beacon(st
                return NULL;
  
        b = (struct ieee80211_probe_response *) skb->data;
-       b->header.seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
+       b->header.seq_ctrl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
  
        if (ieee->seq_ctrl[0] == 0xFFF)
                ieee->seq_ctrl[0] = 0;
@@@ -3139,7 -3139,7 +3139,7 @@@ inline struct sk_buff *ieee80211_disass
                return NULL;
  
        disass = (struct ieee80211_disassoc *) skb_put(skb,sizeof(struct ieee80211_disassoc));
-       disass->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_DISASSOC);
+       disass->header.frame_control = cpu_to_le16(IEEE80211_STYPE_DISASSOC);
        disass->header.duration_id = 0;
  
        memcpy(disass->header.addr1, beacon->bssid, ETH_ALEN);
index ccb9d5b8cd444c154813fa270499f6cdbc407291,2b079fb67d318fdd8b3ccc94a89f57b48d79ecc3..6f424fe8a23757a756e1aeb8af4c2cfc9201172d
@@@ -126,8 -126,6 +126,8 @@@ static struct usb_device_id rtl8192_usb
        {USB_DEVICE(0x2001, 0x3301)},
        /* Zinwell */
        {USB_DEVICE(0x5a57, 0x0290)},
 +      /* Guillemot */
 +      {USB_DEVICE(0x06f8, 0xe031)},
        //92SU
        {USB_DEVICE(0x0bda, 0x8172)},
        {}
@@@ -1503,7 -1501,7 +1503,7 @@@ static void rtl8192_rx_isr(struct urb *
          urb->context = skb;
          skb_queue_tail(&priv->rx_queue, skb);
          err = usb_submit_urb(urb, GFP_ATOMIC);
 -      if(err && err != EPERM)
 +      if(err && err != -EPERM)
                printk("can not submit rxurb, err is %x,URB status is %x\n",err,urb->status);
  }
  
@@@ -6168,7 -6166,7 +6168,7 @@@ void rtl8192_process_phyinfo(struct r81
        u16 sc ;
        unsigned int frag,seq;
        hdr = (struct ieee80211_hdr_3addr *)buffer;
-       sc = le16_to_cpu(hdr->seq_ctl);
+       sc = le16_to_cpu(hdr->seq_ctrl);
        frag = WLAN_GET_SEQ_FRAG(sc);
        seq = WLAN_GET_SEQ_SEQ(sc);
        //cosa add 04292008 to record the sequence number
@@@ -6827,7 -6825,7 +6827,7 @@@ void rtl8192SU_TranslateRxSignalStuff(s
        tmp_buf = (u8*)skb->data;// + get_rxpacket_shiftbytes_819xusb(pstats);
  
        hdr = (struct ieee80211_hdr_3addr *)tmp_buf;
-       fc = le16_to_cpu(hdr->frame_ctl);
+       fc = le16_to_cpu(hdr->frame_control);
        type = WLAN_FC_GET_TYPE(fc);
        praddr = hdr->addr1;
  
@@@ -7157,7 -7155,7 +7157,7 @@@ void rtl8192SU_rx_nomal(struct sk_buff
                        unicast_packet = true;
                }
  
 -              if(!ieee80211_rx(priv->ieee80211,skb, &stats)) {
 +              if(!ieee80211_rtl_rx(priv->ieee80211,skb, &stats)) {
                        dev_kfree_skb_any(skb);
                } else {
                //      priv->stats.rxoktotal++;  //YJ,test,090108
@@@ -7428,7 -7426,7 +7428,7 @@@ static const struct net_device_ops rtl8
        .ndo_set_mac_address    = r8192_set_mac_adr,
        .ndo_validate_addr      = eth_validate_addr,
        .ndo_change_mtu         = eth_change_mtu,
 -      .ndo_start_xmit         = rtl8192_ieee80211_xmit,
 +      .ndo_start_xmit         = rtl8192_ieee80211_rtl_xmit,
  };
  
  static int __devinit rtl8192_usb_probe(struct usb_interface *intf,
@@@ -7621,7 -7619,7 +7621,7 @@@ void rtl8192_try_wake_queue(struct net_
          spin_unlock_irqrestore(&priv->tx_lock,flags);
  
        if(enough_desc)
 -              ieee80211_wake_queue(priv->ieee80211);
 +              ieee80211_rtl_wake_queue(priv->ieee80211);
  }
  
  void EnableHWSecurityConfig8192(struct net_device *dev)
diff --combined net/wireless/nl80211.c
index a001ea32cb7d076de5be21fbb9c7ffcfdea448c8,b0495a1da22e748b26d634cec80f7fe296f7dda0..e447db04cf76dee4f178c3f8b98ac7c2be8393cb
@@@ -1,7 -1,7 +1,7 @@@
  /*
   * This is the new netlink-based wireless configuration interface.
   *
-  * Copyright 2006-2009        Johannes Berg <johannes@sipsolutions.net>
+  * Copyright 2006-2010        Johannes Berg <johannes@sipsolutions.net>
   */
  
  #include <linux/if.h>
@@@ -58,7 -58,7 +58,7 @@@ static int get_rdev_dev_by_info_ifindex
  }
  
  /* policy for the attributes */
 -static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = {
 +static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
        [NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
        [NL80211_ATTR_WIPHY_NAME] = { .type = NLA_NUL_STRING,
                                      .len = 20-1 },
        [NL80211_ATTR_DURATION] = { .type = NLA_U32 },
        [NL80211_ATTR_COOKIE] = { .type = NLA_U64 },
        [NL80211_ATTR_TX_RATES] = { .type = NLA_NESTED },
+       [NL80211_ATTR_FRAME] = { .type = NLA_BINARY,
+                                .len = IEEE80211_MAX_DATA_LEN },
+       [NL80211_ATTR_FRAME_MATCH] = { .type = NLA_BINARY, },
+       [NL80211_ATTR_PS_STATE] = { .type = NLA_U32 },
  };
  
  /* policy for the attributes */
 -static struct nla_policy
 -nl80211_key_policy[NL80211_KEY_MAX + 1] __read_mostly = {
 +static const struct nla_policy nl80211_key_policy[NL80211_KEY_MAX + 1] = {
        [NL80211_KEY_DATA] = { .type = NLA_BINARY, .len = WLAN_MAX_KEY_LEN },
        [NL80211_KEY_IDX] = { .type = NLA_U8 },
        [NL80211_KEY_CIPHER] = { .type = NLA_U32 },
@@@ -576,6 -581,7 +580,7 @@@ static int nl80211_send_wiphy(struct sk
        CMD(flush_pmksa, FLUSH_PMKSA);
        CMD(remain_on_channel, REMAIN_ON_CHANNEL);
        CMD(set_bitrate_mask, SET_TX_BITRATE_MASK);
+       CMD(action, ACTION);
        if (dev->wiphy.flags & WIPHY_FLAG_NETNS_OK) {
                i++;
                NLA_PUT_U32(msg, i, NL80211_CMD_SET_WIPHY_NETNS);
@@@ -2009,6 -2015,9 +2014,9 @@@ static int nl80211_new_station(struct s
        if (!info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES])
                return -EINVAL;
  
+       if (!info->attrs[NL80211_ATTR_STA_AID])
+               return -EINVAL;
        mac_addr = nla_data(info->attrs[NL80211_ATTR_MAC]);
        params.supported_rates =
                nla_data(info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES]);
        params.listen_interval =
                nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
  
-       if (info->attrs[NL80211_ATTR_STA_AID]) {
-               params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
-               if (!params.aid || params.aid > IEEE80211_MAX_AID)
-                       return -EINVAL;
-       }
+       params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
+       if (!params.aid || params.aid > IEEE80211_MAX_AID)
+               return -EINVAL;
  
        if (info->attrs[NL80211_ATTR_HT_CAPABILITY])
                params.ht_capa =
        if (err)
                goto out_rtnl;
  
+       if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
+           dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN) {
+               err = -EINVAL;
+               goto out;
+       }
        err = get_vlan(info, rdev, &params.vlan);
        if (err)
                goto out;
        /* validate settings */
        err = 0;
  
-       switch (dev->ieee80211_ptr->iftype) {
-       case NL80211_IFTYPE_AP:
-       case NL80211_IFTYPE_AP_VLAN:
-               /* all ok but must have AID */
-               if (!params.aid)
-                       err = -EINVAL;
-               break;
-       case NL80211_IFTYPE_MESH_POINT:
-               /* disallow things mesh doesn't support */
-               if (params.vlan)
-                       err = -EINVAL;
-               if (params.aid)
-                       err = -EINVAL;
-               if (params.ht_capa)
-                       err = -EINVAL;
-               if (params.listen_interval >= 0)
-                       err = -EINVAL;
-               if (params.supported_rates)
-                       err = -EINVAL;
-               if (params.sta_flags_mask)
-                       err = -EINVAL;
-               break;
-       default:
-               err = -EINVAL;
-       }
-       if (err)
-               goto out;
        if (!rdev->ops->add_station) {
                err = -EOPNOTSUPP;
                goto out;
@@@ -2112,8 -2096,7 +2095,7 @@@ static int nl80211_del_station(struct s
                goto out_rtnl;
  
        if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
-           dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN &&
-           dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT) {
+           dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN) {
                err = -EINVAL;
                goto out;
        }
@@@ -2500,7 -2483,8 +2482,7 @@@ static int nl80211_set_bss(struct sk_bu
        return err;
  }
  
 -static const struct nla_policy
 -      reg_rule_policy[NL80211_REG_RULE_ATTR_MAX + 1] = {
 +static const struct nla_policy reg_rule_policy[NL80211_REG_RULE_ATTR_MAX + 1] = {
        [NL80211_ATTR_REG_RULE_FLAGS]           = { .type = NLA_U32 },
        [NL80211_ATTR_FREQ_RANGE_START]         = { .type = NLA_U32 },
        [NL80211_ATTR_FREQ_RANGE_END]           = { .type = NLA_U32 },
@@@ -2669,7 -2653,8 +2651,7 @@@ do {
        } \
  } while (0);\
  
 -static struct nla_policy
 -nl80211_meshconf_params_policy[NL80211_MESHCONF_ATTR_MAX+1] __read_mostly = {
 +static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_ATTR_MAX+1] = {
        [NL80211_MESHCONF_RETRY_TIMEOUT] = { .type = NLA_U16 },
        [NL80211_MESHCONF_CONFIRM_TIMEOUT] = { .type = NLA_U16 },
        [NL80211_MESHCONF_HOLDING_TIMEOUT] = { .type = NLA_U16 },
@@@ -4467,7 -4452,8 +4449,7 @@@ static u32 rateset_to_mask(struct ieee8
        return mask;
  }
  
 -static struct nla_policy
 -nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] __read_mostly = {
 +static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = {
        [NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY,
                                    .len = NL80211_MAX_SUPP_RATES },
  };
@@@ -4545,6 -4531,257 +4527,257 @@@ static int nl80211_set_tx_bitrate_mask(
        return err;
  }
  
+ static int nl80211_register_action(struct sk_buff *skb, struct genl_info *info)
+ {
+       struct cfg80211_registered_device *rdev;
+       struct net_device *dev;
+       int err;
+       if (!info->attrs[NL80211_ATTR_FRAME_MATCH])
+               return -EINVAL;
+       if (nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH]) < 1)
+               return -EINVAL;
+       rtnl_lock();
+       err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev);
+       if (err)
+               goto unlock_rtnl;
+       if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION) {
+               err = -EOPNOTSUPP;
+               goto out;
+       }
+       /* not much point in registering if we can't reply */
+       if (!rdev->ops->action) {
+               err = -EOPNOTSUPP;
+               goto out;
+       }
+       err = cfg80211_mlme_register_action(dev->ieee80211_ptr, info->snd_pid,
+                       nla_data(info->attrs[NL80211_ATTR_FRAME_MATCH]),
+                       nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH]));
+  out:
+       cfg80211_unlock_rdev(rdev);
+       dev_put(dev);
+  unlock_rtnl:
+       rtnl_unlock();
+       return err;
+ }
+ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
+ {
+       struct cfg80211_registered_device *rdev;
+       struct net_device *dev;
+       struct ieee80211_channel *chan;
+       enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
+       u32 freq;
+       int err;
+       void *hdr;
+       u64 cookie;
+       struct sk_buff *msg;
+       if (!info->attrs[NL80211_ATTR_FRAME] ||
+           !info->attrs[NL80211_ATTR_WIPHY_FREQ])
+               return -EINVAL;
+       rtnl_lock();
+       err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev);
+       if (err)
+               goto unlock_rtnl;
+       if (!rdev->ops->action) {
+               err = -EOPNOTSUPP;
+               goto out;
+       }
+       if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION) {
+               err = -EOPNOTSUPP;
+               goto out;
+       }
+       if (!netif_running(dev)) {
+               err = -ENETDOWN;
+               goto out;
+       }
+       if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) {
+               channel_type = nla_get_u32(
+                       info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]);
+               if (channel_type != NL80211_CHAN_NO_HT &&
+                   channel_type != NL80211_CHAN_HT20 &&
+                   channel_type != NL80211_CHAN_HT40PLUS &&
+                   channel_type != NL80211_CHAN_HT40MINUS)
+                       err = -EINVAL;
+                       goto out;
+       }
+       freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
+       chan = rdev_freq_to_chan(rdev, freq, channel_type);
+       if (chan == NULL) {
+               err = -EINVAL;
+               goto out;
+       }
+       msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+       if (!msg) {
+               err = -ENOMEM;
+               goto out;
+       }
+       hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
+                            NL80211_CMD_ACTION);
+       if (IS_ERR(hdr)) {
+               err = PTR_ERR(hdr);
+               goto free_msg;
+       }
+       err = cfg80211_mlme_action(rdev, dev, chan, channel_type,
+                                  nla_data(info->attrs[NL80211_ATTR_FRAME]),
+                                  nla_len(info->attrs[NL80211_ATTR_FRAME]),
+                                  &cookie);
+       if (err)
+               goto free_msg;
+       NLA_PUT_U64(msg, NL80211_ATTR_COOKIE, cookie);
+       genlmsg_end(msg, hdr);
+       err = genlmsg_reply(msg, info);
+       goto out;
+  nla_put_failure:
+       err = -ENOBUFS;
+  free_msg:
+       nlmsg_free(msg);
+  out:
+       cfg80211_unlock_rdev(rdev);
+       dev_put(dev);
+ unlock_rtnl:
+       rtnl_unlock();
+       return err;
+ }
+ static int nl80211_set_power_save(struct sk_buff *skb, struct genl_info *info)
+ {
+       struct cfg80211_registered_device *rdev;
+       struct wireless_dev *wdev;
+       struct net_device *dev;
+       u8 ps_state;
+       bool state;
+       int err;
+       if (!info->attrs[NL80211_ATTR_PS_STATE]) {
+               err = -EINVAL;
+               goto out;
+       }
+       ps_state = nla_get_u32(info->attrs[NL80211_ATTR_PS_STATE]);
+       if (ps_state != NL80211_PS_DISABLED && ps_state != NL80211_PS_ENABLED) {
+               err = -EINVAL;
+               goto out;
+       }
+       rtnl_lock();
+       err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev);
+       if (err)
+               goto unlock_rdev;
+       wdev = dev->ieee80211_ptr;
+       if (!rdev->ops->set_power_mgmt) {
+               err = -EOPNOTSUPP;
+               goto unlock_rdev;
+       }
+       state = (ps_state == NL80211_PS_ENABLED) ? true : false;
+       if (state == wdev->ps)
+               goto unlock_rdev;
+       wdev->ps = state;
+       if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, wdev->ps,
+                                     wdev->ps_timeout))
+               /* assume this means it's off */
+               wdev->ps = false;
+ unlock_rdev:
+       cfg80211_unlock_rdev(rdev);
+       dev_put(dev);
+       rtnl_unlock();
+ out:
+       return err;
+ }
+ static int nl80211_get_power_save(struct sk_buff *skb, struct genl_info *info)
+ {
+       struct cfg80211_registered_device *rdev;
+       enum nl80211_ps_state ps_state;
+       struct wireless_dev *wdev;
+       struct net_device *dev;
+       struct sk_buff *msg;
+       void *hdr;
+       int err;
+       rtnl_lock();
+       err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev);
+       if (err)
+               goto unlock_rtnl;
+       wdev = dev->ieee80211_ptr;
+       if (!rdev->ops->set_power_mgmt) {
+               err = -EOPNOTSUPP;
+               goto out;
+       }
+       msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+       if (!msg) {
+               err = -ENOMEM;
+               goto out;
+       }
+       hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
+                            NL80211_CMD_GET_POWER_SAVE);
+       if (!hdr) {
+               err = -ENOMEM;
+               goto free_msg;
+       }
+       if (wdev->ps)
+               ps_state = NL80211_PS_ENABLED;
+       else
+               ps_state = NL80211_PS_DISABLED;
+       NLA_PUT_U32(msg, NL80211_ATTR_PS_STATE, ps_state);
+       genlmsg_end(msg, hdr);
+       err = genlmsg_reply(msg, info);
+       goto out;
+ nla_put_failure:
+       err = -ENOBUFS;
+ free_msg:
+       nlmsg_free(msg);
+ out:
+       cfg80211_unlock_rdev(rdev);
+       dev_put(dev);
+ unlock_rtnl:
+       rtnl_unlock();
+       return err;
+ }
  static struct genl_ops nl80211_ops[] = {
        {
                .cmd = NL80211_CMD_GET_WIPHY,
                .policy = nl80211_policy,
                .flags = GENL_ADMIN_PERM,
        },
+       {
+               .cmd = NL80211_CMD_REGISTER_ACTION,
+               .doit = nl80211_register_action,
+               .policy = nl80211_policy,
+               .flags = GENL_ADMIN_PERM,
+       },
+       {
+               .cmd = NL80211_CMD_ACTION,
+               .doit = nl80211_action,
+               .policy = nl80211_policy,
+               .flags = GENL_ADMIN_PERM,
+       },
+       {
+               .cmd = NL80211_CMD_SET_POWER_SAVE,
+               .doit = nl80211_set_power_save,
+               .policy = nl80211_policy,
+               .flags = GENL_ADMIN_PERM,
+       },
+       {
+               .cmd = NL80211_CMD_GET_POWER_SAVE,
+               .doit = nl80211_get_power_save,
+               .policy = nl80211_policy,
+               /* can be retrieved by unprivileged users */
+       },
  };
  
  static struct genl_multicast_group nl80211_mlme_mcgrp = {
@@@ -5497,6 -5758,110 +5754,110 @@@ void nl80211_send_sta_event(struct cfg8
                                nl80211_mlme_mcgrp.id, gfp);
  }
  
+ int nl80211_send_action(struct cfg80211_registered_device *rdev,
+                       struct net_device *netdev, u32 nlpid,
+                       int freq, const u8 *buf, size_t len, gfp_t gfp)
+ {
+       struct sk_buff *msg;
+       void *hdr;
+       int err;
+       msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
+       if (!msg)
+               return -ENOMEM;
+       hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_ACTION);
+       if (!hdr) {
+               nlmsg_free(msg);
+               return -ENOMEM;
+       }
+       NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
+       NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex);
+       NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
+       NLA_PUT(msg, NL80211_ATTR_FRAME, len, buf);
+       err = genlmsg_end(msg, hdr);
+       if (err < 0) {
+               nlmsg_free(msg);
+               return err;
+       }
+       err = genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlpid);
+       if (err < 0)
+               return err;
+       return 0;
+  nla_put_failure:
+       genlmsg_cancel(msg, hdr);
+       nlmsg_free(msg);
+       return -ENOBUFS;
+ }
+ void nl80211_send_action_tx_status(struct cfg80211_registered_device *rdev,
+                                  struct net_device *netdev, u64 cookie,
+                                  const u8 *buf, size_t len, bool ack,
+                                  gfp_t gfp)
+ {
+       struct sk_buff *msg;
+       void *hdr;
+       msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
+       if (!msg)
+               return;
+       hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_ACTION_TX_STATUS);
+       if (!hdr) {
+               nlmsg_free(msg);
+               return;
+       }
+       NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
+       NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex);
+       NLA_PUT(msg, NL80211_ATTR_FRAME, len, buf);
+       NLA_PUT_U64(msg, NL80211_ATTR_COOKIE, cookie);
+       if (ack)
+               NLA_PUT_FLAG(msg, NL80211_ATTR_ACK);
+       if (genlmsg_end(msg, hdr) < 0) {
+               nlmsg_free(msg);
+               return;
+       }
+       genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
+       return;
+  nla_put_failure:
+       genlmsg_cancel(msg, hdr);
+       nlmsg_free(msg);
+ }
+ static int nl80211_netlink_notify(struct notifier_block * nb,
+                                 unsigned long state,
+                                 void *_notify)
+ {
+       struct netlink_notify *notify = _notify;
+       struct cfg80211_registered_device *rdev;
+       struct wireless_dev *wdev;
+       if (state != NETLINK_URELEASE)
+               return NOTIFY_DONE;
+       rcu_read_lock();
+       list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list)
+               list_for_each_entry_rcu(wdev, &rdev->netdev_list, list)
+                       cfg80211_mlme_unregister_actions(wdev, notify->pid);
+       rcu_read_unlock();
+       return NOTIFY_DONE;
+ }
+ static struct notifier_block nl80211_netlink_notifier = {
+       .notifier_call = nl80211_netlink_notify,
+ };
  /* initialisation/exit functions */
  
  int nl80211_init(void)
                goto err_out;
  #endif
  
+       err = netlink_register_notifier(&nl80211_netlink_notifier);
+       if (err)
+               goto err_out;
        return 0;
   err_out:
        genl_unregister_family(&nl80211_fam);
  
  void nl80211_exit(void)
  {
+       netlink_unregister_notifier(&nl80211_netlink_notifier);
        genl_unregister_family(&nl80211_fam);
  }