PKG_NAME:=mac80211
-PKG_VERSION:=2015-12-03
-PKG_RELEASE:=2
+PKG_VERSION:=2016-01-10
+PKG_RELEASE:=1
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_BACKPORT_VERSION:=
-PKG_MD5SUM:=7a1dc4dc2f509e5532b935b0a0d15103
+PKG_MD5SUM:=be5fae2e8d6f7490f9b073374fb895ba
PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.bz2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
+++ /dev/null
-From 7a6e8b70a956a722f90d551e920c1096a9455b54 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Sat, 5 Dec 2015 14:10:28 +0100
-Subject: [PATCH 07/12] header: fix genl_notify() on kernel 4.4
-
-The change of the parameters of genl_notify() is in kernel 4.4. This
-backport should not be applied for kernel 4.4 and newer kernel versions.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- backport/backport-include/net/genetlink.h | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/backport-include/net/genetlink.h
-+++ b/backport-include/net/genetlink.h
-@@ -146,10 +146,12 @@ backport_genlmsg_multicast_allns(struct
- #define __genl_const
- #else /* < 3.13 */
- #define __genl_const const
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0)
- #define genl_notify(_fam, _skb, _info, _group, _flags) \
- genl_notify(_fam, _skb, genl_info_net(_info), \
- genl_info_snd_portid(_info), \
- _group, _info->nlhdr, _flags)
-+#endif /* < 4.4 */
- #endif /* < 3.13 */
-
- #endif /* __BACKPORT_NET_GENETLINK_H */
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
-@@ -184,7 +184,7 @@ config CFG80211_WEXT_EXPORT
+@@ -171,7 +171,7 @@ config CFG80211_WEXT_EXPORT
wext compatibility symbols to be exported.
config LIB80211
depends on m
default n
help
-@@ -194,15 +194,15 @@ config LIB80211
+@@ -181,15 +181,15 @@ config LIB80211
Drivers should select this themselves if needed.
config LIB80211_CRYPT_WEP
--- a/.local-symbols
+++ b/.local-symbols
-@@ -475,44 +475,6 @@ USB_IPHETH=
+@@ -476,44 +476,6 @@ USB_IPHETH=
USB_SIERRA_NET=
USB_VL600=
USB_NET_CH9200=
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
-@@ -285,7 +285,7 @@ void ieee80211_restart_hw(struct ieee802
+@@ -291,7 +291,7 @@ void ieee80211_restart_hw(struct ieee802
}
EXPORT_SYMBOL(ieee80211_restart_hw);
static int ieee80211_ifa_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
-@@ -344,7 +344,7 @@ static int ieee80211_ifa_changed(struct
+@@ -350,7 +350,7 @@ static int ieee80211_ifa_changed(struct
}
#endif
static int ieee80211_ifa6_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
-@@ -1081,14 +1081,14 @@ int ieee80211_register_hw(struct ieee802
+@@ -1087,14 +1087,14 @@ int ieee80211_register_hw(struct ieee802
rtnl_unlock();
local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
result = register_inet6addr_notifier(&local->ifa6_notifier);
if (result)
-@@ -1097,13 +1097,13 @@ int ieee80211_register_hw(struct ieee802
+@@ -1103,13 +1103,13 @@ int ieee80211_register_hw(struct ieee802
return 0;
fail_ifa:
#endif
rtnl_lock();
-@@ -1131,10 +1131,10 @@ void ieee80211_unregister_hw(struct ieee
+@@ -1137,10 +1137,10 @@ void ieee80211_unregister_hw(struct ieee
tasklet_kill(&local->tx_pending_tasklet);
tasklet_kill(&local->tasklet);
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1971,7 +1971,7 @@ static int ieee80211_scan(struct wiphy *
+@@ -1999,7 +1999,7 @@ static int ieee80211_scan(struct wiphy *
* the frames sent while scanning on other channel will be
* lost)
*/
if (aggr)
last = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf,
tid_q, &aggr_len);
-@@ -1632,7 +1647,7 @@ void ath9k_release_buffered_frames(struc
+@@ -1647,7 +1662,7 @@ void ath9k_release_buffered_frames(struc
__skb_unlink(bf->bf_mpdu, tid_q);
list_add_tail(&bf->list, &bf_q);
if (bf_isampdu(bf)) {
ath_tx_addto_baw(sc, tid, bf);
bf->bf_state.bf_type &= ~BUF_AGGR;
-@@ -2278,7 +2293,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -2293,7 +2308,7 @@ int ath_tx_start(struct ieee80211_hw *hw
struct ath_txq *txq = txctl->txq;
struct ath_atx_tid *tid = NULL;
struct ath_buf *bf;
int q, ret;
if (vif)
-@@ -2325,13 +2340,13 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -2346,13 +2361,13 @@ int ath_tx_start(struct ieee80211_hw *hw
if (!txctl->an)
txctl->an = &avp->mcast_node;
queue = true;
ath_txq_unlock(sc, txq);
txq = sc->tx.uapsdq;
ath_txq_lock(sc, txq);
-@@ -2369,7 +2384,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -2390,7 +2405,7 @@ int ath_tx_start(struct ieee80211_hw *hw
if (txctl->paprd)
bf->bf_state.bfs_paprd_timestamp = jiffies;
ath_tx_send_normal(sc, txq, tid, skb);
out:
-@@ -2408,7 +2423,7 @@ void ath_tx_cabq(struct ieee80211_hw *hw
+@@ -2429,7 +2444,7 @@ void ath_tx_cabq(struct ieee80211_hw *hw
break;
bf->bf_lastbf = bf;
ath_buf_set_rate(sc, bf, &info, fi->framelen, false);
duration += info.rates[0].PktDuration;
if (bf_tail)
-@@ -2911,7 +2926,7 @@ int ath9k_tx99_send(struct ath_softc *sc
+@@ -2932,7 +2947,7 @@ int ath9k_tx99_send(struct ath_softc *sc
return -EINVAL;
}
+++ /dev/null
-From: Bob Copeland <me@bobcopeland.com>
-Date: Thu, 19 Nov 2015 10:04:48 -0500
-Subject: [PATCH] ath5k: fix RTS/CTS by using proper rate flags
-
-The rates in the tx control rateset do not have the protection
-flags applied, so RTS/CTS would never get enabled if requested.
-
-Fix by using the rate flags in the rates returned by
-ieee80211_get_tx_rates().
-
-Signed-off-by: Bob Copeland <me@bobcopeland.com>
----
-
---- a/drivers/net/wireless/ath/ath5k/base.c
-+++ b/drivers/net/wireless/ath/ath5k/base.c
-@@ -767,7 +767,7 @@ ath5k_txbuf_setup(struct ath5k_hw *ah, s
- if (info->flags & IEEE80211_TX_CTL_NO_ACK)
- flags |= AR5K_TXDESC_NOACK;
-
-- rc_flags = info->control.rates[0].flags;
-+ rc_flags = bf->rates[0].flags;
-
- hw_rate = ath5k_get_rate_hw_value(ah->hw, info, bf, 0);
-
--- /dev/null
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Thu, 14 Jan 2016 03:14:03 +0100
+Subject: [PATCH] ath9k_hw: add low power tx gain table for AR953x
+
+Used in some newer TP-Link AR9533 devices.
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+@@ -698,6 +698,9 @@ static void ar9003_tx_gain_table_mode2(s
+ else if (AR_SREV_9340(ah))
+ INIT_INI_ARRAY(&ah->iniModesTxGain,
+ ar9340Modes_low_ob_db_tx_gain_table_1p0);
++ else if (AR_SREV_9531_11(ah))
++ INIT_INI_ARRAY(&ah->iniModesTxGain,
++ qca953x_1p1_modes_no_xpa_low_power_tx_gain_table);
+ else if (AR_SREV_9485_11_OR_LATER(ah))
+ INIT_INI_ARRAY(&ah->iniModesTxGain,
+ ar9485Modes_low_ob_db_tx_gain_1_1);
+--- a/drivers/net/wireless/ath/ath9k/ar953x_initvals.h
++++ b/drivers/net/wireless/ath/ath9k/ar953x_initvals.h
+@@ -757,6 +757,71 @@ static const u32 qca953x_1p1_modes_xpa_t
+ {0x00016448, 0x6c927a70},
+ };
+
++static const u32 qca953x_1p1_modes_no_xpa_low_power_tx_gain_table[][2] = {
++ /* Addr allmodes */
++ {0x0000a2dc, 0xfff55592},
++ {0x0000a2e0, 0xfff99924},
++ {0x0000a2e4, 0xfffe1e00},
++ {0x0000a2e8, 0xffffe000},
++ {0x0000a410, 0x000050d6},
++ {0x0000a500, 0x00000069},
++ {0x0000a504, 0x0400006b},
++ {0x0000a508, 0x0800006d},
++ {0x0000a50c, 0x0c000269},
++ {0x0000a510, 0x1000026b},
++ {0x0000a514, 0x1400026d},
++ {0x0000a518, 0x18000669},
++ {0x0000a51c, 0x1c00066b},
++ {0x0000a520, 0x1d000a68},
++ {0x0000a524, 0x21000a6a},
++ {0x0000a528, 0x25000a6c},
++ {0x0000a52c, 0x29000a6e},
++ {0x0000a530, 0x2d0012a9},
++ {0x0000a534, 0x310012ab},
++ {0x0000a538, 0x350012ad},
++ {0x0000a53c, 0x39001b0a},
++ {0x0000a540, 0x3d001b0c},
++ {0x0000a544, 0x41001b0e},
++ {0x0000a548, 0x43001bae},
++ {0x0000a54c, 0x45001914},
++ {0x0000a550, 0x47001916},
++ {0x0000a554, 0x49001b96},
++ {0x0000a558, 0x49001b96},
++ {0x0000a55c, 0x49001b96},
++ {0x0000a560, 0x49001b96},
++ {0x0000a564, 0x49001b96},
++ {0x0000a568, 0x49001b96},
++ {0x0000a56c, 0x49001b96},
++ {0x0000a570, 0x49001b96},
++ {0x0000a574, 0x49001b96},
++ {0x0000a578, 0x49001b96},
++ {0x0000a57c, 0x49001b96},
++ {0x0000a600, 0x00000000},
++ {0x0000a604, 0x00000000},
++ {0x0000a608, 0x00000000},
++ {0x0000a60c, 0x00000000},
++ {0x0000a610, 0x00000000},
++ {0x0000a614, 0x00000000},
++ {0x0000a618, 0x00804201},
++ {0x0000a61c, 0x01408201},
++ {0x0000a620, 0x01408502},
++ {0x0000a624, 0x01408502},
++ {0x0000a628, 0x01408502},
++ {0x0000a62c, 0x01408502},
++ {0x0000a630, 0x01408502},
++ {0x0000a634, 0x01408502},
++ {0x0000a638, 0x01408502},
++ {0x0000a63c, 0x01408502},
++ {0x0000b2dc, 0xfff55592},
++ {0x0000b2e0, 0xfff99924},
++ {0x0000b2e4, 0xfffe1e00},
++ {0x0000b2e8, 0xffffe000},
++ {0x00016044, 0x044922db},
++ {0x00016048, 0x6c927a70},
++ {0x00016444, 0x044922db},
++ {0x00016448, 0x6c927a70},
++};
++
+ static const u32 qca953x_2p0_baseband_core[][2] = {
+ /* Addr allmodes */
+ {0x00009800, 0xafe68e30},
+++ /dev/null
-From: Felix Fietkau <nbd@openwrt.org>
-Date: Sun, 22 Nov 2015 14:03:40 +0100
-Subject: [PATCH] ath10k: do not use coherent memory for allocated device
- memory chunks
-
-Coherent memory is more expensive to allocate (and constrained on some
-architectures where it has to be pre-allocated). It is also completely
-unnecessary, since the host has no reason to even access these allocated
-memory spaces
-
-Signed-off-by: Felix Fietkau <nbd@openwrt.org>
----
-
---- a/drivers/net/wireless/ath/ath10k/wmi.c
-+++ b/drivers/net/wireless/ath/ath10k/wmi.c
-@@ -4312,34 +4312,58 @@ void ath10k_wmi_event_vdev_resume_req(st
- ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_RESUME_REQ_EVENTID\n");
- }
-
--static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
-- u32 num_units, u32 unit_len)
-+static int ath10k_wmi_alloc_chunk(struct ath10k *ar, u32 req_id,
-+ u32 num_units, u32 unit_len)
- {
- dma_addr_t paddr;
-- u32 pool_size;
-+ u32 pool_size = 0;
- int idx = ar->wmi.num_mem_chunks;
-+ void *vaddr = NULL;
-
-- pool_size = num_units * round_up(unit_len, 4);
-+ if (ar->wmi.num_mem_chunks == ARRAY_SIZE(ar->wmi.mem_chunks))
-+ return -ENOMEM;
-
-- if (!pool_size)
-- return -EINVAL;
-+ while (!vaddr && num_units) {
-+ pool_size = num_units * round_up(unit_len, 4);
-+ if (!pool_size)
-+ return -EINVAL;
-
-- ar->wmi.mem_chunks[idx].vaddr = dma_alloc_coherent(ar->dev,
-- pool_size,
-- &paddr,
-- GFP_KERNEL);
-- if (!ar->wmi.mem_chunks[idx].vaddr) {
-- ath10k_warn(ar, "failed to allocate memory chunk\n");
-- return -ENOMEM;
-+ vaddr = kzalloc(pool_size, GFP_KERNEL | __GFP_NOWARN);
-+ if (!vaddr)
-+ num_units /= 2;
- }
-
-- memset(ar->wmi.mem_chunks[idx].vaddr, 0, pool_size);
-+ if (!num_units)
-+ return -ENOMEM;
-+
-+ paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_TO_DEVICE);
-+ if (dma_mapping_error(ar->dev, paddr)) {
-+ kfree(vaddr);
-+ return -ENOMEM;
-+ }
-
-+ ar->wmi.mem_chunks[idx].vaddr = vaddr;
- ar->wmi.mem_chunks[idx].paddr = paddr;
- ar->wmi.mem_chunks[idx].len = pool_size;
- ar->wmi.mem_chunks[idx].req_id = req_id;
- ar->wmi.num_mem_chunks++;
-
-+ return num_units;
-+}
-+
-+static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
-+ u32 num_units, u32 unit_len)
-+{
-+ int ret;
-+
-+ while (num_units) {
-+ ret = ath10k_wmi_alloc_chunk(ar, req_id, num_units, unit_len);
-+ if (ret < 0)
-+ return ret;
-+
-+ num_units -= ret;
-+ }
-+
- return 0;
- }
-
-@@ -7717,10 +7741,11 @@ void ath10k_wmi_free_host_mem(struct ath
-
- /* free the host memory chunks requested by firmware */
- for (i = 0; i < ar->wmi.num_mem_chunks; i++) {
-- dma_free_coherent(ar->dev,
-- ar->wmi.mem_chunks[i].len,
-- ar->wmi.mem_chunks[i].vaddr,
-- ar->wmi.mem_chunks[i].paddr);
-+ dma_unmap_single(ar->dev,
-+ ar->wmi.mem_chunks[i].paddr,
-+ ar->wmi.mem_chunks[i].len,
-+ DMA_TO_DEVICE);
-+ kfree(ar->wmi.mem_chunks[i].vaddr);
- }
-
- ar->wmi.num_mem_chunks = 0;
--- /dev/null
+From: Eli Cooper <elicooper@gmx.com>
+Date: Thu, 14 Jan 2016 00:07:12 +0800
+Subject: [PATCH] rt2x00: fix monitor mode regression
+
+Since commit df1404650ccbfeb76a84f301f22316be0d00a864 monitor mode for rt2x00
+has been made effectively useless because the hardware filter is configured to
+drop packets whose intended recipient is not the device, regardless of the
+presence of monitor mode interfaces.
+
+This patch fixes this regression by adding explicit monitor mode support, and
+configuring the hardware filter accordingly.
+
+Signed-off-by: Eli Cooper <elicooper@gmx.com>
+---
+
+--- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
+@@ -273,8 +273,10 @@ static void rt2400pci_config_filter(stru
+ !(filter_flags & FIF_PLCPFAIL));
+ rt2x00_set_field32(®, RXCSR0_DROP_CONTROL,
+ !(filter_flags & FIF_CONTROL));
+- rt2x00_set_field32(®, RXCSR0_DROP_NOT_TO_ME, 1);
++ rt2x00_set_field32(®, RXCSR0_DROP_NOT_TO_ME,
++ !rt2x00dev->is_monitoring);
+ rt2x00_set_field32(®, RXCSR0_DROP_TODS,
++ !rt2x00dev->is_monitoring &&
+ !rt2x00dev->intf_ap_count);
+ rt2x00_set_field32(®, RXCSR0_DROP_VERSION_ERROR, 1);
+ rt2x00mmio_register_write(rt2x00dev, RXCSR0, reg);
+--- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
+@@ -274,8 +274,10 @@ static void rt2500pci_config_filter(stru
+ !(filter_flags & FIF_PLCPFAIL));
+ rt2x00_set_field32(®, RXCSR0_DROP_CONTROL,
+ !(filter_flags & FIF_CONTROL));
+- rt2x00_set_field32(®, RXCSR0_DROP_NOT_TO_ME, 1);
++ rt2x00_set_field32(®, RXCSR0_DROP_NOT_TO_ME,
++ !rt2x00dev->is_monitoring);
+ rt2x00_set_field32(®, RXCSR0_DROP_TODS,
++ !rt2x00dev->is_monitoring &&
+ !rt2x00dev->intf_ap_count);
+ rt2x00_set_field32(®, RXCSR0_DROP_VERSION_ERROR, 1);
+ rt2x00_set_field32(®, RXCSR0_DROP_MCAST,
+--- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
+@@ -437,8 +437,10 @@ static void rt2500usb_config_filter(stru
+ !(filter_flags & FIF_PLCPFAIL));
+ rt2x00_set_field16(®, TXRX_CSR2_DROP_CONTROL,
+ !(filter_flags & FIF_CONTROL));
+- rt2x00_set_field16(®, TXRX_CSR2_DROP_NOT_TO_ME, 1);
++ rt2x00_set_field16(®, TXRX_CSR2_DROP_NOT_TO_ME,
++ !rt2x00dev->is_monitoring);
+ rt2x00_set_field16(®, TXRX_CSR2_DROP_TODS,
++ !rt2x00dev->is_monitoring &&
+ !rt2x00dev->intf_ap_count);
+ rt2x00_set_field16(®, TXRX_CSR2_DROP_VERSION_ERROR, 1);
+ rt2x00_set_field16(®, TXRX_CSR2_DROP_MULTICAST,
+--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+@@ -1490,7 +1490,8 @@ void rt2800_config_filter(struct rt2x00_
+ !(filter_flags & FIF_FCSFAIL));
+ rt2x00_set_field32(®, RX_FILTER_CFG_DROP_PHY_ERROR,
+ !(filter_flags & FIF_PLCPFAIL));
+- rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_TO_ME, 1);
++ rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_TO_ME,
++ !rt2x00dev->is_monitoring);
+ rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_MY_BSSD, 0);
+ rt2x00_set_field32(®, RX_FILTER_CFG_DROP_VER_ERROR, 1);
+ rt2x00_set_field32(®, RX_FILTER_CFG_DROP_MULTICAST,
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+@@ -844,11 +844,13 @@ struct rt2x00_dev {
+ * - Open sta interface count.
+ * - Association count.
+ * - Beaconing enabled count.
++ * - Whether the device is monitoring.
+ */
+ unsigned int intf_ap_count;
+ unsigned int intf_sta_count;
+ unsigned int intf_associated;
+ unsigned int intf_beaconing;
++ bool is_monitoring;
+
+ /*
+ * Interface combinations
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00config.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00config.c
+@@ -244,6 +244,16 @@ void rt2x00lib_config(struct rt2x00_dev
+ (ieee80211_flags & IEEE80211_CONF_CHANGE_PS))
+ cancel_delayed_work_sync(&rt2x00dev->autowakeup_work);
+
++ if (ieee80211_flags & IEEE80211_CONF_CHANGE_MONITOR) {
++ if (conf->flags & IEEE80211_CONF_MONITOR) {
++ rt2x00_dbg(rt2x00dev, "Monitor mode is enabled\n");
++ rt2x00dev->is_monitoring = true;
++ } else {
++ rt2x00_dbg(rt2x00dev, "Monitor mode is disabled\n");
++ rt2x00dev->is_monitoring = false;
++ }
++ }
++
+ /*
+ * Start configuration.
+ */
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+@@ -1204,6 +1204,7 @@ int rt2x00lib_start(struct rt2x00_dev *r
+ rt2x00dev->intf_ap_count = 0;
+ rt2x00dev->intf_sta_count = 0;
+ rt2x00dev->intf_associated = 0;
++ rt2x00dev->is_monitoring = false;
+
+ /* Enable the radio */
+ retval = rt2x00lib_enable_radio(rt2x00dev);
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
+@@ -385,11 +385,6 @@ void rt2x00mac_configure_filter(struct i
+ *total_flags |= FIF_PSPOLL;
+ }
+
+- /*
+- * Check if there is any work left for us.
+- */
+- if (rt2x00dev->packet_filter == *total_flags)
+- return;
+ rt2x00dev->packet_filter = *total_flags;
+
+ rt2x00dev->ops->lib->config_filter(rt2x00dev, *total_flags);
+--- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
+@@ -530,8 +530,10 @@ static void rt61pci_config_filter(struct
+ !(filter_flags & FIF_PLCPFAIL));
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_CONTROL,
+ !(filter_flags & (FIF_CONTROL | FIF_PSPOLL)));
+- rt2x00_set_field32(®, TXRX_CSR0_DROP_NOT_TO_ME, 1);
++ rt2x00_set_field32(®, TXRX_CSR0_DROP_NOT_TO_ME,
++ !rt2x00dev->is_monitoring);
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_TO_DS,
++ !rt2x00dev->is_monitoring &&
+ !rt2x00dev->intf_ap_count);
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_VERSION_ERROR, 1);
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_MULTICAST,
+--- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
+@@ -480,8 +480,10 @@ static void rt73usb_config_filter(struct
+ !(filter_flags & FIF_PLCPFAIL));
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_CONTROL,
+ !(filter_flags & (FIF_CONTROL | FIF_PSPOLL)));
+- rt2x00_set_field32(®, TXRX_CSR0_DROP_NOT_TO_ME, 1);
++ rt2x00_set_field32(®, TXRX_CSR0_DROP_NOT_TO_ME,
++ !rt2x00dev->is_monitoring);
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_TO_DS,
++ !rt2x00dev->is_monitoring &&
+ !rt2x00dev->intf_ap_count);
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_VERSION_ERROR, 1);
+ rt2x00_set_field32(®, TXRX_CSR0_DROP_MULTICAST,
--- /dev/null
+From: Miaoqing Pan <miaoqing@codeaurora.org>
+Date: Fri, 15 Jan 2016 18:17:17 +0800
+Subject: [PATCH] ath9k: avoid ANI restart if no trigger
+
+Fixes commit 54da20d83f0e ("ath9k_hw: improve ANI processing and rx desensitizing parameters")
+
+Call ath9k_ani_restart() only when the phy error rate reach the
+ANI immunity threshold. Sync the logic with internal code base.
+
+Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/ani.c
++++ b/drivers/net/wireless/ath/ath9k/ani.c
+@@ -444,14 +444,16 @@ void ath9k_hw_ani_monitor(struct ath_hw
+ ofdmPhyErrRate < ah->config.ofdm_trig_low) {
+ ath9k_hw_ani_lower_immunity(ah);
+ aniState->ofdmsTurn = !aniState->ofdmsTurn;
++ ath9k_ani_restart(ah);
+ } else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) {
+ ath9k_hw_ani_ofdm_err_trigger(ah);
+ aniState->ofdmsTurn = false;
++ ath9k_ani_restart(ah);
+ } else if (cckPhyErrRate > ah->config.cck_trig_high) {
+ ath9k_hw_ani_cck_err_trigger(ah);
+ aniState->ofdmsTurn = true;
++ ath9k_ani_restart(ah);
+ }
+- ath9k_ani_restart(ah);
+ }
+ }
+ EXPORT_SYMBOL(ath9k_hw_ani_monitor);
+++ /dev/null
-From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-Date: Sun, 20 Dec 2015 13:50:00 +0200
-Subject: [PATCH] mac80211: fix PS-Poll handling
-
-My commit below broken PS-Poll handling. In case the driver
-has no frames buffered, driver_release_tids will be 0, but
-calling find_highest_prio_tid() with 0 as a parameter is
-not a good idea:
-fls(0) - 1 = -1.
-This bug caused mac80211 to think that frames were buffered
-in the driver which in turn was confused because mac80211
-was asking to release frames that were not reported to
-exist.
-On iwlwifi, this led to the WARNING below:
-
-WARNING: CPU: 0 PID: 11230 at drivers/net/wireless/intel/iwlwifi/mvm/sta.c:1733 iwl_mvm_sta_modify_sleep_tx_count+0x2af/0x320 [iwlmvm]()
-ffffffffc0627c60 ffff8800069b7648 ffffffff81888913 0000000000000000
-0000000000000000 ffff8800069b7688 ffffffff81089d6a ffff8800069b7678
-0000000000000001 ffff88003b35abf0 ffff88000698b128 ffff8800069b76d4
-Call Trace:
-[<ffffffff81888913>] dump_stack+0x4c/0x65
-[<ffffffff81089d6a>] warn_slowpath_common+0x8a/0xc0
-[<ffffffff81089e5a>] warn_slowpath_null+0x1a/0x20
-[<ffffffffc05f36bf>] iwl_mvm_sta_modify_sleep_tx_count+0x2af/0x320 [iwlmvm]
-[<ffffffffc05dae41>] iwl_mvm_mac_release_buffered_frames+0x31/0x40 [iwlmvm]
-[<ffffffffc045d8b6>] ieee80211_sta_ps_deliver_response+0x6e6/0xd80 [mac80211]
-[<ffffffffc0461296>] ieee80211_sta_ps_deliver_poll_response+0x26/0x30 [mac80211]
-[<ffffffffc048f743>] ieee80211_rx_handlers+0xa83/0x2900 [mac80211]
-[<ffffffffc04917ad>] ieee80211_prepare_and_rx_handle+0x1ed/0xa70 [mac80211]
-[<ffffffffc045e3d5>] ? sta_info_get_bss+0x5/0x4a0 [mac80211]
-[<ffffffffc04925b6>] ieee80211_rx_napi+0x586/0xcd0 [mac80211]
-[<ffffffffc05eaa3e>] iwl_mvm_rx_rx_mpdu+0x59e/0xc60 [iwlmvm]
-
-Fixes: 0ead2510f8ce ("mac80211: allow the driver to send EOSP when needed")
-Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
----
-
---- a/net/mac80211/sta_info.c
-+++ b/net/mac80211/sta_info.c
-@@ -1453,7 +1453,7 @@ ieee80211_sta_ps_deliver_response(struct
-
- more_data = ieee80211_sta_ps_more_data(sta, ignored_acs, reason, driver_release_tids);
-
-- if (reason == IEEE80211_FRAME_RELEASE_PSPOLL)
-+ if (driver_release_tids && reason == IEEE80211_FRAME_RELEASE_PSPOLL)
- driver_release_tids =
- BIT(find_highest_prio_tid(driver_release_tids));
-
--- /dev/null
+From: Miaoqing Pan <miaoqing@codeaurora.org>
+Date: Fri, 15 Jan 2016 18:17:18 +0800
+Subject: [PATCH] ath9k: clean up ANI per-channel pointer checking
+
+commit c24bd3620c50 ("ath9k: Do not maintain ANI state per-channel")
+removed per-channel handling, the code to check 'curchan' also
+should be removed as never used.
+
+Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/ani.c
++++ b/drivers/net/wireless/ath/ath9k/ani.c
+@@ -126,12 +126,8 @@ static void ath9k_hw_update_mibstats(str
+
+ static void ath9k_ani_restart(struct ath_hw *ah)
+ {
+- struct ar5416AniState *aniState;
+-
+- if (!ah->curchan)
+- return;
++ struct ar5416AniState *aniState = &ah->ani;
+
+- aniState = &ah->ani;
+ aniState->listenTime = 0;
+
+ ENABLE_REGWRITE_BUFFER(ah);
+@@ -221,12 +217,7 @@ static void ath9k_hw_set_ofdm_nil(struct
+
+ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
+ {
+- struct ar5416AniState *aniState;
+-
+- if (!ah->curchan)
+- return;
+-
+- aniState = &ah->ani;
++ struct ar5416AniState *aniState = &ah->ani;
+
+ if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL)
+ ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false);
+@@ -281,12 +272,7 @@ static void ath9k_hw_set_cck_nil(struct
+
+ static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)
+ {
+- struct ar5416AniState *aniState;
+-
+- if (!ah->curchan)
+- return;
+-
+- aniState = &ah->ani;
++ struct ar5416AniState *aniState = &ah->ani;
+
+ if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL)
+ ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1,
+@@ -299,9 +285,7 @@ static void ath9k_hw_ani_cck_err_trigger
+ */
+ static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah)
+ {
+- struct ar5416AniState *aniState;
+-
+- aniState = &ah->ani;
++ struct ar5416AniState *aniState = &ah->ani;
+
+ /* lower OFDM noise immunity */
+ if (aniState->ofdmNoiseImmunityLevel > 0 &&
+@@ -329,7 +313,7 @@ void ath9k_ani_reset(struct ath_hw *ah,
+ struct ath_common *common = ath9k_hw_common(ah);
+ int ofdm_nil, cck_nil;
+
+- if (!ah->curchan)
++ if (!chan)
+ return;
+
+ BUG_ON(aniState == NULL);
+@@ -416,14 +400,10 @@ static bool ath9k_hw_ani_read_counters(s
+
+ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
+ {
+- struct ar5416AniState *aniState;
++ struct ar5416AniState *aniState = &ah->ani;
+ struct ath_common *common = ath9k_hw_common(ah);
+ u32 ofdmPhyErrRate, cckPhyErrRate;
+
+- if (!ah->curchan)
+- return;
+-
+- aniState = &ah->ani;
+ if (!ath9k_hw_ani_read_counters(ah))
+ return;
+
+++ /dev/null
-From: Felix Fietkau <nbd@openwrt.org>
-Date: Thu, 14 Jan 2016 03:14:03 +0100
-Subject: [PATCH] ath9k_hw: add low power tx gain table for AR953x
-
-Used in some newer TP-Link AR9533 devices.
-
-Signed-off-by: Felix Fietkau <nbd@openwrt.org>
----
-
---- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
-@@ -698,6 +698,9 @@ static void ar9003_tx_gain_table_mode2(s
- else if (AR_SREV_9340(ah))
- INIT_INI_ARRAY(&ah->iniModesTxGain,
- ar9340Modes_low_ob_db_tx_gain_table_1p0);
-+ else if (AR_SREV_9531_11(ah))
-+ INIT_INI_ARRAY(&ah->iniModesTxGain,
-+ qca953x_1p1_modes_no_xpa_low_power_tx_gain_table);
- else if (AR_SREV_9485_11_OR_LATER(ah))
- INIT_INI_ARRAY(&ah->iniModesTxGain,
- ar9485Modes_low_ob_db_tx_gain_1_1);
---- a/drivers/net/wireless/ath/ath9k/ar953x_initvals.h
-+++ b/drivers/net/wireless/ath/ath9k/ar953x_initvals.h
-@@ -757,6 +757,71 @@ static const u32 qca953x_1p1_modes_xpa_t
- {0x00016448, 0x6c927a70},
- };
-
-+static const u32 qca953x_1p1_modes_no_xpa_low_power_tx_gain_table[][2] = {
-+ /* Addr allmodes */
-+ {0x0000a2dc, 0xfff55592},
-+ {0x0000a2e0, 0xfff99924},
-+ {0x0000a2e4, 0xfffe1e00},
-+ {0x0000a2e8, 0xffffe000},
-+ {0x0000a410, 0x000050d6},
-+ {0x0000a500, 0x00000069},
-+ {0x0000a504, 0x0400006b},
-+ {0x0000a508, 0x0800006d},
-+ {0x0000a50c, 0x0c000269},
-+ {0x0000a510, 0x1000026b},
-+ {0x0000a514, 0x1400026d},
-+ {0x0000a518, 0x18000669},
-+ {0x0000a51c, 0x1c00066b},
-+ {0x0000a520, 0x1d000a68},
-+ {0x0000a524, 0x21000a6a},
-+ {0x0000a528, 0x25000a6c},
-+ {0x0000a52c, 0x29000a6e},
-+ {0x0000a530, 0x2d0012a9},
-+ {0x0000a534, 0x310012ab},
-+ {0x0000a538, 0x350012ad},
-+ {0x0000a53c, 0x39001b0a},
-+ {0x0000a540, 0x3d001b0c},
-+ {0x0000a544, 0x41001b0e},
-+ {0x0000a548, 0x43001bae},
-+ {0x0000a54c, 0x45001914},
-+ {0x0000a550, 0x47001916},
-+ {0x0000a554, 0x49001b96},
-+ {0x0000a558, 0x49001b96},
-+ {0x0000a55c, 0x49001b96},
-+ {0x0000a560, 0x49001b96},
-+ {0x0000a564, 0x49001b96},
-+ {0x0000a568, 0x49001b96},
-+ {0x0000a56c, 0x49001b96},
-+ {0x0000a570, 0x49001b96},
-+ {0x0000a574, 0x49001b96},
-+ {0x0000a578, 0x49001b96},
-+ {0x0000a57c, 0x49001b96},
-+ {0x0000a600, 0x00000000},
-+ {0x0000a604, 0x00000000},
-+ {0x0000a608, 0x00000000},
-+ {0x0000a60c, 0x00000000},
-+ {0x0000a610, 0x00000000},
-+ {0x0000a614, 0x00000000},
-+ {0x0000a618, 0x00804201},
-+ {0x0000a61c, 0x01408201},
-+ {0x0000a620, 0x01408502},
-+ {0x0000a624, 0x01408502},
-+ {0x0000a628, 0x01408502},
-+ {0x0000a62c, 0x01408502},
-+ {0x0000a630, 0x01408502},
-+ {0x0000a634, 0x01408502},
-+ {0x0000a638, 0x01408502},
-+ {0x0000a63c, 0x01408502},
-+ {0x0000b2dc, 0xfff55592},
-+ {0x0000b2e0, 0xfff99924},
-+ {0x0000b2e4, 0xfffe1e00},
-+ {0x0000b2e8, 0xffffe000},
-+ {0x00016044, 0x044922db},
-+ {0x00016048, 0x6c927a70},
-+ {0x00016444, 0x044922db},
-+ {0x00016448, 0x6c927a70},
-+};
-+
- static const u32 qca953x_2p0_baseband_core[][2] = {
- /* Addr allmodes */
- {0x00009800, 0xafe68e30},
--- /dev/null
+From: Miaoqing Pan <miaoqing@codeaurora.org>
+Date: Fri, 15 Jan 2016 18:17:19 +0800
+Subject: [PATCH] ath9k: do not reset while BB panic(0x4000409) on ar9561
+
+BB panic(0x4000409) observed while AP enabling/disabling
+bursting.
+
+Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+@@ -2071,7 +2071,8 @@ void ar9003_hw_attach_phy_ops(struct ath
+ * to be disabled.
+ *
+ * 0x04000409: Packet stuck on receive.
+- * Full chip reset is required for all chips except AR9340.
++ * Full chip reset is required for all chips except
++ * AR9340, AR9531 and AR9561.
+ */
+
+ /*
+@@ -2100,7 +2101,7 @@ bool ar9003_hw_bb_watchdog_check(struct
+ case 0x04000b09:
+ return true;
+ case 0x04000409:
+- if (AR_SREV_9340(ah) || AR_SREV_9531(ah))
++ if (AR_SREV_9340(ah) || AR_SREV_9531(ah) || AR_SREV_9561(ah))
+ return false;
+ else
+ return true;
--- /dev/null
+From: Miaoqing Pan <miaoqing@codeaurora.org>
+Date: Fri, 15 Jan 2016 18:17:20 +0800
+Subject: [PATCH] ath9k: fix inconsistent use of tab and space in
+ indentation
+
+Minor changes for indenting.
+
+Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+@@ -5485,11 +5485,11 @@ unsigned int ar9003_get_paprd_scale_fact
+ AR9300_PAPRD_SCALE_1);
+ else {
+ if (chan->channel >= 5700)
+- return MS(le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20),
+- AR9300_PAPRD_SCALE_1);
++ return MS(le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20),
++ AR9300_PAPRD_SCALE_1);
+ else if (chan->channel >= 5400)
+ return MS(le32_to_cpu(eep->modalHeader5G.papdRateMaskHt40),
+- AR9300_PAPRD_SCALE_2);
++ AR9300_PAPRD_SCALE_2);
+ else
+ return MS(le32_to_cpu(eep->modalHeader5G.papdRateMaskHt40),
+ AR9300_PAPRD_SCALE_1);
--- /dev/null
+From: Miaoqing Pan <miaoqing@codeaurora.org>
+Date: Fri, 15 Jan 2016 18:17:21 +0800
+Subject: [PATCH] ath9k: fix data bus error on ar9300 and ar9580
+
+One crash issue be found on ar9300: RTC_RC reg read leads crash, leading
+the data bus error, due to RTC_RC reg write not happen properly.
+
+Warm Reset trigger in continuous beacon stuck for one of the customer for
+other chip, noticed the MAC was stuck in RTC reset. After analysis noticed
+DMA did not complete when RTC was put in reset.
+
+So, before resetting the MAC need to make sure there are no pending DMA
+transactions because this reset does not reset all parts of the chip.
+
+The 12th and 11th bit of MAC _DMA_CFG register used to do that.
+ 12 cfg_halt_ack 0x0
+ 0 DMA has not yet halted
+ 1 DMA has halted
+ 11 cfg_halt_req 0x0
+ 0 DMA logic operates normally
+ 1 Request DMA logic to stop so software can reset the MAC
+
+The Bit [12] of this register indicates when the halt has taken effect or
+not. the DMA halt IS NOT recoverable; once software sets bit [11] to
+request a DMA halt, software must wait for bit [12] to be set and reset
+the MAC.
+
+So, the same thing we implemented for ar9580 chip.
+
+Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -1368,6 +1368,16 @@ static bool ath9k_hw_set_reset(struct at
+ if (ath9k_hw_mci_is_enabled(ah))
+ ar9003_mci_check_gpm_offset(ah);
+
++ /* DMA HALT added to resolve ar9300 and ar9580 bus error during
++ * RTC_RC reg read
++ */
++ if (AR_SREV_9300(ah) || AR_SREV_9580(ah)) {
++ REG_SET_BIT(ah, AR_CFG, AR_CFG_HALT_REQ);
++ ath9k_hw_wait(ah, AR_CFG, AR_CFG_HALT_ACK, AR_CFG_HALT_ACK,
++ 20 * AH_WAIT_TIMEOUT);
++ REG_CLR_BIT(ah, AR_CFG, AR_CFG_HALT_REQ);
++ }
++
+ REG_WRITE(ah, AR_RTC_RC, rst_flags);
+
+ REGWRITE_BUFFER_FLUSH(ah);
+--- a/drivers/net/wireless/ath/ath9k/reg.h
++++ b/drivers/net/wireless/ath/ath9k/reg.h
+@@ -34,8 +34,10 @@
+ #define AR_CFG_SWRG 0x00000010
+ #define AR_CFG_AP_ADHOC_INDICATION 0x00000020
+ #define AR_CFG_PHOK 0x00000100
+-#define AR_CFG_CLK_GATE_DIS 0x00000400
+ #define AR_CFG_EEBS 0x00000200
++#define AR_CFG_CLK_GATE_DIS 0x00000400
++#define AR_CFG_HALT_REQ 0x00000800
++#define AR_CFG_HALT_ACK 0x00001000
+ #define AR_CFG_PCI_MASTER_REQ_Q_THRESH 0x00060000
+ #define AR_CFG_PCI_MASTER_REQ_Q_THRESH_S 17
+
--- /dev/null
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Fri, 15 Jan 2016 15:59:45 +0100
+Subject: [PATCH] brcmfmac: add missing include
+
+linux/module.h is required for defining module parameters
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+@@ -17,6 +17,7 @@
+ #include <linux/kernel.h>
+ #include <linux/string.h>
+ #include <linux/netdevice.h>
++#include <linux/module.h>
+ #include <brcmu_wifi.h>
+ #include <brcmu_utils.h>
+ #include "core.h"
---help---
--- a/.local-symbols
+++ b/.local-symbols
-@@ -126,6 +126,7 @@ ADM8211=
+@@ -125,6 +125,7 @@ ADM8211=
ATH_COMMON=
WLAN_VENDOR_ATH=
ATH_DEBUG=
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
-@@ -2463,6 +2463,8 @@ void regulatory_hint_country_ie(struct w
+@@ -2411,6 +2411,8 @@ void regulatory_hint_country_ie(struct w
enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request = NULL, *lr;
/* IE len must be evenly divisible by 2 */
if (country_ie_len & 0x01)
return;
-@@ -2669,6 +2671,7 @@ static void restore_regulatory_settings(
+@@ -2617,6 +2619,7 @@ static void restore_regulatory_settings(
void regulatory_hint_disconnect(void)
{
+ return;
- REG_DBG_PRINT("All devices are disconnected, going to restore regulatory settings\n");
+ pr_debug("All devices are disconnected, going to restore regulatory settings\n");
restore_regulatory_settings(false);
}
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -1038,23 +1038,23 @@ static int __init ath9k_init(void)
+@@ -1039,23 +1039,23 @@ static int __init ath9k_init(void)
{
int error;
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -87,7 +87,7 @@ int ath_descdma_setup(struct ath_softc *
+@@ -88,7 +88,7 @@ int ath_descdma_setup(struct ath_softc *
(_l) &= ((_sz) - 1); \
} while (0)
const u8 *addr);
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1252,6 +1252,7 @@ enum ieee80211_smps_mode {
+@@ -1282,6 +1282,7 @@ enum ieee80211_smps_mode {
*
* @power_level: requested transmit power (in dBm), backward compatibility
* value only that is set to the minimum of all interfaces
*
* @chandef: the channel definition to tune to
* @radar_enabled: whether radar detection is enabled
-@@ -1272,6 +1273,7 @@ enum ieee80211_smps_mode {
+@@ -1302,6 +1303,7 @@ enum ieee80211_smps_mode {
struct ieee80211_conf {
u32 flags;
int power_level, dynamic_ps_timeout;
__NL80211_ATTR_AFTER_LAST,
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -2201,6 +2201,19 @@ static int ieee80211_get_tx_power(struct
+@@ -2229,6 +2229,19 @@ static int ieee80211_get_tx_power(struct
return 0;
}
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr)
{
-@@ -3375,6 +3388,7 @@ const struct cfg80211_ops mac80211_confi
+@@ -3403,6 +3416,7 @@ const struct cfg80211_ops mac80211_confi
.set_wiphy_params = ieee80211_set_wiphy_params,
.set_tx_power = ieee80211_set_tx_power,
.get_tx_power = ieee80211_get_tx_power,
if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER;
local->hw.conf.power_level = power;
-@@ -580,6 +586,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+@@ -586,6 +592,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
IEEE80211_RADIOTAP_MCS_HAVE_BW;
local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI |
IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH;
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -813,6 +813,9 @@ static inline int ath9k_dump_btcoex(stru
+@@ -814,6 +814,9 @@ static inline int ath9k_dump_btcoex(stru
void ath_init_leds(struct ath_softc *sc);
void ath_deinit_leds(struct ath_softc *sc);
void ath_fill_led_pin(struct ath_softc *sc);
#else
static inline void ath_init_leds(struct ath_softc *sc)
{
-@@ -952,6 +955,13 @@ void ath_ant_comb_scan(struct ath_softc
+@@ -953,6 +956,13 @@ void ath_ant_comb_scan(struct ath_softc
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
-@@ -1003,9 +1013,8 @@ struct ath_softc {
+@@ -1005,9 +1015,8 @@ struct ath_softc {
spinlock_t chan_lock;
#ifdef CPTCFG_MAC80211_LEDS
void ath_fill_led_pin(struct ath_softc *sc)
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -950,7 +950,7 @@ int ath9k_init_device(u16 devid, struct
+@@ -951,7 +951,7 @@ int ath9k_init_device(u16 devid, struct
#ifdef CPTCFG_MAC80211_LEDS
/* must be initialized before ieee80211_register_hw */
int (*external_reset)(void);
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -577,6 +577,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
+@@ -577,6 +577,7 @@ static int ath9k_init_softc(u16 devid, s
ah->external_reset = pdata->external_reset;
ah->disable_2ghz = pdata->disable_2ghz;
ah->disable_5ghz = pdata->disable_5ghz;
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1809,6 +1809,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
+@@ -1819,6 +1819,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
}
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
struct ath9k_hw_cal_data *caldata, bool fastcc)
{
-@@ -2017,6 +2031,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -2027,6 +2041,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ar9003_hw_disable_phy_restart(ah);
ath9k_hw_apply_gpio_override(ah);
}
static const struct ieee80211_iface_limit if_limits[] = {
-@@ -911,6 +912,18 @@ static void ath9k_set_hw_capab(struct at
+@@ -912,6 +913,18 @@ static void ath9k_set_hw_capab(struct at
SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
}
int ath9k_init_device(u16 devid, struct ath_softc *sc,
const struct ath_bus_ops *bus_ops)
{
-@@ -956,6 +969,8 @@ int ath9k_init_device(u16 devid, struct
+@@ -957,6 +970,8 @@ int ath9k_init_device(u16 devid, struct
ARRAY_SIZE(ath9k_tpt_blink));
#endif
/******************/
/* Chip Revisions */
/******************/
-@@ -1387,6 +1400,9 @@ static bool ath9k_hw_set_reset(struct at
+@@ -1397,6 +1410,9 @@ static bool ath9k_hw_set_reset(struct at
if (AR_SREV_9100(ah))
udelay(50);
return true;
}
-@@ -1486,6 +1502,9 @@ static bool ath9k_hw_chip_reset(struct a
+@@ -1496,6 +1512,9 @@ static bool ath9k_hw_chip_reset(struct a
ar9003_hw_internal_regulator_apply(ah);
ath9k_hw_init_pll(ah, chan);
return true;
}
-@@ -1787,8 +1806,14 @@ static int ath9k_hw_do_fastcc(struct ath
+@@ -1797,8 +1816,14 @@ static int ath9k_hw_do_fastcc(struct ath
if (AR_SREV_9271(ah))
ar9002_hw_load_ani_reg(ah, chan);
return -EINVAL;
}
-@@ -2042,6 +2067,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -2052,6 +2077,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ath9k_hw_set_radar_params(ah);
}
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7721,6 +7721,7 @@ static int rt2800_probe_rt(struct rt2x00
+@@ -7722,6 +7722,7 @@ static int rt2800_probe_rt(struct rt2x00
int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
u32 reg;
-@@ -7728,6 +7729,9 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+@@ -7729,6 +7730,9 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (retval)
return retval;
}
/*
-@@ -4884,14 +4917,19 @@ static int rt2800_init_registers(struct
+@@ -4885,14 +4918,19 @@ static int rt2800_init_registers(struct
/*
* ASIC will keep garbage value after boot, clear encryption keys.
*/
}
/*
-@@ -5017,8 +5055,10 @@ static int rt2800_wait_bbp_ready(struct
+@@ -5018,8 +5056,10 @@ static int rt2800_wait_bbp_ready(struct
* BBP was enabled after firmware was loaded,
* but we need to reactivate it now.
*/
msleep(1);
for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
-@@ -6714,11 +6754,19 @@ int rt2800_enable_radio(struct rt2x00_de
+@@ -6715,11 +6755,19 @@ int rt2800_enable_radio(struct rt2x00_de
/*
* Send signal during boot time to initialize firmware.
*/
msleep(1);
/*
-@@ -7725,6 +7773,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+@@ -7726,6 +7774,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
int retval;
u32 reg;
retval = rt2800_probe_rt(rt2x00dev);
if (retval)
return retval;
-@@ -7808,8 +7858,11 @@ void rt2800_get_key_seq(struct ieee80211
+@@ -7809,8 +7859,11 @@ void rt2800_get_key_seq(struct ieee80211
return;
offset = MAC_IVEIV_ENTRY(key->hw_key_idx);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4614,6 +4614,7 @@ EXPORT_SYMBOL_GPL(rt2800_link_tuner);
+@@ -4615,6 +4615,7 @@ EXPORT_SYMBOL_GPL(rt2800_link_tuner);
*/
static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
{
u32 reg;
u16 eeprom;
unsigned int i;
-@@ -4979,7 +4980,7 @@ static int rt2800_init_registers(struct
+@@ -4980,7 +4981,7 @@ static int rt2800_init_registers(struct
/*
* Clear all beacons
*/
rt2800_clear_beacon_register(rt2x00dev, i);
if (rt2x00_is_usb(rt2x00dev)) {
-@@ -7826,6 +7827,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+@@ -7827,6 +7828,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (rt2x00_rt(rt2x00dev, RT3593))
__set_bit(RT2800_HAS_HIGH_SHARED_MEM, &drv_data->rt2800_flags);
*/
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4626,6 +4626,30 @@ static int rt2800_init_registers(struct
+@@ -4627,6 +4627,30 @@ static int rt2800_init_registers(struct
if (ret)
return ret;
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7851,7 +7851,10 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+@@ -7852,7 +7852,10 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (rt2x00_rt(rt2x00dev, RT3593))
__set_bit(RT2800_HAS_HIGH_SHARED_MEM, &drv_data->rt2800_flags);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7821,6 +7821,7 @@ static int rt2800_probe_rt(struct rt2x00
+@@ -7822,6 +7822,7 @@ static int rt2800_probe_rt(struct rt2x00
case RT3390:
case RT3572:
case RT3593:
#define RF5370 0x5370
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7441,6 +7441,66 @@ static const struct rf_channel rf_vals_3
+@@ -7442,6 +7442,66 @@ static const struct rf_channel rf_vals_3
{173, 0x61, 0, 9},
};
static const struct rf_channel rf_vals_5592_xtal20[] = {
/* Channel, N, K, mod, R */
{1, 482, 4, 10, 3},
-@@ -7668,6 +7728,11 @@ static int rt2800_probe_hw_mode(struct r
+@@ -7669,6 +7729,11 @@ static int rt2800_probe_hw_mode(struct r
spec->channels = rf_vals_3x;
break;
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4378,6 +4378,7 @@ void rt2800_vco_calibration(struct rt2x0
+@@ -4379,6 +4379,7 @@ void rt2800_vco_calibration(struct rt2x0
case RF3053:
case RF3070:
case RF3290:
case RF5360:
case RF5362:
case RF5370:
-@@ -7847,6 +7848,7 @@ static int rt2800_probe_hw_mode(struct r
+@@ -7848,6 +7849,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3053:
case RF3070:
case RF3290:
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -2625,6 +2625,211 @@ static void rt2800_config_channel_rf3053
+@@ -2626,6 +2626,211 @@ static void rt2800_config_channel_rf3053
}
}
#define POWER_BOUND 0x27
#define POWER_BOUND_5G 0x2b
-@@ -3237,6 +3442,9 @@ static void rt2800_config_channel(struct
+@@ -3238,6 +3443,9 @@ static void rt2800_config_channel(struct
case RF3322:
rt2800_config_channel_rf3322(rt2x00dev, conf, rf, info);
break;
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7406,6 +7406,7 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7407,6 +7407,7 @@ static int rt2800_init_eeprom(struct rt2
case RF3290:
case RF3320:
case RF3322:
#define RX_FILTER_CFG 0x1400
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4981,6 +4981,12 @@ static int rt2800_init_registers(struct
+@@ -4982,6 +4982,12 @@ static int rt2800_init_registers(struct
rt2800_register_write(rt2x00dev, TX_SW_CFG2,
0x00000000);
}
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392) ||
rt2x00_rt(rt2x00dev, RT5592)) {
-@@ -5011,9 +5017,11 @@ static int rt2800_init_registers(struct
+@@ -5012,9 +5018,11 @@ static int rt2800_init_registers(struct
rt2800_register_read(rt2x00dev, MAX_LEN_CFG, ®);
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE);
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 2);
else
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 1);
-@@ -5166,6 +5174,11 @@ static int rt2800_init_registers(struct
+@@ -5167,6 +5175,11 @@ static int rt2800_init_registers(struct
reg = rt2x00_rt(rt2x00dev, RT5592) ? 0x00000082 : 0x00000002;
rt2800_register_write(rt2x00dev, TXOP_HLDR_ET, reg);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -5784,6 +5784,47 @@ static void rt2800_init_bbp_3593(struct
+@@ -5785,6 +5785,47 @@ static void rt2800_init_bbp_3593(struct
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
}
static void rt2800_init_bbp_53xx(struct rt2x00_dev *rt2x00dev)
{
int ant, div_mode;
-@@ -6002,6 +6043,9 @@ static void rt2800_init_bbp(struct rt2x0
+@@ -6003,6 +6044,9 @@ static void rt2800_init_bbp(struct rt2x0
case RT3593:
rt2800_init_bbp_3593(rt2x00dev);
return;
/*
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -6819,6 +6819,144 @@ static void rt2800_init_rfcsr_3593(struc
+@@ -6820,6 +6820,144 @@ static void rt2800_init_rfcsr_3593(struc
/* TODO: enable stream mode support */
}
static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
{
rt2800_rf_init_calibration(rt2x00dev, 2);
-@@ -7050,6 +7188,9 @@ static void rt2800_init_rfcsr(struct rt2
+@@ -7051,6 +7189,9 @@ static void rt2800_init_rfcsr(struct rt2
case RT3390:
rt2800_init_rfcsr_3390(rt2x00dev);
break;
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7587,6 +7587,8 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7588,6 +7588,8 @@ static int rt2800_init_eeprom(struct rt2
rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392))
rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -3405,6 +3405,36 @@ static char rt2800_txpower_to_dev(struct
+@@ -3406,6 +3406,36 @@ static char rt2800_txpower_to_dev(struct
return clamp_t(char, txpower, MIN_A_TXPOWER, MAX_A_TXPOWER);
}
static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
struct ieee80211_conf *conf,
struct rf_channel *rf,
-@@ -3423,6 +3453,12 @@ static void rt2800_config_channel(struct
+@@ -3424,6 +3454,12 @@ static void rt2800_config_channel(struct
rt2800_txpower_to_dev(rt2x00dev, rf->channel,
info->default_power3);
switch (rt2x00dev->chip.rf) {
case RF2020:
case RF3020:
-@@ -3506,6 +3542,15 @@ static void rt2800_config_channel(struct
+@@ -3507,6 +3543,15 @@ static void rt2800_config_channel(struct
rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain);
rt2800_bbp_write(rt2x00dev, 64, 0x37 - rt2x00dev->lna_gain);
rt2800_bbp_write(rt2x00dev, 77, 0x98);
} else {
rt2800_bbp_write(rt2x00dev, 62, 0x37 - rt2x00dev->lna_gain);
rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain);
-@@ -3518,6 +3563,7 @@ static void rt2800_config_channel(struct
+@@ -3519,6 +3564,7 @@ static void rt2800_config_channel(struct
!rt2x00_rt(rt2x00dev, RT5392)) {
if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) {
rt2800_bbp_write(rt2x00dev, 82, 0x62);
rt2800_bbp_write(rt2x00dev, 75, 0x46);
} else {
if (rt2x00_rt(rt2x00dev, RT3593))
-@@ -3526,19 +3572,22 @@ static void rt2800_config_channel(struct
+@@ -3527,19 +3573,22 @@ static void rt2800_config_channel(struct
rt2800_bbp_write(rt2x00dev, 82, 0x84);
rt2800_bbp_write(rt2x00dev, 75, 0x50);
}
rt2800_bbp_write(rt2x00dev, 83, 0x9a);
if (rt2x00_has_cap_external_lna_a(rt2x00dev))
-@@ -3660,6 +3709,23 @@ static void rt2800_config_channel(struct
+@@ -3661,6 +3710,23 @@ static void rt2800_config_channel(struct
rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -3392,13 +3392,15 @@ static char rt2800_txpower_to_dev(struct
+@@ -3393,13 +3393,15 @@ static char rt2800_txpower_to_dev(struct
unsigned int channel,
char txpower)
{
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4611,7 +4611,8 @@ static void rt2800_config_txpower(struct
+@@ -4612,7 +4612,8 @@ static void rt2800_config_txpower(struct
struct ieee80211_channel *chan,
int power_level)
{
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7469,7 +7469,8 @@ static u8 rt2800_get_txmixer_gain_24g(st
+@@ -7470,7 +7470,8 @@ static u8 rt2800_get_txmixer_gain_24g(st
{
u16 word;
return 0;
rt2800_eeprom_read(rt2x00dev, EEPROM_TXMIXER_GAIN_BG, &word);
-@@ -7483,7 +7484,8 @@ static u8 rt2800_get_txmixer_gain_5g(str
+@@ -7484,7 +7485,8 @@ static u8 rt2800_get_txmixer_gain_5g(str
{
u16 word;
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -8402,7 +8402,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+@@ -8403,7 +8403,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (rt2x00_rt(rt2x00dev, RT3593))
__set_bit(RT2800_HAS_HIGH_SHARED_MEM, &drv_data->rt2800_flags);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -1937,7 +1937,8 @@ void rt2800_config_ant(struct rt2x00_dev
+@@ -1938,7 +1938,8 @@ void rt2800_config_ant(struct rt2x00_dev
rt2800_bbp_write(rt2x00dev, 3, r3);
rt2800_bbp_write(rt2x00dev, 1, r1);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -1960,7 +1960,8 @@ static void rt2800_config_lna_gain(struc
+@@ -1961,7 +1961,8 @@ static void rt2800_config_lna_gain(struc
rt2800_eeprom_read(rt2x00dev, EEPROM_LNA, &eeprom);
lna_gain = rt2x00_get_field16(eeprom, EEPROM_LNA_A0);
} else if (libconf->rf.channel <= 128) {
rt2800_eeprom_read(rt2x00dev, EEPROM_EXT_LNA2, &eeprom);
lna_gain = rt2x00_get_field16(eeprom,
EEPROM_EXT_LNA2_A1);
-@@ -1970,7 +1971,8 @@ static void rt2800_config_lna_gain(struc
+@@ -1971,7 +1972,8 @@ static void rt2800_config_lna_gain(struc
EEPROM_RSSI_BG2_LNA_A1);
}
} else {
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4811,7 +4811,8 @@ static u8 rt2800_get_default_vgc(struct
+@@ -4812,7 +4812,8 @@ static u8 rt2800_get_default_vgc(struct
else
vgc = 0x2e + rt2x00dev->lna_gain;
} else { /* 5GHZ band */
vgc = 0x20 + (rt2x00dev->lna_gain * 5) / 3;
else if (rt2x00_rt(rt2x00dev, RT5592))
vgc = 0x24 + (2 * rt2x00dev->lna_gain);
-@@ -4831,7 +4832,8 @@ static inline void rt2800_set_vgc(struct
+@@ -4832,7 +4833,8 @@ static inline void rt2800_set_vgc(struct
{
if (qual->vgc_level != vgc_level) {
if (rt2x00_rt(rt2x00dev, RT3572) ||
rt2800_bbp_write_with_rx_chain(rt2x00dev, 66,
vgc_level);
} else if (rt2x00_rt(rt2x00dev, RT5592)) {
-@@ -4878,6 +4880,11 @@ void rt2800_link_tuner(struct rt2x00_dev
+@@ -4879,6 +4881,11 @@ void rt2800_link_tuner(struct rt2x00_dev
}
break;
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7606,7 +7606,8 @@ static int rt2800_validate_eeprom(struct
+@@ -7607,7 +7607,8 @@ static int rt2800_validate_eeprom(struct
rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_BG2, &word);
if (abs(rt2x00_get_field16(word, EEPROM_RSSI_BG2_OFFSET2)) > 10)
rt2x00_set_field16(&word, EEPROM_RSSI_BG2_OFFSET2, 0);
if (rt2x00_get_field16(word, EEPROM_RSSI_BG2_LNA_A1) == 0x00 ||
rt2x00_get_field16(word, EEPROM_RSSI_BG2_LNA_A1) == 0xff)
rt2x00_set_field16(&word, EEPROM_RSSI_BG2_LNA_A1,
-@@ -7626,7 +7627,8 @@ static int rt2800_validate_eeprom(struct
+@@ -7627,7 +7628,8 @@ static int rt2800_validate_eeprom(struct
rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_A2, &word);
if (abs(rt2x00_get_field16(word, EEPROM_RSSI_A2_OFFSET2)) > 10)
rt2x00_set_field16(&word, EEPROM_RSSI_A2_OFFSET2, 0);
if (rt2x00_get_field16(word, EEPROM_RSSI_A2_LNA_A2) == 0x00 ||
rt2x00_get_field16(word, EEPROM_RSSI_A2_LNA_A2) == 0xff)
rt2x00_set_field16(&word, EEPROM_RSSI_A2_LNA_A2,
-@@ -7634,7 +7636,8 @@ static int rt2800_validate_eeprom(struct
+@@ -7635,7 +7637,8 @@ static int rt2800_validate_eeprom(struct
}
rt2800_eeprom_write(rt2x00dev, EEPROM_RSSI_A2, word);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -3981,6 +3981,9 @@ static u8 rt2800_compensate_txpower(stru
+@@ -3982,6 +3982,9 @@ static u8 rt2800_compensate_txpower(stru
if (rt2x00_rt(rt2x00dev, RT3593))
return min_t(u8, txpower, 0xc);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -8415,7 +8415,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+@@ -8416,7 +8416,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (retval)
return retval;
*/
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-@@ -989,6 +989,11 @@ struct rt2x00_dev {
+@@ -991,6 +991,11 @@ struct rt2x00_dev {
int rf_channel;
/*
/*
* Capabilities
-@@ -966,6 +967,11 @@ struct rt2x00_dev {
+@@ -968,6 +969,11 @@ struct rt2x00_dev {
const struct firmware *fw;
/*
DECLARE_KFIFO_PTR(txstatus_fifo, u32);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1334,6 +1334,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+@@ -1335,6 +1335,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
/*
* Let the driver probe the device to detect the capabilities.
*/
-@@ -1474,6 +1478,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
+@@ -1475,6 +1479,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
* Free the driver data.
*/
kfree(rt2x00dev->drv_data);
{
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-@@ -1412,6 +1412,7 @@ static inline void rt2x00debug_dump_fram
+@@ -1414,6 +1414,7 @@ static inline void rt2x00debug_dump_fram
*/
u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
struct ieee80211_vif *vif);
* Interrupt context handlers.
--- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
-@@ -2390,6 +2390,7 @@ static int rt61pci_validate_eeprom(struc
+@@ -2392,6 +2392,7 @@ static int rt61pci_validate_eeprom(struc
u32 reg;
u16 word;
u8 *mac;
s8 value;
rt2x00mmio_register_read(rt2x00dev, E2PROM_CSR, ®);
-@@ -2410,7 +2411,11 @@ static int rt61pci_validate_eeprom(struc
+@@ -2412,7 +2413,11 @@ static int rt61pci_validate_eeprom(struc
/*
* Start validation of the data that has been read.
*/
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -3528,11 +3528,18 @@ static void rt2800_config_channel(struct
+@@ -3529,11 +3529,18 @@ static void rt2800_config_channel(struct
/*
* Change BBP settings
*/
} else if (rt2x00_rt(rt2x00dev, RT3593)) {
if (rf->channel > 14) {
/* Disable CCK Packet detection on 5GHz */
-@@ -6594,6 +6601,12 @@ static void rt2800_init_rfcsr_3290(struc
+@@ -6595,6 +6602,12 @@ static void rt2800_init_rfcsr_3290(struc
static void rt2800_init_rfcsr_3352(struct rt2x00_dev *rt2x00dev)
{
rt2800_rf_init_calibration(rt2x00dev, 30);
rt2800_rfcsr_write(rt2x00dev, 0, 0xf0);
-@@ -6629,15 +6642,30 @@ static void rt2800_init_rfcsr_3352(struc
+@@ -6630,15 +6643,30 @@ static void rt2800_init_rfcsr_3352(struc
rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
rt2800_rfcsr_write(rt2x00dev, 32, 0x80);
rt2800_rfcsr_write(rt2x00dev, 33, 0x00);
rt2800_rfcsr_write(rt2x00dev, 43, 0xdb);
rt2800_rfcsr_write(rt2x00dev, 44, 0xdb);
rt2800_rfcsr_write(rt2x00dev, 45, 0xdb);
-@@ -6645,15 +6673,20 @@ static void rt2800_init_rfcsr_3352(struc
+@@ -6646,15 +6674,20 @@ static void rt2800_init_rfcsr_3352(struc
rt2800_rfcsr_write(rt2x00dev, 47, 0x0d);
rt2800_rfcsr_write(rt2x00dev, 48, 0x14);
rt2800_rfcsr_write(rt2x00dev, 49, 0x00);
rt2800_rfcsr_write(rt2x00dev, 59, 0x00);
rt2800_rfcsr_write(rt2x00dev, 60, 0x00);
rt2800_rfcsr_write(rt2x00dev, 61, 0x00);
-@@ -7674,6 +7707,7 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7675,6 +7708,7 @@ static int rt2800_init_eeprom(struct rt2
* RT53xx: defined in "EEPROM_CHIP_ID" field
*/
if (rt2x00_rt(rt2x00dev, RT3290) ||
rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392))
rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);
-@@ -7769,7 +7803,8 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7770,7 +7804,8 @@ static int rt2800_init_eeprom(struct rt2
/*
* Detect if this device has Bluetooth co-existence.
*/
__set_bit(CAPABILITY_BT_COEXIST, &rt2x00dev->cap_flags);
/*
-@@ -7798,6 +7833,22 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7799,6 +7834,22 @@ static int rt2800_init_eeprom(struct rt2
EIRP_MAX_TX_POWER_LIMIT)
__set_bit(CAPABILITY_POWER_LIMIT, &rt2x00dev->cap_flags);
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -8185,6 +8185,27 @@ static const struct rf_channel rf_vals_5
+@@ -8186,6 +8186,27 @@ static const struct rf_channel rf_vals_5
{196, 83, 0, 12, 1},
};
static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
{
struct hw_mode_spec *spec = &rt2x00dev->spec;
-@@ -8271,7 +8292,10 @@ static int rt2800_probe_hw_mode(struct r
+@@ -8272,7 +8293,10 @@ static int rt2800_probe_hw_mode(struct r
case RF5390:
case RF5392:
spec->num_channels = 14;
break;
case RF3052:
-@@ -8455,6 +8479,19 @@ static int rt2800_probe_rt(struct rt2x00
+@@ -8456,6 +8480,19 @@ static int rt2800_probe_rt(struct rt2x00
return 0;
}
int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev)
{
struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
-@@ -8497,6 +8534,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+@@ -8498,6 +8535,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
/*
#include "rt2x00.h"
#include "rt2800lib.h"
-@@ -8481,13 +8482,14 @@ static int rt2800_probe_rt(struct rt2x00
+@@ -8482,13 +8483,14 @@ static int rt2800_probe_rt(struct rt2x00
int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev)
{
#define RF5370 0x5370
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -3014,6 +3014,13 @@ static void rt2800_config_channel_rf53xx
+@@ -3015,6 +3015,13 @@ static void rt2800_config_channel_rf53xx
rt2800_rfcsr_write(rt2x00dev, 59,
r59_non_bt[idx]);
}
}
}
-@@ -3492,6 +3499,7 @@ static void rt2800_config_channel(struct
+@@ -3493,6 +3500,7 @@ static void rt2800_config_channel(struct
rt2800_config_channel_rf3853(rt2x00dev, conf, rf, info);
break;
case RF3070:
case RF5360:
case RF5362:
case RF5370:
-@@ -3510,6 +3518,7 @@ static void rt2800_config_channel(struct
+@@ -3511,6 +3519,7 @@ static void rt2800_config_channel(struct
if (rt2x00_rf(rt2x00dev, RF3070) ||
rt2x00_rf(rt2x00dev, RF3290) ||
rt2x00_rf(rt2x00dev, RF3322) ||
rt2x00_rf(rt2x00dev, RF5360) ||
rt2x00_rf(rt2x00dev, RF5362) ||
rt2x00_rf(rt2x00dev, RF5370) ||
-@@ -3788,7 +3797,8 @@ static void rt2800_config_channel(struct
+@@ -3789,7 +3798,8 @@ static void rt2800_config_channel(struct
/*
* Clear update flag
*/
rt2800_bbp_read(rt2x00dev, 49, &bbp);
rt2x00_set_field8(&bbp, BBP49_UPDATE_FLAG, 0);
rt2800_bbp_write(rt2x00dev, 49, bbp);
-@@ -4674,6 +4684,7 @@ void rt2800_vco_calibration(struct rt2x0
+@@ -4675,6 +4685,7 @@ void rt2800_vco_calibration(struct rt2x0
case RF3070:
case RF3290:
case RF3853:
case RF5360:
case RF5362:
case RF5370:
-@@ -5087,6 +5098,8 @@ static int rt2800_init_registers(struct
+@@ -5088,6 +5099,8 @@ static int rt2800_init_registers(struct
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
} else {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000000);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
-@@ -5742,9 +5755,13 @@ static void rt2800_init_bbp_3352(struct
+@@ -5743,9 +5756,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 82, 0x62);
rt2800_bbp_write(rt2x00dev, 86, 0x38);
-@@ -5758,9 +5775,13 @@ static void rt2800_init_bbp_3352(struct
+@@ -5759,9 +5776,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 104, 0x92);
rt2800_bbp_write(rt2x00dev, 120, 0x50);
-@@ -5785,6 +5806,13 @@ static void rt2800_init_bbp_3352(struct
+@@ -5786,6 +5807,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 143, 0xa2);
rt2800_bbp_write(rt2x00dev, 148, 0xc8);
}
static void rt2800_init_bbp_3390(struct rt2x00_dev *rt2x00dev)
-@@ -6126,6 +6154,7 @@ static void rt2800_init_bbp(struct rt2x0
+@@ -6127,6 +6155,7 @@ static void rt2800_init_bbp(struct rt2x0
rt2800_init_bbp_3290(rt2x00dev);
break;
case RT3352:
rt2800_init_bbp_3352(rt2x00dev);
break;
case RT3390:
-@@ -7077,6 +7106,76 @@ static void rt2800_init_rfcsr_3883(struc
+@@ -7078,6 +7107,76 @@ static void rt2800_init_rfcsr_3883(struc
rt2800_rfcsr_write(rt2x00dev, 20, rfcsr);
}
static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
{
rt2800_rf_init_calibration(rt2x00dev, 2);
-@@ -7317,6 +7416,9 @@ static void rt2800_init_rfcsr(struct rt2
+@@ -7318,6 +7417,9 @@ static void rt2800_init_rfcsr(struct rt2
case RT3593:
rt2800_init_rfcsr_3593(rt2x00dev);
break;
case RT5390:
rt2800_init_rfcsr_5390(rt2x00dev);
break;
-@@ -7576,6 +7678,12 @@ static int rt2800_validate_eeprom(struct
+@@ -7577,6 +7679,12 @@ static int rt2800_validate_eeprom(struct
rt2x00_set_field16(&word, EEPROM_NIC_CONF0_RF_TYPE, RF2820);
rt2800_eeprom_write(rt2x00dev, EEPROM_NIC_CONF0, word);
rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word);
} else if (rt2x00_rt(rt2x00dev, RT2860) ||
rt2x00_rt(rt2x00dev, RT2872)) {
/*
-@@ -7714,6 +7822,8 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7715,6 +7823,8 @@ static int rt2800_init_eeprom(struct rt2
rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);
else if (rt2x00_rt(rt2x00dev, RT3883))
rf = RF3853;
else
rf = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
-@@ -7733,6 +7843,7 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7734,6 +7844,7 @@ static int rt2800_init_eeprom(struct rt2
case RF3320:
case RF3322:
case RF3853:
case RF5360:
case RF5362:
case RF5370:
-@@ -8286,6 +8397,7 @@ static int rt2800_probe_hw_mode(struct r
+@@ -8287,6 +8398,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3290:
case RF3320:
case RF3322:
case RF5360:
case RF5362:
case RF5370:
-@@ -8425,6 +8537,7 @@ static int rt2800_probe_hw_mode(struct r
+@@ -8426,6 +8538,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3070:
case RF3290:
case RF3853:
case RF5360:
case RF5362:
case RF5370:
-@@ -8465,6 +8578,7 @@ static int rt2800_probe_rt(struct rt2x00
+@@ -8466,6 +8579,7 @@ static int rt2800_probe_rt(struct rt2x00
case RT3572:
case RT3593:
case RT3883:
#include "rt2x00.h"
#include "rt2800lib.h"
-@@ -7933,6 +7934,17 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7934,6 +7935,17 @@ static int rt2800_init_eeprom(struct rt2
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1283,7 +1283,7 @@ static inline void rt2x00lib_set_if_comb
+@@ -1284,7 +1284,7 @@ static inline void rt2x00lib_set_if_comb
*/
if_limit = &rt2x00dev->if_limits_ap;
if_limit->max = rt2x00dev->ops->max_ap_intf;
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -7817,10 +7817,11 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7818,10 +7818,11 @@ static int rt2800_init_eeprom(struct rt2
* RT53xx: defined in "EEPROM_CHIP_ID" field
*/
if (rt2x00_rt(rt2x00dev, RT3290) ||
* RFCSR 31:
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -3527,8 +3527,13 @@ static void rt2800_config_channel(struct
+@@ -3528,8 +3528,13 @@ static void rt2800_config_channel(struct
rt2x00_rf(rt2x00dev, RF5390) ||
rt2x00_rf(rt2x00dev, RF5392)) {
rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
-@@ -632,12 +632,8 @@ void rt2x00mac_bss_info_changed(struct i
+@@ -627,12 +627,8 @@ void rt2x00mac_bss_info_changed(struct i
} else if (bss_conf->enable_beacon && !intf->enable_beacon) {
rt2x00dev->intf_beaconing++;
intf->enable_beacon = true;
--- a/drivers/net/wireless/marvell/mwl8k.c
+++ b/drivers/net/wireless/marvell/mwl8k.c
-@@ -5679,6 +5679,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
+@@ -5681,6 +5681,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
static const struct pci_device_id mwl8k_pci_id_table[] = {
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
-@@ -1226,6 +1226,7 @@ static int __init brcmfmac_module_init(v
+@@ -1332,6 +1332,7 @@ static int __init brcmfmac_module_init(v
#endif
if (!schedule_work(&brcmf_driver_work))
return -EBUSY;
}
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
-@@ -420,6 +420,7 @@ struct brcmf_fw {
+@@ -418,6 +418,7 @@ struct brcmf_fw {
u16 bus_nr;
void (*done)(struct device *dev, const struct firmware *fw,
void *nvram_image, u32 nvram_len);
};
static void brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx)
-@@ -454,6 +455,8 @@ static void brcmf_fw_request_nvram_done(
+@@ -452,6 +453,8 @@ static void brcmf_fw_request_nvram_done(
goto fail;
fwctx->done(fwctx->dev, fwctx->code, nvram, nvram_length);
kfree(fwctx);
return;
-@@ -461,6 +464,8 @@ fail:
+@@ -459,6 +462,8 @@ fail:
brcmf_dbg(TRACE, "failed: dev=%s\n", dev_name(fwctx->dev));
release_firmware(fwctx->code);
device_release_driver(fwctx->dev);
kfree(fwctx);
}
-@@ -476,6 +481,8 @@ static void brcmf_fw_request_code_done(c
+@@ -474,6 +479,8 @@ static void brcmf_fw_request_code_done(c
/* only requested code so done here */
if (!(fwctx->flags & BRCMF_FW_REQUEST_NVRAM)) {
fwctx->done(fwctx->dev, fw, NULL, 0);
kfree(fwctx);
return;
}
-@@ -493,6 +500,8 @@ static void brcmf_fw_request_code_done(c
+@@ -491,6 +498,8 @@ static void brcmf_fw_request_code_done(c
fail:
brcmf_dbg(TRACE, "failed: dev=%s\n", dev_name(fwctx->dev));
device_release_driver(fwctx->dev);
kfree(fwctx);
}
-@@ -504,6 +513,8 @@ int brcmf_fw_get_firmwares_pcie(struct d
+@@ -502,6 +511,8 @@ int brcmf_fw_get_firmwares_pcie(struct d
u16 domain_nr, u16 bus_nr)
{
struct brcmf_fw *fwctx;
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
if (!fw_cb || !code)
-@@ -524,9 +535,17 @@ int brcmf_fw_get_firmwares_pcie(struct d
+@@ -522,9 +533,17 @@ int brcmf_fw_get_firmwares_pcie(struct d
fwctx->domain_nr = domain_nr;
fwctx->bus_nr = bus_nr;
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -609,9 +609,37 @@ static struct wireless_dev *brcmf_cfg802
+@@ -618,9 +618,37 @@ static struct wireless_dev *brcmf_cfg802
u32 *flags,
struct vif_params *params)
{
case RT5592:
*txwi_size = TXWI_DESC_SIZE_5WORDS;
*rxwi_size = RXWI_DESC_SIZE_6WORDS;
-@@ -3302,6 +3375,312 @@ static void rt2800_config_channel_rf55xx
+@@ -3303,6 +3376,312 @@ static void rt2800_config_channel_rf55xx
rt2800_bbp_write(rt2x00dev, 196, (rf->channel <= 14) ? 0x19 : 0x7F);
}
static void rt2800_bbp_write_with_rx_chain(struct rt2x00_dev *rt2x00dev,
const unsigned int word,
const u8 value)
-@@ -3458,7 +3837,7 @@ static void rt2800_config_channel(struct
+@@ -3459,7 +3838,7 @@ static void rt2800_config_channel(struct
struct channel_info *info)
{
u32 reg;
u8 bbp, rfcsr;
info->default_power1 = rt2800_txpower_to_dev(rt2x00dev, rf->channel,
-@@ -3512,6 +3891,9 @@ static void rt2800_config_channel(struct
+@@ -3513,6 +3892,9 @@ static void rt2800_config_channel(struct
case RF5592:
rt2800_config_channel_rf55xx(rt2x00dev, conf, rf, info);
break;
default:
rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info);
}
-@@ -3614,7 +3996,7 @@ static void rt2800_config_channel(struct
+@@ -3615,7 +3997,7 @@ static void rt2800_config_channel(struct
else if (rt2x00_rt(rt2x00dev, RT3593) ||
rt2x00_rt(rt2x00dev, RT3883))
rt2800_bbp_write(rt2x00dev, 82, 0x82);
rt2800_bbp_write(rt2x00dev, 82, 0xf2);
if (rt2x00_rt(rt2x00dev, RT3593) ||
-@@ -3636,7 +4018,7 @@ static void rt2800_config_channel(struct
+@@ -3637,7 +4019,7 @@ static void rt2800_config_channel(struct
if (rt2x00_rt(rt2x00dev, RT3572))
rt2800_rfcsr_write(rt2x00dev, 8, 0);
switch (rt2x00dev->default_ant.tx_chain_num) {
case 3:
-@@ -3685,6 +4067,7 @@ static void rt2800_config_channel(struct
+@@ -3686,6 +4068,7 @@ static void rt2800_config_channel(struct
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_RFTR_EN, 1);
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_TRSW_EN, 1);
rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin);
-@@ -4701,6 +5084,14 @@ void rt2800_vco_calibration(struct rt2x0
+@@ -4702,6 +5085,14 @@ void rt2800_vco_calibration(struct rt2x0
rt2x00_set_field8(&rfcsr, RFCSR3_VCOCAL_EN, 1);
rt2800_rfcsr_write(rt2x00dev, 3, rfcsr);
break;
default:
return;
}
-@@ -5101,9 +5492,42 @@ static int rt2800_init_registers(struct
+@@ -5102,9 +5493,42 @@ static int rt2800_init_registers(struct
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392) ||
rt2x00_rt(rt2x00dev, RT5592)) {
} else if (rt2x00_rt(rt2x00dev, RT5350)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
} else {
-@@ -6135,6 +6559,225 @@ static void rt2800_init_bbp_5592(struct
+@@ -6136,6 +6560,225 @@ static void rt2800_init_bbp_5592(struct
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
}
static void rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
{
unsigned int i;
-@@ -6177,7 +6820,10 @@ static void rt2800_init_bbp(struct rt2x0
+@@ -6178,7 +6821,10 @@ static void rt2800_init_bbp(struct rt2x0
return;
case RT5390:
case RT5392:
break;
case RT5592:
rt2800_init_bbp_5592(rt2x00dev);
-@@ -7391,6 +8037,296 @@ static void rt2800_init_rfcsr_5592(struc
+@@ -7392,6 +8038,296 @@ static void rt2800_init_rfcsr_5592(struc
rt2800_led_open_drain_enable(rt2x00dev);
}
static void rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
{
if (rt2800_is_305x_soc(rt2x00dev)) {
-@@ -7426,7 +8362,10 @@ static void rt2800_init_rfcsr(struct rt2
+@@ -7427,7 +8363,10 @@ static void rt2800_init_rfcsr(struct rt2
rt2800_init_rfcsr_5350(rt2x00dev);
break;
case RT5390:
break;
case RT5392:
rt2800_init_rfcsr_5392(rt2x00dev);
-@@ -7858,6 +8797,7 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7859,6 +8798,7 @@ static int rt2800_init_eeprom(struct rt2
case RF5390:
case RF5392:
case RF5592:
break;
default:
rt2x00_err(rt2x00dev, "Invalid RF chipset 0x%04x detected\n",
-@@ -8422,6 +9362,7 @@ static int rt2800_probe_hw_mode(struct r
+@@ -8423,6 +9363,7 @@ static int rt2800_probe_hw_mode(struct r
case RF5372:
case RF5390:
case RF5392:
spec->num_channels = 14;
if (spec->clk_is_20mhz)
spec->channels = rf_vals_xtal20mhz_3x;
-@@ -8562,6 +9503,7 @@ static int rt2800_probe_hw_mode(struct r
+@@ -8563,6 +9504,7 @@ static int rt2800_probe_hw_mode(struct r
case RF5372:
case RF5390:
case RF5392:
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -7138,6 +7138,21 @@ struct ath10k_vif *ath10k_get_arvif(stru
+@@ -7141,6 +7141,21 @@ struct ath10k_vif *ath10k_get_arvif(stru
return arvif_iter.arvif;
}
int ath10k_mac_register(struct ath10k *ar)
{
static const u32 cipher_suites[] = {
-@@ -7354,6 +7369,12 @@ int ath10k_mac_register(struct ath10k *a
+@@ -7357,6 +7372,12 @@ int ath10k_mac_register(struct ath10k *a
ar->hw->wiphy->cipher_suites = cipher_suites;
ar->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
--- a/drivers/net/wireless/marvell/mwl8k.c
+++ b/drivers/net/wireless/marvell/mwl8k.c
-@@ -6262,6 +6262,8 @@ static int mwl8k_probe(struct pci_dev *p
+@@ -6264,6 +6264,8 @@ static int mwl8k_probe(struct pci_dev *p
priv->running_bsses = 0;
return rc;
err_stop_firmware:
-@@ -6295,8 +6297,6 @@ static void mwl8k_remove(struct pci_dev
+@@ -6297,8 +6299,6 @@ static void mwl8k_remove(struct pci_dev
return;
priv = hw->priv;