aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-06-30 10:44:19 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-06-30 10:44:19 +0000
commit12c033dfd90659fe6c4b7dc44cc91824be07c877 (patch)
treea796bba76f01a25a043031055297b59307514aef /package/kernel/mac80211
parent02a6750af87091e69d8c14e4b9e73c960b4d5794 (diff)
downloadupstream-12c033dfd90659fe6c4b7dc44cc91824be07c877.tar.gz
upstream-12c033dfd90659fe6c4b7dc44cc91824be07c877.tar.bz2
upstream-12c033dfd90659fe6c4b7dc44cc91824be07c877.zip
mac80211: update to wireless-testing 2013-06-27, fix ATH_USER_REGD handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37097
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/Makefile4
-rw-r--r--package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch6
-rw-r--r--package/kernel/mac80211/patches/300-pending_work.patch598
-rw-r--r--package/kernel/mac80211/patches/400-ath_move_debug_code.patch2
-rw-r--r--package/kernel/mac80211/patches/403-ath_regd_optional.patch10
-rw-r--r--package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch2
-rw-r--r--package/kernel/mac80211/patches/501-ath9k-eeprom_endianess.patch4
-rw-r--r--package/kernel/mac80211/patches/502-ath9k_ahb_init.patch2
-rw-r--r--package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch4
-rw-r--r--package/kernel/mac80211/patches/520-mac80211_cur_txpower.patch2
-rw-r--r--package/kernel/mac80211/patches/523-mac80211_configure_antenna_gain.patch12
-rw-r--r--package/kernel/mac80211/patches/530-ath9k_extra_leds.patch6
-rw-r--r--package/kernel/mac80211/patches/550-ath9k_reduce_ani_interval.patch2
-rw-r--r--package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch6
-rw-r--r--package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch2
-rw-r--r--package/kernel/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch4
-rw-r--r--package/kernel/mac80211/patches/556-ath9k_ani_revert.patch74
-rw-r--r--package/kernel/mac80211/patches/557-ath9k_fix_tx_queue_accounting.patch95
-rw-r--r--package/kernel/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch6
-rw-r--r--package/kernel/mac80211/patches/605-rt2x00-pci-eeprom.patch2
-rw-r--r--package/kernel/mac80211/patches/610-rt2x00-fix-rt3352-ext-pa.patch12
-rw-r--r--package/kernel/mac80211/patches/611-rt2x00-rf_vals-rt3352-xtal20.patch10
-rw-r--r--package/kernel/mac80211/patches/612-rt2x00-make-wmac-loadable-via-OF-on-rt288x-305x-SoC.patch2
-rw-r--r--package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch2
-rw-r--r--package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch30
-rw-r--r--package/kernel/mac80211/patches/618-rt2x00-msi-fix.patch12
-rw-r--r--package/kernel/mac80211/patches/800-b43-gpio-mask-module-option.patch2
-rw-r--r--package/kernel/mac80211/patches/810-b43_no_pio.patch4
-rw-r--r--package/kernel/mac80211/patches/820-b43-add-antenna-control.patch16
-rw-r--r--package/kernel/mac80211/patches/845-b43-only-use-gpio-0-1-for-led.patch2
30 files changed, 591 insertions, 344 deletions
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 10f540554d..b51dc1a3b5 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
-PKG_VERSION:=2013-06-13
+PKG_VERSION:=2013-06-27
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=986749f5fbc5ec9b963e49c7171be300
+PKG_MD5SUM:=e9300c5113e3f41488718b82d0624123
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
diff --git a/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch b/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch
index 062c2774ab..c557460381 100644
--- a/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch
+++ b/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch
@@ -1,6 +1,6 @@
--- a/.local-symbols
+++ b/.local-symbols
-@@ -365,42 +365,6 @@ USB_CDC_PHONET=
+@@ -363,42 +363,6 @@ USB_CDC_PHONET=
USB_IPHETH=
USB_SIERRA_NET=
USB_VL600=
@@ -68,7 +68,7 @@
obj-$(CPTCFG_DRM) += drivers/gpu/drm/
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
-@@ -2727,7 +2727,7 @@ static struct ssb_device *b43_ssb_gpio_d
+@@ -2729,7 +2729,7 @@ static struct ssb_device *b43_ssb_gpio_d
{
struct ssb_bus *bus = dev->dev->sdev->bus;
@@ -77,7 +77,7 @@
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
#else
return bus->chipco.dev;
-@@ -4733,7 +4733,7 @@ static int b43_wireless_core_init(struct
+@@ -4735,7 +4735,7 @@ static int b43_wireless_core_init(struct
}
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
diff --git a/package/kernel/mac80211/patches/300-pending_work.patch b/package/kernel/mac80211/patches/300-pending_work.patch
index 824d939046..654d6aabe8 100644
--- a/package/kernel/mac80211/patches/300-pending_work.patch
+++ b/package/kernel/mac80211/patches/300-pending_work.patch
@@ -45,32 +45,6 @@
TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL),
TEST(UAPSD), TEST(SP), TEST(TDLS_PEER),
TEST(TDLS_PEER_AUTH), TEST(4ADDR_EVENT),
---- a/net/mac80211/ht.c
-+++ b/net/mac80211/ht.c
-@@ -281,13 +281,14 @@ void ieee80211_ba_session_work(struct wo
- sta, tid, WLAN_BACK_RECIPIENT,
- WLAN_REASON_UNSPECIFIED, true);
-
-+ spin_lock_bh(&sta->lock);
-+
- tid_tx = sta->ampdu_mlme.tid_start_tx[tid];
- if (tid_tx) {
- /*
- * Assign it over to the normal tid_tx array
- * where it "goes live".
- */
-- spin_lock_bh(&sta->lock);
-
- sta->ampdu_mlme.tid_start_tx[tid] = NULL;
- /* could there be a race? */
-@@ -300,6 +301,7 @@ void ieee80211_ba_session_work(struct wo
- ieee80211_tx_ba_session_handle_start(sta, tid);
- continue;
- }
-+ spin_unlock_bh(&sta->lock);
-
- tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
- if (tid_tx && test_and_clear_bit(HT_AGG_STATE_WANT_STOP,
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -463,7 +463,6 @@ int ieee80211_do_open(struct wireless_de
@@ -198,6 +172,28 @@
default:
WARN(1, "frame for unexpected interface type");
break;
+--- a/net/mac80211/rc80211_minstrel_ht.c
++++ b/net/mac80211/rc80211_minstrel_ht.c
+@@ -804,10 +804,18 @@ minstrel_ht_get_rate(void *priv, struct
+
+ sample_group = &minstrel_mcs_groups[sample_idx / MCS_GROUP_RATES];
+ info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
++ rate->count = 1;
++
++ if (sample_idx / MCS_GROUP_RATES == MINSTREL_CCK_GROUP) {
++ int idx = sample_idx % ARRAY_SIZE(mp->cck_rates);
++ rate->idx = mp->cck_rates[idx];
++ rate->flags = 0;
++ return;
++ }
++
+ rate->idx = sample_idx % MCS_GROUP_RATES +
+ (sample_group->streams - 1) * MCS_GROUP_RATES;
+ rate->flags = IEEE80211_TX_RC_MCS | sample_group->flags;
+- rate->count = 1;
+ }
+
+ static void
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2369,6 +2369,7 @@ ieee80211_rx_h_action(struct ieee80211_r
@@ -245,16 +241,6 @@
break;
case NL80211_IFTYPE_P2P_DEVICE:
if (!ieee80211_is_public_action(hdr, skb->len) &&
---- a/net/mac80211/sta_info.c
-+++ b/net/mac80211/sta_info.c
-@@ -149,6 +149,7 @@ static void cleanup_single_sta(struct st
- * directly by station destruction.
- */
- for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
-+ kfree(sta->ampdu_mlme.tid_start_tx[i]);
- tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]);
- if (!tid_tx)
- continue;
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -32,7 +32,6 @@
@@ -273,84 +259,506 @@
WLAN_STA_CLEAR_PS_FILT,
WLAN_STA_MFP,
WLAN_STA_BLOCK_BA,
-@@ -203,6 +201,7 @@ struct tid_ampdu_rx {
- * driver requested to close until the work for it runs
- * @mtx: mutex to protect all TX data (except non-NULL assignments
- * to tid_tx[idx], which are protected by the sta spinlock)
-+ * tid_start_tx is also protected by sta->lock.
- */
- struct sta_ampdu_mlme {
- struct mutex mtx;
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -1673,6 +1673,8 @@ void ath_txq_schedule(struct ath_softc *
- txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
- return;
+@@ -146,6 +146,28 @@ static void ath_set_rates(struct ieee802
+ ARRAY_SIZE(bf->rates));
+ }
-+ rcu_read_lock();
++static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
++ struct sk_buff *skb)
++{
++ int q;
++
++ q = skb_get_queue_mapping(skb);
++ if (txq == sc->tx.uapsdq)
++ txq = sc->tx.txq_map[q];
++
++ if (txq != sc->tx.txq_map[q])
++ return;
++
++ if (WARN_ON(--txq->pending_frames < 0))
++ txq->pending_frames = 0;
+
- ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
- last_ac = list_entry(txq->axq_acq.prev, struct ath_atx_ac, list);
++ if (txq->stopped &&
++ txq->pending_frames < sc->tx.txq_max_pending[q]) {
++ ieee80211_wake_queue(sc->hw, q);
++ txq->stopped = false;
++ }
++}
++
+ static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
+ {
+ struct ath_txq *txq = tid->ac->txq;
+@@ -167,6 +189,7 @@ static void ath_tx_flush_tid(struct ath_
+ if (!bf) {
+ bf = ath_tx_setup_buffer(sc, txq, tid, skb);
+ if (!bf) {
++ ath_txq_skb_done(sc, txq, skb);
+ ieee80211_free_txskb(sc->hw, skb);
+ continue;
+ }
+@@ -811,6 +834,7 @@ ath_tx_get_tid_subframe(struct ath_softc
-@@ -1711,8 +1713,10 @@ void ath_txq_schedule(struct ath_softc *
+ if (!bf) {
+ __skb_unlink(skb, &tid->buf_q);
++ ath_txq_skb_done(sc, txq, skb);
+ ieee80211_free_txskb(sc->hw, skb);
+ continue;
+ }
+@@ -1824,6 +1848,7 @@ static void ath_tx_send_ampdu(struct ath
- if (ac == last_ac ||
- txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
-- return;
-+ break;
+ bf = ath_tx_setup_buffer(sc, txq, tid, skb);
+ if (!bf) {
++ ath_txq_skb_done(sc, txq, skb);
+ ieee80211_free_txskb(sc->hw, skb);
+ return;
}
-+
-+ rcu_read_unlock();
+@@ -2090,6 +2115,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+
+ bf = ath_tx_setup_buffer(sc, txq, tid, skb);
+ if (!bf) {
++ ath_txq_skb_done(sc, txq, skb);
+ if (txctl->paprd)
+ dev_kfree_skb_any(skb);
+ else
+@@ -2189,7 +2215,7 @@ static void ath_tx_complete(struct ath_s
+ struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data;
+- int q, padpos, padsize;
++ int padpos, padsize;
+ unsigned long flags;
+
+ ath_dbg(common, XMIT, "TX complete: skb: %p\n", skb);
+@@ -2225,21 +2251,7 @@ static void ath_tx_complete(struct ath_s
+ spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
+
+ __skb_queue_tail(&txq->complete_q, skb);
+-
+- q = skb_get_queue_mapping(skb);
+- if (txq == sc->tx.uapsdq)
+- txq = sc->tx.txq_map[q];
+-
+- if (txq == sc->tx.txq_map[q]) {
+- if (WARN_ON(--txq->pending_frames < 0))
+- txq->pending_frames = 0;
+-
+- if (txq->stopped &&
+- txq->pending_frames < sc->tx.txq_max_pending[q]) {
+- ieee80211_wake_queue(sc->hw, q);
+- txq->stopped = false;
+- }
+- }
++ ath_txq_skb_done(sc, txq, skb);
}
- /***********/
-@@ -1778,9 +1782,13 @@ static void ath_tx_txqaddbuf(struct ath_
- }
+ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -2094,7 +2094,7 @@ static void ath9k_wow_add_pattern(struct
+ {
+ struct ath_hw *ah = sc->sc_ah;
+ struct ath9k_wow_pattern *wow_pattern = NULL;
+- struct cfg80211_wowlan_trig_pkt_pattern *patterns = wowlan->patterns;
++ struct cfg80211_pkt_pattern *patterns = wowlan->patterns;
+ int mask_len;
+ s8 i = 0;
+
+--- a/drivers/net/wireless/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/mwifiex/cfg80211.c
+@@ -2298,8 +2298,7 @@ EXPORT_SYMBOL_GPL(mwifiex_del_virtual_in
- if (!internal) {
-- txq->axq_depth++;
-- if (bf_is_ampdu_not_probing(bf))
-- txq->axq_ampdu_depth++;
-+ while (bf) {
-+ txq->axq_depth++;
-+ if (bf_is_ampdu_not_probing(bf))
-+ txq->axq_ampdu_depth++;
+ #ifdef CONFIG_PM
+ static bool
+-mwifiex_is_pattern_supported(struct cfg80211_wowlan_trig_pkt_pattern *pat,
+- s8 *byte_seq)
++mwifiex_is_pattern_supported(struct cfg80211_pkt_pattern *pat, s8 *byte_seq)
+ {
+ int j, k, valid_byte_cnt = 0;
+ bool dont_care_byte = false;
+--- a/drivers/net/wireless/ti/wlcore/main.c
++++ b/drivers/net/wireless/ti/wlcore/main.c
+@@ -1315,7 +1315,7 @@ static struct sk_buff *wl12xx_alloc_dumm
+
+ #ifdef CONFIG_PM
+ static int
+-wl1271_validate_wowlan_pattern(struct cfg80211_wowlan_trig_pkt_pattern *p)
++wl1271_validate_wowlan_pattern(struct cfg80211_pkt_pattern *p)
+ {
+ int num_fields = 0, in_field = 0, fields_size = 0;
+ int i, pattern_len = 0;
+@@ -1458,9 +1458,9 @@ void wl1271_rx_filter_flatten_fields(str
+ * Allocates an RX filter returned through f
+ * which needs to be freed using rx_filter_free()
+ */
+-static int wl1271_convert_wowlan_pattern_to_rx_filter(
+- struct cfg80211_wowlan_trig_pkt_pattern *p,
+- struct wl12xx_rx_filter **f)
++static int
++wl1271_convert_wowlan_pattern_to_rx_filter(struct cfg80211_pkt_pattern *p,
++ struct wl12xx_rx_filter **f)
+ {
+ int i, j, ret = 0;
+ struct wl12xx_rx_filter *filter;
+@@ -1562,7 +1562,7 @@ static int wl1271_configure_wowlan(struc
+
+ /* Translate WoWLAN patterns into filters */
+ for (i = 0; i < wow->n_patterns; i++) {
+- struct cfg80211_wowlan_trig_pkt_pattern *p;
++ struct cfg80211_pkt_pattern *p;
+ struct wl12xx_rx_filter *filter = NULL;
+
+ p = &wow->patterns[i];
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -1698,7 +1698,7 @@ struct cfg80211_pmksa {
+ };
+
+ /**
+- * struct cfg80211_wowlan_trig_pkt_pattern - packet pattern
++ * struct cfg80211_pkt_pattern - packet pattern
+ * @mask: bitmask where to match pattern and where to ignore bytes,
+ * one bit per byte, in same format as nl80211
+ * @pattern: bytes to match where bitmask is 1
+@@ -1708,7 +1708,7 @@ struct cfg80211_pmksa {
+ * Internal note: @mask and @pattern are allocated in one chunk of
+ * memory, free @mask only!
+ */
+-struct cfg80211_wowlan_trig_pkt_pattern {
++struct cfg80211_pkt_pattern {
+ u8 *mask, *pattern;
+ int pattern_len;
+ int pkt_offset;
+@@ -1770,7 +1770,7 @@ struct cfg80211_wowlan {
+ bool any, disconnect, magic_pkt, gtk_rekey_failure,
+ eap_identity_req, four_way_handshake,
+ rfkill_release;
+- struct cfg80211_wowlan_trig_pkt_pattern *patterns;
++ struct cfg80211_pkt_pattern *patterns;
+ struct cfg80211_wowlan_tcp *tcp;
+ int n_patterns;
+ };
+--- a/include/uapi/linux/nl80211.h
++++ b/include/uapi/linux/nl80211.h
+@@ -3060,11 +3060,11 @@ enum nl80211_tx_power_setting {
+ };
+
+ /**
+- * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute
+- * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute
+- * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has
++ * enum nl80211_packet_pattern_attr - packet pattern attribute
++ * @__NL80211_PKTPAT_INVALID: invalid number for nested attribute
++ * @NL80211_PKTPAT_PATTERN: the pattern, values where the mask has
+ * a zero bit are ignored
+- * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have
++ * @NL80211_PKTPAT_MASK: pattern mask, must be long enough to have
+ * a bit for each byte in the pattern. The lowest-order bit corresponds
+ * to the first byte of the pattern, but the bytes of the pattern are
+ * in a little-endian-like format, i.e. the 9th byte of the pattern
+@@ -3075,23 +3075,23 @@ enum nl80211_tx_power_setting {
+ * Note that the pattern matching is done as though frames were not
+ * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
+ * first (including SNAP header unpacking) and then matched.
+- * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after
++ * @NL80211_PKTPAT_OFFSET: packet offset, pattern is matched after
+ * these fixed number of bytes of received packet
+- * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes
+- * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number
++ * @NUM_NL80211_PKTPAT: number of attributes
++ * @MAX_NL80211_PKTPAT: max attribute number
+ */
+-enum nl80211_wowlan_packet_pattern_attr {
+- __NL80211_WOWLAN_PKTPAT_INVALID,
+- NL80211_WOWLAN_PKTPAT_MASK,
+- NL80211_WOWLAN_PKTPAT_PATTERN,
+- NL80211_WOWLAN_PKTPAT_OFFSET,
++enum nl80211_packet_pattern_attr {
++ __NL80211_PKTPAT_INVALID,
++ NL80211_PKTPAT_MASK,
++ NL80211_PKTPAT_PATTERN,
++ NL80211_PKTPAT_OFFSET,
+
+- NUM_NL80211_WOWLAN_PKTPAT,
+- MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1,
++ NUM_NL80211_PKTPAT,
++ MAX_NL80211_PKTPAT = NUM_NL80211_PKTPAT - 1,
+ };
+
+ /**
+- * struct nl80211_wowlan_pattern_support - pattern support information
++ * struct nl80211_pattern_support - packet pattern support information
+ * @max_patterns: maximum number of patterns supported
+ * @min_pattern_len: minimum length of each pattern
+ * @max_pattern_len: maximum length of each pattern
+@@ -3101,13 +3101,22 @@ enum nl80211_wowlan_packet_pattern_attr
+ * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
+ * capability information given by the kernel to userspace.
+ */
+-struct nl80211_wowlan_pattern_support {
++struct nl80211_pattern_support {
+ __u32 max_patterns;
+ __u32 min_pattern_len;
+ __u32 max_pattern_len;
+ __u32 max_pkt_offset;
+ } __attribute__((packed));
+
++/* only for backward compatibility */
++#define __NL80211_WOWLAN_PKTPAT_INVALID __NL80211_PKTPAT_INVALID
++#define NL80211_WOWLAN_PKTPAT_MASK NL80211_PKTPAT_MASK
++#define NL80211_WOWLAN_PKTPAT_PATTERN NL80211_PKTPAT_PATTERN
++#define NL80211_WOWLAN_PKTPAT_OFFSET NL80211_PKTPAT_OFFSET
++#define NUM_NL80211_WOWLAN_PKTPAT NUM_NL80211_PKTPAT
++#define MAX_NL80211_WOWLAN_PKTPAT MAX_NL80211_PKTPAT
++#define nl80211_wowlan_pattern_support nl80211_pattern_support
+
-+ bf = bf->bf_lastbf->bf_next;
+ /**
+ * enum nl80211_wowlan_triggers - WoWLAN trigger definitions
+ * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes
+@@ -3127,7 +3136,7 @@ struct nl80211_wowlan_pattern_support {
+ * pattern matching is done after the packet is converted to the MSDU.
+ *
+ * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
+- * carrying a &struct nl80211_wowlan_pattern_support.
++ * carrying a &struct nl80211_pattern_support.
+ *
+ * When reporting wakeup. it is a u32 attribute containing the 0-based
+ * index of the pattern that caused the wakeup, in the patterns passed
+@@ -3284,7 +3293,7 @@ struct nl80211_wowlan_tcp_data_token_fea
+ * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a
+ * u32 attribute holding the maximum length
+ * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for
+- * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK
++ * feature advertising. The mask works like @NL80211_PKTPAT_MASK
+ * but on the TCP payload only.
+ * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes
+ * @MAX_NL80211_WOWLAN_TCP: highest attribute number
+--- a/net/mac80211/mesh_ps.c
++++ b/net/mac80211/mesh_ps.c
+@@ -229,6 +229,10 @@ void ieee80211_mps_sta_status_update(str
+ enum nl80211_mesh_power_mode pm;
+ bool do_buffer;
+
++ /* For non-assoc STA, prevent buffering or frame transmission */
++ if (sta->sta_state < IEEE80211_STA_ASSOC)
++ return;
++
+ /*
+ * use peer-specific power mode if peering is established and the
+ * peer's power mode is known
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -974,7 +974,7 @@ static int nl80211_send_wowlan(struct sk
+ return -ENOBUFS;
+
+ if (dev->wiphy.wowlan->n_patterns) {
+- struct nl80211_wowlan_pattern_support pat = {
++ struct nl80211_pattern_support pat = {
+ .max_patterns = dev->wiphy.wowlan->n_patterns,
+ .min_pattern_len = dev->wiphy.wowlan->pattern_min_len,
+ .max_pattern_len = dev->wiphy.wowlan->pattern_max_len,
+@@ -1568,8 +1568,10 @@ static int nl80211_dump_wiphy(struct sk_
+ rtnl_lock();
+ if (!state) {
+ state = kzalloc(sizeof(*state), GFP_KERNEL);
+- if (!state)
++ if (!state) {
++ rtnl_unlock();
+ return -ENOMEM;
+ }
- }
+ state->filter_wiphy = -1;
+ ret = nl80211_dump_wiphy_parse(skb, cb, state);
+ if (ret) {
+@@ -6615,12 +6617,14 @@ EXPORT_SYMBOL(cfg80211_testmode_alloc_ev
+
+ void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
+ {
++ struct cfg80211_registered_device *rdev = ((void **)skb->cb)[0];
+ void *hdr = ((void **)skb->cb)[1];
+ struct nlattr *data = ((void **)skb->cb)[2];
+
+ nla_nest_end(skb, data);
+ genlmsg_end(skb, hdr);
+- genlmsg_multicast(skb, 0, nl80211_testmode_mcgrp.id, gfp);
++ genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), skb, 0,
++ nl80211_testmode_mcgrp.id, gfp);
}
+ EXPORT_SYMBOL(cfg80211_testmode_event);
+ #endif
+@@ -7593,12 +7597,11 @@ static int nl80211_send_wowlan_patterns(
+ if (!nl_pat)
+ return -ENOBUFS;
+ pat_len = wowlan->patterns[i].pattern_len;
+- if (nla_put(msg, NL80211_WOWLAN_PKTPAT_MASK,
+- DIV_ROUND_UP(pat_len, 8),
++ if (nla_put(msg, NL80211_PKTPAT_MASK, DIV_ROUND_UP(pat_len, 8),
+ wowlan->patterns[i].mask) ||
+- nla_put(msg, NL80211_WOWLAN_PKTPAT_PATTERN,
+- pat_len, wowlan->patterns[i].pattern) ||
+- nla_put_u32(msg, NL80211_WOWLAN_PKTPAT_OFFSET,
++ nla_put(msg, NL80211_PKTPAT_PATTERN, pat_len,
++ wowlan->patterns[i].pattern) ||
++ nla_put_u32(msg, NL80211_PKTPAT_OFFSET,
+ wowlan->patterns[i].pkt_offset))
+ return -ENOBUFS;
+ nla_nest_end(msg, nl_pat);
+@@ -7939,7 +7942,7 @@ static int nl80211_set_wowlan(struct sk_
+ struct nlattr *pat;
+ int n_patterns = 0;
+ int rem, pat_len, mask_len, pkt_offset;
+- struct nlattr *pat_tb[NUM_NL80211_WOWLAN_PKTPAT];
++ struct nlattr *pat_tb[NUM_NL80211_PKTPAT];
---- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
-+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
-@@ -1183,7 +1183,7 @@ static int ath9k_htc_config(struct ieee8
- mutex_lock(&priv->htc_pm_lock);
+ nla_for_each_nested(pat, tb[NL80211_WOWLAN_TRIG_PKT_PATTERN],
+ rem)
+@@ -7958,26 +7961,25 @@ static int nl80211_set_wowlan(struct sk_
- priv->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
-- if (priv->ps_idle)
-+ if (!priv->ps_idle)
- chip_reset = true;
+ nla_for_each_nested(pat, tb[NL80211_WOWLAN_TRIG_PKT_PATTERN],
+ rem) {
+- nla_parse(pat_tb, MAX_NL80211_WOWLAN_PKTPAT,
+- nla_data(pat), nla_len(pat), NULL);
++ nla_parse(pat_tb, MAX_NL80211_PKTPAT, nla_data(pat),
++ nla_len(pat), NULL);
+ err = -EINVAL;
+- if (!pat_tb[NL80211_WOWLAN_PKTPAT_MASK] ||
+- !pat_tb[NL80211_WOWLAN_PKTPAT_PATTERN])
++ if (!pat_tb[NL80211_PKTPAT_MASK] ||
++ !pat_tb[NL80211_PKTPAT_PATTERN])
+ goto error;
+- pat_len = nla_len(pat_tb[NL80211_WOWLAN_PKTPAT_PATTERN]);
++ pat_len = nla_len(pat_tb[NL80211_PKTPAT_PATTERN]);
+ mask_len = DIV_ROUND_UP(pat_len, 8);
+- if (nla_len(pat_tb[NL80211_WOWLAN_PKTPAT_MASK]) !=
+- mask_len)
++ if (nla_len(pat_tb[NL80211_PKTPAT_MASK]) != mask_len)
+ goto error;
+ if (pat_len > wowlan->pattern_max_len ||
+ pat_len < wowlan->pattern_min_len)
+ goto error;
- mutex_unlock(&priv->htc_pm_lock);
---- a/net/mac80211/rc80211_minstrel_ht.c
-+++ b/net/mac80211/rc80211_minstrel_ht.c
-@@ -804,10 +804,18 @@ minstrel_ht_get_rate(void *priv, struct
+- if (!pat_tb[NL80211_WOWLAN_PKTPAT_OFFSET])
++ if (!pat_tb[NL80211_PKTPAT_OFFSET])
+ pkt_offset = 0;
+ else
+ pkt_offset = nla_get_u32(
+- pat_tb[NL80211_WOWLAN_PKTPAT_OFFSET]);
++ pat_tb[NL80211_PKTPAT_OFFSET]);
+ if (pkt_offset > wowlan->max_pkt_offset)
+ goto error;
+ new_triggers.patterns[i].pkt_offset = pkt_offset;
+@@ -7991,11 +7993,11 @@ static int nl80211_set_wowlan(struct sk_
+ new_triggers.patterns[i].pattern =
+ new_triggers.patterns[i].mask + mask_len;
+ memcpy(new_triggers.patterns[i].mask,
+- nla_data(pat_tb[NL80211_WOWLAN_PKTPAT_MASK]),
++ nla_data(pat_tb[NL80211_PKTPAT_MASK]),
+ mask_len);
+ new_triggers.patterns[i].pattern_len = pat_len;
+ memcpy(new_triggers.patterns[i].pattern,
+- nla_data(pat_tb[NL80211_WOWLAN_PKTPAT_PATTERN]),
++ nla_data(pat_tb[NL80211_PKTPAT_PATTERN]),
+ pat_len);
+ i++;
+ }
+@@ -10066,7 +10068,8 @@ void cfg80211_mgmt_tx_status(struct wire
- sample_group = &minstrel_mcs_groups[sample_idx / MCS_GROUP_RATES];
- info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
-+ rate->count = 1;
+ genlmsg_end(msg, hdr);
+
+- genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
++ genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
++ nl80211_mlme_mcgrp.id, gfp);
+ return;
+
+ nla_put_failure:
+--- a/net/wireless/reg.c
++++ b/net/wireless/reg.c
+@@ -2279,7 +2279,9 @@ void wiphy_regulatory_deregister(struct
+ static void reg_timeout_work(struct work_struct *work)
+ {
+ REG_DBG_PRINT("Timeout while waiting for CRDA to reply, restoring regulatory settings\n");
++ rtnl_lock();
+ restore_regulatory_settings(true);
++ rtnl_unlock();
+ }
+
+ int __init regulatory_init(void)
+--- a/net/wireless/sme.c
++++ b/net/wireless/sme.c
+@@ -34,8 +34,10 @@ struct cfg80211_conn {
+ CFG80211_CONN_SCAN_AGAIN,
+ CFG80211_CONN_AUTHENTICATE_NEXT,
+ CFG80211_CONN_AUTHENTICATING,
++ CFG80211_CONN_AUTH_FAILED,
+ CFG80211_CONN_ASSOCIATE_NEXT,
+ CFG80211_CONN_ASSOCIATING,
++ CFG80211_CONN_ASSOC_FAILED,
+ CFG80211_CONN_DEAUTH,
+ CFG80211_CONN_CONNECTED,
+ } state;
+@@ -164,6 +166,8 @@ static int cfg80211_conn_do_work(struct
+ NULL, 0,
+ params->key, params->key_len,
+ params->key_idx, NULL, 0);
++ case CFG80211_CONN_AUTH_FAILED:
++ return -ENOTCONN;
+ case CFG80211_CONN_ASSOCIATE_NEXT:
+ BUG_ON(!rdev->ops->assoc);
+ wdev->conn->state = CFG80211_CONN_ASSOCIATING;
+@@ -188,10 +192,17 @@ static int cfg80211_conn_do_work(struct
+ WLAN_REASON_DEAUTH_LEAVING,
+ false);
+ return err;
++ case CFG80211_CONN_ASSOC_FAILED:
++ cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
++ NULL, 0,
++ WLAN_REASON_DEAUTH_LEAVING, false);
++ return -ENOTCONN;
+ case CFG80211_CONN_DEAUTH:
+ cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
+ NULL, 0,
+ WLAN_REASON_DEAUTH_LEAVING, false);
++ /* free directly, disconnected event already sent */
++ cfg80211_sme_free(wdev);
+ return 0;
+ default:
+ return 0;
+@@ -371,7 +382,7 @@ bool cfg80211_sme_rx_assoc_resp(struct w
+ return true;
+ }
+
+- wdev->conn->state = CFG80211_CONN_DEAUTH;
++ wdev->conn->state = CFG80211_CONN_ASSOC_FAILED;
+ schedule_work(&rdev->conn_work);
+ return false;
+ }
+@@ -383,7 +394,13 @@ void cfg80211_sme_deauth(struct wireless
+
+ void cfg80211_sme_auth_timeout(struct wireless_dev *wdev)
+ {
+- cfg80211_sme_free(wdev);
++ struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
+
-+ if (sample_idx / MCS_GROUP_RATES == MINSTREL_CCK_GROUP) {
-+ int idx = sample_idx % ARRAY_SIZE(mp->cck_rates);
-+ rate->idx = mp->cck_rates[idx];
-+ rate->flags = 0;
++ if (!wdev->conn)
+ return;
-+ }
+
- rate->idx = sample_idx % MCS_GROUP_RATES +
- (sample_group->streams - 1) * MCS_GROUP_RATES;
- rate->flags = IEEE80211_TX_RC_MCS | sample_group->flags;
-- rate->count = 1;
++ wdev->conn->state = CFG80211_CONN_AUTH_FAILED;
++ schedule_work(&rdev->conn_work);
}
- static void
+ void cfg80211_sme_disassoc(struct wireless_dev *wdev)
+@@ -399,7 +416,13 @@ void cfg80211_sme_disassoc(struct wirele
+
+ void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev)
+ {
+- cfg80211_sme_disassoc(wdev);
++ struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
++
++ if (!wdev->conn)
++ return;
++
++ wdev->conn->state = CFG80211_CONN_ASSOC_FAILED;
++ schedule_work(&rdev->conn_work);
+ }
+
+ static int cfg80211_sme_connect(struct wireless_dev *wdev,
diff --git a/package/kernel/mac80211/patches/400-ath_move_debug_code.patch b/package/kernel/mac80211/patches/400-ath_move_debug_code.patch
index a01db3ea9b..aa5ce94d1e 100644
--- a/package/kernel/mac80211/patches/400-ath_move_debug_code.patch
+++ b/package/kernel/mac80211/patches/400-ath_move_debug_code.patch
@@ -12,7 +12,7 @@
ccflags-y += -D__CHECK_ENDIAN__
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
-@@ -281,13 +281,6 @@ void _ath_dbg(struct ath_common *common,
+@@ -280,13 +280,6 @@ void _ath_dbg(struct ath_common *common,
#endif /* CPTCFG_ATH_DEBUG */
/** Returns string describing opmode, or NULL if unknown mode. */
diff --git a/package/kernel/mac80211/patches/403-ath_regd_optional.patch b/package/kernel/mac80211/patches/403-ath_regd_optional.patch
index a9d5b6d44e..77384b7fb6 100644
--- a/package/kernel/mac80211/patches/403-ath_regd_optional.patch
+++ b/package/kernel/mac80211/patches/403-ath_regd_optional.patch
@@ -56,3 +56,13 @@
config ATH_DEBUG
bool "Atheros wireless debugging"
---help---
+--- a/.local-symbols
++++ b/.local-symbols
+@@ -122,6 +122,7 @@ RTL8187_LEDS=
+ ATH_COMMON=
+ ATH_CARDS=
+ ATH_DEBUG=
++ATH_USER_REGD=
+ ATH5K=
+ ATH5K_DEBUG=
+ ATH5K_TRACER=
diff --git a/package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch b/package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
index 2eae3916dd..f6182dd31b 100644
--- a/package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
+++ b/package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -729,6 +729,7 @@ static const struct ieee80211_iface_limi
+@@ -755,6 +755,7 @@ static const struct ieee80211_iface_limi
#endif
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_P2P_GO) },
diff --git a/package/kernel/mac80211/patches/501-ath9k-eeprom_endianess.patch b/package/kernel/mac80211/patches/501-ath9k-eeprom_endianess.patch
index 3d904e939d..b98e8f50f0 100644
--- a/package/kernel/mac80211/patches/501-ath9k-eeprom_endianess.patch
+++ b/package/kernel/mac80211/patches/501-ath9k-eeprom_endianess.patch
@@ -71,7 +71,7 @@
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -735,6 +735,7 @@ enum ath_cal_list {
+@@ -739,6 +739,7 @@ enum ath_cal_list {
#define AH_USE_EEPROM 0x1
#define AH_UNPLUGGED 0x2 /* The card has been physically removed. */
#define AH_FASTCC 0x4
@@ -81,7 +81,7 @@
struct ath_ops reg_ops;
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -592,6 +592,8 @@ static int ath9k_init_softc(u16 devid, s
+@@ -613,6 +613,8 @@ static int ath9k_init_softc(u16 devid, s
ah->is_clk_25mhz = pdata->is_clk_25mhz;
ah->get_mac_revision = pdata->get_mac_revision;
ah->external_reset = pdata->external_reset;
diff --git a/package/kernel/mac80211/patches/502-ath9k_ahb_init.patch b/package/kernel/mac80211/patches/502-ath9k_ahb_init.patch
index 9e715526a6..03199d8f37 100644
--- a/package/kernel/mac80211/patches/502-ath9k_ahb_init.patch
+++ b/package/kernel/mac80211/patches/502-ath9k_ahb_init.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -984,23 +984,23 @@ static int __init ath9k_init(void)
+@@ -1011,23 +1011,23 @@ static int __init ath9k_init(void)
goto err_out;
}
diff --git a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
index ef87a35922..681291dc55 100644
--- a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
+++ b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -696,6 +696,7 @@ struct ath_softc {
+@@ -701,6 +701,7 @@ struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
@@ -8,7 +8,7 @@
struct survey_info *cur_survey;
struct survey_info survey[ATH9K_NUM_CHANNELS];
-@@ -899,6 +900,7 @@ struct fft_sample_ht20 {
+@@ -905,6 +906,7 @@ struct fft_sample_ht20 {
u8 data[SPECTRAL_HT20_NUM_BINS];
} __packed;
diff --git a/package/kernel/mac80211/patches/520-mac80211_cur_txpower.patch b/package/kernel/mac80211/patches/520-mac80211_cur_txpower.patch
index 8583cdc25b..837d9f633f 100644
--- a/package/kernel/mac80211/patches/520-mac80211_cur_txpower.patch
+++ b/package/kernel/mac80211/patches/520-mac80211_cur_txpower.patch
@@ -1,6 +1,6 @@
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1614,6 +1614,7 @@ struct ieee80211_hw {
+@@ -1616,6 +1616,7 @@ struct ieee80211_hw {
u8 max_tx_aggregation_subframes;
u8 offchannel_tx_hw_queue;
u8 radiotap_mcs_details;
diff --git a/package/kernel/mac80211/patches/523-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/523-mac80211_configure_antenna_gain.patch
index 759812bfd7..354ea03597 100644
--- a/package/kernel/mac80211/patches/523-mac80211_configure_antenna_gain.patch
+++ b/package/kernel/mac80211/patches/523-mac80211_configure_antenna_gain.patch
@@ -1,6 +1,6 @@
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -997,6 +997,7 @@ enum ieee80211_smps_mode {
+@@ -999,6 +999,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
@@ -8,7 +8,7 @@
*
* @chandef: the channel definition to tune to
* @radar_enabled: whether radar detection is enabled
-@@ -1018,6 +1019,7 @@ struct ieee80211_conf {
+@@ -1020,6 +1021,7 @@ struct ieee80211_conf {
u32 flags;
int power_level, dynamic_ps_timeout;
int max_sleep_period;
@@ -47,7 +47,7 @@
};
/* policy for the key attributes */
-@@ -1953,6 +1954,22 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -1991,6 +1992,22 @@ static int nl80211_set_wiphy(struct sk_b
goto bad_res;
}
@@ -92,7 +92,7 @@
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr)
{
-@@ -3484,6 +3497,7 @@ struct cfg80211_ops mac80211_config_ops
+@@ -3474,6 +3487,7 @@ struct cfg80211_ops mac80211_config_ops
.set_wiphy_params = ieee80211_set_wiphy_params,
.set_tx_power = ieee80211_set_tx_power,
.get_tx_power = ieee80211_get_tx_power,
@@ -102,7 +102,7 @@
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -1942,6 +1942,7 @@ struct cfg80211_update_ft_ies_params {
+@@ -1970,6 +1970,7 @@ struct cfg80211_update_ft_ies_params {
* (as advertised by the nl80211 feature flag.)
* @get_tx_power: store the current TX power into the dbm variable;
* return 0 if successful
@@ -110,7 +110,7 @@
*
* @set_wds_peer: set the WDS peer for a WDS interface
*
-@@ -2161,6 +2162,7 @@ struct cfg80211_ops {
+@@ -2189,6 +2190,7 @@ struct cfg80211_ops {
enum nl80211_tx_power_setting type, int mbm);
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
int *dbm);
diff --git a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
index 134b0978b2..b931d5f4cf 100644
--- a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
+++ b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
@@ -10,7 +10,7 @@
#else
static inline void ath_init_leds(struct ath_softc *sc)
{
-@@ -692,6 +695,13 @@ enum spectral_mode {
+@@ -697,6 +700,13 @@ enum spectral_mode {
SPECTRAL_CHANSCAN,
};
@@ -24,7 +24,7 @@
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
-@@ -733,9 +743,8 @@ struct ath_softc {
+@@ -739,9 +749,8 @@ struct ath_softc {
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
#ifdef CPTCFG_MAC80211_LEDS
@@ -162,7 +162,7 @@
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
-@@ -891,7 +891,7 @@ int ath9k_init_device(u16 devid, struct
+@@ -918,7 +918,7 @@ int ath9k_init_device(u16 devid, struct
#ifdef CPTCFG_MAC80211_LEDS
/* must be initialized before ieee80211_register_hw */
diff --git a/package/kernel/mac80211/patches/550-ath9k_reduce_ani_interval.patch b/package/kernel/mac80211/patches/550-ath9k_reduce_ani_interval.patch
index 2b7cf21881..7c24f46f67 100644
--- a/package/kernel/mac80211/patches/550-ath9k_reduce_ani_interval.patch
+++ b/package/kernel/mac80211/patches/550-ath9k_reduce_ani_interval.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ani.h
+++ b/drivers/net/wireless/ath/ath9k/ani.h
-@@ -34,7 +34,7 @@
+@@ -38,7 +38,7 @@
#define ATH9K_ANI_PERIOD 300
/* in ms */
diff --git a/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch
index 0e1572af9a..db380b0814 100644
--- a/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch
+++ b/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch
@@ -62,7 +62,7 @@
debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -495,6 +495,12 @@ enum {
+@@ -499,6 +499,12 @@ enum {
ATH9K_RESET_COLD,
};
@@ -75,7 +75,7 @@
struct ath9k_hw_version {
u32 magic;
u16 devid;
-@@ -773,6 +779,8 @@ struct ath_hw {
+@@ -777,6 +783,8 @@ struct ath_hw {
u32 rfkill_polarity;
u32 ah_flags;
@@ -84,7 +84,7 @@
bool reset_power_on;
bool htc_reset_init;
-@@ -1020,6 +1028,7 @@ void ath9k_hw_set_sta_beacon_timers(stru
+@@ -1027,6 +1035,7 @@ void ath9k_hw_set_sta_beacon_timers(stru
bool ath9k_hw_check_alive(struct ath_hw *ah);
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
diff --git a/package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch b/package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch
index 3bee413970..47df721322 100644
--- a/package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch
+++ b/package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
-@@ -1136,6 +1136,10 @@ skip_ws_det:
+@@ -1173,6 +1173,10 @@ skip_ws_det:
* is_on == 0 means MRC CCK is OFF (more noise imm)
*/
bool is_on = param ? 1 : 0;
diff --git a/package/kernel/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch b/package/kernel/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch
index fc0243162f..584a7d70ce 100644
--- a/package/kernel/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch
+++ b/package/kernel/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch
@@ -48,7 +48,7 @@
AR_SREV_9285(ah) ||
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -940,6 +940,8 @@ struct ath_hw {
+@@ -947,6 +947,8 @@ struct ath_hw {
bool is_clk_25mhz;
int (*get_mac_revision)(void);
int (*external_reset)(void);
@@ -59,7 +59,7 @@
};
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -592,6 +592,8 @@ static int ath9k_init_softc(u16 devid, s
+@@ -613,6 +613,8 @@ static int ath9k_init_softc(u16 devid, s
ah->is_clk_25mhz = pdata->is_clk_25mhz;
ah->get_mac_revision = pdata->get_mac_revision;
ah->external_reset = pdata->external_reset;
diff --git a/package/kernel/mac80211/patches/556-ath9k_ani_revert.patch b/package/kernel/mac80211/patches/556-ath9k_ani_revert.patch
deleted file mode 100644
index 006f3930e9..0000000000
--- a/package/kernel/mac80211/patches/556-ath9k_ani_revert.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ani.h
-+++ b/drivers/net/wireless/ath/ath9k/ani.h
-@@ -20,8 +20,12 @@
- #define BEACON_RSSI(ahp) (ahp->stats.avgbrssi)
-
- /* units are errors per second */
--#define ATH9K_ANI_OFDM_TRIG_HIGH 1000
-+#define ATH9K_ANI_OFDM_TRIG_HIGH 3500
-+#define ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI 1000
-+
- #define ATH9K_ANI_OFDM_TRIG_LOW 400
-+#define ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI 900
-+
- #define ATH9K_ANI_CCK_TRIG_HIGH 600
- #define ATH9K_ANI_CCK_TRIG_LOW 300
-
---- a/drivers/net/wireless/ath/ath9k/ani.c
-+++ b/drivers/net/wireless/ath/ath9k/ani.c
-@@ -177,14 +177,17 @@ static void ath9k_hw_set_ofdm_nil(struct
- BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_HIGH)
- weak_sig = true;
-
-- /*
-- * OFDM Weak signal detection is always enabled for AP mode.
-- */
-- if (ah->opmode != NL80211_IFTYPE_AP &&
-- aniState->ofdmWeakSigDetect != weak_sig) {
-- ath9k_hw_ani_control(ah,
-- ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
-- entry_ofdm->ofdm_weak_signal_on);
-+ if (aniState->ofdmWeakSigDetect != weak_sig)
-+ ath9k_hw_ani_control(ah,
-+ ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
-+ entry_ofdm->ofdm_weak_signal_on);
-+
-+ if (aniState->ofdmNoiseImmunityLevel >= ATH9K_ANI_OFDM_DEF_LEVEL) {
-+ ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;
-+ ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI;
-+ } else {
-+ ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI;
-+ ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;
- }
- }
-
-@@ -420,25 +423,12 @@ void ath9k_hw_ani_monitor(struct ath_hw
- ofdmPhyErrRate, aniState->cckNoiseImmunityLevel,
- cckPhyErrRate, aniState->ofdmsTurn);
-
-- if (aniState->listenTime > 5 * ah->aniperiod) {
-- /*
-- * Check if we need to lower immunity if
-- * 5 ani_periods have passed.
-- */
-- if (ofdmPhyErrRate <= ah->config.ofdm_trig_low &&
-- cckPhyErrRate <= ah->config.cck_trig_low) {
-+ if (aniState->listenTime > ah->aniperiod) {
-+ if (cckPhyErrRate < ah->config.cck_trig_low &&
-+ ofdmPhyErrRate < ah->config.ofdm_trig_low) {
- ath9k_hw_ani_lower_immunity(ah);
- aniState->ofdmsTurn = !aniState->ofdmsTurn;
-- }
-- ath9k_ani_restart(ah);
-- } else if (aniState->listenTime > ah->aniperiod) {
-- /*
-- * Check if immunity has to be raised,
-- * (either OFDM or CCK).
-- */
-- if (ofdmPhyErrRate > ah->config.ofdm_trig_high &&
-- (cckPhyErrRate <= ah->config.cck_trig_high ||
-- aniState->ofdmsTurn)) {
-+ } else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) {
- ath9k_hw_ani_ofdm_err_trigger(ah);
- aniState->ofdmsTurn = false;
- } else if (cckPhyErrRate > ah->config.cck_trig_high) {
diff --git a/package/kernel/mac80211/patches/557-ath9k_fix_tx_queue_accounting.patch b/package/kernel/mac80211/patches/557-ath9k_fix_tx_queue_accounting.patch
deleted file mode 100644
index 83dcdceda3..0000000000
--- a/package/kernel/mac80211/patches/557-ath9k_fix_tx_queue_accounting.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -146,6 +146,28 @@ static void ath_set_rates(struct ieee802
- ARRAY_SIZE(bf->rates));
- }
-
-+static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
-+ struct sk_buff *skb)
-+{
-+ int q;
-+
-+ q = skb_get_queue_mapping(skb);
-+ if (txq == sc->tx.uapsdq)
-+ txq = sc->tx.txq_map[q];
-+
-+ if (txq != sc->tx.txq_map[q])
-+ return;
-+
-+ if (WARN_ON(--txq->pending_frames < 0))
-+ txq->pending_frames = 0;
-+
-+ if (txq->stopped &&
-+ txq->pending_frames < sc->tx.txq_max_pending[q]) {
-+ ieee80211_wake_queue(sc->hw, q);
-+ txq->stopped = false;
-+ }
-+}
-+
- static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
- {
- struct ath_txq *txq = tid->ac->txq;
-@@ -167,6 +189,7 @@ static void ath_tx_flush_tid(struct ath_
- if (!bf) {
- bf = ath_tx_setup_buffer(sc, txq, tid, skb);
- if (!bf) {
-+ ath_txq_skb_done(sc, txq, skb);
- ieee80211_free_txskb(sc->hw, skb);
- continue;
- }
-@@ -811,6 +834,7 @@ ath_tx_get_tid_subframe(struct ath_softc
-
- if (!bf) {
- __skb_unlink(skb, &tid->buf_q);
-+ ath_txq_skb_done(sc, txq, skb);
- ieee80211_free_txskb(sc->hw, skb);
- continue;
- }
-@@ -1824,6 +1848,7 @@ static void ath_tx_send_ampdu(struct ath
-
- bf = ath_tx_setup_buffer(sc, txq, tid, skb);
- if (!bf) {
-+ ath_txq_skb_done(sc, txq, skb);
- ieee80211_free_txskb(sc->hw, skb);
- return;
- }
-@@ -2090,6 +2115,7 @@ int ath_tx_start(struct ieee80211_hw *hw
-
- bf = ath_tx_setup_buffer(sc, txq, tid, skb);
- if (!bf) {
-+ ath_txq_skb_done(sc, txq, skb);
- if (txctl->paprd)
- dev_kfree_skb_any(skb);
- else
-@@ -2189,7 +2215,7 @@ static void ath_tx_complete(struct ath_s
- struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
- struct ath_common *common = ath9k_hw_common(sc->sc_ah);
- struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data;
-- int q, padpos, padsize;
-+ int padpos, padsize;
- unsigned long flags;
-
- ath_dbg(common, XMIT, "TX complete: skb: %p\n", skb);
-@@ -2225,21 +2251,7 @@ static void ath_tx_complete(struct ath_s
- spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
-
- __skb_queue_tail(&txq->complete_q, skb);
--
-- q = skb_get_queue_mapping(skb);
-- if (txq == sc->tx.uapsdq)
-- txq = sc->tx.txq_map[q];
--
-- if (txq == sc->tx.txq_map[q]) {
-- if (WARN_ON(--txq->pending_frames < 0))
-- txq->pending_frames = 0;
--
-- if (txq->stopped &&
-- txq->pending_frames < sc->tx.txq_max_pending[q]) {
-- ieee80211_wake_queue(sc->hw, q);
-- txq->stopped = false;
-- }
-- }
-+ ath_txq_skb_done(sc, txq, skb);
- }
-
- static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
diff --git a/package/kernel/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
index 40a2576d7a..b910830dea 100644
--- a/package/kernel/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
+++ b/package/kernel/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
@@ -164,7 +164,7 @@
select RT2X00_LIB_CRYPTO
depends on CRC_CCITT
depends on EEPROM_93CX6
-@@ -235,6 +236,9 @@ config RT2X00_LIB_FIRMWARE
+@@ -238,6 +239,9 @@ config RT2X00_LIB_FIRMWARE
config RT2X00_LIB_CRYPTO
boolean
@@ -234,7 +234,7 @@
* Initialization functions.
*/
static bool rt2800pci_get_entry_state(struct queue_entry *entry)
-@@ -1155,6 +1155,7 @@ static const struct rt2x00lib_ops rt2800
+@@ -1156,6 +1156,7 @@ static const struct rt2x00lib_ops rt2800
.get_firmware_name = rt2800pci_get_firmware_name,
.check_firmware = rt2800_check_firmware,
.load_firmware = rt2800_load_firmware,
@@ -279,7 +279,7 @@
--- a/.local-symbols
+++ b/.local-symbols
-@@ -272,6 +272,7 @@ RT2X00_LIB_FIRMWARE=
+@@ -271,6 +271,7 @@ RT2X00_LIB_FIRMWARE=
RT2X00_LIB_CRYPTO=
RT2X00_LIB_LEDS=
RT2X00_LIB_DEBUGFS=
diff --git a/package/kernel/mac80211/patches/605-rt2x00-pci-eeprom.patch b/package/kernel/mac80211/patches/605-rt2x00-pci-eeprom.patch
index d37f3acc28..bcbb435c1d 100644
--- a/package/kernel/mac80211/patches/605-rt2x00-pci-eeprom.patch
+++ b/package/kernel/mac80211/patches/605-rt2x00-pci-eeprom.patch
@@ -9,7 +9,7 @@
{
memcpy(rt2x00dev->eeprom, rt2x00dev->eeprom_file->data, EEPROM_SIZE);
return 0;
-@@ -1092,8 +1092,9 @@ static int rt2800pci_read_eeprom(struct
+@@ -1093,8 +1093,9 @@ static int rt2800pci_read_eeprom(struct
{
int retval;
diff --git a/package/kernel/mac80211/patches/610-rt2x00-fix-rt3352-ext-pa.patch b/package/kernel/mac80211/patches/610-rt2x00-fix-rt3352-ext-pa.patch
index f5709d9846..15083d4847 100644
--- a/package/kernel/mac80211/patches/610-rt2x00-fix-rt3352-ext-pa.patch
+++ b/package/kernel/mac80211/patches/610-rt2x00-fix-rt3352-ext-pa.patch
@@ -22,7 +22,7 @@
rt2800_bbp_write(rt2x00dev, 86, 0);
}
-@@ -4948,6 +4951,12 @@ static void rt2800_init_rfcsr_3290(struc
+@@ -4971,6 +4974,12 @@ static void rt2800_init_rfcsr_3290(struc
static void rt2800_init_rfcsr_3352(struct rt2x00_dev *rt2x00dev)
{
@@ -35,7 +35,7 @@
rt2800_rf_init_calibration(rt2x00dev, 30);
rt2800_rfcsr_write(rt2x00dev, 0, 0xf0);
-@@ -4983,15 +4992,30 @@ static void rt2800_init_rfcsr_3352(struc
+@@ -5006,15 +5015,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);
@@ -69,7 +69,7 @@
rt2800_rfcsr_write(rt2x00dev, 43, 0xdb);
rt2800_rfcsr_write(rt2x00dev, 44, 0xdb);
rt2800_rfcsr_write(rt2x00dev, 45, 0xdb);
-@@ -4999,15 +5023,20 @@ static void rt2800_init_rfcsr_3352(struc
+@@ -5022,15 +5046,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);
@@ -99,7 +99,7 @@
rt2800_rfcsr_write(rt2x00dev, 59, 0x00);
rt2800_rfcsr_write(rt2x00dev, 60, 0x00);
rt2800_rfcsr_write(rt2x00dev, 61, 0x00);
-@@ -5692,6 +5721,7 @@ static int rt2800_init_eeprom(struct rt2
+@@ -5715,6 +5744,7 @@ static int rt2800_init_eeprom(struct rt2
* RT53xx: defined in "EEPROM_CHIP_ID" field
*/
if (rt2x00_rt(rt2x00dev, RT3290) ||
@@ -107,7 +107,7 @@
rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392))
rt2x00_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);
-@@ -5781,7 +5811,8 @@ static int rt2800_init_eeprom(struct rt2
+@@ -5804,7 +5834,8 @@ static int rt2800_init_eeprom(struct rt2
/*
* Detect if this device has Bluetooth co-existence.
*/
@@ -117,7 +117,7 @@
__set_bit(CAPABILITY_BT_COEXIST, &rt2x00dev->cap_flags);
/*
-@@ -5810,6 +5841,22 @@ static int rt2800_init_eeprom(struct rt2
+@@ -5833,6 +5864,22 @@ static int rt2800_init_eeprom(struct rt2
EIRP_MAX_TX_POWER_LIMIT)
__set_bit(CAPABILITY_POWER_LIMIT, &rt2x00dev->cap_flags);
diff --git a/package/kernel/mac80211/patches/611-rt2x00-rf_vals-rt3352-xtal20.patch b/package/kernel/mac80211/patches/611-rt2x00-rf_vals-rt3352-xtal20.patch
index 81df685043..cd9a5f3ec3 100644
--- a/package/kernel/mac80211/patches/611-rt2x00-rf_vals-rt3352-xtal20.patch
+++ b/package/kernel/mac80211/patches/611-rt2x00-rf_vals-rt3352-xtal20.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
-@@ -6133,6 +6133,27 @@ static const struct rf_channel rf_vals_5
+@@ -6156,6 +6156,27 @@ static const struct rf_channel rf_vals_5
{196, 83, 0, 12, 1},
};
@@ -28,7 +28,7 @@
static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
{
struct hw_mode_spec *spec = &rt2x00dev->spec;
-@@ -6211,7 +6232,6 @@ static int rt2800_probe_hw_mode(struct r
+@@ -6234,7 +6255,6 @@ static int rt2800_probe_hw_mode(struct r
rt2x00_rf(rt2x00dev, RF3022) ||
rt2x00_rf(rt2x00dev, RF3290) ||
rt2x00_rf(rt2x00dev, RF3320) ||
@@ -36,7 +36,7 @@
rt2x00_rf(rt2x00dev, RF5360) ||
rt2x00_rf(rt2x00dev, RF5370) ||
rt2x00_rf(rt2x00dev, RF5372) ||
-@@ -6219,6 +6239,12 @@ static int rt2800_probe_hw_mode(struct r
+@@ -6242,6 +6262,12 @@ static int rt2800_probe_hw_mode(struct r
rt2x00_rf(rt2x00dev, RF5392)) {
spec->num_channels = 14;
spec->channels = rf_vals_3x;
@@ -49,7 +49,7 @@
} else if (rt2x00_rf(rt2x00dev, RF3052)) {
spec->supported_bands |= SUPPORT_BAND_5GHZ;
spec->num_channels = ARRAY_SIZE(rf_vals_3x);
-@@ -6366,6 +6392,19 @@ static int rt2800_probe_rt(struct rt2x00
+@@ -6389,6 +6415,19 @@ static int rt2800_probe_rt(struct rt2x00
return 0;
}
@@ -69,7 +69,7 @@
int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
-@@ -6395,6 +6434,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+@@ -6418,6 +6457,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
/*
diff --git a/package/kernel/mac80211/patches/612-rt2x00-make-wmac-loadable-via-OF-on-rt288x-305x-SoC.patch b/package/kernel/mac80211/patches/612-rt2x00-make-wmac-loadable-via-OF-on-rt288x-305x-SoC.patch
index 6b783bc6e8..81125a96c2 100644
--- a/package/kernel/mac80211/patches/612-rt2x00-make-wmac-loadable-via-OF-on-rt288x-305x-SoC.patch
+++ b/package/kernel/mac80211/patches/612-rt2x00-make-wmac-loadable-via-OF-on-rt288x-305x-SoC.patch
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
-@@ -1308,11 +1308,18 @@ static int rt2800soc_probe(struct platfo
+@@ -1309,11 +1309,18 @@ static int rt2800soc_probe(struct platfo
return rt2x00soc_probe(pdev, &rt2800pci_ops);
}
diff --git a/package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch b/package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch
index a0dc81c28d..9438d38bbf 100644
--- a/package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch
+++ b/package/kernel/mac80211/patches/615-rt2x00-fix_20mhz_clk.patch
@@ -8,7 +8,7 @@
#include "rt2x00.h"
#include "rt2800lib.h"
-@@ -6394,13 +6395,14 @@ static int rt2800_probe_rt(struct rt2x00
+@@ -6417,13 +6418,14 @@ static int rt2800_probe_rt(struct rt2x00
int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev)
{
diff --git a/package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch b/package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch
index 79e864ba89..ba1b910471 100644
--- a/package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch
+++ b/package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch
@@ -42,7 +42,7 @@
rt2x00_rf(rt2x00dev, RF5360) ||
rt2x00_rf(rt2x00dev, RF5370) ||
rt2x00_rf(rt2x00dev, RF5372) ||
-@@ -2755,7 +2766,8 @@ static void rt2800_config_channel(struct
+@@ -2778,7 +2789,8 @@ static void rt2800_config_channel(struct
/*
* Clear update flag
*/
@@ -52,7 +52,7 @@
rt2800_bbp_read(rt2x00dev, 49, &bbp);
rt2x00_set_field8(&bbp, BBP49_UPDATE_FLAG, 0);
rt2800_bbp_write(rt2x00dev, 49, bbp);
-@@ -3201,6 +3213,7 @@ void rt2800_vco_calibration(struct rt2x0
+@@ -3224,6 +3236,7 @@ void rt2800_vco_calibration(struct rt2x0
rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
break;
case RF3290:
@@ -60,7 +60,7 @@
case RF5360:
case RF5370:
case RF5372:
-@@ -3540,7 +3553,8 @@ static int rt2800_init_registers(struct
+@@ -3563,7 +3576,8 @@ static int rt2800_init_registers(struct
} else if (rt2x00_rt(rt2x00dev, RT3572)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
@@ -70,7 +70,7 @@
rt2x00_rt(rt2x00dev, RT5392) ||
rt2x00_rt(rt2x00dev, RT5592)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
-@@ -4193,9 +4207,13 @@ static void rt2800_init_bbp_3352(struct
+@@ -4216,9 +4230,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 82, 0x62);
@@ -87,7 +87,7 @@
rt2800_bbp_write(rt2x00dev, 86, 0x38);
-@@ -4209,9 +4227,13 @@ static void rt2800_init_bbp_3352(struct
+@@ -4232,9 +4250,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 104, 0x92);
@@ -104,7 +104,7 @@
rt2800_bbp_write(rt2x00dev, 120, 0x50);
-@@ -4236,6 +4258,13 @@ static void rt2800_init_bbp_3352(struct
+@@ -4259,6 +4281,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 143, 0xa2);
rt2800_bbp_write(rt2x00dev, 148, 0xc8);
@@ -118,7 +118,7 @@
}
static void rt2800_init_bbp_3390(struct rt2x00_dev *rt2x00dev)
-@@ -4520,6 +4549,7 @@ static void rt2800_init_bbp(struct rt2x0
+@@ -4543,6 +4572,7 @@ static void rt2800_init_bbp(struct rt2x0
rt2800_init_bbp_3290(rt2x00dev);
break;
case RT3352:
@@ -126,7 +126,7 @@
rt2800_init_bbp_3352(rt2x00dev);
break;
case RT3390:
-@@ -5159,6 +5189,76 @@ static void rt2800_init_rfcsr_3572(struc
+@@ -5182,6 +5212,76 @@ static void rt2800_init_rfcsr_3572(struc
rt2800_normal_mode_setup_3xxx(rt2x00dev);
}
@@ -203,7 +203,7 @@
static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
{
rt2800_rf_init_calibration(rt2x00dev, 2);
-@@ -5387,6 +5487,9 @@ static void rt2800_init_rfcsr(struct rt2
+@@ -5410,6 +5510,9 @@ static void rt2800_init_rfcsr(struct rt2
case RT3572:
rt2800_init_rfcsr_3572(rt2x00dev);
break;
@@ -213,7 +213,7 @@
case RT5390:
rt2800_init_rfcsr_5390(rt2x00dev);
break;
-@@ -5598,6 +5701,12 @@ static int rt2800_validate_eeprom(struct
+@@ -5621,6 +5724,12 @@ static int rt2800_validate_eeprom(struct
rt2x00_set_field16(&word, EEPROM_NIC_CONF0_RF_TYPE, RF2820);
rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC_CONF0, word);
rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word);
@@ -226,7 +226,7 @@
} else if (rt2x00_rt(rt2x00dev, RT2860) ||
rt2x00_rt(rt2x00dev, RT2872)) {
/*
-@@ -5723,9 +5832,12 @@ static int rt2800_init_eeprom(struct rt2
+@@ -5746,9 +5855,12 @@ static int rt2800_init_eeprom(struct rt2
*/
if (rt2x00_rt(rt2x00dev, RT3290) ||
rt2x00_rt(rt2x00dev, RT3352) ||
@@ -239,7 +239,7 @@
else
rf = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
-@@ -5742,6 +5854,7 @@ static int rt2800_init_eeprom(struct rt2
+@@ -5765,6 +5877,7 @@ static int rt2800_init_eeprom(struct rt2
case RF3290:
case RF3320:
case RF3322:
@@ -247,7 +247,7 @@
case RF5360:
case RF5370:
case RF5372:
-@@ -6240,7 +6353,8 @@ static int rt2800_probe_hw_mode(struct r
+@@ -6263,7 +6376,8 @@ static int rt2800_probe_hw_mode(struct r
rt2x00_rf(rt2x00dev, RF5392)) {
spec->num_channels = 14;
spec->channels = rf_vals_3x;
@@ -257,7 +257,7 @@
spec->num_channels = 14;
if (spec->clk_is_20mhz)
spec->channels = rf_vals_xtal20mhz_3x;
-@@ -6341,6 +6455,7 @@ static int rt2800_probe_hw_mode(struct r
+@@ -6364,6 +6478,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3320:
case RF3052:
case RF3290:
@@ -265,7 +265,7 @@
case RF5360:
case RF5370:
case RF5372:
-@@ -6378,6 +6493,7 @@ static int rt2800_probe_rt(struct rt2x00
+@@ -6401,6 +6516,7 @@ static int rt2800_probe_rt(struct rt2x00
case RT3352:
case RT3390:
case RT3572:
diff --git a/package/kernel/mac80211/patches/618-rt2x00-msi-fix.patch b/package/kernel/mac80211/patches/618-rt2x00-msi-fix.patch
index 139bd7245e..ceddbe439d 100644
--- a/package/kernel/mac80211/patches/618-rt2x00-msi-fix.patch
+++ b/package/kernel/mac80211/patches/618-rt2x00-msi-fix.patch
@@ -1,8 +1,6 @@
-Index: compat-wireless-2013-06-13/drivers/net/wireless/rt2x00/rt2x00pci.c
-===================================================================
---- compat-wireless-2013-06-13.orig/drivers/net/wireless/rt2x00/rt2x00pci.c 2013-06-20 21:19:16.205070973 +0200
-+++ compat-wireless-2013-06-13/drivers/net/wireless/rt2x00/rt2x00pci.c 2013-06-20 21:18:36.705069262 +0200
-@@ -108,7 +108,9 @@
+--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
++++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
+@@ -108,7 +108,9 @@ int rt2x00pci_probe(struct pci_dev *pci_
goto exit_release_regions;
}
@@ -12,7 +10,7 @@ Index: compat-wireless-2013-06-13/drivers/net/wireless/rt2x00/rt2x00pci.c
hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
if (!hw) {
-@@ -162,7 +164,9 @@
+@@ -162,7 +164,9 @@ exit_free_device:
ieee80211_free_hw(hw);
exit_disable_msi:
@@ -22,7 +20,7 @@ Index: compat-wireless-2013-06-13/drivers/net/wireless/rt2x00/rt2x00pci.c
exit_release_regions:
pci_release_regions(pci_dev);
-@@ -188,7 +192,9 @@
+@@ -188,7 +192,9 @@ void rt2x00pci_remove(struct pci_dev *pc
rt2x00pci_free_reg(rt2x00dev);
ieee80211_free_hw(hw);
diff --git a/package/kernel/mac80211/patches/800-b43-gpio-mask-module-option.patch b/package/kernel/mac80211/patches/800-b43-gpio-mask-module-option.patch
index d2ccf30d7d..46de746db1 100644
--- a/package/kernel/mac80211/patches/800-b43-gpio-mask-module-option.patch
+++ b/package/kernel/mac80211/patches/800-b43-gpio-mask-module-option.patch
@@ -22,7 +22,7 @@
static int modparam_bad_frames_preempt;
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
MODULE_PARM_DESC(bad_frames_preempt,
-@@ -2740,10 +2745,10 @@ static int b43_gpio_init(struct b43_wlde
+@@ -2742,10 +2747,10 @@ static int b43_gpio_init(struct b43_wlde
u32 mask, set;
b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);
diff --git a/package/kernel/mac80211/patches/810-b43_no_pio.patch b/package/kernel/mac80211/patches/810-b43_no_pio.patch
index 0821dc7856..1206923e0d 100644
--- a/package/kernel/mac80211/patches/810-b43_no_pio.patch
+++ b/package/kernel/mac80211/patches/810-b43_no_pio.patch
@@ -11,7 +11,7 @@
b43-$(CPTCFG_B43_PCMCIA) += pcmcia.o
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
-@@ -1913,10 +1913,12 @@ static void b43_do_interrupt_thread(stru
+@@ -1915,10 +1915,12 @@ static void b43_do_interrupt_thread(stru
dma_reason[0], dma_reason[1],
dma_reason[2], dma_reason[3],
dma_reason[4], dma_reason[5]);
@@ -75,7 +75,7 @@
#endif /* B43_PIO_H_ */
--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
-@@ -104,7 +104,7 @@ config B43_BCMA_PIO
+@@ -98,7 +98,7 @@ config B43_BCMA_PIO
default y
config B43_PIO
diff --git a/package/kernel/mac80211/patches/820-b43-add-antenna-control.patch b/package/kernel/mac80211/patches/820-b43-add-antenna-control.patch
index c17c1ca0a9..56aef894bc 100644
--- a/package/kernel/mac80211/patches/820-b43-add-antenna-control.patch
+++ b/package/kernel/mac80211/patches/820-b43-add-antenna-control.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
-@@ -1560,7 +1560,7 @@ static void b43_write_beacon_template(st
+@@ -1562,7 +1562,7 @@ static void b43_write_beacon_template(st
len, ram_offset, shm_size_offset, rate);
/* Write the PHY TX control parameters. */
@@ -9,7 +9,7 @@
antenna = b43_antenna_to_phyctl(antenna);
ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
/* We can't send beacons with short preamble. Would get PHY errors. */
-@@ -3098,8 +3098,8 @@ static int b43_chip_init(struct b43_wlde
+@@ -3100,8 +3100,8 @@ static int b43_chip_init(struct b43_wlde
/* Select the antennae */
if (phy->ops->set_rx_antenna)
@@ -20,7 +20,7 @@
if (phy->type == B43_PHYTYPE_B) {
value16 = b43_read16(dev, 0x005E);
-@@ -3843,7 +3843,6 @@ static int b43_op_config(struct ieee8021
+@@ -3845,7 +3845,6 @@ static int b43_op_config(struct ieee8021
struct b43_wldev *dev;
struct b43_phy *phy;
struct ieee80211_conf *conf = &hw->conf;
@@ -28,7 +28,7 @@
int err = 0;
bool reload_bss = false;
-@@ -3897,11 +3896,9 @@ static int b43_op_config(struct ieee8021
+@@ -3899,11 +3898,9 @@ static int b43_op_config(struct ieee8021
}
/* Antennas for RX and management frame TX. */
@@ -42,7 +42,7 @@
if (wl->radio_enabled != phy->radio_on) {
if (wl->radio_enabled) {
-@@ -5026,6 +5023,47 @@ static int b43_op_get_survey(struct ieee
+@@ -5028,6 +5025,47 @@ static int b43_op_get_survey(struct ieee
return 0;
}
@@ -90,7 +90,7 @@
static const struct ieee80211_ops b43_hw_ops = {
.tx = b43_op_tx,
.conf_tx = b43_op_conf_tx,
-@@ -5047,6 +5085,8 @@ static const struct ieee80211_ops b43_hw
+@@ -5049,6 +5087,8 @@ static const struct ieee80211_ops b43_hw
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
.get_survey = b43_op_get_survey,
.rfkill_poll = b43_rfkill_poll,
@@ -99,7 +99,7 @@
};
/* Hard-reset the chip. Do not call this directly.
-@@ -5293,6 +5333,8 @@ static int b43_one_core_attach(struct b4
+@@ -5295,6 +5335,8 @@ static int b43_one_core_attach(struct b4
if (!wldev)
goto out;
@@ -108,7 +108,7 @@
wldev->use_pio = b43_modparam_pio;
wldev->dev = dev;
wldev->wl = wl;
-@@ -5383,6 +5425,9 @@ static struct b43_wl *b43_wireless_init(
+@@ -5385,6 +5427,9 @@ static struct b43_wl *b43_wireless_init(
hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
diff --git a/package/kernel/mac80211/patches/845-b43-only-use-gpio-0-1-for-led.patch b/package/kernel/mac80211/patches/845-b43-only-use-gpio-0-1-for-led.patch
index 35d774492e..a1eafa487b 100644
--- a/package/kernel/mac80211/patches/845-b43-only-use-gpio-0-1-for-led.patch
+++ b/package/kernel/mac80211/patches/845-b43-only-use-gpio-0-1-for-led.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
-@@ -2757,6 +2757,14 @@ static int b43_gpio_init(struct b43_wlde
+@@ -2759,6 +2759,14 @@ static int b43_gpio_init(struct b43_wlde
} else if (dev->dev->chip_id == 0x5354) {
/* Don't allow overtaking buttons GPIOs */
set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */