Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Jul 2012 17:44:50 +0000 (13:44 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Jul 2012 17:44:50 +0000 (13:44 -0400)
14 files changed:
1  2 
MAINTAINERS
drivers/net/wimax/i2400m/fw.c
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/carl9170/rx.c
drivers/net/wireless/brcm80211/brcmsmac/dma.c
drivers/net/wireless/brcm80211/brcmsmac/main.c
drivers/net/wireless/iwlwifi/pcie/trans.c
drivers/net/wireless/mac80211_hwsim.c
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/mwifiex/sta_cmd.c
drivers/net/wireless/mwifiex/sta_cmdresp.c
net/mac80211/mesh_plink.c
net/nfc/netlink.c
net/wireless/nl80211.c

diff --combined MAINTAINERS
index ce7398e1e1ecfcbac1638ca51c0ec6309d84be14,1b2b77da1584f0830cca58976f0437bd61b3dee1..b4321fb74698d161d399fa2e9b519da9e6c379e9
@@@ -579,7 -579,7 +579,7 @@@ F: drivers/net/appletalk
  F:    net/appletalk/
  
  ARASAN COMPACT FLASH PATA CONTROLLER
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  L:    linux-ide@vger.kernel.org
  S:    Maintained
  F:    include/linux/pata_arasan_cf_data.h
@@@ -1077,7 -1077,7 +1077,7 @@@ F:      drivers/media/video/s5p-fimc
  ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
  M:    Kyungmin Park <kyungmin.park@samsung.com>
  M:    Kamil Debski <k.debski@samsung.com>
 -M:     Jeongtae Park <jtp.park@samsung.com>
 +M:    Jeongtae Park <jtp.park@samsung.com>
  L:    linux-arm-kernel@lists.infradead.org
  L:    linux-media@vger.kernel.org
  S:    Maintained
@@@ -1647,11 -1647,11 +1647,11 @@@ S:   Maintaine
  F:    drivers/gpio/gpio-bt8xx.c
  
  BTRFS FILE SYSTEM
 -M:    Chris Mason <chris.mason@oracle.com>
 +M:    Chris Mason <chris.mason@fusionio.com>
  L:    linux-btrfs@vger.kernel.org
  W:    http://btrfs.wiki.kernel.org/
  Q:    http://patchwork.kernel.org/project/linux-btrfs/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git
  S:    Maintained
  F:    Documentation/filesystems/btrfs.txt
  F:    fs/btrfs/
@@@ -1744,10 -1744,10 +1744,10 @@@ F:   include/linux/can/platform
  CAPABILITIES
  M:    Serge Hallyn <serge.hallyn@canonical.com>
  L:    linux-security-module@vger.kernel.org
 -S:    Supported       
 +S:    Supported
  F:    include/linux/capability.h
  F:    security/capability.c
 -F:    security/commoncap.c 
 +F:    security/commoncap.c
  F:    kernel/capability.c
  
  CELL BROADBAND ENGINE ARCHITECTURE
@@@ -2150,11 -2150,11 +2150,11 @@@ S:   Orpha
  F:    drivers/net/wan/pc300*
  
  CYTTSP TOUCHSCREEN DRIVER
 -M:      Javier Martinez Canillas <javier@dowhile0.org>
 -L:      linux-input@vger.kernel.org
 -S:      Maintained
 -F:      drivers/input/touchscreen/cyttsp*
 -F:      include/linux/input/cyttsp.h
 +M:    Javier Martinez Canillas <javier@dowhile0.org>
 +L:    linux-input@vger.kernel.org
 +S:    Maintained
 +F:    drivers/input/touchscreen/cyttsp*
 +F:    include/linux/input/cyttsp.h
  
  DAMA SLAVE for AX.25
  M:    Joerg Reuter <jreuter@yaina.de>
@@@ -2274,7 -2274,7 +2274,7 @@@ F:      include/linux/device-mapper.
  F:    include/linux/dm-*.h
  
  DIOLAN U2C-12 I2C DRIVER
 -M:    Guenter Roeck <guenter.roeck@ericsson.com>
 +M:    Guenter Roeck <linux@roeck-us.net>
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
  F:    drivers/i2c/busses/i2c-diolan-u2c.c
@@@ -2934,13 -2934,6 +2934,13 @@@ F:    Documentation/power/freezing-of-task
  F:    include/linux/freezer.h
  F:    kernel/freezer.c
  
 +FRONTSWAP API
 +M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    mm/frontswap.c
 +F:    include/linux/frontswap.h
 +
  FS-CACHE: LOCAL CACHING FOR NETWORK FILESYSTEMS
  M:    David Howells <dhowells@redhat.com>
  L:    linux-cachefs@redhat.com
@@@ -3149,7 -3142,7 +3149,7 @@@ F:      drivers/tty/hvc
  
  HARDWARE MONITORING
  M:    Jean Delvare <khali@linux-fr.org>
 -M:    Guenter Roeck <guenter.roeck@ericsson.com>
 +M:    Guenter Roeck <linux@roeck-us.net>
  L:    lm-sensors@lm-sensors.org
  W:    http://www.lm-sensors.org/
  T:    quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-hwmon/
@@@ -3661,14 -3654,6 +3661,6 @@@ T:     git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    drivers/net/wireless/iwlwifi/
  
- INTEL WIRELESS MULTICOMM 3200 WIFI (iwmc3200wifi)
- M:    Samuel Ortiz <samuel.ortiz@intel.com>
- M:    Intel Linux Wireless <ilw@linux.intel.com>
- L:    linux-wireless@vger.kernel.org
- S:    Supported
- W:    http://wireless.kernel.org/en/users/Drivers/iwmc3200wifi
- F:    drivers/net/wireless/iwmc3200wifi/
  INTEL MANAGEMENT ENGINE (mei)
  M:    Tomas Winkler <tomas.winkler@intel.com>
  L:    linux-kernel@vger.kernel.org
@@@ -4107,8 -4092,6 +4099,8 @@@ F:      drivers/scsi/53c700
  LED SUBSYSTEM
  M:    Bryan Wu <bryan.wu@canonical.com>
  M:    Richard Purdie <rpurdie@rpsys.net>
 +L:    linux-leds@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git
  S:    Maintained
  F:    drivers/leds/
  F:    include/linux/leds.h
@@@ -4426,13 -4409,6 +4418,13 @@@ S:    Orpha
  F:    drivers/video/matrox/matroxfb_*
  F:    include/linux/matroxfb.h
  
 +MAX16065 HARDWARE MONITOR DRIVER
 +M:    Guenter Roeck <linux@roeck-us.net>
 +L:    lm-sensors@lm-sensors.org
 +S:    Maintained
 +F:    Documentation/hwmon/max16065
 +F:    drivers/hwmon/max16065.c
 +
  MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
  M:    "Hans J. Koch" <hjk@hansjkoch.de>
  L:    lm-sensors@lm-sensors.org
@@@ -4638,6 -4614,8 +4630,6 @@@ F:      net/sched/sch_netem.
  NETERION 10GbE DRIVERS (s2io/vxge)
  M:    Jon Mason <jdmason@kudzu.us>
  L:    netdev@vger.kernel.org
 -W:    http://trac.neterion.com/cgi-bin/trac.cgi/wiki/Linux?Anonymous
 -W:    http://trac.neterion.com/cgi-bin/trac.cgi/wiki/X3100Linux?Anonymous
  S:    Supported
  F:    Documentation/networking/s2io.txt
  F:    Documentation/networking/vxge.txt
@@@ -4653,8 -4631,8 +4645,8 @@@ L:      netfilter@vger.kernel.or
  L:    coreteam@netfilter.org
  W:    http://www.netfilter.org/
  W:    http://www.iptables.org/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-2.6.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next-2.6.git
 +T:    git git://1984.lsi.us.es/nf
 +T:    git git://1984.lsi.us.es/nf-next
  S:    Supported
  F:    include/linux/netfilter*
  F:    include/linux/netfilter/
@@@ -5169,7 -5147,7 +5161,7 @@@ F:      drivers/leds/leds-pca9532.
  F:    include/linux/leds-pca9532.h
  
  PCA9541 I2C BUS MASTER SELECTOR DRIVER
 -M:    Guenter Roeck <guenter.roeck@ericsson.com>
 +M:    Guenter Roeck <linux@roeck-us.net>
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
  F:    drivers/i2c/muxes/i2c-mux-pca9541.c
@@@ -5189,7 -5167,7 +5181,7 @@@ S:      Maintaine
  F:    drivers/firmware/pcdp.*
  
  PCI ERROR RECOVERY
 -M:     Linas Vepstas <linasvepstas@gmail.com>
 +M:    Linas Vepstas <linasvepstas@gmail.com>
  L:    linux-pci@vger.kernel.org
  S:    Supported
  F:    Documentation/PCI/pci-error-recovery.txt
@@@ -5295,7 -5273,7 +5287,7 @@@ S:      Maintaine
  F:    drivers/pinctrl/
  
  PIN CONTROLLER - ST SPEAR
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  L:    spear-devel@list.st.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
@@@ -5319,7 -5297,7 +5311,7 @@@ F:      drivers/video/fb-puv3.
  F:    drivers/rtc/rtc-puv3.c
  
  PMBUS HARDWARE MONITORING DRIVERS
 -M:    Guenter Roeck <guenter.roeck@ericsson.com>
 +M:    Guenter Roeck <linux@roeck-us.net>
  L:    lm-sensors@lm-sensors.org
  W:    http://www.lm-sensors.org/
  W:    http://www.roeck-us.net/linux/drivers/
@@@ -5872,7 -5850,7 +5864,7 @@@ S:      Maintaine
  F:    drivers/tty/serial
  
  SYNOPSYS DESIGNWARE DMAC DRIVER
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  S:    Maintained
  F:    include/linux/dw_dmac.h
  F:    drivers/dma/dw_dmac_regs.h
@@@ -6020,7 -5998,7 +6012,7 @@@ S:      Maintaine
  F:    drivers/mmc/host/sdhci-s3c.c
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  L:    spear-devel@list.st.com
  L:    linux-mmc@vger.kernel.org
  S:    Maintained
@@@ -6376,7 -6354,7 +6368,7 @@@ S:      Maintaine
  F:    include/linux/compiler.h
  
  SPEAR PLATFORM SUPPORT
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  M:    Shiraz Hashim <shiraz.hashim@st.com>
  L:    spear-devel@list.st.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -6385,7 -6363,7 +6377,7 @@@ S:      Maintaine
  F:    arch/arm/plat-spear/
  
  SPEAR13XX MACHINE SUPPORT
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  M:    Shiraz Hashim <shiraz.hashim@st.com>
  L:    spear-devel@list.st.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -6394,7 -6372,7 +6386,7 @@@ S:      Maintaine
  F:    arch/arm/mach-spear13xx/
  
  SPEAR3XX MACHINE SUPPORT
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  M:    Shiraz Hashim <shiraz.hashim@st.com>
  L:    spear-devel@list.st.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -6405,7 -6383,7 +6397,7 @@@ F:      arch/arm/mach-spear3xx
  SPEAR6XX MACHINE SUPPORT
  M:    Rajeev Kumar <rajeev-dlh.kumar@st.com>
  M:    Shiraz Hashim <shiraz.hashim@st.com>
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  L:    spear-devel@list.st.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
@@@ -6413,7 -6391,7 +6405,7 @@@ S:      Maintaine
  F:    arch/arm/mach-spear6xx/
  
  SPEAR CLOCK FRAMEWORK SUPPORT
 -M:    Viresh Kumar <viresh.kumar@st.com>
 +M:     Viresh Kumar <viresh.linux@gmail.com>
  L:    spear-devel@list.st.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
@@@ -7314,11 -7292,11 +7306,11 @@@ F:   Documentation/DocBook/uio-howto.tmp
  F:    drivers/uio/
  F:    include/linux/uio*.h
  
 -UTIL-LINUX-NG PACKAGE
 +UTIL-LINUX PACKAGE
  M:    Karel Zak <kzak@redhat.com>
 -L:    util-linux-ng@vger.kernel.org
 -W:    http://kernel.org/~kzak/util-linux-ng/
 -T:    git git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git
 +L:    util-linux@vger.kernel.org
 +W:    http://en.wikipedia.org/wiki/Util-linux
 +T:    git git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
  S:    Maintained
  
  UVESAFB DRIVER
@@@ -7420,7 -7398,7 +7412,7 @@@ F:      include/linux/vlynq.
  
  VME SUBSYSTEM
  M:    Martyn Welch <martyn.welch@ge.com>
 -M:    Manohar Vanga <manohar.vanga@cern.ch>
 +M:    Manohar Vanga <manohar.vanga@gmail.com>
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    devel@driverdev.osuosl.org
  S:    Maintained
index d09e44970e637c3a6600b28d070896009bf9341d,7632f8cf09dfdd0ade72d274d8b700f257b375f6..283237f6f074a775b5ce82d6db1a64459168cfaf
@@@ -51,8 -51,7 +51,7 @@@
   * firmware. Normal hardware takes only signed firmware.
   *
   * On boot mode, in USB, we write to the device using the bulk out
-  * endpoint and read from it in the notification endpoint. In SDIO we
-  * talk to it via the write address and read from the read address.
+  * endpoint and read from it in the notification endpoint.
   *
   * Upon entrance to boot mode, the device sends (preceded with a few
   * zero length packets (ZLPs) on the notification endpoint in USB) a
@@@ -1268,7 -1267,7 +1267,7 @@@ int i2400m_fw_check(struct i2400m *i240
                size_t leftover, offset, header_len, size;
  
                leftover = top - itr;
 -              offset = itr - (const void *) bcf;
 +              offset = itr - bcf;
                if (leftover <= sizeof(*bcf_hdr)) {
                        dev_err(dev, "firmware %s: %zu B left at @%zx, "
                                "not enough for BCF header\n",
index b1e59236d24550407a17dfd9fa1df79499e959a2,25de6f9a9778a964828cd7ebcc6ae4ff970f75cf..ab2bfcb3bed2652981d64cbd32487bc08c6dd79d
@@@ -3178,7 -3178,7 +3178,7 @@@ static int ar9300_compress_decision(str
                                mdata_size, length);
                        return -1;
                }
 -              memcpy(mptr, (u8 *) (word + COMP_HDR_LEN), length);
 +              memcpy(mptr, word + COMP_HDR_LEN, length);
                ath_dbg(common, EEPROM,
                        "restored eeprom %d: uncompressed, length %d\n",
                        it, length);
                        "restore eeprom %d: block, reference %d, length %d\n",
                        it, reference, length);
                ar9300_uncompress_block(ah, mptr, mdata_size,
 -                                      (u8 *) (word + COMP_HDR_LEN), length);
 +                                      (word + COMP_HDR_LEN), length);
                break;
        default:
                ath_dbg(common, EEPROM, "unknown compression code %d\n", code);
@@@ -3509,7 -3509,7 +3509,7 @@@ static void ar9003_hw_xpa_bias_level_ap
  
        if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
                REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias);
