From 6adbeb35c1cf86ae6dd0da7fd86000f3bb5c5a55 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Tue, 19 Oct 2010 22:11:21 +0000
Subject: [PATCH] mac80211: update to wireless-testing 2010-10-19

SVN-Revision: 23540
---
 package/mac80211/Makefile                     |   4 +-
 .../patches/005-disable_ssb_build.patch       |   4 +-
 .../patches/300-ath5k_cc_lock_fix.patch       |  10 -
 .../patches/301-ath9k_cc_lock_fix.patch       |  10 -
 ...-add-wndr3700-antenna-initialization.patch |   4 +-
 .../410-ath9k-wndr3700-led-pin-fix.patch      |   2 +-
 .../patches/500-ath9k_eeprom_debugfs.patch    |   4 +-
 .../patches/520-ath9k_ps_survey_fix.patch     |  54 ---
 .../521-ath9k_ani_listen_time_fix.patch       |  52 ---
 .../patches/522-ath9k_ani_overflow_fix.patch  |  11 -
 .../523-ath9k_cycle_counter_lock_fix.patch    |  12 -
 .../patches/540-ath9k_rc_debugfs.patch        | 363 ------------------
 .../541-ath9k_rc_rate_table_cleanup.patch     | 158 --------
 .../patches/542-ath9k_no_mode_idx.patch       | 247 ------------
 ...50-ath9k_interrupt_mask_optimization.patch | 282 --------------
 .../patches/551-ath9k_isr_optimization.patch  |  60 ---
 .../552-ath9k_txdesc_optimization.patch       | 248 ------------
 .../patches/553-ath9k_no_node_rssi.patch      | 145 -------
 .../patches/554-ath9k_bt_timer_start.patch    |  15 -
 .../555-ath9k_hw_gettsf32_static.patch        |  25 --
 .../patches/556-ath9k_desc_alignment.patch    |  49 ---
 package/mac80211/patches/810-b43_no_pio.patch |   2 +-
 22 files changed, 10 insertions(+), 1751 deletions(-)
 delete mode 100644 package/mac80211/patches/300-ath5k_cc_lock_fix.patch
 delete mode 100644 package/mac80211/patches/301-ath9k_cc_lock_fix.patch
 delete mode 100644 package/mac80211/patches/520-ath9k_ps_survey_fix.patch
 delete mode 100644 package/mac80211/patches/521-ath9k_ani_listen_time_fix.patch
 delete mode 100644 package/mac80211/patches/522-ath9k_ani_overflow_fix.patch
 delete mode 100644 package/mac80211/patches/523-ath9k_cycle_counter_lock_fix.patch
 delete mode 100644 package/mac80211/patches/540-ath9k_rc_debugfs.patch
 delete mode 100644 package/mac80211/patches/541-ath9k_rc_rate_table_cleanup.patch
 delete mode 100644 package/mac80211/patches/542-ath9k_no_mode_idx.patch
 delete mode 100644 package/mac80211/patches/550-ath9k_interrupt_mask_optimization.patch
 delete mode 100644 package/mac80211/patches/551-ath9k_isr_optimization.patch
 delete mode 100644 package/mac80211/patches/552-ath9k_txdesc_optimization.patch
 delete mode 100644 package/mac80211/patches/553-ath9k_no_node_rssi.patch
 delete mode 100644 package/mac80211/patches/554-ath9k_bt_timer_start.patch
 delete mode 100644 package/mac80211/patches/555-ath9k_hw_gettsf32_static.patch
 delete mode 100644 package/mac80211/patches/556-ath9k_desc_alignment.patch

diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile
index ef219d3ec8..2000e03fc1 100644
--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mac80211
 
-PKG_VERSION:=2010-10-15
+PKG_VERSION:=2010-10-19
 PKG_RELEASE:=1
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
 #	http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
 #	http://wireless.kernel.org/download/compat-wireless-2.6
-PKG_MD5SUM:=3c1cfce9a4a14af671c69dad02b973a4
+PKG_MD5SUM:=3bad1752f0154baa57a4d94774bd2ccf
 
 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
diff --git a/package/mac80211/patches/005-disable_ssb_build.patch b/package/mac80211/patches/005-disable_ssb_build.patch
index 7f92487577..fd2907ffe3 100644
--- a/package/mac80211/patches/005-disable_ssb_build.patch
+++ b/package/mac80211/patches/005-disable_ssb_build.patch
@@ -6,9 +6,9 @@
  obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/
 -obj-$(CONFIG_COMPAT_VAR_MODULES) +=  drivers/ssb/ drivers/misc/eeprom/
 +obj-$(CONFIG_COMPAT_VAR_MODULES) +=  drivers/misc/eeprom/
- endif
  
- obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
+ ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
+ obj-$(CONFIG_COMPAT_STAGING) += drivers/staging/ath6kl/
 --- a/config.mk
 +++ b/config.mk
 @@ -9,7 +9,6 @@ ifeq ($(wildcard $(KLIB_BUILD)/.config),
diff --git a/package/mac80211/patches/300-ath5k_cc_lock_fix.patch b/package/mac80211/patches/300-ath5k_cc_lock_fix.patch
deleted file mode 100644
index 46f1202d09..0000000000
--- a/package/mac80211/patches/300-ath5k_cc_lock_fix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/drivers/net/wireless/ath/ath5k/base.c
-+++ b/drivers/net/wireless/ath/ath5k/base.c
-@@ -3605,6 +3605,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
- 	common->ah = sc->ah;
- 	common->hw = hw;
- 	common->cachelsz = csz << 2; /* convert to bytes */
-+	spin_lock_init(&common->cc_lock);
- 
- 	/* Initialize device */
- 	ret = ath5k_hw_attach(sc);
diff --git a/package/mac80211/patches/301-ath9k_cc_lock_fix.patch b/package/mac80211/patches/301-ath9k_cc_lock_fix.patch
deleted file mode 100644
index b9e82d18a4..0000000000
--- a/package/mac80211/patches/301-ath9k_cc_lock_fix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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, s
- 	common->hw = sc->hw;
- 	common->priv = sc;
- 	common->debug_mask = ath9k_debug;
-+	spin_lock_init(&common->cc_lock);
- 
- 	spin_lock_init(&sc->wiphy_lock);
- 	spin_lock_init(&sc->sc_resetlock);
diff --git a/package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch b/package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch
index 2007e4a6f7..77db1729b3 100644
--- a/package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch
+++ b/package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch
@@ -42,7 +42,7 @@
  int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
  		    const struct ath_bus_ops *bus_ops)
  {
-@@ -722,6 +743,9 @@ int ath9k_init_device(u16 devid, struct 
+@@ -723,6 +744,9 @@ int ath9k_init_device(u16 devid, struct 
  	common = ath9k_hw_common(ah);
  	ath9k_set_hw_capab(sc, hw);
  
@@ -54,7 +54,7 @@
  			      ath9k_reg_notifier);
 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -639,6 +639,8 @@ struct ath_softc {
+@@ -635,6 +635,8 @@ struct ath_softc {
  
  	int beacon_interval;
  
diff --git a/package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch b/package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch
index d9de21fb7a..03d017a6de 100644
--- a/package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch
+++ b/package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch
@@ -13,7 +13,7 @@
  		sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -457,6 +457,7 @@ void ath9k_btcoex_timer_pause(struct ath
+@@ -455,6 +455,7 @@ void ath9k_btcoex_timer_pause(struct ath
  
  #define ATH_LED_PIN_DEF 		1
  #define ATH_LED_PIN_9287		8
diff --git a/package/mac80211/patches/500-ath9k_eeprom_debugfs.patch b/package/mac80211/patches/500-ath9k_eeprom_debugfs.patch
index 2e0e692b92..20ad8b2644 100644
--- a/package/mac80211/patches/500-ath9k_eeprom_debugfs.patch
+++ b/package/mac80211/patches/500-ath9k_eeprom_debugfs.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -950,6 +950,53 @@ static const struct file_operations fops
+@@ -861,6 +861,53 @@ static const struct file_operations fops
  	.owner = THIS_MODULE
  };
  
@@ -54,7 +54,7 @@
  int ath9k_init_debug(struct ath_hw *ah)
  {
  	struct ath_common *common = ath9k_hw_common(ah);
-@@ -1013,6 +1060,10 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -920,6 +967,10 @@ int ath9k_init_debug(struct ath_hw *ah)
  			sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
  		goto err;
  
diff --git a/package/mac80211/patches/520-ath9k_ps_survey_fix.patch b/package/mac80211/patches/520-ath9k_ps_survey_fix.patch
deleted file mode 100644
index f130f4132e..0000000000
--- a/package/mac80211/patches/520-ath9k_ps_survey_fix.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -122,6 +122,7 @@ bool ath9k_setpower(struct ath_softc *sc
- 
- void ath9k_ps_wakeup(struct ath_softc *sc)
- {
-+	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
- 	unsigned long flags;
- 
- 	spin_lock_irqsave(&sc->sc_pm_lock, flags);
-@@ -130,18 +131,33 @@ void ath9k_ps_wakeup(struct ath_softc *s
- 
- 	ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
- 
-+	/*
-+	 * While the hardware is asleep, the cycle counters contain no
-+	 * useful data. Better clear them now so that they don't mess up the
-+	 * ANI or survey data results.
-+	 */
-+	spin_lock(&common->cc_lock);
-+	ath_hw_cycle_counters_update(common);
-+	memset(&common->cc_survey, 0, sizeof(common->cc_survey));
-+	spin_unlock(&common->cc_lock);
-+
-  unlock:
- 	spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
- }
- 
- void ath9k_ps_restore(struct ath_softc *sc)
- {
-+	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
- 	unsigned long flags;
- 
- 	spin_lock_irqsave(&sc->sc_pm_lock, flags);
- 	if (--sc->ps_usecount != 0)
- 		goto unlock;
- 
-+	spin_lock(&common->cc_lock);
-+	ath_hw_cycle_counters_update(common);
-+	spin_unlock(&common->cc_lock);
-+
- 	if (sc->ps_idle)
- 		ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP);
- 	else if (sc->ps_enabled &&
-@@ -197,7 +213,8 @@ static void ath_update_survey_stats(stru
- 	struct ath_cycle_counters *cc = &common->cc_survey;
- 	unsigned int div = common->clockrate * 1000;
- 
--	ath_hw_cycle_counters_update(common);
-+	if (ah->power_mode == ATH9K_PM_AWAKE)
-+		ath_hw_cycle_counters_update(common);
- 
- 	if (cc->cycles > 0) {
- 		survey->filled |= SURVEY_INFO_CHANNEL_TIME |
diff --git a/package/mac80211/patches/521-ath9k_ani_listen_time_fix.patch b/package/mac80211/patches/521-ath9k_ani_listen_time_fix.patch
deleted file mode 100644
index 598286ec9e..0000000000
--- a/package/mac80211/patches/521-ath9k_ani_listen_time_fix.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ani.c
-+++ b/drivers/net/wireless/ath/ath9k/ani.c
-@@ -633,7 +633,7 @@ void ath9k_ani_reset(struct ath_hw *ah, 
- 	REGWRITE_BUFFER_FLUSH(ah);
- }
- 
--static void ath9k_hw_ani_read_counters(struct ath_hw *ah)
-+static bool ath9k_hw_ani_read_counters(struct ath_hw *ah)
- {
- 	struct ath_common *common = ath9k_hw_common(ah);
- 	struct ar5416AniState *aniState = &ah->curchan->ani;
-@@ -646,10 +646,10 @@ static void ath9k_hw_ani_read_counters(s
- 	ath_hw_cycle_counters_update(common);
- 	listenTime = ath_hw_get_listen_time(common);
- 
--	if (listenTime < 0) {
-+	if (listenTime <= 0) {
- 		ah->stats.ast_ani_lneg++;
- 		ath9k_ani_restart(ah);
--		return;
-+		return false;
- 	}
- 
- 	if (!use_new_ani(ah)) {
-@@ -683,7 +683,7 @@ static void ath9k_hw_ani_read_counters(s
- 			REG_WRITE(ah, AR_PHY_ERR_MASK_2,
- 				  AR_PHY_ERR_CCK_TIMING);
- 		}
--		return;
-+		return false;
- 	}
- 
- 	ofdmPhyErrCnt = phyCnt1 - ofdm_base;
-@@ -695,7 +695,7 @@ static void ath9k_hw_ani_read_counters(s
- 	ah->stats.ast_ani_cckerrs +=
- 		cckPhyErrCnt - aniState->cckPhyErrCount;
- 	aniState->cckPhyErrCount = cckPhyErrCnt;
--
-+	return true;
- }
- 
- void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
-@@ -711,7 +711,8 @@ void ath9k_hw_ani_monitor(struct ath_hw 
- 	if (WARN_ON(!aniState))
- 		return;
- 
--	ath9k_hw_ani_read_counters(ah);
-+	if (!ath9k_hw_ani_read_counters(ah))
-+		return;
- 
- 	ofdmPhyErrRate = aniState->ofdmPhyErrCount * 1000 /
- 			 aniState->listenTime;
diff --git a/package/mac80211/patches/522-ath9k_ani_overflow_fix.patch b/package/mac80211/patches/522-ath9k_ani_overflow_fix.patch
deleted file mode 100644
index 45bb95d4ee..0000000000
--- a/package/mac80211/patches/522-ath9k_ani_overflow_fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ani.c
-+++ b/drivers/net/wireless/ath/ath9k/ani.c
-@@ -664,7 +664,7 @@ static bool ath9k_hw_ani_read_counters(s
- 	phyCnt1 = REG_READ(ah, AR_PHY_ERR_1);
- 	phyCnt2 = REG_READ(ah, AR_PHY_ERR_2);
- 
--	if (use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) {
-+	if (!use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) {
- 		if (phyCnt1 < ofdm_base) {
- 			ath_print(common, ATH_DBG_ANI,
- 				  "phyCnt1 0x%x, resetting "
diff --git a/package/mac80211/patches/523-ath9k_cycle_counter_lock_fix.patch b/package/mac80211/patches/523-ath9k_cycle_counter_lock_fix.patch
deleted file mode 100644
index 9f284df2cc..0000000000
--- a/package/mac80211/patches/523-ath9k_cycle_counter_lock_fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -780,7 +780,9 @@ irqreturn_t ath_isr(int irq, void *dev)
- 		 * it will clear whatever condition caused
- 		 * the interrupt.
- 		 */
-+		spin_lock(&common->cc_lock);
- 		ath9k_hw_proc_mib_event(ah);
-+		spin_unlock(&common->cc_lock);
- 		ath9k_hw_set_interrupts(ah, ah->imask);
- 	}
- 
diff --git a/package/mac80211/patches/540-ath9k_rc_debugfs.patch b/package/mac80211/patches/540-ath9k_rc_debugfs.patch
deleted file mode 100644
index 4e413f88d1..0000000000
--- a/package/mac80211/patches/540-ath9k_rc_debugfs.patch
+++ /dev/null
@@ -1,363 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/debug.c
-+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -378,95 +378,6 @@ static const struct file_operations fops
- 	.owner = THIS_MODULE
- };
- 
--void ath_debug_stat_rc(struct ath_softc *sc, int final_rate)
--{
--	struct ath_rc_stats *stats;
--
--	stats = &sc->debug.stats.rcstats[final_rate];
--	stats->success++;
--}
--
--void ath_debug_stat_retries(struct ath_softc *sc, int rix,
--			    int xretries, int retries, u8 per)
--{
--	struct ath_rc_stats *stats = &sc->debug.stats.rcstats[rix];
--
--	stats->xretries += xretries;
--	stats->retries += retries;
--	stats->per = per;
--}
--
--static ssize_t read_file_rcstat(struct file *file, char __user *user_buf,
--				size_t count, loff_t *ppos)
--{
--	struct ath_softc *sc = file->private_data;
--	char *buf;
--	unsigned int len = 0, max;
--	int i = 0;
--	ssize_t retval;
--
--	if (sc->cur_rate_table == NULL)
--		return 0;
--
--	max = 80 + sc->cur_rate_table->rate_cnt * 1024 + 1;
--	buf = kmalloc(max, GFP_KERNEL);
--	if (buf == NULL)
--		return -ENOMEM;
--
--	len += sprintf(buf, "%6s %6s %6s "
--		       "%10s %10s %10s %10s\n",
--		       "HT", "MCS", "Rate",
--		       "Success", "Retries", "XRetries", "PER");
--
--	for (i = 0; i < sc->cur_rate_table->rate_cnt; i++) {
--		u32 ratekbps = sc->cur_rate_table->info[i].ratekbps;
--		struct ath_rc_stats *stats = &sc->debug.stats.rcstats[i];
--		char mcs[5];
--		char htmode[5];
--		int used_mcs = 0, used_htmode = 0;
--
--		if (WLAN_RC_PHY_HT(sc->cur_rate_table->info[i].phy)) {
--			used_mcs = snprintf(mcs, 5, "%d",
--				sc->cur_rate_table->info[i].ratecode);
--
--			if (WLAN_RC_PHY_40(sc->cur_rate_table->info[i].phy))
--				used_htmode = snprintf(htmode, 5, "HT40");
--			else if (WLAN_RC_PHY_20(sc->cur_rate_table->info[i].phy))
--				used_htmode = snprintf(htmode, 5, "HT20");
--			else
--				used_htmode = snprintf(htmode, 5, "????");
--		}
--
--		mcs[used_mcs] = '\0';
--		htmode[used_htmode] = '\0';
--
--		len += snprintf(buf + len, max - len,
--			"%6s %6s %3u.%d: "
--			"%10u %10u %10u %10u\n",
--			htmode,
--			mcs,
--			ratekbps / 1000,
--			(ratekbps % 1000) / 100,
--			stats->success,
--			stats->retries,
--			stats->xretries,
--			stats->per);
--	}
--
--	if (len > max)
--		len = max;
--
--	retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
--	kfree(buf);
--	return retval;
--}
--
--static const struct file_operations fops_rcstat = {
--	.read = read_file_rcstat,
--	.open = ath9k_debugfs_open,
--	.owner = THIS_MODULE
--};
--
- static const char * ath_wiphy_state_str(enum ath_wiphy_state state)
- {
- 	switch (state) {
-@@ -1024,10 +935,6 @@ int ath9k_init_debug(struct ath_hw *ah)
- 			sc, &fops_interrupt))
- 		goto err;
- 
--	if (!debugfs_create_file("rcstat", S_IRUSR, sc->debug.debugfs_phy,
--			sc, &fops_rcstat))
--		goto err;
--
- 	if (!debugfs_create_file("wiphy", S_IRUSR | S_IWUSR,
- 			sc->debug.debugfs_phy, sc, &fops_wiphy))
- 		goto err;
---- a/drivers/net/wireless/ath/ath9k/debug.h
-+++ b/drivers/net/wireless/ath/ath9k/debug.h
-@@ -80,13 +80,6 @@ struct ath_interrupt_stats {
- 	u32 bb_watchdog;
- };
- 
--struct ath_rc_stats {
--	u32 success;
--	u32 retries;
--	u32 xretries;
--	u8 per;
--};
--
- /**
-  * struct ath_tx_stats - Statistics about TX
-  * @tx_pkts_all:  No. of total frames transmitted, including ones that
-@@ -160,7 +153,6 @@ struct ath_rx_stats {
- 
- struct ath_stats {
- 	struct ath_interrupt_stats istats;
--	struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
- 	struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES];
- 	struct ath_rx_stats rxstats;
- };
-@@ -177,12 +169,9 @@ void ath9k_exit_debug(struct ath_hw *ah)
- int ath9k_debug_create_root(void);
- void ath9k_debug_remove_root(void);
- void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
--void ath_debug_stat_rc(struct ath_softc *sc, int final_rate);
- void ath_debug_stat_tx(struct ath_softc *sc, struct ath_txq *txq,
- 		       struct ath_buf *bf, struct ath_tx_status *ts);
- void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs);
--void ath_debug_stat_retries(struct ath_softc *sc, int rix,
--			    int xretries, int retries, u8 per);
- 
- #else
- 
-@@ -209,11 +198,6 @@ static inline void ath_debug_stat_interr
- {
- }
- 
--static inline void ath_debug_stat_rc(struct ath_softc *sc,
--				     int final_rate)
--{
--}
--
- static inline void ath_debug_stat_tx(struct ath_softc *sc,
- 				     struct ath_txq *txq,
- 				     struct ath_buf *bf,
-@@ -226,11 +210,6 @@ static inline void ath_debug_stat_rx(str
- {
- }
- 
--static inline void ath_debug_stat_retries(struct ath_softc *sc, int rix,
--					  int xretries, int retries, u8 per)
--{
--}
--
- #endif /* CONFIG_ATH9K_DEBUGFS */
- 
- #endif /* DEBUG_H */
---- a/drivers/net/wireless/ath/ath9k/rc.c
-+++ b/drivers/net/wireless/ath/ath9k/rc.c
-@@ -1026,6 +1026,16 @@ static bool ath_rc_update_per(struct ath
- 	return state_change;
- }
- 
-+static void ath_debug_stat_retries(struct ath_rate_priv *rc, int rix,
-+				   int xretries, int retries, u8 per)
-+{
-+	struct ath_rc_stats *stats = &rc->rcstats[rix];
-+
-+	stats->xretries += xretries;
-+	stats->retries += retries;
-+	stats->per = per;
-+}
-+
- /* Update PER, RSSI and whatever else that the code thinks it is doing.
-    If you can make sense of all this, you really need to go out more. */
- 
-@@ -1098,7 +1108,7 @@ static void ath_rc_update_ht(struct ath_
- 		ath_rc_priv->per_down_time = now_msec;
- 	}
- 
--	ath_debug_stat_retries(sc, tx_rate, xretries, retries,
-+	ath_debug_stat_retries(ath_rc_priv, tx_rate, xretries, retries,
- 			       ath_rc_priv->per[tx_rate]);
- 
- }
-@@ -1294,6 +1304,7 @@ static void ath_rc_init(struct ath_softc
- 	ath_rc_sort_validrates(rate_table, ath_rc_priv);
- 	ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4];
- 	sc->cur_rate_table = rate_table;
-+	ath_rc_priv->rate_table = rate_table;
- 
- 	ath_print(common, ATH_DBG_CONFIG,
- 		  "RC Initialized with capabilities: 0x%x\n",
-@@ -1340,6 +1351,15 @@ static bool ath_tx_aggr_check(struct ath
- /* mac80211 Rate Control callbacks */
- /***********************************/
- 
-+static void ath_debug_stat_rc(struct ath_rate_priv *rc, int final_rate)
-+{
-+	struct ath_rc_stats *stats;
-+
-+	stats = &rc->rcstats[final_rate];
-+	stats->success++;
-+}
-+
-+
- static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband,
- 			  struct ieee80211_sta *sta, void *priv_sta,
- 			  struct sk_buff *skb)
-@@ -1419,7 +1439,7 @@ static void ath_tx_status(void *priv, st
- 		}
- 	}
- 
--	ath_debug_stat_rc(sc, ath_rc_get_rateindex(sc->cur_rate_table,
-+	ath_debug_stat_rc(ath_rc_priv, ath_rc_get_rateindex(sc->cur_rate_table,
- 		&tx_info->status.rates[final_ts_idx]));
- }
- 
-@@ -1521,6 +1541,94 @@ static void ath_rate_update(void *priv, 
- 	}
- }
- 
-+#ifdef CONFIG_ATH9K_DEBUGFS
-+
-+static int ath9k_debugfs_open(struct inode *inode, struct file *file)
-+{
-+	file->private_data = inode->i_private;
-+	return 0;
-+}
-+
-+static ssize_t read_file_rcstat(struct file *file, char __user *user_buf,
-+				size_t count, loff_t *ppos)
-+{
-+	struct ath_rate_priv *rc = file->private_data;
-+	char *buf;
-+	unsigned int len = 0, max;
-+	int i = 0;
-+	ssize_t retval;
-+
-+	if (rc->rate_table == NULL)
-+		return 0;
-+
-+	max = 80 + rc->rate_table->rate_cnt * 1024 + 1;
-+	buf = kmalloc(max, GFP_KERNEL);
-+	if (buf == NULL)
-+		return -ENOMEM;
-+
-+	len += sprintf(buf, "%6s %6s %6s "
-+		       "%10s %10s %10s %10s\n",
-+		       "HT", "MCS", "Rate",
-+		       "Success", "Retries", "XRetries", "PER");
-+
-+	for (i = 0; i < rc->rate_table->rate_cnt; i++) {
-+		u32 ratekbps = rc->rate_table->info[i].ratekbps;
-+		struct ath_rc_stats *stats = &rc->rcstats[i];
-+		char mcs[5];
-+		char htmode[5];
-+		int used_mcs = 0, used_htmode = 0;
-+
-+		if (WLAN_RC_PHY_HT(rc->rate_table->info[i].phy)) {
-+			used_mcs = snprintf(mcs, 5, "%d",
-+				rc->rate_table->info[i].ratecode);
-+
-+			if (WLAN_RC_PHY_40(rc->rate_table->info[i].phy))
-+				used_htmode = snprintf(htmode, 5, "HT40");
-+			else if (WLAN_RC_PHY_20(rc->rate_table->info[i].phy))
-+				used_htmode = snprintf(htmode, 5, "HT20");
-+			else
-+				used_htmode = snprintf(htmode, 5, "????");
-+		}
-+
-+		mcs[used_mcs] = '\0';
-+		htmode[used_htmode] = '\0';
-+
-+		len += snprintf(buf + len, max - len,
-+			"%6s %6s %3u.%d: "
-+			"%10u %10u %10u %10u\n",
-+			htmode,
-+			mcs,
-+			ratekbps / 1000,
-+			(ratekbps % 1000) / 100,
-+			stats->success,
-+			stats->retries,
-+			stats->xretries,
-+			stats->per);
-+	}
-+
-+	if (len > max)
-+		len = max;
-+
-+	retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
-+	kfree(buf);
-+	return retval;
-+}
-+
-+static const struct file_operations fops_rcstat = {
-+	.read = read_file_rcstat,
-+	.open = ath9k_debugfs_open,
-+	.owner = THIS_MODULE
-+};
-+
-+static void ath_rate_add_sta_debugfs(void *priv, void *priv_sta,
-+				     struct dentry *dir)
-+{
-+	struct ath_rate_priv *rc = priv_sta;
-+	debugfs_create_file("rc_stats", S_IRUGO, dir, rc, &fops_rcstat);
-+}
-+
-+#endif /* CONFIG_ATH9K_DEBUGFS */
-+
- static void *ath_rate_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
- {
- 	struct ath_wiphy *aphy = hw->priv;
-@@ -1567,6 +1675,9 @@ static struct rate_control_ops ath_rate_
- 	.free = ath_rate_free,
- 	.alloc_sta = ath_rate_alloc_sta,
- 	.free_sta = ath_rate_free_sta,
-+#ifdef CONFIG_ATH9K_DEBUGFS
-+	.add_sta_debugfs = ath_rate_add_sta_debugfs,
-+#endif
- };
- 
- int ath_rate_control_register(void)
---- a/drivers/net/wireless/ath/ath9k/rc.h
-+++ b/drivers/net/wireless/ath/ath9k/rc.h
-@@ -176,6 +176,13 @@ struct ath_rateset {
- 	u8 rs_rates[ATH_RATE_MAX];
- };
- 
-+struct ath_rc_stats {
-+	u32 success;
-+	u32 retries;
-+	u32 xretries;
-+	u8 per;
-+};
-+
- /**
-  * struct ath_rate_priv - Rate Control priv data
-  * @state: RC state
-@@ -212,6 +219,10 @@ struct ath_rate_priv {
- 	struct ath_rateset neg_rates;
- 	struct ath_rateset neg_ht_rates;
- 	struct ath_rate_softc *asc;
-+	const struct ath_rate_table *rate_table;
-+
-+	struct dentry *debugfs_rcstats;
-+	struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
- };
- 
- #define ATH_TX_INFO_FRAME_TYPE_INTERNAL	(1 << 0)
diff --git a/package/mac80211/patches/541-ath9k_rc_rate_table_cleanup.patch b/package/mac80211/patches/541-ath9k_rc_rate_table_cleanup.patch
deleted file mode 100644
index b3c0413178..0000000000
--- a/package/mac80211/patches/541-ath9k_rc_rate_table_cleanup.patch
+++ /dev/null
@@ -1,158 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -624,8 +624,6 @@ struct ath_softc {
- 	struct ath_rx rx;
- 	struct ath_tx tx;
- 	struct ath_beacon beacon;
--	const struct ath_rate_table *cur_rate_table;
--	enum wireless_mode cur_rate_mode;
- 	struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
- 
- 	struct ath_led radio_led;
---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -19,36 +19,6 @@
- #include "ath9k.h"
- #include "btcoex.h"
- 
--static void ath_cache_conf_rate(struct ath_softc *sc,
--				struct ieee80211_conf *conf)
--{
--	switch (conf->channel->band) {
--	case IEEE80211_BAND_2GHZ:
--		if (conf_is_ht20(conf))
--			sc->cur_rate_mode = ATH9K_MODE_11NG_HT20;
--		else if (conf_is_ht40_minus(conf))
--			sc->cur_rate_mode = ATH9K_MODE_11NG_HT40MINUS;
--		else if (conf_is_ht40_plus(conf))
--			sc->cur_rate_mode = ATH9K_MODE_11NG_HT40PLUS;
--		else
--			sc->cur_rate_mode = ATH9K_MODE_11G;
--		break;
--	case IEEE80211_BAND_5GHZ:
--		if (conf_is_ht20(conf))
--			sc->cur_rate_mode = ATH9K_MODE_11NA_HT20;
--		else if (conf_is_ht40_minus(conf))
--			sc->cur_rate_mode = ATH9K_MODE_11NA_HT40MINUS;
--		else if (conf_is_ht40_plus(conf))
--			sc->cur_rate_mode = ATH9K_MODE_11NA_HT40PLUS;
--		else
--			sc->cur_rate_mode = ATH9K_MODE_11A;
--		break;
--	default:
--		BUG_ON(1);
--		break;
--	}
--}
--
- static void ath_update_txpow(struct ath_softc *sc)
- {
- 	struct ath_hw *ah = sc->sc_ah;
-@@ -307,7 +277,6 @@ int ath_set_channel(struct ath_softc *sc
- 		goto ps_restore;
- 	}
- 
--	ath_cache_conf_rate(sc, &hw->conf);
- 	ath_update_txpow(sc);
- 	ath9k_hw_set_interrupts(ah, ah->imask);
- 
-@@ -1014,8 +983,6 @@ int ath_reset(struct ath_softc *sc, bool
- 	 * that changes the channel so update any state that
- 	 * might change as a result.
- 	 */
--	ath_cache_conf_rate(sc, &hw->conf);
--
- 	ath_update_txpow(sc);
- 
- 	if ((sc->sc_flags & SC_OP_BEACONS) || !(sc->sc_flags & (SC_OP_OFFCHANNEL)))
-@@ -1222,8 +1189,6 @@ static int ath9k_start(struct ieee80211_
- 	if (ah->caps.hw_caps & ATH9K_HW_CAP_HT)
- 		ah->imask |= ATH9K_INT_CST;
- 
--	ath_cache_conf_rate(sc, &hw->conf);
--
- 	sc->sc_flags &= ~SC_OP_INVALID;
- 
- 	/* Disable BMISS interrupt when we're not associated */
---- a/drivers/net/wireless/ath/ath9k/rc.c
-+++ b/drivers/net/wireless/ath/ath9k/rc.c
-@@ -791,7 +791,7 @@ static void ath_get_rate(void *priv, str
- 	 */
- 	try_per_rate = 4;
- 
--	rate_table = sc->cur_rate_table;
-+	rate_table = ath_rc_priv->rate_table;
- 	rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe);
- 
- 	/*
-@@ -1048,7 +1048,7 @@ static void ath_rc_update_ht(struct ath_
- 	int rate;
- 	u8 last_per;
- 	bool state_change = false;
--	const struct ath_rate_table *rate_table = sc->cur_rate_table;
-+	const struct ath_rate_table *rate_table = ath_rc_priv->rate_table;
- 	int size = ath_rc_priv->rate_table_size;
- 
- 	if ((tx_rate < 0) || (tx_rate > rate_table->rate_cnt))
-@@ -1150,7 +1150,7 @@ static void ath_rc_tx_status(struct ath_
- 	u8 flags;
- 	u32 i = 0, rix;
- 
--	rate_table = sc->cur_rate_table;
-+	rate_table = ath_rc_priv->rate_table;
- 
- 	/*
- 	 * If the first rate is not the final index, there
-@@ -1231,7 +1231,6 @@ struct ath_rate_table *ath_choose_rate_t
- 	ath_print(common, ATH_DBG_CONFIG,
- 		  "Choosing rate table for mode: %d\n", mode);
- 
--	sc->cur_rate_mode = mode;
- 	return hw_rate_table[mode];
- }
- 
-@@ -1303,7 +1302,6 @@ static void ath_rc_init(struct ath_softc
- 	ath_rc_priv->max_valid_rate = k;
- 	ath_rc_sort_validrates(rate_table, ath_rc_priv);
- 	ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4];
--	sc->cur_rate_table = rate_table;
- 	ath_rc_priv->rate_table = rate_table;
- 
- 	ath_print(common, ATH_DBG_CONFIG,
-@@ -1439,8 +1437,9 @@ static void ath_tx_status(void *priv, st
- 		}
- 	}
- 
--	ath_debug_stat_rc(ath_rc_priv, ath_rc_get_rateindex(sc->cur_rate_table,
--		&tx_info->status.rates[final_ts_idx]));
-+	ath_debug_stat_rc(ath_rc_priv,
-+		ath_rc_get_rateindex(ath_rc_priv->rate_table,
-+			&tx_info->status.rates[final_ts_idx]));
- }
- 
- static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband,
-@@ -1480,14 +1479,8 @@ static void ath_rate_init(void *priv, st
- 
- 	/* Choose rate table first */
- 
--	if ((sc->sc_ah->opmode == NL80211_IFTYPE_STATION) ||
--	    (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT) ||
--	    (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC)) {
--		rate_table = ath_choose_rate_table(sc, sband->band,
--		                      sta->ht_cap.ht_supported, is_cw40);
--	} else {
--		rate_table = hw_rate_table[sc->cur_rate_mode];
--	}
-+	rate_table = ath_choose_rate_table(sc, sband->band,
-+	                      sta->ht_cap.ht_supported, is_cw40);
- 
- 	ath_rc_priv->ht_cap = ath_rc_build_ht_caps(sc, sta, is_cw40, is_sgi);
- 	ath_rc_init(sc, priv_sta, sband, sta, rate_table);
-@@ -1536,7 +1529,6 @@ static void ath_rate_update(void *priv, 
- 			ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_CONFIG,
- 				  "Operating HT Bandwidth changed to: %d\n",
- 				  sc->hw->conf.channel_type);
--			sc->cur_rate_table = hw_rate_table[sc->cur_rate_mode];
- 		}
- 	}
- }
diff --git a/package/mac80211/patches/542-ath9k_no_mode_idx.patch b/package/mac80211/patches/542-ath9k_no_mode_idx.patch
deleted file mode 100644
index ae6854637d..0000000000
--- a/package/mac80211/patches/542-ath9k_no_mode_idx.patch
+++ /dev/null
@@ -1,247 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/rc.c
-+++ b/drivers/net/wireless/ath/ath9k/rc.c
-@@ -378,17 +378,6 @@ static const struct ath_rate_table ar541
- 	0,   /* Phy rates allowed initially */
- };
- 
--static const struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX] = {
--	[ATH9K_MODE_11A] = &ar5416_11a_ratetable,
--	[ATH9K_MODE_11G] = &ar5416_11g_ratetable,
--	[ATH9K_MODE_11NA_HT20] = &ar5416_11na_ratetable,
--	[ATH9K_MODE_11NG_HT20] = &ar5416_11ng_ratetable,
--	[ATH9K_MODE_11NA_HT40PLUS] = &ar5416_11na_ratetable,
--	[ATH9K_MODE_11NA_HT40MINUS] = &ar5416_11na_ratetable,
--	[ATH9K_MODE_11NG_HT40PLUS] = &ar5416_11ng_ratetable,
--	[ATH9K_MODE_11NG_HT40MINUS] = &ar5416_11ng_ratetable,
--};
--
- static int ath_rc_get_rateindex(const struct ath_rate_table *rate_table,
- 				struct ieee80211_tx_rate *rate);
- 
-@@ -1200,38 +1189,23 @@ static void ath_rc_tx_status(struct ath_
- static const
- struct ath_rate_table *ath_choose_rate_table(struct ath_softc *sc,
- 					     enum ieee80211_band band,
--					     bool is_ht,
--					     bool is_cw_40)
-+					     bool is_ht)
- {
--	int mode = 0;
- 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
- 
- 	switch(band) {
- 	case IEEE80211_BAND_2GHZ:
--		mode = ATH9K_MODE_11G;
- 		if (is_ht)
--			mode = ATH9K_MODE_11NG_HT20;
--		if (is_cw_40)
--			mode = ATH9K_MODE_11NG_HT40PLUS;
--		break;
-+			return &ar5416_11ng_ratetable;
-+		return &ar5416_11g_ratetable;
- 	case IEEE80211_BAND_5GHZ:
--		mode = ATH9K_MODE_11A;
- 		if (is_ht)
--			mode = ATH9K_MODE_11NA_HT20;
--		if (is_cw_40)
--			mode = ATH9K_MODE_11NA_HT40PLUS;
--		break;
-+			return &ar5416_11na_ratetable;
-+		return &ar5416_11a_ratetable;
- 	default:
- 		ath_print(common, ATH_DBG_CONFIG, "Invalid band\n");
- 		return NULL;
- 	}
--
--	BUG_ON(mode >= ATH9K_MODE_MAX);
--
--	ath_print(common, ATH_DBG_CONFIG,
--		  "Choosing rate table for mode: %d\n", mode);
--
--	return hw_rate_table[mode];
- }
- 
- static void ath_rc_init(struct ath_softc *sc,
-@@ -1480,7 +1454,7 @@ static void ath_rate_init(void *priv, st
- 	/* Choose rate table first */
- 
- 	rate_table = ath_choose_rate_table(sc, sband->band,
--	                      sta->ht_cap.ht_supported, is_cw40);
-+	                      sta->ht_cap.ht_supported);
- 
- 	ath_rc_priv->ht_cap = ath_rc_build_ht_caps(sc, sta, is_cw40, is_sgi);
- 	ath_rc_init(sc, priv_sta, sband, sta, rate_table);
-@@ -1520,8 +1494,7 @@ static void ath_rate_update(void *priv, 
- 
- 		if ((local_cw40 != oper_cw40) || (local_sgi != oper_sgi)) {
- 			rate_table = ath_choose_rate_table(sc, sband->band,
--						   sta->ht_cap.ht_supported,
--						   oper_cw40);
-+						   sta->ht_cap.ht_supported);
- 			ath_rc_priv->ht_cap = ath_rc_build_ht_caps(sc, sta,
- 						   oper_cw40, oper_sgi);
- 			ath_rc_init(sc, priv_sta, sband, sta, rate_table);
---- a/drivers/net/wireless/ath/ath9k/hw.c
-+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1812,37 +1812,11 @@ int ath9k_hw_fill_cap_info(struct ath_hw
- 		return -EINVAL;
- 	}
- 
--	bitmap_zero(pCap->wireless_modes, ATH9K_MODE_MAX);
-+	if (eeval & AR5416_OPFLAGS_11A)
-+		pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
- 
--	if (eeval & AR5416_OPFLAGS_11A) {
--		set_bit(ATH9K_MODE_11A, pCap->wireless_modes);
--		if (ah->config.ht_enable) {
--			if (!(eeval & AR5416_OPFLAGS_N_5G_HT20))
--				set_bit(ATH9K_MODE_11NA_HT20,
--					pCap->wireless_modes);
--			if (!(eeval & AR5416_OPFLAGS_N_5G_HT40)) {
--				set_bit(ATH9K_MODE_11NA_HT40PLUS,
--					pCap->wireless_modes);
--				set_bit(ATH9K_MODE_11NA_HT40MINUS,
--					pCap->wireless_modes);
--			}
--		}
--	}
--
--	if (eeval & AR5416_OPFLAGS_11G) {
--		set_bit(ATH9K_MODE_11G, pCap->wireless_modes);
--		if (ah->config.ht_enable) {
--			if (!(eeval & AR5416_OPFLAGS_N_2G_HT20))
--				set_bit(ATH9K_MODE_11NG_HT20,
--					pCap->wireless_modes);
--			if (!(eeval & AR5416_OPFLAGS_N_2G_HT40)) {
--				set_bit(ATH9K_MODE_11NG_HT40PLUS,
--					pCap->wireless_modes);
--				set_bit(ATH9K_MODE_11NG_HT40MINUS,
--					pCap->wireless_modes);
--			}
--		}
--	}
-+	if (eeval & AR5416_OPFLAGS_11G)
-+		pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
- 
- 	pCap->tx_chainmask = ah->eep_ops->get_eeprom(ah, EEP_TX_MASK);
- 	/*
---- a/drivers/net/wireless/ath/ath9k/hw.h
-+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -164,18 +164,6 @@ enum ath_ini_subsys {
- 	ATH_INI_NUM_SPLIT,
- };
- 
--enum wireless_mode {
--	ATH9K_MODE_11A = 0,
--	ATH9K_MODE_11G,
--	ATH9K_MODE_11NA_HT20,
--	ATH9K_MODE_11NG_HT20,
--	ATH9K_MODE_11NA_HT40PLUS,
--	ATH9K_MODE_11NA_HT40MINUS,
--	ATH9K_MODE_11NG_HT40PLUS,
--	ATH9K_MODE_11NG_HT40MINUS,
--	ATH9K_MODE_MAX,
--};
--
- enum ath9k_hw_caps {
- 	ATH9K_HW_CAP_HT                         = BIT(0),
- 	ATH9K_HW_CAP_RFSILENT                   = BIT(1),
-@@ -190,11 +178,12 @@ enum ath9k_hw_caps {
- 	ATH9K_HW_CAP_SGI_20			= BIT(10),
- 	ATH9K_HW_CAP_PAPRD			= BIT(11),
- 	ATH9K_HW_CAP_ANT_DIV_COMB		= BIT(12),
-+	ATH9K_HW_CAP_2GHZ			= BIT(13),
-+	ATH9K_HW_CAP_5GHZ			= BIT(14),
- };
- 
- struct ath9k_hw_capabilities {
- 	u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */
--	DECLARE_BITMAP(wireless_modes, ATH9K_MODE_MAX); /* ATH9K_MODE_* */
- 	u16 total_queues;
- 	u16 keycache_size;
- 	u16 low_5ghz_chan, high_5ghz_chan;
---- a/drivers/net/wireless/ath/ath9k/init.c
-+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -486,7 +486,7 @@ static int ath9k_init_channels_rates(str
- 		     ARRAY_SIZE(ath9k_5ghz_chantable) !=
- 		     ATH9K_NUM_CHANNELS);
- 
--	if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) {
-+	if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) {
- 		channels = kmemdup(ath9k_2ghz_chantable,
- 			sizeof(ath9k_2ghz_chantable), GFP_KERNEL);
- 		if (!channels)
-@@ -501,7 +501,7 @@ static int ath9k_init_channels_rates(str
- 			ARRAY_SIZE(ath9k_legacy_rates);
- 	}
- 
--	if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes)) {
-+	if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) {
- 		channels = kmemdup(ath9k_5ghz_chantable,
- 			sizeof(ath9k_5ghz_chantable), GFP_KERNEL);
- 		if (!channels) {
-@@ -690,17 +690,17 @@ void ath9k_set_hw_capab(struct ath_softc
- 	hw->rate_control_algorithm = "ath9k_rate_control";
- #endif
- 
--	if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes))
-+	if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
- 		hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
- 			&sc->sbands[IEEE80211_BAND_2GHZ];
--	if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes))
-+	if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
- 		hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
- 			&sc->sbands[IEEE80211_BAND_5GHZ];
- 
- 	if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
--		if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes))
-+		if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
- 			setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap);
--		if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes))
-+		if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
- 			setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_5GHZ].ht_cap);
- 	}
- 
---- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
-+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
-@@ -566,7 +566,7 @@ static void ath9k_init_crypto(struct ath
- 
- static void ath9k_init_channels_rates(struct ath9k_htc_priv *priv)
- {
--	if (test_bit(ATH9K_MODE_11G, priv->ah->caps.wireless_modes)) {
-+	if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) {
- 		priv->sbands[IEEE80211_BAND_2GHZ].channels =
- 			ath9k_2ghz_channels;
- 		priv->sbands[IEEE80211_BAND_2GHZ].band = IEEE80211_BAND_2GHZ;
-@@ -577,7 +577,7 @@ static void ath9k_init_channels_rates(st
- 			ARRAY_SIZE(ath9k_legacy_rates);
- 	}
- 
--	if (test_bit(ATH9K_MODE_11A, priv->ah->caps.wireless_modes)) {
-+	if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) {
- 		priv->sbands[IEEE80211_BAND_5GHZ].channels = ath9k_5ghz_channels;
- 		priv->sbands[IEEE80211_BAND_5GHZ].band = IEEE80211_BAND_5GHZ;
- 		priv->sbands[IEEE80211_BAND_5GHZ].n_channels =
-@@ -740,18 +740,18 @@ static void ath9k_set_hw_capab(struct at
- 	hw->extra_tx_headroom = sizeof(struct tx_frame_hdr) +
- 		sizeof(struct htc_frame_hdr) + 4;
- 
--	if (test_bit(ATH9K_MODE_11G, priv->ah->caps.wireless_modes))
-+	if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
- 		hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
- 			&priv->sbands[IEEE80211_BAND_2GHZ];
--	if (test_bit(ATH9K_MODE_11A, priv->ah->caps.wireless_modes))
-+	if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
- 		hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
- 			&priv->sbands[IEEE80211_BAND_5GHZ];
- 
- 	if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
--		if (test_bit(ATH9K_MODE_11G, priv->ah->caps.wireless_modes))
-+		if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
- 			setup_ht_cap(priv,
- 				     &priv->sbands[IEEE80211_BAND_2GHZ].ht_cap);
--		if (test_bit(ATH9K_MODE_11A, priv->ah->caps.wireless_modes))
-+		if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
- 			setup_ht_cap(priv,
- 				     &priv->sbands[IEEE80211_BAND_5GHZ].ht_cap);
- 	}
diff --git a/package/mac80211/patches/550-ath9k_interrupt_mask_optimization.patch b/package/mac80211/patches/550-ath9k_interrupt_mask_optimization.patch
deleted file mode 100644
index d6a1d7525f..0000000000
--- a/package/mac80211/patches/550-ath9k_interrupt_mask_optimization.patch
+++ /dev/null
@@ -1,282 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/mac.c
-+++ b/drivers/net/wireless/ath/ath9k/mac.c
-@@ -117,12 +117,11 @@ EXPORT_SYMBOL(ath9k_hw_numtxpending);
- bool ath9k_hw_updatetxtriglevel(struct ath_hw *ah, bool bIncTrigLevel)
- {
- 	u32 txcfg, curLevel, newLevel;
--	enum ath9k_int omask;
- 
- 	if (ah->tx_trig_level >= ah->config.max_txtrig_level)
- 		return false;
- 
--	omask = ath9k_hw_set_interrupts(ah, ah->imask & ~ATH9K_INT_GLOBAL);
-+	ath9k_hw_disable_interrupts(ah);
- 
- 	txcfg = REG_READ(ah, AR_TXCFG);
- 	curLevel = MS(txcfg, AR_FTRIG);
-@@ -136,7 +135,7 @@ bool ath9k_hw_updatetxtriglevel(struct a
- 		REG_WRITE(ah, AR_TXCFG,
- 			  (txcfg & ~AR_FTRIG) | SM(newLevel, AR_FTRIG));
- 
--	ath9k_hw_set_interrupts(ah, omask);
-+	ath9k_hw_enable_interrupts(ah);
- 
- 	ah->tx_trig_level = newLevel;
- 
-@@ -849,28 +848,59 @@ bool ath9k_hw_intrpend(struct ath_hw *ah
- }
- EXPORT_SYMBOL(ath9k_hw_intrpend);
- 
--enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah,
--					      enum ath9k_int ints)
-+void ath9k_hw_disable_interrupts(struct ath_hw *ah)
-+{
-+	struct ath_common *common = ath9k_hw_common(ah);
-+
-+	ath_print(common, ATH_DBG_INTERRUPT, "disable IER\n");
-+	REG_WRITE(ah, AR_IER, AR_IER_DISABLE);
-+	(void) REG_READ(ah, AR_IER);
-+	if (!AR_SREV_9100(ah)) {
-+		REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, 0);
-+		(void) REG_READ(ah, AR_INTR_ASYNC_ENABLE);
-+
-+		REG_WRITE(ah, AR_INTR_SYNC_ENABLE, 0);
-+		(void) REG_READ(ah, AR_INTR_SYNC_ENABLE);
-+	}
-+}
-+EXPORT_SYMBOL(ath9k_hw_disable_interrupts);
-+
-+void ath9k_hw_enable_interrupts(struct ath_hw *ah)
-+{
-+	struct ath_common *common = ath9k_hw_common(ah);
-+
-+	if (!(ah->imask & ATH9K_INT_GLOBAL))
-+		return;
-+
-+	ath_print(common, ATH_DBG_INTERRUPT, "enable IER\n");
-+	REG_WRITE(ah, AR_IER, AR_IER_ENABLE);
-+	if (!AR_SREV_9100(ah)) {
-+		REG_WRITE(ah, AR_INTR_ASYNC_ENABLE,
-+			  AR_INTR_MAC_IRQ);
-+		REG_WRITE(ah, AR_INTR_ASYNC_MASK, AR_INTR_MAC_IRQ);
-+
-+
-+		REG_WRITE(ah, AR_INTR_SYNC_ENABLE,
-+			  AR_INTR_SYNC_DEFAULT);
-+		REG_WRITE(ah, AR_INTR_SYNC_MASK,
-+			  AR_INTR_SYNC_DEFAULT);
-+	}
-+	ath_print(common, ATH_DBG_INTERRUPT, "AR_IMR 0x%x IER 0x%x\n",
-+		  REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER));
-+}
-+EXPORT_SYMBOL(ath9k_hw_enable_interrupts);
-+
-+void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
- {
- 	enum ath9k_int omask = ah->imask;
- 	u32 mask, mask2;
- 	struct ath9k_hw_capabilities *pCap = &ah->caps;
- 	struct ath_common *common = ath9k_hw_common(ah);
- 
--	ath_print(common, ATH_DBG_INTERRUPT, "0x%x => 0x%x\n", omask, ints);
--
--	if (omask & ATH9K_INT_GLOBAL) {
--		ath_print(common, ATH_DBG_INTERRUPT, "disable IER\n");
--		REG_WRITE(ah, AR_IER, AR_IER_DISABLE);
--		(void) REG_READ(ah, AR_IER);
--		if (!AR_SREV_9100(ah)) {
--			REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, 0);
--			(void) REG_READ(ah, AR_INTR_ASYNC_ENABLE);
-+	if (!(ints & ATH9K_INT_GLOBAL))
-+		ath9k_hw_enable_interrupts(ah);
- 
--			REG_WRITE(ah, AR_INTR_SYNC_ENABLE, 0);
--			(void) REG_READ(ah, AR_INTR_SYNC_ENABLE);
--		}
--	}
-+	ath_print(common, ATH_DBG_INTERRUPT, "0x%x => 0x%x\n", omask, ints);
- 
- 	/* TODO: global int Ref count */
- 	mask = ints & ATH9K_INT_COMMON;
-@@ -946,24 +976,8 @@ enum ath9k_int ath9k_hw_set_interrupts(s
- 			REG_CLR_BIT(ah, AR_IMR_S5, AR_IMR_S5_TIM_TIMER);
- 	}
- 
--	if (ints & ATH9K_INT_GLOBAL) {
--		ath_print(common, ATH_DBG_INTERRUPT, "enable IER\n");
--		REG_WRITE(ah, AR_IER, AR_IER_ENABLE);
--		if (!AR_SREV_9100(ah)) {
--			REG_WRITE(ah, AR_INTR_ASYNC_ENABLE,
--				  AR_INTR_MAC_IRQ);
--			REG_WRITE(ah, AR_INTR_ASYNC_MASK, AR_INTR_MAC_IRQ);
--
--
--			REG_WRITE(ah, AR_INTR_SYNC_ENABLE,
--				  AR_INTR_SYNC_DEFAULT);
--			REG_WRITE(ah, AR_INTR_SYNC_MASK,
--				  AR_INTR_SYNC_DEFAULT);
--		}
--		ath_print(common, ATH_DBG_INTERRUPT, "AR_IMR 0x%x IER 0x%x\n",
--			  REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER));
--	}
-+	ath9k_hw_enable_interrupts(ah);
- 
--	return omask;
-+	return;
- }
- EXPORT_SYMBOL(ath9k_hw_set_interrupts);
---- a/drivers/net/wireless/ath/ath9k/mac.h
-+++ b/drivers/net/wireless/ath/ath9k/mac.h
-@@ -669,6 +669,7 @@ enum ath9k_key_type {
- 
- struct ath_hw;
- struct ath9k_channel;
-+enum ath9k_int;
- 
- u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q);
- void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp);
-@@ -700,8 +701,9 @@ int ath9k_hw_beaconq_setup(struct ath_hw
- 
- /* Interrupt Handling */
- bool ath9k_hw_intrpend(struct ath_hw *ah);
--enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah,
--				       enum ath9k_int ints);
-+void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints);
-+void ath9k_hw_enable_interrupts(struct ath_hw *ah);
-+void ath9k_hw_disable_interrupts(struct ath_hw *ah);
- 
- void ar9002_hw_attach_mac_ops(struct ath_hw *ah);
- 
---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -237,7 +237,7 @@ int ath_set_channel(struct ath_softc *sc
- 	 * hardware at the new frequency, and then re-enable
- 	 * the relevant bits of the h/w.
- 	 */
--	ath9k_hw_set_interrupts(ah, 0);
-+	ath9k_hw_disable_interrupts(ah);
- 	ath_drain_all_txq(sc, false);
- 	stopped = ath_stoprecv(sc);
- 
-@@ -644,7 +644,7 @@ void ath9k_tasklet(unsigned long data)
- 			ath_gen_timer_isr(sc->sc_ah);
- 
- 	/* re-enable hardware interrupt */
--	ath9k_hw_set_interrupts(ah, ah->imask);
-+	ath9k_hw_enable_interrupts(ah);
- 	ath9k_ps_restore(sc);
- }
- 
-@@ -743,7 +743,7 @@ irqreturn_t ath_isr(int irq, void *dev)
- 		 * interrupt; otherwise it will continue to
- 		 * fire.
- 		 */
--		ath9k_hw_set_interrupts(ah, 0);
-+		ath9k_hw_disable_interrupts(ah);
- 		/*
- 		 * Let the hal handle the event. We assume
- 		 * it will clear whatever condition caused
-@@ -752,7 +752,7 @@ irqreturn_t ath_isr(int irq, void *dev)
- 		spin_lock(&common->cc_lock);
- 		ath9k_hw_proc_mib_event(ah);
- 		spin_unlock(&common->cc_lock);
--		ath9k_hw_set_interrupts(ah, ah->imask);
-+		ath9k_hw_enable_interrupts(ah);
- 	}
- 
- 	if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
-@@ -769,8 +769,8 @@ chip_reset:
- 	ath_debug_stat_interrupt(sc, status);
- 
- 	if (sched) {
--		/* turn off every interrupt except SWBA */
--		ath9k_hw_set_interrupts(ah, (ah->imask & ATH9K_INT_SWBA));
-+		/* turn off every interrupt */
-+		ath9k_hw_disable_interrupts(ah);
- 		tasklet_schedule(&sc->intr_tq);
- 	}
- 
-@@ -925,7 +925,7 @@ void ath_radio_disable(struct ath_softc 
- 	}
- 
- 	/* Disable interrupts */
--	ath9k_hw_set_interrupts(ah, 0);
-+	ath9k_hw_disable_interrupts(ah);
- 
- 	ath_drain_all_txq(sc, false);	/* clear pending tx frames */
- 	ath_stoprecv(sc);		/* turn off frame recv */
-@@ -962,7 +962,7 @@ int ath_reset(struct ath_softc *sc, bool
- 
- 	ieee80211_stop_queues(hw);
- 
--	ath9k_hw_set_interrupts(ah, 0);
-+	ath9k_hw_disable_interrupts(ah);
- 	ath_drain_all_txq(sc, retry_tx);
- 	ath_stoprecv(sc);
- 	ath_flushrecv(sc);
-@@ -1367,7 +1367,7 @@ static void ath9k_stop(struct ieee80211_
- 
- 	/* make sure h/w will not generate any interrupt
- 	 * before setting the invalid flag. */
--	ath9k_hw_set_interrupts(ah, 0);
-+	ath9k_hw_disable_interrupts(ah);
- 
- 	if (!(sc->sc_flags & SC_OP_INVALID)) {
- 		ath_drain_all_txq(sc, false);
---- a/drivers/net/wireless/ath/ath9k/beacon.c
-+++ b/drivers/net/wireless/ath/ath9k/beacon.c
-@@ -500,10 +500,10 @@ static void ath_beacon_config_ap(struct 
- 
- 	/* Set the computed AP beacon timers */
- 
--	ath9k_hw_set_interrupts(ah, 0);
-+	ath9k_hw_disable_interrupts(ah);
- 	ath9k_beacon_init(sc, nexttbtt, intval);
- 	sc->beacon.bmisscnt = 0;
--	ath9k_hw_set_interrupts(ah, ah->imask);
-+	ath9k_hw_enable_interrupts(ah);
- 
- 	/* Clear the reset TSF flag, so that subsequent beacon updation
- 	   will not reset the HW TSF. */
-@@ -635,7 +635,7 @@ static void ath_beacon_config_sta(struct
- 
- 	/* Set the computed STA beacon timers */
- 
--	ath9k_hw_set_interrupts(ah, 0);
-+	ath9k_hw_disable_interrupts(ah);
- 	ath9k_hw_set_sta_beacon_timers(ah, &bs);
- 	ah->imask |= ATH9K_INT_BMISS;
- 	ath9k_hw_set_interrupts(ah, ah->imask);
-@@ -683,10 +683,10 @@ static void ath_beacon_config_adhoc(stru
- 
- 	/* Set the computed ADHOC beacon timers */
- 
--	ath9k_hw_set_interrupts(ah, 0);
-+	ath9k_hw_disable_interrupts(ah);
- 	ath9k_beacon_init(sc, nexttbtt, intval);
- 	sc->beacon.bmisscnt = 0;
--	ath9k_hw_set_interrupts(ah, ah->imask);
-+	ath9k_hw_enable_interrupts(ah);
- }
- 
- void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
---- a/drivers/net/wireless/ath/ath9k/gpio.c
-+++ b/drivers/net/wireless/ath/ath9k/gpio.c
-@@ -275,7 +275,7 @@ static void ath9k_gen_timer_start(struct
- 	ath9k_hw_gen_timer_start(ah, timer, timer_next, timer_period);
- 
- 	if ((ah->imask & ATH9K_INT_GENTIMER) == 0) {
--		ath9k_hw_set_interrupts(ah, 0);
-+		ath9k_hw_disable_interrupts(ah);
- 		ah->imask |= ATH9K_INT_GENTIMER;
- 		ath9k_hw_set_interrupts(ah, ah->imask);
- 	}
-@@ -289,7 +289,7 @@ static void ath9k_gen_timer_stop(struct 
- 
- 	/* if no timer is enabled, turn off interrupt mask */
- 	if (timer_table->timer_mask.val == 0) {
--		ath9k_hw_set_interrupts(ah, 0);
-+		ath9k_hw_disable_interrupts(ah);
- 		ah->imask &= ~ATH9K_INT_GENTIMER;
- 		ath9k_hw_set_interrupts(ah, ah->imask);
- 	}
diff --git a/package/mac80211/patches/551-ath9k_isr_optimization.patch b/package/mac80211/patches/551-ath9k_isr_optimization.patch
deleted file mode 100644
index dc267f33b0..0000000000
--- a/package/mac80211/patches/551-ath9k_isr_optimization.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c
-@@ -90,13 +90,10 @@ static bool ar9002_hw_get_isr(struct ath
- 
- 		*masked = isr & ATH9K_INT_COMMON;
- 
--		if (ah->config.rx_intr_mitigation) {
--			if (isr & (AR_ISR_RXMINTR | AR_ISR_RXINTM))
--				*masked |= ATH9K_INT_RX;
--		}
--
--		if (isr & (AR_ISR_RXOK | AR_ISR_RXERR))
-+		if (isr & (AR_ISR_RXMINTR | AR_ISR_RXINTM |
-+			   AR_ISR_RXOK | AR_ISR_RXERR))
- 			*masked |= ATH9K_INT_RX;
-+
- 		if (isr &
- 		    (AR_ISR_TXOK | AR_ISR_TXDESC | AR_ISR_TXERR |
- 		     AR_ISR_TXEOL)) {
-@@ -118,14 +115,6 @@ static bool ar9002_hw_get_isr(struct ath
- 				  "receive FIFO overrun interrupt\n");
- 		}
- 
--		if (!AR_SREV_9100(ah)) {
--			if (!(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) {
--				u32 isr5 = REG_READ(ah, AR_ISR_S5_S);
--				if (isr5 & AR_ISR_S5_TIM_TIMER)
--					*masked |= ATH9K_INT_TIM_TIMER;
--			}
--		}
--
- 		*masked |= mask2;
- 	}
- 
-@@ -136,17 +125,18 @@ static bool ar9002_hw_get_isr(struct ath
- 		u32 s5_s;
- 
- 		s5_s = REG_READ(ah, AR_ISR_S5_S);
--		if (isr & AR_ISR_GENTMR) {
--			ah->intr_gen_timer_trigger =
-+		ah->intr_gen_timer_trigger =
- 				MS(s5_s, AR_ISR_S5_GENTIMER_TRIG);
- 
--			ah->intr_gen_timer_thresh =
--				MS(s5_s, AR_ISR_S5_GENTIMER_THRESH);
-+		ah->intr_gen_timer_thresh =
-+			MS(s5_s, AR_ISR_S5_GENTIMER_THRESH);
- 
--			if (ah->intr_gen_timer_trigger)
--				*masked |= ATH9K_INT_GENTIMER;
-+		if (ah->intr_gen_timer_trigger)
-+			*masked |= ATH9K_INT_GENTIMER;
- 
--		}
-+		if ((s5_s & AR_ISR_S5_TIM_TIMER) &&
-+		    !(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
-+			*masked |= ATH9K_INT_TIM_TIMER;
- 	}
- 
- 	if (sync_cause) {
diff --git a/package/mac80211/patches/552-ath9k_txdesc_optimization.patch b/package/mac80211/patches/552-ath9k_txdesc_optimization.patch
deleted file mode 100644
index 75d9f653d9..0000000000
--- a/package/mac80211/patches/552-ath9k_txdesc_optimization.patch
+++ /dev/null
@@ -1,248 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c
-@@ -208,77 +208,68 @@ static int ar9002_hw_proc_txdesc(struct 
- 				 struct ath_tx_status *ts)
- {
- 	struct ar5416_desc *ads = AR5416DESC(ds);
-+	u32 status;
- 
--	if ((ads->ds_txstatus9 & AR_TxDone) == 0)
-+	status = ACCESS_ONCE(ads->ds_txstatus9);
-+	if ((status & AR_TxDone) == 0)
- 		return -EINPROGRESS;
- 
--	ts->ts_seqnum = MS(ads->ds_txstatus9, AR_SeqNum);
- 	ts->ts_tstamp = ads->AR_SendTimestamp;
- 	ts->ts_status = 0;
- 	ts->ts_flags = 0;
- 
--	if (ads->ds_txstatus1 & AR_FrmXmitOK)
-+	if (status & AR_TxOpExceeded)
-+		ts->ts_status |= ATH9K_TXERR_XTXOP;
-+	ts->tid = MS(status, AR_TxTid);
-+	ts->ts_rateindex = MS(status, AR_FinalTxIdx);
-+	ts->ts_seqnum = MS(status, AR_SeqNum);
-+
-+	status = ACCESS_ONCE(ads->ds_txstatus0);
-+	ts->ts_rssi_ctl0 = MS(status, AR_TxRSSIAnt00);
-+	ts->ts_rssi_ctl1 = MS(status, AR_TxRSSIAnt01);
-+	ts->ts_rssi_ctl2 = MS(status, AR_TxRSSIAnt02);
-+	if (status & AR_TxBaStatus) {
-+		ts->ts_flags |= ATH9K_TX_BA;
-+		ts->ba_low = ads->AR_BaBitmapLow;
-+		ts->ba_high = ads->AR_BaBitmapHigh;
-+	}
-+
-+	status = ACCESS_ONCE(ads->ds_txstatus1);
-+	if (status & AR_FrmXmitOK)
- 		ts->ts_status |= ATH9K_TX_ACKED;
--	if (ads->ds_txstatus1 & AR_ExcessiveRetries)
-+	if (status & AR_ExcessiveRetries)
- 		ts->ts_status |= ATH9K_TXERR_XRETRY;
--	if (ads->ds_txstatus1 & AR_Filtered)
-+	if (status & AR_Filtered)
- 		ts->ts_status |= ATH9K_TXERR_FILT;
--	if (ads->ds_txstatus1 & AR_FIFOUnderrun) {
-+	if (status & AR_FIFOUnderrun) {
- 		ts->ts_status |= ATH9K_TXERR_FIFO;
- 		ath9k_hw_updatetxtriglevel(ah, true);
- 	}
--	if (ads->ds_txstatus9 & AR_TxOpExceeded)
--		ts->ts_status |= ATH9K_TXERR_XTXOP;
--	if (ads->ds_txstatus1 & AR_TxTimerExpired)
-+	if (status & AR_TxTimerExpired)
- 		ts->ts_status |= ATH9K_TXERR_TIMER_EXPIRED;
--
--	if (ads->ds_txstatus1 & AR_DescCfgErr)
-+	if (status & AR_DescCfgErr)
- 		ts->ts_flags |= ATH9K_TX_DESC_CFG_ERR;
--	if (ads->ds_txstatus1 & AR_TxDataUnderrun) {
-+	if (status & AR_TxDataUnderrun) {
- 		ts->ts_flags |= ATH9K_TX_DATA_UNDERRUN;
- 		ath9k_hw_updatetxtriglevel(ah, true);
- 	}
--	if (ads->ds_txstatus1 & AR_TxDelimUnderrun) {
-+	if (status & AR_TxDelimUnderrun) {
- 		ts->ts_flags |= ATH9K_TX_DELIM_UNDERRUN;
- 		ath9k_hw_updatetxtriglevel(ah, true);
- 	}
--	if (ads->ds_txstatus0 & AR_TxBaStatus) {
--		ts->ts_flags |= ATH9K_TX_BA;
--		ts->ba_low = ads->AR_BaBitmapLow;
--		ts->ba_high = ads->AR_BaBitmapHigh;
--	}
--
--	ts->ts_rateindex = MS(ads->ds_txstatus9, AR_FinalTxIdx);
--	switch (ts->ts_rateindex) {
--	case 0:
--		ts->ts_ratecode = MS(ads->ds_ctl3, AR_XmitRate0);
--		break;
--	case 1:
--		ts->ts_ratecode = MS(ads->ds_ctl3, AR_XmitRate1);
--		break;
--	case 2:
--		ts->ts_ratecode = MS(ads->ds_ctl3, AR_XmitRate2);
--		break;
--	case 3:
--		ts->ts_ratecode = MS(ads->ds_ctl3, AR_XmitRate3);
--		break;
--	}
-+	ts->ts_shortretry = MS(status, AR_RTSFailCnt);
-+	ts->ts_longretry = MS(status, AR_DataFailCnt);
-+	ts->ts_virtcol = MS(status, AR_VirtRetryCnt);
-+
-+	status = ACCESS_ONCE(ads->ds_txstatus5);
-+	ts->ts_rssi = MS(status, AR_TxRSSICombined);
-+	ts->ts_rssi_ext0 = MS(status, AR_TxRSSIAnt10);
-+	ts->ts_rssi_ext1 = MS(status, AR_TxRSSIAnt11);
-+	ts->ts_rssi_ext2 = MS(status, AR_TxRSSIAnt12);
- 
--	ts->ts_rssi = MS(ads->ds_txstatus5, AR_TxRSSICombined);
--	ts->ts_rssi_ctl0 = MS(ads->ds_txstatus0, AR_TxRSSIAnt00);
--	ts->ts_rssi_ctl1 = MS(ads->ds_txstatus0, AR_TxRSSIAnt01);
--	ts->ts_rssi_ctl2 = MS(ads->ds_txstatus0, AR_TxRSSIAnt02);
--	ts->ts_rssi_ext0 = MS(ads->ds_txstatus5, AR_TxRSSIAnt10);
--	ts->ts_rssi_ext1 = MS(ads->ds_txstatus5, AR_TxRSSIAnt11);
--	ts->ts_rssi_ext2 = MS(ads->ds_txstatus5, AR_TxRSSIAnt12);
- 	ts->evm0 = ads->AR_TxEVM0;
- 	ts->evm1 = ads->AR_TxEVM1;
- 	ts->evm2 = ads->AR_TxEVM2;
--	ts->ts_shortretry = MS(ads->ds_txstatus1, AR_RTSFailCnt);
--	ts->ts_longretry = MS(ads->ds_txstatus1, AR_DataFailCnt);
--	ts->ts_virtcol = MS(ads->ds_txstatus1, AR_VirtRetryCnt);
--	ts->tid = MS(ads->ds_txstatus9, AR_TxTid);
--	ts->ts_antenna = 0;
- 
- 	return 0;
- }
---- a/drivers/net/wireless/ath/ath9k/mac.h
-+++ b/drivers/net/wireless/ath/ath9k/mac.h
-@@ -104,13 +104,11 @@ struct ath_tx_status {
- 	u32 ts_tstamp;
- 	u16 ts_seqnum;
- 	u8 ts_status;
--	u8 ts_ratecode;
- 	u8 ts_rateindex;
- 	int8_t ts_rssi;
- 	u8 ts_shortretry;
- 	u8 ts_longretry;
- 	u8 ts_virtcol;
--	u8 ts_antenna;
- 	u8 ts_flags;
- 	int8_t ts_rssi_ctl0;
- 	int8_t ts_rssi_ctl1;
-@@ -121,7 +119,6 @@ struct ath_tx_status {
- 	u8 qid;
- 	u16 desc_id;
- 	u8 tid;
--	u8 pad[2];
- 	u32 ba_low;
- 	u32 ba_high;
- 	u32 evm0;
---- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
-@@ -237,10 +237,12 @@ static int ar9003_hw_proc_txdesc(struct 
- 				 struct ath_tx_status *ts)
- {
- 	struct ar9003_txs *ads;
-+	u32 status;
- 
- 	ads = &ah->ts_ring[ah->ts_tail];
- 
--	if ((ads->status8 & AR_TxDone) == 0)
-+	status = ACCESS_ONCE(ads->status8);
-+	if ((status & AR_TxDone) == 0)
- 		return -EINPROGRESS;
- 
- 	ah->ts_tail = (ah->ts_tail + 1) % ah->ts_size;
-@@ -253,57 +255,58 @@ static int ar9003_hw_proc_txdesc(struct 
- 		return -EIO;
- 	}
- 
-+	if (status & AR_TxOpExceeded)
-+		ts->ts_status |= ATH9K_TXERR_XTXOP;
-+	ts->ts_rateindex = MS(status, AR_FinalTxIdx);
-+	ts->ts_seqnum = MS(status, AR_SeqNum);
-+	ts->tid = MS(status, AR_TxTid);
-+
- 	ts->qid = MS(ads->ds_info, AR_TxQcuNum);
- 	ts->desc_id = MS(ads->status1, AR_TxDescId);
--	ts->ts_seqnum = MS(ads->status8, AR_SeqNum);
- 	ts->ts_tstamp = ads->status4;
- 	ts->ts_status = 0;
- 	ts->ts_flags  = 0;
- 
--	if (ads->status3 & AR_ExcessiveRetries)
-+	status = ACCESS_ONCE(ads->status2);
-+	ts->ts_rssi_ctl0 = MS(status, AR_TxRSSIAnt00);
-+	ts->ts_rssi_ctl1 = MS(status, AR_TxRSSIAnt01);
-+	ts->ts_rssi_ctl2 = MS(status, AR_TxRSSIAnt02);
-+	if (status & AR_TxBaStatus) {
-+		ts->ts_flags |= ATH9K_TX_BA;
-+		ts->ba_low = ads->status5;
-+		ts->ba_high = ads->status6;
-+	}
-+
-+	status = ACCESS_ONCE(ads->status3);
-+	if (status & AR_ExcessiveRetries)
- 		ts->ts_status |= ATH9K_TXERR_XRETRY;
--	if (ads->status3 & AR_Filtered)
-+	if (status & AR_Filtered)
- 		ts->ts_status |= ATH9K_TXERR_FILT;
--	if (ads->status3 & AR_FIFOUnderrun) {
-+	if (status & AR_FIFOUnderrun) {
- 		ts->ts_status |= ATH9K_TXERR_FIFO;
- 		ath9k_hw_updatetxtriglevel(ah, true);
- 	}
--	if (ads->status8 & AR_TxOpExceeded)
--		ts->ts_status |= ATH9K_TXERR_XTXOP;
--	if (ads->status3 & AR_TxTimerExpired)
-+	if (status & AR_TxTimerExpired)
- 		ts->ts_status |= ATH9K_TXERR_TIMER_EXPIRED;
--
--	if (ads->status3 & AR_DescCfgErr)
-+	if (status & AR_DescCfgErr)
- 		ts->ts_flags |= ATH9K_TX_DESC_CFG_ERR;
--	if (ads->status3 & AR_TxDataUnderrun) {
-+	if (status & AR_TxDataUnderrun) {
- 		ts->ts_flags |= ATH9K_TX_DATA_UNDERRUN;
- 		ath9k_hw_updatetxtriglevel(ah, true);
- 	}
--	if (ads->status3 & AR_TxDelimUnderrun) {
-+	if (status & AR_TxDelimUnderrun) {
- 		ts->ts_flags |= ATH9K_TX_DELIM_UNDERRUN;
- 		ath9k_hw_updatetxtriglevel(ah, true);
- 	}
--	if (ads->status2 & AR_TxBaStatus) {
--		ts->ts_flags |= ATH9K_TX_BA;
--		ts->ba_low = ads->status5;
--		ts->ba_high = ads->status6;
--	}
--
--	ts->ts_rateindex = MS(ads->status8, AR_FinalTxIdx);
--
--	ts->ts_rssi = MS(ads->status7, AR_TxRSSICombined);
--	ts->ts_rssi_ctl0 = MS(ads->status2, AR_TxRSSIAnt00);
--	ts->ts_rssi_ctl1 = MS(ads->status2, AR_TxRSSIAnt01);
--	ts->ts_rssi_ctl2 = MS(ads->status2, AR_TxRSSIAnt02);
--	ts->ts_rssi_ext0 = MS(ads->status7, AR_TxRSSIAnt10);
--	ts->ts_rssi_ext1 = MS(ads->status7, AR_TxRSSIAnt11);
--	ts->ts_rssi_ext2 = MS(ads->status7, AR_TxRSSIAnt12);
--	ts->ts_shortretry = MS(ads->status3, AR_RTSFailCnt);
--	ts->ts_longretry = MS(ads->status3, AR_DataFailCnt);
--	ts->ts_virtcol = MS(ads->status3, AR_VirtRetryCnt);
--	ts->ts_antenna = 0;
--
--	ts->tid = MS(ads->status8, AR_TxTid);
-+	ts->ts_shortretry = MS(status, AR_RTSFailCnt);
-+	ts->ts_longretry = MS(status, AR_DataFailCnt);
-+	ts->ts_virtcol = MS(status, AR_VirtRetryCnt);
-+
-+	status = ACCESS_ONCE(ads->status7);
-+	ts->ts_rssi = MS(status, AR_TxRSSICombined);
-+	ts->ts_rssi_ext0 = MS(status, AR_TxRSSIAnt10);
-+	ts->ts_rssi_ext1 = MS(status, AR_TxRSSIAnt11);
-+	ts->ts_rssi_ext2 = MS(status, AR_TxRSSIAnt12);
- 
- 	memset(ads, 0, sizeof(*ads));
- 
diff --git a/package/mac80211/patches/553-ath9k_no_node_rssi.patch b/package/mac80211/patches/553-ath9k_no_node_rssi.patch
deleted file mode 100644
index 5991485338..0000000000
--- a/package/mac80211/patches/553-ath9k_no_node_rssi.patch
+++ /dev/null
@@ -1,145 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -271,7 +271,6 @@ struct ath_node {
- 	struct ath_atx_ac ac[WME_NUM_AC];
- 	u16 maxampdu;
- 	u8 mpdudensity;
--	int last_rssi;
- };
- 
- #define AGGR_CLEANUP         BIT(1)
-@@ -666,6 +665,7 @@ struct ath_wiphy {
- 	bool idle;
- 	int chan_idx;
- 	int chan_is_ht;
-+	int last_rssi;
- };
- 
- void ath9k_tasklet(unsigned long data);
---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -553,7 +553,6 @@ static void ath_node_attach(struct ath_s
- 		an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
- 				     sta->ht_cap.ampdu_factor);
- 		an->mpdudensity = parse_mpdudensity(sta->ht_cap.ampdu_density);
--		an->last_rssi = ATH_RSSI_DUMMY_MARKER;
- 	}
- }
- 
-@@ -822,9 +821,11 @@ static u32 ath_get_extchanmode(struct at
- }
- 
- static void ath9k_bss_assoc_info(struct ath_softc *sc,
-+				 struct ieee80211_hw *hw,
- 				 struct ieee80211_vif *vif,
- 				 struct ieee80211_bss_conf *bss_conf)
- {
-+	struct ath_wiphy *aphy = hw->priv;
- 	struct ath_hw *ah = sc->sc_ah;
- 	struct ath_common *common = ath9k_hw_common(ah);
- 
-@@ -848,6 +849,7 @@ static void ath9k_bss_assoc_info(struct 
- 		ath_beacon_config(sc, vif);
- 
- 		/* Reset rssi stats */
-+		aphy->last_rssi = ATH_RSSI_DUMMY_MARKER;
- 		sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER;
- 
- 		sc->sc_flags |= SC_OP_ANI_RUN;
-@@ -1969,7 +1971,7 @@ static void ath9k_bss_info_changed(struc
- 	if (changed & BSS_CHANGED_ASSOC) {
- 		ath_print(common, ATH_DBG_CONFIG, "BSS Changed ASSOC %d\n",
- 			bss_conf->assoc);
--		ath9k_bss_assoc_info(sc, vif, bss_conf);
-+		ath9k_bss_assoc_info(sc, hw, vif, bss_conf);
- 	}
- 
- 	mutex_unlock(&sc->mutex);
---- a/drivers/net/wireless/ath/ath9k/recv.c
-+++ b/drivers/net/wireless/ath/ath9k/recv.c
-@@ -960,36 +960,23 @@ static void ath9k_process_rssi(struct at
- 			       struct ieee80211_hdr *hdr,
- 			       struct ath_rx_status *rx_stats)
- {
-+	struct ath_wiphy *aphy = hw->priv;
- 	struct ath_hw *ah = common->ah;
--	struct ieee80211_sta *sta;
--	struct ath_node *an;
--	int last_rssi = ATH_RSSI_DUMMY_MARKER;
-+	int last_rssi;
- 	__le16 fc;
- 
--	fc = hdr->frame_control;
-+	if (ah->opmode != NL80211_IFTYPE_STATION)
-+		return;
- 
--	rcu_read_lock();
--	/*
--	 * XXX: use ieee80211_find_sta! This requires quite a bit of work
--	 * under the current ath9k virtual wiphy implementation as we have
--	 * no way of tying a vif to wiphy. Typically vifs are attached to
--	 * at least one sdata of a wiphy on mac80211 but with ath9k virtual
--	 * wiphy you'd have to iterate over every wiphy and each sdata.
--	 */
--	if (is_multicast_ether_addr(hdr->addr1))
--		sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr2, NULL);
--	else
--		sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr2, hdr->addr1);
-+	fc = hdr->frame_control;
-+	if (!ieee80211_is_beacon(fc) ||
-+	    compare_ether_addr(hdr->addr3, common->curbssid))
-+		return;
- 
--	if (sta) {
--		an = (struct ath_node *) sta->drv_priv;
--		if (rx_stats->rs_rssi != ATH9K_RSSI_BAD &&
--		   !rx_stats->rs_moreaggr)
--			ATH_RSSI_LPF(an->last_rssi, rx_stats->rs_rssi);
--		last_rssi = an->last_rssi;
--	}
--	rcu_read_unlock();
-+	if (rx_stats->rs_rssi != ATH9K_RSSI_BAD && !rx_stats->rs_moreaggr)
-+		ATH_RSSI_LPF(aphy->last_rssi, rx_stats->rs_rssi);
- 
-+	last_rssi = aphy->last_rssi;
- 	if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
- 		rx_stats->rs_rssi = ATH_EP_RND(last_rssi,
- 					      ATH_RSSI_EP_MULTIPLIER);
-@@ -997,8 +984,7 @@ static void ath9k_process_rssi(struct at
- 		rx_stats->rs_rssi = 0;
- 
- 	/* Update Beacon RSSI, this is used by ANI. */
--	if (ieee80211_is_beacon(fc))
--		ah->stats.avgbrssi = rx_stats->rs_rssi;
-+	ah->stats.avgbrssi = rx_stats->rs_rssi;
- }
- 
- /*
---- a/drivers/net/wireless/ath/ath9k/init.c
-+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -729,6 +729,7 @@ int ath9k_init_device(u16 devid, struct 
- 		    const struct ath_bus_ops *bus_ops)
- {
- 	struct ieee80211_hw *hw = sc->hw;
-+	struct ath_wiphy *aphy = hw->priv;
- 	struct ath_common *common;
- 	struct ath_hw *ah;
- 	int error = 0;
-@@ -781,6 +782,7 @@ int ath9k_init_device(u16 devid, struct 
- 	INIT_WORK(&sc->chan_work, ath9k_wiphy_chan_work);
- 	INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work);
- 	sc->wiphy_scheduler_int = msecs_to_jiffies(500);
-+	aphy->last_rssi = ATH_RSSI_DUMMY_MARKER;
- 
- 	ath_init_leds(sc);
- 	ath_start_rfkill_poll(sc);
---- a/drivers/net/wireless/ath/ath9k/virtual.c
-+++ b/drivers/net/wireless/ath/ath9k/virtual.c
-@@ -107,6 +107,7 @@ int ath9k_wiphy_add(struct ath_softc *sc
- 	aphy->sc = sc;
- 	aphy->hw = hw;
- 	sc->sec_wiphy[i] = aphy;
-+	aphy->last_rssi = ATH_RSSI_DUMMY_MARKER;
- 	spin_unlock_bh(&sc->wiphy_lock);
- 
- 	memcpy(addr, common->macaddr, ETH_ALEN);
diff --git a/package/mac80211/patches/554-ath9k_bt_timer_start.patch b/package/mac80211/patches/554-ath9k_bt_timer_start.patch
deleted file mode 100644
index 33aadb74f0..0000000000
--- a/package/mac80211/patches/554-ath9k_bt_timer_start.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/gpio.c
-+++ b/drivers/net/wireless/ath/ath9k/gpio.c
-@@ -326,10 +326,8 @@ static void ath_btcoex_period_timer(unsi
- 
- 		timer_period = is_btscan ? btcoex->btscan_no_stomp :
- 					   btcoex->btcoex_no_stomp;
--		ath9k_gen_timer_start(ah,
--				      btcoex->no_stomp_timer,
--				      (ath9k_hw_gettsf32(ah) +
--				       timer_period), timer_period * 10);
-+		ath9k_gen_timer_start(ah, btcoex->no_stomp_timer, 0,
-+				      timer_period * 10);
- 		btcoex->hw_timer_enabled = true;
- 	}
- 
diff --git a/package/mac80211/patches/555-ath9k_hw_gettsf32_static.patch b/package/mac80211/patches/555-ath9k_hw_gettsf32_static.patch
deleted file mode 100644
index 6fc4bc7210..0000000000
--- a/package/mac80211/patches/555-ath9k_hw_gettsf32_static.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/hw.c
-+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2324,11 +2324,10 @@ static u32 rightmost_index(struct ath_ge
- 	return timer_table->gen_timer_index[b];
- }
- 
--u32 ath9k_hw_gettsf32(struct ath_hw *ah)
-+static u32 ath9k_hw_gettsf32(struct ath_hw *ah)
- {
- 	return REG_READ(ah, AR_TSF_L32);
- }
--EXPORT_SYMBOL(ath9k_hw_gettsf32);
- 
- struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
- 					  void (*trigger)(void *),
---- a/drivers/net/wireless/ath/ath9k/hw.h
-+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -892,7 +892,6 @@ void ath9k_hw_gen_timer_stop(struct ath_
- 
- void ath_gen_timer_free(struct ath_hw *ah, struct ath_gen_timer *timer);
- void ath_gen_timer_isr(struct ath_hw *hw);
--u32 ath9k_hw_gettsf32(struct ath_hw *ah);
- 
- void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len);
- 
diff --git a/package/mac80211/patches/556-ath9k_desc_alignment.patch b/package/mac80211/patches/556-ath9k_desc_alignment.patch
deleted file mode 100644
index 6295f5eed2..0000000000
--- a/package/mac80211/patches/556-ath9k_desc_alignment.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ar9003_mac.h
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.h
-@@ -65,7 +65,7 @@ struct ar9003_rxs {
- 	u32 status9;
- 	u32 status10;
- 	u32 status11;
--} __packed;
-+} __packed __aligned(4);
- 
- /* Transmit Control Descriptor */
- struct ar9003_txc {
-@@ -93,7 +93,7 @@ struct ar9003_txc {
- 	u32 ctl21;  /* DMA control 21 */
- 	u32 ctl22;  /* DMA control 22 */
- 	u32 pad[9]; /* pad to cache line (128 bytes/32 dwords) */
--} __packed;
-+} __packed __aligned(4);
- 
- struct ar9003_txs {
- 	u32 ds_info;
-@@ -105,7 +105,7 @@ struct ar9003_txs {
- 	u32 status6;
- 	u32 status7;
- 	u32 status8;
--} __packed;
-+} __packed __aligned(4);
- 
- void ar9003_hw_attach_mac_ops(struct ath_hw *hw);
- void ath9k_hw_set_rx_bufsize(struct ath_hw *ah, u16 buf_size);
---- a/drivers/net/wireless/ath/ath9k/mac.h
-+++ b/drivers/net/wireless/ath/ath9k/mac.h
-@@ -237,7 +237,7 @@ struct ath_desc {
- 	u32 ds_ctl1;
- 	u32 ds_hw[20];
- 	void *ds_vdata;
--} __packed;
-+} __packed __aligned(4);
- 
- #define ATH9K_TXDESC_CLRDMASK		0x0001
- #define ATH9K_TXDESC_NOACK		0x0002
-@@ -307,7 +307,7 @@ struct ar5416_desc {
- 			u32 status8;
- 		} rx;
- 	} u;
--} __packed;
-+} __packed __aligned(4);
- 
- #define AR5416DESC(_ds)         ((struct ar5416_desc *)(_ds))
- #define AR5416DESC_CONST(_ds)   ((const struct ar5416_desc *)(_ds))
diff --git a/package/mac80211/patches/810-b43_no_pio.patch b/package/mac80211/patches/810-b43_no_pio.patch
index 2aa426e37a..4a382e70eb 100644
--- a/package/mac80211/patches/810-b43_no_pio.patch
+++ b/package/mac80211/patches/810-b43_no_pio.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/b43/Makefile
 +++ b/drivers/net/wireless/b43/Makefile
-@@ -12,7 +12,7 @@ b43-y				+= xmit.o
+@@ -14,7 +14,7 @@ b43-y				+= xmit.o
  b43-y				+= lo.o
  b43-y				+= wa.o
  b43-y				+= dma.o
-- 
GitLab