-       else if (AR_SREV_9462(ah))
+       else if (AR_SREV_9462(ah) || AR_SREV_9550(ah))
                REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
        else {
                REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
@@@ -3591,6 -3591,9 +3591,9 @@@ static void ar9003_hw_ant_ctrl_apply(st
        if (AR_SREV_9462(ah)) {
                REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
                                AR_SWITCH_TABLE_COM_AR9462_ALL, value);
+       } else if (AR_SREV_9550(ah)) {
+               REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
+                               AR_SWITCH_TABLE_COM_AR9550_ALL, value);
        } else
                REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
                              AR_SWITCH_TABLE_COM_ALL, value);
@@@ -3957,7 -3960,7 +3960,7 @@@ static void ath9k_hw_ar9300_set_board_v
        ar9003_hw_drive_strength_apply(ah);
        ar9003_hw_atten_apply(ah, chan);
        ar9003_hw_quick_drop_apply(ah, chan->channel);
-       if (!AR_SREV_9330(ah) && !AR_SREV_9340(ah))
+       if (!AR_SREV_9330(ah) && !AR_SREV_9340(ah) && !AR_SREV_9550(ah))
                ar9003_hw_internal_regulator_apply(ah);
        if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
                ar9003_hw_apply_tuning_caps(ah);
index 7a8e90eaad83332bb7eb2107c4faa7963fca5c44,25910a14e79cb1f677d5737011e4156ee0b9f62d..6f6a34155667d0da84fdb5c9d63824ce7d1ac37b
@@@ -161,7 -161,7 +161,7 @@@ static void carl9170_cmd_callback(struc
  
  void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len)
  {
 -      struct carl9170_rsp *cmd = (void *) buf;
 +      struct carl9170_rsp *cmd = buf;
        struct ieee80211_vif *vif;
  
        if (carl9170_check_sequence(ar, cmd->hdr.seq))
@@@ -520,7 -520,7 +520,7 @@@ static u8 *carl9170_find_ie(u8 *data, u
   */
  static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len)
  {
 -      struct ieee80211_hdr *hdr = (void *) data;
 +      struct ieee80211_hdr *hdr = data;
        struct ieee80211_tim_ie *tim_ie;
        u8 *tim;
        u8 tim_len;
        }
  }
  
+ static void carl9170_ba_check(struct ar9170 *ar, void *data, unsigned int len)
+ {
+       struct ieee80211_bar *bar = (void *) data;
+       struct carl9170_bar_list_entry *entry;
+       unsigned int queue;
+       if (likely(!ieee80211_is_back(bar->frame_control)))
+               return;
+       if (len <= sizeof(*bar) + FCS_LEN)
+               return;
+       queue = TID_TO_WME_AC(((le16_to_cpu(bar->control) &
+               IEEE80211_BAR_CTRL_TID_INFO_MASK) >>
+               IEEE80211_BAR_CTRL_TID_INFO_SHIFT) & 7);
+       rcu_read_lock();
+       list_for_each_entry_rcu(entry, &ar->bar_list[queue], list) {
+               struct sk_buff *entry_skb = entry->skb;
+               struct _carl9170_tx_superframe *super = (void *)entry_skb->data;
+               struct ieee80211_bar *entry_bar = (void *)super->frame_data;
+ #define TID_CHECK(a, b) (                                             \
+       ((a) & cpu_to_le16(IEEE80211_BAR_CTRL_TID_INFO_MASK)) ==        \
+       ((b) & cpu_to_le16(IEEE80211_BAR_CTRL_TID_INFO_MASK)))          \
+               if (bar->start_seq_num == entry_bar->start_seq_num &&
+                   TID_CHECK(bar->control, entry_bar->control) &&
+                   compare_ether_addr(bar->ra, entry_bar->ta) == 0 &&
+                   compare_ether_addr(bar->ta, entry_bar->ra) == 0) {
+                       struct ieee80211_tx_info *tx_info;
+                       tx_info = IEEE80211_SKB_CB(entry_skb);
+                       tx_info->flags |= IEEE80211_TX_STAT_ACK;
+                       spin_lock_bh(&ar->bar_list_lock[queue]);
+                       list_del_rcu(&entry->list);
+                       spin_unlock_bh(&ar->bar_list_lock[queue]);
+                       kfree_rcu(entry, head);
+                       break;
+               }
+       }
+       rcu_read_unlock();
+ #undef TID_CHECK
+ }
  static bool carl9170_ampdu_check(struct ar9170 *ar, u8 *buf, u8 ms)
  {
        __le16 fc;
@@@ -738,6 -785,8 +785,8 @@@ static void carl9170_handle_mpdu(struc
  
        carl9170_ps_beacon(ar, buf, mpdu_len);
  
+       carl9170_ba_check(ar, buf, mpdu_len);
        skb = carl9170_rx_copy_data(buf, mpdu_len);
        if (!skb)
                goto drop;
index 7516639412ec6740389c6eb005414d4ef826830d,f64c5cf3fccc02f54fd3ceb3753563a3548e2e35..5e53305bd9a9bc57901c1a0597b00de32208a57b
@@@ -573,6 -573,7 +573,7 @@@ struct dma_pub *dma_attach(char *name, 
        struct dma_info *di;
        u8 rev = core->id.rev;
        uint size;
+       struct si_info *sii = container_of(sih, struct si_info, pub);
  
        /* allocate private info structure */
        di = kzalloc(sizeof(struct dma_info), GFP_ATOMIC);
         */
        di->ddoffsetlow = 0;
        di->dataoffsetlow = 0;
-       /* add offset for pcie with DMA64 bus */
-       di->ddoffsetlow = 0;
-       di->ddoffsethigh = SI_PCIE_DMA_H32;
+       /* for pci bus, add offset */
+       if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) {
+               /* add offset for pcie with DMA64 bus */
+               di->ddoffsetlow = 0;
+               di->ddoffsethigh = SI_PCIE_DMA_H32;
+       }
        di->dataoffsetlow = di->ddoffsetlow;
        di->dataoffsethigh = di->ddoffsethigh;
        /* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */
-       if ((core->id.id == SDIOD_CORE_ID)
+       if ((core->id.id == BCMA_CORE_SDIO_DEV)
            && ((rev > 0) && (rev <= 2)))
                di->addrext = false;
-       else if ((core->id.id == I2S_CORE_ID) &&
+       else if ((core->id.id == BCMA_CORE_I2S) &&
                 ((rev == 0) || (rev == 1)))
                di->addrext = false;
        else
@@@ -1433,7 -1438,7 +1438,7 @@@ void dma_walk_packets(struct dma_pub *d
        struct ieee80211_tx_info *tx_info;
  
        while (i != end) {
 -              skb = (struct sk_buff *)di->txp[i];
 +              skb = di->txp[i];
                if (skb != NULL) {
                        tx_info = (struct ieee80211_tx_info *)skb->cb;
                        (callback_fnc)(tx_info, arg_a);
index bb00b6528d8f3bbb01925650f77d3bed50aa34c6,d39f7d041e0bc3351a50035e40853e298ec8205e..cb73f2250b11db1ae976fe131d6cbc202f7da126
@@@ -269,7 -269,7 +269,7 @@@ struct brcms_c_bit_desc 
   */
  
  /* Starting corerev for the fifo size table */
- #define XMTFIFOTBL_STARTREV   20
+ #define XMTFIFOTBL_STARTREV   17
  
  struct d11init {
        __le16 addr;
@@@ -333,6 -333,12 +333,12 @@@ const u8 wlc_prio2prec_map[] = 
  };
  
  static const u16 xmtfifo_sz[][NFIFO] = {
+       /* corerev 17: 5120, 49152, 49152, 5376, 4352, 1280 */
+       {20, 192, 192, 21, 17, 5},
+       /* corerev 18: */
+       {0, 0, 0, 0, 0, 0},
+       /* corerev 19: */
+       {0, 0, 0, 0, 0, 0},
        /* corerev 20: 5120, 49152, 49152, 5376, 4352, 1280 */
        {20, 192, 192, 21, 17, 5},
        /* corerev 21: 2304, 14848, 5632, 3584, 3584, 1280 */
        {20, 192, 192, 21, 17, 5},
        /* corerev 24: 2304, 14848, 5632, 3584, 3584, 1280 */
        {9, 58, 22, 14, 14, 5},
+       /* corerev 25: */
+       {0, 0, 0, 0, 0, 0},
+       /* corerev 26: */
+       {0, 0, 0, 0, 0, 0},
+       /* corerev 27: */
+       {0, 0, 0, 0, 0, 0},
+       /* corerev 28: 2304, 14848, 5632, 3584, 3584, 1280 */
+       {9, 58, 22, 14, 14, 5},
  };
  
  #ifdef DEBUG
@@@ -1942,7 -1956,8 +1956,8 @@@ static bool brcms_b_radio_read_hwdisabl
                 * accesses phyreg throughput mac. This can be skipped since
                 * only mac reg is accessed below
                 */
-               flags |= SICF_PCLKE;
+               if (D11REV_GE(wlc_hw->corerev, 18))
+                       flags |= SICF_PCLKE;
  
                /*
                 * TODO: test suspend/resume
@@@ -2023,7 -2038,8 +2038,8 @@@ void brcms_b_corereset(struct brcms_har
         * phyreg throughput mac, AND phy_reset is skipped at early stage when
         * band->pi is invalid. need to enable PHY CLK
         */
-       flags |= SICF_PCLKE;
+       if (D11REV_GE(wlc_hw->corerev, 18))
+               flags |= SICF_PCLKE;
  
        /*
         * reset the core
@@@ -2126,8 -2142,8 +2142,8 @@@ void brcms_b_switch_macfreq(struct brcm
  {
        struct bcma_device *core = wlc_hw->d11core;
  
-       if ((ai_get_chip_id(wlc_hw->sih) == BCM43224_CHIP_ID) ||
-           (ai_get_chip_id(wlc_hw->sih) == BCM43225_CHIP_ID)) {
+       if ((ai_get_chip_id(wlc_hw->sih) == BCMA_CHIP_ID_BCM43224) ||
+           (ai_get_chip_id(wlc_hw->sih) == BCMA_CHIP_ID_BCM43225)) {
                if (spurmode == WL_SPURAVOID_ON2) {     /* 126Mhz */
                        bcma_write16(core, D11REGOFFS(tsf_clk_frac_l), 0x2082);
                        bcma_write16(core, D11REGOFFS(tsf_clk_frac_h), 0x8);
@@@ -2791,7 -2807,7 +2807,7 @@@ void brcms_b_core_phypll_ctl(struct brc
        tmp = 0;
  
        if (on) {
-               if ((ai_get_chip_id(wlc_hw->sih) == BCM4313_CHIP_ID)) {
+               if ((ai_get_chip_id(wlc_hw->sih) == BCMA_CHIP_ID_BCM4313)) {
                        bcma_set32(core, D11REGOFFS(clk_ctl_st),
                                   CCS_ERSRC_REQ_HT |
                                   CCS_ERSRC_REQ_D11PLL |
@@@ -4218,9 -4234,8 +4234,8 @@@ static void brcms_c_radio_timer(void *a
  }
  
  /* common low-level watchdog code */
- static void brcms_b_watchdog(void *arg)
+ static void brcms_b_watchdog(struct brcms_c_info *wlc)
  {
-       struct brcms_c_info *wlc = (struct brcms_c_info *) arg;
        struct brcms_hardware *wlc_hw = wlc->hw;
  
        BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit);
  }
  
  /* common watchdog code */
- static void brcms_c_watchdog(void *arg)
+ static void brcms_c_watchdog(struct brcms_c_info *wlc)
  {
-       struct brcms_c_info *wlc = (struct brcms_c_info *) arg;
        BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
  
        if (!wlc->pub->up)
  
  static void brcms_c_watchdog_by_timer(void *arg)
  {
-       brcms_c_watchdog(arg);
+       struct brcms_c_info *wlc = (struct brcms_c_info *) arg;
+       brcms_c_watchdog(wlc);
  }
  
  static bool brcms_c_timers_init(struct brcms_c_info *wlc, int unit)
@@@ -4454,11 -4469,9 +4469,9 @@@ static int brcms_b_attach(struct brcms_
        }
  
        /* verify again the device is supported */
-       if (core->bus->hosttype == BCMA_HOSTTYPE_PCI &&
-           !brcms_c_chipmatch(pcidev->vendor, pcidev->device)) {
-               wiphy_err(wiphy, "wl%d: brcms_b_attach: Unsupported "
-                       "vendor/device (0x%x/0x%x)\n",
-                        unit, pcidev->vendor, pcidev->device);
+       if (!brcms_c_chipmatch(core)) {
+               wiphy_err(wiphy, "wl%d: brcms_b_attach: Unsupported device\n",
+                        unit);
                err = 12;
                goto fail;
        }
        else
                wlc_hw->_nbands = 1;
  
-       if ((ai_get_chip_id(wlc_hw->sih) == BCM43225_CHIP_ID))
+       if ((ai_get_chip_id(wlc_hw->sih) == BCMA_CHIP_ID_BCM43225))
                wlc_hw->_nbands = 1;
  
        /* BMAC_NOTE: remove init of pub values when brcms_c_attach()
                wlc_hw->machwcap_backup = wlc_hw->machwcap;
  
                /* init tx fifo size */
+               WARN_ON((wlc_hw->corerev - XMTFIFOTBL_STARTREV) < 0 ||
+                       (wlc_hw->corerev - XMTFIFOTBL_STARTREV) >
+                               ARRAY_SIZE(xmtfifo_sz));
                wlc_hw->xmtfifo_sz =
                    xmtfifo_sz[(wlc_hw->corerev - XMTFIFOTBL_STARTREV)];
+               WARN_ON(!wlc_hw->xmtfifo_sz[0]);
  
                /* Get a phy for this band */
                wlc_hw->band->pi =
@@@ -5036,7 -5053,7 +5053,7 @@@ static void brcms_b_hw_up(struct brcms_
        wlc_hw->wlc->pub->hw_up = true;
  
        if ((wlc_hw->boardflags & BFL_FEM)
-           && (ai_get_chip_id(wlc_hw->sih) == BCM4313_CHIP_ID)) {
+           && (ai_get_chip_id(wlc_hw->sih) == BCMA_CHIP_ID_BCM4313)) {
                if (!
                    (wlc_hw->boardrev >= 0x1250
                     && (wlc_hw->boardflags & BFL_FEM_BT)))
@@@ -5130,7 -5147,7 +5147,7 @@@ int brcms_c_up(struct brcms_c_info *wlc
        }
  
        if ((wlc->pub->boardflags & BFL_FEM)
-           && (ai_get_chip_id(wlc->hw->sih) == BCM4313_CHIP_ID)) {
+           && (ai_get_chip_id(wlc->hw->sih) == BCMA_CHIP_ID_BCM4313)) {
                if (wlc->pub->boardrev >= 0x1250
                    && (wlc->pub->boardflags & BFL_FEM_BT))
                        brcms_b_mhf(wlc->hw, MHF5, MHF5_4313_GPIOCTRL,
@@@ -5767,8 -5784,12 +5784,12 @@@ void brcms_c_print_txstatus(struct tx_s
                 (txs->ackphyrxsh & PRXS1_SQ_MASK) >> PRXS1_SQ_SHIFT);
  }
  
bool brcms_c_chipmatch(u16 vendor, u16 device)
static bool brcms_c_chipmatch_pci(struct bcma_device *core)
  {
+       struct pci_dev *pcidev = core->bus->host_pci;
+       u16 vendor = pcidev->vendor;
+       u16 device = pcidev->device;
        if (vendor != PCI_VENDOR_ID_BROADCOM) {
                pr_err("unknown vendor id %04x\n", vendor);
                return false;
        return false;
  }
  
+ static bool brcms_c_chipmatch_soc(struct bcma_device *core)
+ {
+       struct bcma_chipinfo *chipinfo = &core->bus->chipinfo;
+       if (chipinfo->id == BCMA_CHIP_ID_BCM4716)
+               return true;
+       pr_err("unknown chip id %04x\n", chipinfo->id);
+       return false;
+ }
+ bool brcms_c_chipmatch(struct bcma_device *core)
+ {
+       switch (core->bus->hosttype) {
+       case BCMA_HOSTTYPE_PCI:
+               return brcms_c_chipmatch_pci(core);
+       case BCMA_HOSTTYPE_SOC:
+               return brcms_c_chipmatch_soc(core);
+       default:
+               pr_err("unknown host type: %i\n", core->bus->hosttype);
+               return false;
+       }
+ }
  #if defined(DEBUG)
  void brcms_c_print_txdesc(struct d11txh *txh)
  {
@@@ -8296,7 -8341,7 +8341,7 @@@ brcms_c_attach(struct brcms_info *wl, s
        struct brcms_pub *pub;
  
        /* allocate struct brcms_c_info state and its substructures */
 -      wlc = (struct brcms_c_info *) brcms_c_attach_malloc(unit, &err, 0);
 +      wlc = brcms_c_attach_malloc(unit, &err, 0);
        if (wlc == NULL)
                goto fail;
        wlc->wiphy = wl->wiphy;
index d1950838f17f3b5bf910a4850c8610ae5ac2c55d,203d575e44931c3e3807f59b0effe30de4e7bcdb..09795afccb232a22f87fdaf9bfe0a74d0ddc89f3
@@@ -1059,7 -1059,7 +1059,7 @@@ static void iwl_tx_start(struct iwl_tra
  {
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
        u32 a;
-       int i, chan;
+       int chan;
        u32 reg_val;
  
        /* make sure all queue are not stopped/used */
         */
        iwl_write_prph(trans, SCD_CHAINEXT_EN, 0);
  
-       for (i = 0; i < trans_pcie->n_q_to_fifo; i++) {
-               int fifo = trans_pcie->setup_q_to_fifo[i];
-               iwl_trans_pcie_txq_enable(trans, i, fifo, IWL_INVALID_STATION,
-                                         IWL_TID_NON_QOS, SCD_FRAME_LIMIT, 0);
-       }
+       iwl_trans_ac_txq_enable(trans, trans_pcie->cmd_queue,
+                               trans_pcie->cmd_fifo);
  
        /* Activate all Tx DMA/FIFO channels */
        iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7));
@@@ -1145,7 -1141,7 +1141,7 @@@ static int iwl_trans_tx_stop(struct iwl
                        FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), 1000);
                if (ret < 0)
                        IWL_ERR(trans,
-                               "Failing on timeout while stopping DMA channel %d [0x%08x]",
+                               "Failing on timeout while stopping DMA channel %d [0x%08x]\n",
                                ch,
                                iwl_read_direct32(trans,
                                                  FH_TSSR_TX_STATUS_REG));
        spin_unlock_irqrestore(&trans_pcie->irq_lock, flags);
  
        if (!trans_pcie->txq) {
-               IWL_WARN(trans, "Stopping tx queues that aren't allocated...");
+               IWL_WARN(trans,
+                        "Stopping tx queues that aren't allocated...\n");
                return 0;
        }
  
@@@ -1367,7 -1364,7 +1364,7 @@@ static int iwl_trans_pcie_tx(struct iwl
                                   DMA_BIDIRECTIONAL);
  
        trace_iwlwifi_dev_tx(trans->dev,
 -                           &((struct iwl_tfd *)txq->tfds)[txq->q.write_ptr],
 +                           &txq->tfds[txq->q.write_ptr],
                             sizeof(struct iwl_tfd),
                             &dev_cmd->hdr, firstlen,
                             skb->data + hdr_len, secondlen);
@@@ -1430,7 -1427,7 +1427,7 @@@ static int iwl_trans_pcie_start_hw(stru
  
        err = iwl_prepare_card_hw(trans);
        if (err) {
-               IWL_ERR(trans, "Error while preparing HW: %d", err);
+               IWL_ERR(trans, "Error while preparing HW: %d\n", err);
                goto err_free_irq;
        }
  
@@@ -1528,6 -1525,7 +1525,7 @@@ static void iwl_trans_pcie_configure(st
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
  
        trans_pcie->cmd_queue = trans_cfg->cmd_queue;
+       trans_pcie->cmd_fifo = trans_cfg->cmd_fifo;
        if (WARN_ON(trans_cfg->n_no_reclaim_cmds > MAX_NO_RECLAIM_CMDS))
                trans_pcie->n_no_reclaim_cmds = 0;
        else
                memcpy(trans_pcie->no_reclaim_cmds, trans_cfg->no_reclaim_cmds,
                       trans_pcie->n_no_reclaim_cmds * sizeof(u8));
  
-       trans_pcie->n_q_to_fifo = trans_cfg->n_queue_to_fifo;
-       if (WARN_ON(trans_pcie->n_q_to_fifo > IWL_MAX_HW_QUEUES))
-               trans_pcie->n_q_to_fifo = IWL_MAX_HW_QUEUES;
-       /* at least the command queue must be mapped */
-       WARN_ON(!trans_pcie->n_q_to_fifo);
-       memcpy(trans_pcie->setup_q_to_fifo, trans_cfg->queue_to_fifo,
-              trans_pcie->n_q_to_fifo * sizeof(u8));
        trans_pcie->rx_buf_size_8k = trans_cfg->rx_buf_size_8k;
        if (trans_pcie->rx_buf_size_8k)
                trans_pcie->rx_page_order = get_order(8 * 1024);
@@@ -2141,13 -2128,14 +2128,14 @@@ struct iwl_trans *iwl_trans_pcie_alloc(
  
        err = pci_request_regions(pdev, DRV_NAME);
        if (err) {
-               dev_printk(KERN_ERR, &pdev->dev, "pci_request_regions failed");
+               dev_printk(KERN_ERR, &pdev->dev,
+                          "pci_request_regions failed\n");
                goto out_pci_disable_device;
        }
  
        trans_pcie->hw_base = pci_ioremap_bar(pdev, 0);
        if (!trans_pcie->hw_base) {
-               dev_printk(KERN_ERR, &pdev->dev, "pci_ioremap_bar failed");
+               dev_printk(KERN_ERR, &pdev->dev, "pci_ioremap_bar failed\n");
                err = -ENODEV;
                goto out_pci_release_regions;
        }
        err = pci_enable_msi(pdev);
        if (err)
                dev_printk(KERN_ERR, &pdev->dev,
-                          "pci_enable_msi failed(0X%x)", err);
+                          "pci_enable_msi failed(0X%x)\n", err);
  
        trans->dev = &pdev->dev;
        trans_pcie->irq = pdev->irq;
index f578d0b2172dcceb34c0cbe92295158877df4d8d,3f38d846b093abc130732ed7ab48c3450c72e343..200bcc0ead9893b8de07c1d6ec13930d72f61872
@@@ -292,7 -292,7 +292,7 @@@ struct mac80211_hwsim_data 
        struct list_head list;
        struct ieee80211_hw *hw;
        struct device *dev;
-       struct ieee80211_supported_band bands[2];
+       struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
        struct ieee80211_channel channels_2ghz[ARRAY_SIZE(hwsim_channels_2ghz)];
        struct ieee80211_channel channels_5ghz[ARRAY_SIZE(hwsim_channels_5ghz)];
        struct ieee80211_rate rates[ARRAY_SIZE(hwsim_rates)];
@@@ -571,7 -571,7 +571,7 @@@ static void mac80211_hwsim_tx_frame_nl(
                        skb_dequeue(&data->pending);
        }
  
 -      skb = genlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC);
 +      skb = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_ATOMIC);
        if (skb == NULL)
                goto nla_put_failure;
  
@@@ -1082,6 -1082,8 +1082,8 @@@ enum hwsim_testmode_attr 
  enum hwsim_testmode_cmd {
        HWSIM_TM_CMD_SET_PS             = 0,
        HWSIM_TM_CMD_GET_PS             = 1,
+       HWSIM_TM_CMD_STOP_QUEUES        = 2,
+       HWSIM_TM_CMD_WAKE_QUEUES        = 3,
  };
  
  static const struct nla_policy hwsim_testmode_policy[HWSIM_TM_ATTR_MAX + 1] = {
@@@ -1121,6 -1123,12 +1123,12 @@@ static int mac80211_hwsim_testmode_cmd(
                if (nla_put_u32(skb, HWSIM_TM_ATTR_PS, hwsim->ps))
                        goto nla_put_failure;
                return cfg80211_testmode_reply(skb);
+       case HWSIM_TM_CMD_STOP_QUEUES:
+               ieee80211_stop_queues(hw);
+               return 0;
+       case HWSIM_TM_CMD_WAKE_QUEUES:
+               ieee80211_wake_queues(hw);
+               return 0;
        default:
                return -EOPNOTSUPP;
        }
@@@ -1855,7 -1863,7 +1863,7 @@@ static int __init init_mac80211_hwsim(v
                                sband->n_bitrates = ARRAY_SIZE(hwsim_rates) - 4;
                                break;
                        default:
-                               break;
+                               continue;
                        }
  
                        sband->ht_cap.ht_supported = true;
index 3af88b8cfcb74250bcc13ebf30197bba9a60b262,6c57e832ae8396032fdc2f452a70867d223cf0b8..c7a177c62625699444136b94a95479990b5a9b3b
@@@ -914,6 -914,69 +914,69 @@@ static int mwifiex_cfg80211_set_cqm_rss
        return 0;
  }
  
+ /* cfg80211 operation handler for change_beacon.
+  * Function retrieves and sets modified management IEs to FW.
+  */
+ static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy,
+                                         struct net_device *dev,
+                                         struct cfg80211_beacon_data *data)
+ {
+       struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+       if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
+               wiphy_err(wiphy, "%s: bss_type mismatched\n", __func__);
+               return -EINVAL;
+       }
+       if (!priv->bss_started) {
+               wiphy_err(wiphy, "%s: bss not started\n", __func__);
+               return -EINVAL;
+       }
+       if (mwifiex_set_mgmt_ies(priv, data)) {
+               wiphy_err(wiphy, "%s: setting mgmt ies failed\n", __func__);
+               return -EFAULT;
+       }
+       return 0;
+ }
+ static int
+ mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
+ {
+       struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
+       struct mwifiex_private *priv = mwifiex_get_priv(adapter,
+                                                       MWIFIEX_BSS_ROLE_ANY);
+       struct mwifiex_ds_ant_cfg ant_cfg;
+       if (!tx_ant || !rx_ant)
+               return -EOPNOTSUPP;
+       if (adapter->hw_dev_mcs_support != HT_STREAM_2X2) {
+               /* Not a MIMO chip. User should provide specific antenna number
+                * for Tx/Rx path or enable all antennas for diversity
+                */
+               if (tx_ant != rx_ant)
+                       return -EOPNOTSUPP;
+               if ((tx_ant & (tx_ant - 1)) &&
+                   (tx_ant != BIT(adapter->number_of_antenna) - 1))
+                       return -EOPNOTSUPP;
+               if ((tx_ant == BIT(adapter->number_of_antenna) - 1) &&
+                   (priv->adapter->number_of_antenna > 1)) {
+                       tx_ant = RF_ANTENNA_AUTO;
+                       rx_ant = RF_ANTENNA_AUTO;
+               }
+       }
+       ant_cfg.tx_ant = tx_ant;
+       ant_cfg.rx_ant = rx_ant;
+       return mwifiex_send_cmd_sync(priv, HostCmd_CMD_RF_ANTENNA,
+                                    HostCmd_ACT_GEN_SET, 0, &ant_cfg);
+ }
  /* cfg80211 operation handler for stop ap.
   * Function stops BSS running at uAP interface.
   */
@@@ -947,7 -1010,7 +1010,7 @@@ static int mwifiex_cfg80211_start_ap(st
  
        if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP)
                return -1;
-       if (mwifiex_set_mgmt_ies(priv, params))
+       if (mwifiex_set_mgmt_ies(priv, &params->beacon))
                return -1;
  
        bss_cfg = kzalloc(sizeof(struct mwifiex_uap_bss_param), GFP_KERNEL);
@@@ -1697,7 -1760,9 +1760,9 @@@ static struct cfg80211_ops mwifiex_cfg8
        .set_bitrate_mask = mwifiex_cfg80211_set_bitrate_mask,
        .start_ap = mwifiex_cfg80211_start_ap,
        .stop_ap = mwifiex_cfg80211_stop_ap,
+       .change_beacon = mwifiex_cfg80211_change_beacon,
        .set_cqm_rssi_config = mwifiex_cfg80211_set_cqm_rssi_config,
+       .set_antenna = mwifiex_cfg80211_set_antenna,
  };
  
  /*
@@@ -1744,7 -1809,14 +1809,14 @@@ int mwifiex_register_cfg80211(struct mw
  
        memcpy(wiphy->perm_addr, priv->curr_addr, ETH_ALEN);
        wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
-       wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME;
+       wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME |
+                       WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
+       wiphy->probe_resp_offload = NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS |
+                                   NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2;
+       wiphy->available_antennas_tx = BIT(adapter->number_of_antenna) - 1;
+       wiphy->available_antennas_rx = BIT(adapter->number_of_antenna) - 1;
  
        /* Reserve space for mwifiex specific private data for BSS */
        wiphy->bss_priv_size = sizeof(struct mwifiex_bss_priv);
        wdev_priv = wiphy_priv(wiphy);
        *(unsigned long *)wdev_priv = (unsigned long)adapter;
  
 -      set_wiphy_dev(wiphy, (struct device *)priv->adapter->dev);
 +      set_wiphy_dev(wiphy, priv->adapter->dev);
  
        ret = wiphy_register(wiphy);
        if (ret < 0) {
index b9cd9ed48c456f40bdede3cda839016c4548cfde,75eaa6f877fa5b0bf2e3a902b35158d7aac987ae..225d4c776177e0033c02cb5589ddd72b1b5929d6
@@@ -276,6 -276,39 +276,39 @@@ static int mwifiex_cmd_rf_tx_power(stru
        return 0;
  }
  
+ /*
+  * This function prepares command to set rf antenna.
+  */
+ static int mwifiex_cmd_rf_antenna(struct mwifiex_private *priv,
+                                 struct host_cmd_ds_command *cmd,
+                                 u16 cmd_action,
+                                 struct mwifiex_ds_ant_cfg *ant_cfg)
+ {
+       struct host_cmd_ds_rf_ant_mimo *ant_mimo = &cmd->params.ant_mimo;
+       struct host_cmd_ds_rf_ant_siso *ant_siso = &cmd->params.ant_siso;
+       cmd->command = cpu_to_le16(HostCmd_CMD_RF_ANTENNA);
+       if (cmd_action != HostCmd_ACT_GEN_SET)
+               return 0;
+       if (priv->adapter->hw_dev_mcs_support == HT_STREAM_2X2) {
+               cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_rf_ant_mimo) +
+                                       S_DS_GEN);
+               ant_mimo->action_tx = cpu_to_le16(HostCmd_ACT_SET_TX);
+               ant_mimo->tx_ant_mode = cpu_to_le16((u16)ant_cfg->tx_ant);
+               ant_mimo->action_rx = cpu_to_le16(HostCmd_ACT_SET_RX);
+               ant_mimo->rx_ant_mode = cpu_to_le16((u16)ant_cfg->rx_ant);
+       } else {
+               cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_rf_ant_siso) +
+                                       S_DS_GEN);
+               ant_siso->action = cpu_to_le16(HostCmd_ACT_SET_BOTH);
+               ant_siso->ant_mode = cpu_to_le16((u16)ant_cfg->tx_ant);
+       }
+       return 0;
+ }
  /*
   * This function prepares command to set Host Sleep configuration.
   *
@@@ -810,7 -843,8 +843,7 @@@ static int mwifiex_cmd_reg_access(struc
                struct host_cmd_ds_mac_reg_access *mac_reg;
  
                cmd->size = cpu_to_le16(sizeof(*mac_reg) + S_DS_GEN);
 -              mac_reg = (struct host_cmd_ds_mac_reg_access *) &cmd->
 -                                                              params.mac_reg;
 +              mac_reg = &cmd->params.mac_reg;
                mac_reg->action = cpu_to_le16(cmd_action);
                mac_reg->offset =
                        cpu_to_le16((u16) le32_to_cpu(reg_rw->offset));
                struct host_cmd_ds_bbp_reg_access *bbp_reg;
  
                cmd->size = cpu_to_le16(sizeof(*bbp_reg) + S_DS_GEN);
 -              bbp_reg = (struct host_cmd_ds_bbp_reg_access *)
 -                                                      &cmd->params.bbp_reg;
 +              bbp_reg = &cmd->params.bbp_reg;
                bbp_reg->action = cpu_to_le16(cmd_action);
                bbp_reg->offset =
                        cpu_to_le16((u16) le32_to_cpu(reg_rw->offset));
                struct host_cmd_ds_rf_reg_access *rf_reg;
  
                cmd->size = cpu_to_le16(sizeof(*rf_reg) + S_DS_GEN);
 -              rf_reg = (struct host_cmd_ds_rf_reg_access *)
 -                                                      &cmd->params.rf_reg;
 +              rf_reg = &cmd->params.rf_reg;
                rf_reg->action = cpu_to_le16(cmd_action);
                rf_reg->offset = cpu_to_le16((u16) le32_to_cpu(reg_rw->offset));
                rf_reg->value = (u8) le32_to_cpu(reg_rw->value);
                struct host_cmd_ds_pmic_reg_access *pmic_reg;
  
                cmd->size = cpu_to_le16(sizeof(*pmic_reg) + S_DS_GEN);
 -              pmic_reg = (struct host_cmd_ds_pmic_reg_access *) &cmd->
 -                              params.pmic_reg;
 +              pmic_reg = &cmd->params.pmic_reg;
                pmic_reg->action = cpu_to_le16(cmd_action);
                pmic_reg->offset =
                                cpu_to_le16((u16) le32_to_cpu(reg_rw->offset));
                struct host_cmd_ds_rf_reg_access *cau_reg;
  
                cmd->size = cpu_to_le16(sizeof(*cau_reg) + S_DS_GEN);
 -              cau_reg = (struct host_cmd_ds_rf_reg_access *)
 -                                                      &cmd->params.rf_reg;
 +              cau_reg = &cmd->params.rf_reg;
                cau_reg->action = cpu_to_le16(cmd_action);
                cau_reg->offset =
                                cpu_to_le16((u16) le32_to_cpu(reg_rw->offset));
        {
                struct mwifiex_ds_read_eeprom *rd_eeprom = data_buf;
                struct host_cmd_ds_802_11_eeprom_access *cmd_eeprom =
 -                      (struct host_cmd_ds_802_11_eeprom_access *)
                        &cmd->params.eeprom;
  
                cmd->size = cpu_to_le16(sizeof(*cmd_eeprom) + S_DS_GEN);
@@@ -1070,6 -1109,10 +1103,10 @@@ int mwifiex_sta_prepare_cmd(struct mwif
                ret = mwifiex_cmd_rf_tx_power(priv, cmd_ptr, cmd_action,
                                              data_buf);
                break;
+       case HostCmd_CMD_RF_ANTENNA:
+               ret = mwifiex_cmd_rf_antenna(priv, cmd_ptr, cmd_action,
+                                            data_buf);
+               break;
        case HostCmd_CMD_802_11_PS_MODE_ENH:
                ret = mwifiex_cmd_enh_power_mode(priv, cmd_ptr, cmd_action,
                                                 (uint16_t)cmd_oid, data_buf);
index 78fc352c85c4812d40bbe5e4a1f0e676aac6a0ac,71c9b5b92e6dc2e6384013400d1ac72f11bc065b..97715dfbdf58a786de59c887781ddf9b08cfeb09
@@@ -227,7 -227,7 +227,7 @@@ static int mwifiex_ret_get_log(struct m
                               struct mwifiex_ds_get_stats *stats)
  {
        struct host_cmd_ds_802_11_get_log *get_log =
 -              (struct host_cmd_ds_802_11_get_log *) &resp->params.get_log;
 +              &resp->params.get_log;
  
        if (stats) {
                stats->mcast_tx_frame = le32_to_cpu(get_log->mcast_tx_frame);
@@@ -282,7 -282,7 +282,7 @@@ static int mwifiex_ret_tx_rate_cfg(stru
        u32 i;
        int ret = 0;
  
 -      tlv_buf = (u8 *) ((u8 *) rate_cfg) +
 +      tlv_buf = ((u8 *)rate_cfg) +
                        sizeof(struct host_cmd_ds_tx_rate_cfg);
        tlv_buf_len = *(u16 *) (tlv_buf + sizeof(u16));
  
@@@ -474,6 -474,33 +474,33 @@@ static int mwifiex_ret_rf_tx_power(stru
        return 0;
  }
  
+ /*
+  * This function handles the command response of set rf antenna
+  */
+ static int mwifiex_ret_rf_antenna(struct mwifiex_private *priv,
+                                 struct host_cmd_ds_command *resp)
+ {
+       struct host_cmd_ds_rf_ant_mimo *ant_mimo = &resp->params.ant_mimo;
+       struct host_cmd_ds_rf_ant_siso *ant_siso = &resp->params.ant_siso;
+       struct mwifiex_adapter *adapter = priv->adapter;
+       if (adapter->hw_dev_mcs_support == HT_STREAM_2X2)
+               dev_dbg(adapter->dev,
+                       "RF_ANT_RESP: Tx action = 0x%x, Tx Mode = 0x%04x"
+                       " Rx action = 0x%x, Rx Mode = 0x%04x\n",
+                       le16_to_cpu(ant_mimo->action_tx),
+                       le16_to_cpu(ant_mimo->tx_ant_mode),
+                       le16_to_cpu(ant_mimo->action_rx),
+                       le16_to_cpu(ant_mimo->rx_ant_mode));
+       else
+               dev_dbg(adapter->dev,
+                       "RF_ANT_RESP: action = 0x%x, Mode = 0x%04x\n",
+                       le16_to_cpu(ant_siso->action),
+                       le16_to_cpu(ant_siso->ant_mode));
+       return 0;
+ }
  /*
   * This function handles the command response of set/get MAC address.
   *
@@@ -703,33 -730,39 +730,33 @@@ static int mwifiex_ret_reg_access(u16 t
        eeprom = data_buf;
        switch (type) {
        case HostCmd_CMD_MAC_REG_ACCESS:
 -              r.mac = (struct host_cmd_ds_mac_reg_access *)
 -                      &resp->params.mac_reg;
 +              r.mac = &resp->params.mac_reg;
                reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.mac->offset));
                reg_rw->value = r.mac->value;
                break;
        case HostCmd_CMD_BBP_REG_ACCESS:
 -              r.bbp = (struct host_cmd_ds_bbp_reg_access *)
 -                      &resp->params.bbp_reg;
 +              r.bbp = &resp->params.bbp_reg;
                reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.bbp->offset));
                reg_rw->value = cpu_to_le32((u32) r.bbp->value);
                break;
  
        case HostCmd_CMD_RF_REG_ACCESS:
 -              r.rf = (struct host_cmd_ds_rf_reg_access *)
 -                     &resp->params.rf_reg;
 +              r.rf = &resp->params.rf_reg;
                reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.rf->offset));
                reg_rw->value = cpu_to_le32((u32) r.bbp->value);
                break;
        case HostCmd_CMD_PMIC_REG_ACCESS:
 -              r.pmic = (struct host_cmd_ds_pmic_reg_access *)
 -                       &resp->params.pmic_reg;
 +              r.pmic = &resp->params.pmic_reg;
                reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.pmic->offset));
                reg_rw->value = cpu_to_le32((u32) r.pmic->value);
                break;
        case HostCmd_CMD_CAU_REG_ACCESS:
 -              r.rf = (struct host_cmd_ds_rf_reg_access *)
 -                     &resp->params.rf_reg;
 +              r.rf = &resp->params.rf_reg;
                reg_rw->offset = cpu_to_le32((u32) le16_to_cpu(r.rf->offset));
                reg_rw->value = cpu_to_le32((u32) r.rf->value);
                break;
        case HostCmd_CMD_802_11_EEPROM_ACCESS:
 -              r.eeprom = (struct host_cmd_ds_802_11_eeprom_access *)
 -                         &resp->params.eeprom;
 +              r.eeprom = &resp->params.eeprom;
                pr_debug("info: EEPROM read len=%x\n", r.eeprom->byte_count);
                if (le16_to_cpu(eeprom->byte_count) <
                    le16_to_cpu(r.eeprom->byte_count)) {
@@@ -805,7 -838,7 +832,7 @@@ static int mwifiex_ret_subsc_evt(struc
                                 struct mwifiex_ds_misc_subsc_evt *sub_event)
  {
        struct host_cmd_ds_802_11_subsc_evt *cmd_sub_event =
 -              (struct host_cmd_ds_802_11_subsc_evt *)&resp->params.subsc_evt;
 +              &resp->params.subsc_evt;
  
        /* For every subscribe event command (Get/Set/Clear), FW reports the
         * current set of subscribed events*/
@@@ -868,6 -901,9 +895,9 @@@ int mwifiex_process_sta_cmdresp(struct 
        case HostCmd_CMD_RF_TX_PWR:
                ret = mwifiex_ret_rf_tx_power(priv, resp);
                break;
+       case HostCmd_CMD_RF_ANTENNA:
+               ret = mwifiex_ret_rf_antenna(priv, resp);
+               break;
        case HostCmd_CMD_802_11_PS_MODE_ENH:
                ret = mwifiex_ret_enh_power_mode(priv, resp, data_buf);
                break;
index 9ad74dd87a7ba7aa1eff3ded9ef22ebee0f64c8a,425685914d7d68b0c90a7bfd7364235cba54cb6d..af671b984df37123cf6841fb9a8e4e5db70bde65
@@@ -99,7 -99,7 +99,7 @@@ static struct sta_info *mesh_plink_allo
        return sta;
  }
  
 -/*
 +/**
   * mesh_set_ht_prot_mode - set correct HT protection mode
   *
   * Section 9.23.3.5 of IEEE 80211-2012 describes the protection rules for HT
@@@ -258,8 -258,8 +258,8 @@@ static int mesh_plink_frame_tx(struct i
                        pos = skb_put(skb, 2);
                        memcpy(pos + 2, &plid, 2);
                }
-               if (ieee80211_add_srates_ie(&sdata->vif, skb, true) ||
-                   ieee80211_add_ext_srates_ie(&sdata->vif, skb, true) ||
+               if (ieee80211_add_srates_ie(sdata, skb, true) ||
+                   ieee80211_add_ext_srates_ie(sdata, skb, true) ||
                    mesh_add_rsn_ie(skb, sdata) ||
                    mesh_add_meshid_ie(skb, sdata) ||
                    mesh_add_meshconf_ie(skb, sdata))
        return 0;
  }
  
 -/* mesh_peer_init - initialize new mesh peer and return resulting sta_info
 +/**
 + * mesh_peer_init - initialize new mesh peer and return resulting sta_info
   *
   * @sdata: local meshif
   * @addr: peer's address
diff --combined net/nfc/netlink.c
index f4f07f9b61c0e092ba7f81154bae71feacbbec59,99bc6f7faa7b858e28254b3690ca46b1592d24fb..4c51714ee74177509d6d7831c064e89280424ded
@@@ -167,7 -167,7 +167,7 @@@ int nfc_genl_targets_found(struct nfc_d
  
        dev->genl_data.poll_req_pid = 0;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
        if (!msg)
                return -ENOMEM;
  
@@@ -195,7 -195,7 +195,7 @@@ int nfc_genl_target_lost(struct nfc_de
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return -ENOMEM;
  
@@@ -226,7 -226,7 +226,7 @@@ int nfc_genl_tm_activated(struct nfc_de
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return -ENOMEM;
  
@@@ -258,7 -258,7 +258,7 @@@ int nfc_genl_tm_deactivated(struct nfc_
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return -ENOMEM;
  
@@@ -288,7 -288,7 +288,7 @@@ int nfc_genl_device_added(struct nfc_de
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return -ENOMEM;
  
@@@ -321,7 -321,7 +321,7 @@@ int nfc_genl_device_removed(struct nfc_
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return -ENOMEM;
  
@@@ -434,7 -434,7 +434,7 @@@ int nfc_genl_dep_link_up_event(struct n
  
        pr_debug("DEP link is up\n");
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
        if (!msg)
                return -ENOMEM;
  
@@@ -473,7 -473,7 +473,7 @@@ int nfc_genl_dep_link_down_event(struc
  
        pr_debug("DEP link is down\n");
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
        if (!msg)
                return -ENOMEM;
  
@@@ -514,7 -514,7 +514,7 @@@ static int nfc_genl_get_device(struct s
        if (!dev)
                return -ENODEV;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg) {
                rc = -ENOMEM;
                goto out_putdev;
@@@ -634,6 -634,15 +634,15 @@@ static int nfc_genl_stop_poll(struct sk
        if (!dev)
                return -ENODEV;
  
+       device_lock(&dev->dev);
+       if (!dev->polling) {
+               device_unlock(&dev->dev);
+               return -EINVAL;
+       }
+       device_unlock(&dev->dev);
        mutex_lock(&dev->genl_data.genl_data_mutex);
  
        if (dev->genl_data.poll_req_pid != info->snd_pid) {
diff --combined net/wireless/nl80211.c
index 3b508eaf2d072e094f8aee5dd433ab013bed3439,2a5cdb60bc6e0ba15003592149bb10d56d4d0c4d..0249cea538522066a37dfe1f8941e6bdd1f9f5a9
@@@ -921,6 -921,15 +921,15 @@@ static int nl80211_send_wiphy(struct sk
                                dev->wiphy.bands[band]->ht_cap.ampdu_density)))
                        goto nla_put_failure;
  
+               /* add VHT info */
+               if (dev->wiphy.bands[band]->vht_cap.vht_supported &&
+                   (nla_put(msg, NL80211_BAND_ATTR_VHT_MCS_SET,
+                            sizeof(dev->wiphy.bands[band]->vht_cap.vht_mcs),
+                            &dev->wiphy.bands[band]->vht_cap.vht_mcs) ||
+                    nla_put_u32(msg, NL80211_BAND_ATTR_VHT_CAPA,
+                                dev->wiphy.bands[band]->vht_cap.cap)))
+                       goto nla_put_failure;
                /* add frequencies */
                nl_freqs = nla_nest_start(msg, NL80211_BAND_ATTR_FREQS);
                if (!nl_freqs)
                nla_nest_end(msg, nl_ifs);
        }
  
+ #ifdef CONFIG_PM
        if (dev->wiphy.wowlan.flags || dev->wiphy.wowlan.n_patterns) {
                struct nlattr *nl_wowlan;
  
  
                nla_nest_end(msg, nl_wowlan);
        }
+ #endif
  
        if (nl80211_put_iftypes(msg, NL80211_ATTR_SOFTWARE_IFTYPES,
                                dev->wiphy.software_iftypes))
@@@ -1678,16 -1689,11 +1689,11 @@@ static int nl80211_send_iface(struct sk
                        (cfg80211_rdev_list_generation << 2)))
                goto nla_put_failure;
  
-       if (rdev->ops->get_channel) {
-               struct ieee80211_channel *chan;
-               enum nl80211_channel_type channel_type;
-               chan = rdev->ops->get_channel(&rdev->wiphy, &channel_type);
-               if (chan &&
-                   (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ,
-                                   chan->center_freq) ||
-                    nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE,
-                                   channel_type)))
+       if (rdev->monitor_channel) {
+               if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ,
+                               rdev->monitor_channel->center_freq) ||
+                   nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE,
+                               rdev->monitor_channel_type))
                        goto nla_put_failure;
        }
  
@@@ -2472,11 -2478,20 +2478,20 @@@ static int nl80211_start_ap(struct sk_b
                                          params.channel_type))
                return -EINVAL;
  
+       mutex_lock(&rdev->devlist_mtx);
+       err = cfg80211_can_use_chan(rdev, wdev, params.channel,
+                                   CHAN_MODE_SHARED);
+       mutex_unlock(&rdev->devlist_mtx);
+       if (err)
+               return err;
        err = rdev->ops->start_ap(&rdev->wiphy, dev, &params);
        if (!err) {
                wdev->preset_chan = params.channel;
                wdev->preset_chantype = params.channel_type;
                wdev->beacon_interval = params.beacon_interval;
+               wdev->channel = params.channel;
        }
        return err;
  }
@@@ -2510,23 -2525,8 +2525,8 @@@ static int nl80211_stop_ap(struct sk_bu
  {
        struct cfg80211_registered_device *rdev = info->user_ptr[0];
        struct net_device *dev = info->user_ptr[1];
-       struct wireless_dev *wdev = dev->ieee80211_ptr;
-       int err;
  
-       if (!rdev->ops->stop_ap)
-               return -EOPNOTSUPP;
-       if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
-           dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
-               return -EOPNOTSUPP;
-       if (!wdev->beacon_interval)
-               return -ENOENT;
-       err = rdev->ops->stop_ap(&rdev->wiphy, dev);
-       if (!err)
-               wdev->beacon_interval = 0;
-       return err;
+       return cfg80211_stop_ap(rdev, dev);
  }
  
  static const struct nla_policy sta_flags_policy[NL80211_STA_FLAG_MAX + 1] = {
@@@ -2618,7 -2618,8 +2618,8 @@@ static bool nl80211_put_sta_rate(struc
                                 int attr)
  {
        struct nlattr *rate;
-       u16 bitrate;
+       u32 bitrate;
+       u16 bitrate_compat;
  
        rate = nla_nest_start(msg, attr);
        if (!rate)
  
        /* cfg80211_calculate_bitrate will return 0 for mcs >= 32 */
        bitrate = cfg80211_calculate_bitrate(info);
+       /* report 16-bit bitrate only if we can */
+       bitrate_compat = bitrate < (1UL << 16) ? bitrate : 0;
        if ((bitrate > 0 &&
-            nla_put_u16(msg, NL80211_RATE_INFO_BITRATE, bitrate)) ||
+            nla_put_u32(msg, NL80211_RATE_INFO_BITRATE32, bitrate)) ||
+           (bitrate_compat > 0 &&
+            nla_put_u16(msg, NL80211_RATE_INFO_BITRATE, bitrate_compat)) ||
            ((info->flags & RATE_INFO_FLAGS_MCS) &&
             nla_put_u8(msg, NL80211_RATE_INFO_MCS, info->mcs)) ||
            ((info->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH) &&
@@@ -6276,6 -6281,7 +6281,7 @@@ static int nl80211_leave_mesh(struct sk
        return cfg80211_leave_mesh(rdev, dev);
  }
  
+ #ifdef CONFIG_PM
  static int nl80211_get_wowlan(struct sk_buff *skb, struct genl_info *info)
  {
        struct cfg80211_registered_device *rdev = info->user_ptr[0];
@@@ -6504,6 -6510,7 +6510,7 @@@ static int nl80211_set_wowlan(struct sk
        kfree(new_triggers.patterns);
        return err;
  }
+ #endif
  
  static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info)
  {
@@@ -7158,6 -7165,7 +7165,7 @@@ static struct genl_ops nl80211_ops[] = 
                .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
                                  NL80211_FLAG_NEED_RTNL,
        },
+ #ifdef CONFIG_PM
        {
                .cmd = NL80211_CMD_GET_WOWLAN,
                .doit = nl80211_get_wowlan,
                .internal_flags = NL80211_FLAG_NEED_WIPHY |
                                  NL80211_FLAG_NEED_RTNL,
        },
+ #endif
        {
                .cmd = NL80211_CMD_SET_REKEY_OFFLOAD,
                .doit = nl80211_set_rekey_data,
@@@ -7360,7 -7369,7 +7369,7 @@@ void nl80211_send_scan_start(struct cfg
  {
        struct sk_buff *msg;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return;
  
@@@ -7436,7 -7445,7 +7445,7 @@@ void nl80211_send_sched_scan(struct cfg
  {
        struct sk_buff *msg;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return;
  
@@@ -7652,7 -7661,7 +7661,7 @@@ void nl80211_send_connect_result(struc
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -7692,7 -7701,7 +7701,7 @@@ void nl80211_send_roamed(struct cfg8021
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -7730,7 -7739,7 +7739,7 @@@ void nl80211_send_disconnected(struct c
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return;
  
@@@ -7992,7 -8001,7 +8001,7 @@@ void nl80211_send_sta_event(struct cfg8
  {
        struct sk_buff *msg;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -8013,7 -8022,7 +8022,7 @@@ void nl80211_send_sta_del_event(struct 
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -8176,7 -8185,7 +8185,7 @@@ nl80211_send_cqm_rssi_notify(struct cfg
        struct nlattr *pinfoattr;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -8219,7 -8228,7 +8228,7 @@@ void nl80211_gtk_rekey_notify(struct cf
        struct nlattr *rekey_attr;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -8263,7 -8272,7 +8272,7 @@@ void nl80211_pmksa_candidate_notify(str
        struct nlattr *attr;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -8307,7 -8316,7 +8316,7 @@@ void nl80211_ch_switch_notify(struct cf
        struct sk_buff *msg;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -8342,7 -8351,7 +8351,7 @@@ nl80211_send_cqm_pktloss_notify(struct 
        struct nlattr *pinfoattr;
        void *hdr;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
@@@ -8386,7 -8395,7 +8395,7 @@@ void cfg80211_probe_status(struct net_d
        void *hdr;
        int err;
  
 -      msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
 +      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;
  
This page took 0.095233 seconds and 5 git commands to generate.