mac80211: update to wireless-testing 2010-09-28
authorFelix Fietkau <nbd@openwrt.org>
Wed, 29 Sep 2010 13:13:16 +0000 (13:13 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 29 Sep 2010 13:13:16 +0000 (13:13 +0000)
SVN-Revision: 23149

25 files changed:
package/mac80211/Makefile
package/mac80211/patches/001-disable_b44.patch
package/mac80211/patches/002-disable_rfkill.patch
package/mac80211/patches/005-disable_ssb_build.patch
package/mac80211/patches/007-remove_misc_drivers.patch
package/mac80211/patches/008-led_default.patch
package/mac80211/patches/010-no_pcmcia.patch
package/mac80211/patches/011-no_sdio.patch
package/mac80211/patches/013-disable_b43_nphy.patch
package/mac80211/patches/015-remove-rt2x00-options.patch
package/mac80211/patches/016-remove_pid_algo.patch
package/mac80211/patches/017-carl9170_addr_backport.patch [deleted file]
package/mac80211/patches/018-list_for_each_continue_backport.patch [deleted file]
package/mac80211/patches/030-backport_93c86_eeprom.patch
package/mac80211/patches/110-disable_usb_compat.patch
package/mac80211/patches/130-printk_debug_revert.patch [deleted file]
package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch
package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch
package/mac80211/patches/500-ath9k_eeprom_debugfs.patch [new file with mode: 0644]
package/mac80211/patches/500-ath9k_use_minstrel.patch [deleted file]
package/mac80211/patches/510-ath9k_baw_fix.patch [deleted file]
package/mac80211/patches/520-ath9k_aggr_start_fix.patch [deleted file]
package/mac80211/patches/521-ath9k_aggr_race_fix.patch [deleted file]
package/mac80211/patches/522-ath9k_aggr_flush.patch [deleted file]
package/mac80211/patches/530-ath9k_eeprom_debugfs.patch [deleted file]

index 78220aff5785beb492f1959fa10e0adc16a2f6d9..259f744ee5f25d064c83bf877c5e36d32f0184be 100644 (file)
@@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mac80211
 
-PKG_VERSION:=2010-09-14
+PKG_VERSION:=2010-09-28
 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:=88511287e013ff0f2843b3679f52f335
+PKG_MD5SUM:=c1b4ebcb61a59824493ec35f799f8393
 
 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
index 301148cfb991e90c8e3d97514d7d425243f87f32..d93857bf3c3e0aaf9f3c6977662eb9b458f88178 100644 (file)
@@ -1,6 +1,6 @@
 --- a/config.mk
 +++ b/config.mk
-@@ -297,8 +297,8 @@ endif #CONFIG_SSB
+@@ -300,8 +300,8 @@ endif #CONFIG_SSB
  
  CONFIG_P54_PCI=m
  
index 979435f55b7f7d0f094e002067c868f422461658..f1d45ad8a26a2a3fbf58440b9fb263753ed6dcf5 100644 (file)
@@ -9,7 +9,7 @@
  
  ifeq ($(CONFIG_MAC80211),y)
  $(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
-@@ -572,8 +572,8 @@ endif #CONFIG_COMPAT_KERNEL_27
+@@ -585,8 +585,8 @@ endif #CONFIG_COMPAT_KERNEL_27
  # We need the backported rfkill module on kernel < 2.6.31.
  # In more recent kernel versions use the in kernel rfkill module.
  ifdef CONFIG_COMPAT_KERNEL_31
index 301aa95251886146b76a3fb8f64d37a4c18df8c1..7f92487577fa74aee28fb76bc3560b238083c5a9 100644 (file)
@@ -19,8 +19,8 @@
  else
  include $(KLIB_BUILD)/.config
  endif
-@@ -280,21 +279,6 @@ endif #CONFIG_WEXT_PRIV
- endif #CONFIG_WEXT_SPY
+@@ -283,21 +282,6 @@ CONFIG_IPW2200_QOS=y
+ # % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
  endif #CONFIG_WIRELESS_EXT
  
 -ifdef CONFIG_SSB
@@ -41,7 +41,7 @@
  CONFIG_P54_PCI=m
  
  # CONFIG_B44=m
-@@ -474,7 +458,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
+@@ -485,7 +469,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
  
  ifdef CONFIG_MMC
  
index 6f7693fa3871bf4b034e9a2e24dfdad4f2b14038..39bef1868ad80dd87697d3f31c1fa4dc210baaee 100644 (file)
@@ -9,7 +9,7 @@
  endif
  
  # mac80211 test driver
-@@ -311,13 +311,13 @@ endif #CONFIG_CRC_ITU_T
+@@ -314,13 +314,13 @@ endif #CONFIG_CRC_ITU_T
  CONFIG_MWL8K=m
  
  # Ethernet drivers go here
@@ -28,7 +28,7 @@
  endif #CONFIG_COMPAT_KERNEL_27
  
  ifdef CONFIG_WIRELESS_EXT
-@@ -372,17 +372,17 @@ CONFIG_ZD1211RW=m
+@@ -371,17 +371,17 @@ CONFIG_ZD1211RW=m
  # Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
  # it also requires new RNDIS_HOST and CDC_ETHER modules which we add
  ifdef CONFIG_COMPAT_KERNEL_29
index 5f6eec0366bae4e8f1da81e4038abe667c984dbc..79868f7a72a2988c17a12b8ace73563c9fa28305 100644 (file)
@@ -9,7 +9,7 @@
  
  # enable mesh networking too
  CONFIG_MAC80211_MESH=y
-@@ -233,7 +233,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
+@@ -240,7 +240,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
  ifdef CONFIG_PCMCIA
  CONFIG_B43_PCMCIA=y
  endif #CONFIG_PCMCIA
@@ -18,7 +18,7 @@
  CONFIG_B43_PHY_LP=y
  CONFIG_B43_NPHY=y
  # CONFIG_B43_FORCE_PIO=y
-@@ -242,7 +242,7 @@ CONFIG_B43_NPHY=y
+@@ -249,7 +249,7 @@ CONFIG_B43_NPHY=y
  CONFIG_B43LEGACY=m
  CONFIG_B43LEGACY_HWRNG=y
  CONFIG_B43LEGACY_PCI_AUTOSELECT=y
@@ -27,7 +27,7 @@
  # CONFIG_B43LEGACY_DEBUG=y
  CONFIG_B43LEGACY_DMA=y
  CONFIG_B43LEGACY_PIO=y
-@@ -529,7 +529,7 @@ endif
+@@ -542,7 +542,7 @@ endif
  
  # p54
  CONFIG_P54_COMMON=m
index 33f152eb635f0c5626b7255f18579959c93523e3..f16dac6d5354bd1e0665f9862d926992f2ce847e 100644 (file)
@@ -9,7 +9,7 @@
  else
  include $(KLIB_BUILD)/.config
  endif
-@@ -214,7 +214,7 @@ CONFIG_B43=m
+@@ -221,7 +221,7 @@ CONFIG_B43=m
  CONFIG_B43_HWRNG=y
  CONFIG_B43_PCI_AUTOSELECT=y
  ifdef CONFIG_PCMCIA
index 42792fb57e2da2ac95a7132167edbadcc5f2fc97..2e906f56bac018049b6d40f8cc563353f44511f3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/config.mk
 +++ b/config.mk
-@@ -441,7 +441,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
+@@ -452,7 +452,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
  
  ifdef CONFIG_MMC
  
index 2fa9354ce4b0a26be04837e805c99cf47f6bfb13..743d123517cbb3f8eb2e7c338fdeaa073939f1f5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/config.mk
 +++ b/config.mk
-@@ -218,7 +218,7 @@ ifdef CONFIG_PCMCIA
+@@ -225,7 +225,7 @@ ifdef CONFIG_PCMCIA
  endif #CONFIG_PCMCIA
  # CONFIG_B43_LEDS=y
  CONFIG_B43_PHY_LP=y
index 31b4a653f2ffc34adab94ce01e037d45cfab34cc..5353261185c34efc264efc3b200520a05a902dfb 100644 (file)
@@ -1,6 +1,6 @@
 --- a/config.mk
 +++ b/config.mk
-@@ -271,12 +271,12 @@ CONFIG_RTL8180=m
+@@ -274,12 +274,12 @@ CONFIG_RTL8180=m
  
  CONFIG_ADM8211=m
  
@@ -15,7 +15,7 @@
  # CONFIG_RT2800PCI_RT30XX=y
  # CONFIG_RT2800PCI_RT35XX=y
  # CONFIG_RT2800PCI_SOC=y
-@@ -391,7 +391,7 @@ CONFIG_RT2800USB_RT30XX=y
+@@ -402,7 +402,7 @@ CONFIG_RT2800USB_RT30XX=y
  CONFIG_RT2800USB_RT35XX=y
  CONFIG_RT2800USB_UNKNOWN=y
  endif #CONFIG_CRC_CCITT
index 02527b6a86187b0fe4ca4971ae1c7fbaef03fc60..99b19d81edc88f7e10caad4fc0329fd824948dec 100644 (file)
@@ -3,7 +3,7 @@
 @@ -112,7 +112,7 @@ CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
  # This is the one used by our compat-wireless net/mac80211/rate.c
  # in case you have and old kernel which is overriding this to pid.
- CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel
+ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
 -CONFIG_MAC80211_RC_PID=y
 +# CONFIG_MAC80211_RC_PID=y
  CONFIG_MAC80211_RC_MINSTREL=y
diff --git a/package/mac80211/patches/017-carl9170_addr_backport.patch b/package/mac80211/patches/017-carl9170_addr_backport.patch
deleted file mode 100644 (file)
index 0d3774b..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/drivers/net/wireless/ath/carl9170/main.c
-+++ b/drivers/net/wireless/ath/carl9170/main.c
-@@ -811,16 +811,34 @@ out:
- }
- static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw,
--                                       struct netdev_hw_addr_list *mc_list)
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
-+                                 struct netdev_hw_addr_list *mc_list)
-+#else
-+                                 int mc_count, struct dev_addr_list *ha)
-+#endif
- {
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
-       struct netdev_hw_addr *ha;
-+#else
-+      int i;
-+#endif
-       u64 mchash;
-       /* always get broadcast frames */
-       mchash = 1ULL << (0xff >> 2);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
-       netdev_hw_addr_list_for_each(ha, mc_list)
-               mchash |= 1ULL << (ha->addr[5] >> 2);
-+#else
-+      for (i = 0; i < mc_count; i++) {
-+              if (!ha)
-+                      break;
-+
-+              mchash |= 1ULL << (ha->dmi_addr[5] >> 2);
-+              ha = ha->next;
-+      }
-+#endif
-       return mchash;
- }
diff --git a/package/mac80211/patches/018-list_for_each_continue_backport.patch b/package/mac80211/patches/018-list_for_each_continue_backport.patch
deleted file mode 100644 (file)
index 08f8eed..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/include/linux/compat-2.6.33.h
-+++ b/include/linux/compat-2.6.33.h
-@@ -98,6 +98,12 @@ int pccard_loop_tuple(struct pcmcia_sock
- #define kfifo_out(a, b, c) __kfifo_get(*a, b, c)
- #define kfifo_len(a) __kfifo_len(*a)
-+#define list_for_each_entry_continue_rcu(pos, head, member)           \
-+      for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \
-+           prefetch(pos->member.next), &pos->member != (head);        \
-+           pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
-+
-+
- #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
- #endif /* LINUX_26_33_COMPAT_H */
index b2a855d45a9ed2f5e5ec40809697abd044742ea5..ac568f7f2ae02a5e8ab15cbca015865414ead4b5 100644 (file)
@@ -1,8 +1,8 @@
 --- a/include/linux/compat-2.6.36.h
 +++ b/include/linux/compat-2.6.36.h
-@@ -15,6 +15,8 @@ struct va_format {
- #define device_rename(dev, new_name) device_rename(dev, (char *)new_name)
+@@ -56,6 +56,8 @@ static inline int pcmcia_write_config_by
+       return pcmcia_access_configuration_register(p_dev, &reg);
+ }
  
 +#define PCI_EEPROM_WIDTH_93C86   8
 +
index 76f3fb24baf273efc4da744841f667b39b3f86b1..5c9147c77ae622279050bdcee3a036a3e485dc64 100644 (file)
  #if 0
  extern void usb_poison_urb(struct urb *urb);
  #endif
+--- a/config.mk
++++ b/config.mk
+@@ -389,7 +389,7 @@ endif #CONFIG_COMPAT_KERNEL_29
+ # This activates a threading fix for usb urb.
+ # this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
+ # This fix will be included in some stable releases.
+-CONFIG_COMPAT_USB_URB_THREAD_FIX=y
++# CONFIG_COMPAT_USB_URB_THREAD_FIX=y
+ CONFIG_ATH9K_HTC=m
+ # CONFIG_ATH9K_HTC_DEBUGFS=y
diff --git a/package/mac80211/patches/130-printk_debug_revert.patch b/package/mac80211/patches/130-printk_debug_revert.patch
deleted file mode 100644 (file)
index a1ceb66..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/include/net/cfg80211.h
-+++ b/include/net/cfg80211.h
-@@ -2574,9 +2574,8 @@ void cfg80211_cqm_rssi_notify(struct net
-       wiphy_printk(KERN_NOTICE, wiphy, format, ##args)
- #define wiphy_info(wiphy, format, args...)                    \
-       wiphy_printk(KERN_INFO, wiphy, format, ##args)
--
--int wiphy_debug(const struct wiphy *wiphy, const char *format, ...)
--      __attribute__ ((format (printf, 2, 3)));
-+#define wiphy_debug(wiphy, format, args...)                   \
-+      wiphy_printk(KERN_DEBUG, wiphy, format, ##args)
- #if defined(DEBUG)
- #define wiphy_dbg(wiphy, format, args...)                     \
---- a/net/wireless/core.c
-+++ b/net/wireless/core.c
-@@ -936,52 +936,3 @@ static void __exit cfg80211_exit(void)
-       destroy_workqueue(cfg80211_wq);
- }
- module_exit(cfg80211_exit);
--
--static int ___wiphy_printk(const char *level, const struct wiphy *wiphy,
--                         struct va_format *vaf)
--{
--      if (!wiphy)
--              return printk("%s(NULL wiphy *): %pV", level, vaf);
--
--      return printk("%s%s: %pV", level, wiphy_name(wiphy), vaf);
--}
--
--int __wiphy_printk(const char *level, const struct wiphy *wiphy,
--                 const char *fmt, ...)
--{
--      struct va_format vaf;
--      va_list args;
--      int r;
--
--      va_start(args, fmt);
--
--      vaf.fmt = fmt;
--      vaf.va = &args;
--
--      r = ___wiphy_printk(level, wiphy, &vaf);
--      va_end(args);
--
--      return r;
--}
--EXPORT_SYMBOL(__wiphy_printk);
--
--#define define_wiphy_printk_level(func, kern_level)           \
--int func(const struct wiphy *wiphy, const char *fmt, ...)     \
--{                                                             \
--      struct va_format vaf;                                   \
--      va_list args;                                           \
--      int r;                                                  \
--                                                              \
--      va_start(args, fmt);                                    \
--                                                              \
--      vaf.fmt = fmt;                                          \
--      vaf.va = &args;                                         \
--                                                              \
--      r = ___wiphy_printk(kern_level, wiphy, &vaf);           \
--      va_end(args);                                           \
--                                                              \
--      return r;                                               \
--}                                                             \
--EXPORT_SYMBOL(func);
--
--define_wiphy_printk_level(wiphy_debug, KERN_DEBUG);
index 5659ab85bcb3388626edab88655cd08bcbf7338c..7f491f31b75526ad0270ad1612a6f635810443ef 100644 (file)
@@ -17,7 +17,7 @@
  
        common = ath9k_hw_common(ah);
        common->ops = &ath9k_common_ops;
-@@ -677,6 +680,24 @@ void ath9k_set_hw_capab(struct ath_softc
+@@ -680,6 +683,24 @@ void ath9k_set_hw_capab(struct ath_softc
        SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
  }
  
@@ -42,7 +42,7 @@
  int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
                    const struct ath_bus_ops *bus_ops)
  {
-@@ -695,6 +716,9 @@ int ath9k_init_device(u16 devid, struct 
+@@ -698,6 +719,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
-@@ -643,6 +643,8 @@ struct ath_softc {
+@@ -641,6 +641,8 @@ struct ath_softc {
  
        int beacon_interval;
  
index f98056f0d439234c6fa63711aa1a9b43d6818aba..02481aba2573afe4d4c08b64b8126ca9841d20a5 100644 (file)
@@ -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
-@@ -460,6 +460,7 @@ void ath9k_btcoex_timer_pause(struct ath
+@@ -459,6 +459,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
new file mode 100644 (file)
index 0000000..cbe2d73
--- /dev/null
@@ -0,0 +1,67 @@
+--- a/drivers/net/wireless/ath/ath9k/debug.c
++++ b/drivers/net/wireless/ath/ath9k/debug.c
+@@ -930,6 +930,53 @@ static const struct file_operations fops
+       .owner = THIS_MODULE
+ };
++static ssize_t read_file_eeprom(struct file *file, char __user *user_buf,
++                           size_t count, loff_t *ppos)
++{
++      struct ath_softc *sc = file->private_data;
++      struct ath_hw *ah = sc->sc_ah;
++      struct ath_common *common = ath9k_hw_common(ah);
++      int bytes = 0;
++      int pos = *ppos;
++      int size = 4096;
++      u16 val;
++      int i;
++
++      if (AR_SREV_9300_20_OR_LATER(ah))
++              size = 16384;
++
++      if (*ppos < 0)
++              return -EINVAL;
++
++      if (count > size - *ppos)
++              count = size - *ppos;
++
++      for (i = *ppos / 2; count > 0; count -= bytes, *ppos += bytes, i++) {
++              void *from = &val;
++
++              if (!common->bus_ops->eeprom_read(common, i, &val))
++                      val = 0xffff;
++
++              if (*ppos % 2) {
++                      from++;
++                      bytes = 1;
++              } else if (count == 1) {
++                      bytes = 1;
++              } else {
++                      bytes = 2;
++              }
++              copy_to_user(user_buf, from, bytes);
++              user_buf += bytes;
++      }
++      return *ppos - pos;
++}
++
++static const struct file_operations fops_eeprom = {
++      .read = read_file_eeprom,
++      .open = ath9k_debugfs_open,
++      .owner = THIS_MODULE
++};
++
+ int ath9k_init_debug(struct ath_hw *ah)
+ {
+       struct ath_common *common = ath9k_hw_common(ah);
+@@ -993,6 +1040,10 @@ int ath9k_init_debug(struct ath_hw *ah)
+                       sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
+               goto err;
++      if (!debugfs_create_file("eeprom", S_IRUSR,
++                      sc->debug.debugfs_phy, sc, &fops_eeprom))
++              goto err;
++
+       sc->debug.regidx = 0;
+       return 0;
+ err:
diff --git a/package/mac80211/patches/500-ath9k_use_minstrel.patch b/package/mac80211/patches/500-ath9k_use_minstrel.patch
deleted file mode 100644 (file)
index 61e01c1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/init.c
-+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -661,7 +661,11 @@ void ath9k_set_hw_capab(struct ath_softc
-       hw->sta_data_size = sizeof(struct ath_node);
-       hw->vif_data_size = sizeof(struct ath_vif);
-+#ifdef ATH9K_USE_MINSTREL
-+      hw->rate_control_algorithm = "minstrel_ht";
-+#else
-       hw->rate_control_algorithm = "ath9k_rate_control";
-+#endif
-       if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes))
-               hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
diff --git a/package/mac80211/patches/510-ath9k_baw_fix.patch b/package/mac80211/patches/510-ath9k_baw_fix.patch
deleted file mode 100644 (file)
index 50e4b99..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -254,7 +254,7 @@ struct ath_atx_tid {
-       struct list_head buf_q;
-       struct ath_node *an;
-       struct ath_atx_ac *ac;
--      struct ath_buf *tx_buf[ATH_TID_MAX_BUFS];
-+      unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
-       u16 seq_start;
-       u16 seq_next;
-       u16 baw_size;
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -168,9 +168,9 @@ static void ath_tx_update_baw(struct ath
-       index  = ATH_BA_INDEX(tid->seq_start, seqno);
-       cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
--      tid->tx_buf[cindex] = NULL;
-+      __clear_bit(cindex, tid->tx_buf);
--      while (tid->baw_head != tid->baw_tail && !tid->tx_buf[tid->baw_head]) {
-+      while (tid->baw_head != tid->baw_tail && !test_bit(tid->baw_head, tid->tx_buf)) {
-               INCR(tid->seq_start, IEEE80211_SEQ_MAX);
-               INCR(tid->baw_head, ATH_TID_MAX_BUFS);
-       }
-@@ -186,9 +186,7 @@ static void ath_tx_addto_baw(struct ath_
-       index  = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno);
-       cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
--
--      BUG_ON(tid->tx_buf[cindex] != NULL);
--      tid->tx_buf[cindex] = bf;
-+      __set_bit(cindex, tid->tx_buf);
-       if (index >= ((tid->baw_tail - tid->baw_head) &
-               (ATH_TID_MAX_BUFS - 1))) {
diff --git a/package/mac80211/patches/520-ath9k_aggr_start_fix.patch b/package/mac80211/patches/520-ath9k_aggr_start_fix.patch
deleted file mode 100644 (file)
index 1dcac53..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -124,7 +124,8 @@ static void ath_tx_resume_tid(struct ath
- {
-       struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
--      WARN_ON(!tid->paused);
-+      if (!tid->paused)
-+              return;
-       spin_lock_bh(&txq->axq_lock);
-       tid->paused = false;
diff --git a/package/mac80211/patches/521-ath9k_aggr_race_fix.patch b/package/mac80211/patches/521-ath9k_aggr_race_fix.patch
deleted file mode 100644 (file)
index 0dbbc13..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -784,17 +784,23 @@ static void ath_tx_sched_aggr(struct ath
-                status != ATH_AGGR_BAW_CLOSED);
- }
--void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
--                     u16 tid, u16 *ssn)
-+int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
-+                    u16 tid, u16 *ssn)
- {
-       struct ath_atx_tid *txtid;
-       struct ath_node *an;
-       an = (struct ath_node *)sta->drv_priv;
-       txtid = ATH_AN_2_TID(an, tid);
-+
-+      if (txtid->state & (AGGR_CLEANUP | AGGR_ADDBA_COMPLETE))
-+              return -EAGAIN;
-+
-       txtid->state |= AGGR_ADDBA_PROGRESS;
-       txtid->paused = true;
-       *ssn = txtid->seq_start;
-+
-+      return 0;
- }
- void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -346,8 +346,8 @@ void ath_tx_tasklet(struct ath_softc *sc
- void ath_tx_edma_tasklet(struct ath_softc *sc);
- void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb);
- bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, u8 tidno);
--void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
--                     u16 tid, u16 *ssn);
-+int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
-+                    u16 tid, u16 *ssn);
- void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
- void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
- void ath9k_enable_ps(struct ath_softc *sc);
---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1968,8 +1968,9 @@ static int ath9k_ampdu_action(struct iee
-               break;
-       case IEEE80211_AMPDU_TX_START:
-               ath9k_ps_wakeup(sc);
--              ath_tx_aggr_start(sc, sta, tid, ssn);
--              ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
-+              ret = ath_tx_aggr_start(sc, sta, tid, ssn);
-+              if (!ret)
-+                      ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
-               ath9k_ps_restore(sc);
-               break;
-       case IEEE80211_AMPDU_TX_STOP:
diff --git a/package/mac80211/patches/522-ath9k_aggr_flush.patch b/package/mac80211/patches/522-ath9k_aggr_flush.patch
deleted file mode 100644 (file)
index 6fdd42f..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -61,6 +61,8 @@ static int ath_tx_num_badfrms(struct ath
-                             struct ath_tx_status *ts, int txok);
- static void ath_tx_rc_status(struct ath_buf *bf, struct ath_tx_status *ts,
-                            int nbad, int txok, bool update_rc);
-+static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
-+                            int seqno);
- enum {
-       MCS_HT20,
-@@ -144,18 +146,23 @@ static void ath_tx_flush_tid(struct ath_
-       struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
-       struct ath_buf *bf;
-       struct list_head bf_head;
--      INIT_LIST_HEAD(&bf_head);
-+      struct ath_tx_status ts;
--      WARN_ON(!tid->paused);
-+      INIT_LIST_HEAD(&bf_head);
-+      memset(&ts, 0, sizeof(ts));
-       spin_lock_bh(&txq->axq_lock);
--      tid->paused = false;
-       while (!list_empty(&tid->buf_q)) {
-               bf = list_first_entry(&tid->buf_q, struct ath_buf, list);
--              BUG_ON(bf_isretried(bf));
-               list_move_tail(&bf->list, &bf_head);
--              ath_tx_send_ht_normal(sc, txq, tid, &bf_head);
-+
-+              if (bf_isretried(bf)) {
-+                      ath_tx_update_baw(sc, tid, bf->bf_seqno);
-+                      ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0);
-+              } else {
-+                      ath_tx_send_ht_normal(sc, txq, tid, &bf_head);
-+              }
-       }
-       spin_unlock_bh(&txq->axq_lock);
-@@ -430,7 +437,7 @@ static void ath_tx_complete_aggr(struct 
-                       list_move_tail(&bf->list, &bf_head);
-               }
--              if (!txpending) {
-+              if (!txpending || (tid->state & AGGR_CLEANUP)) {
-                       /*
-                        * complete the acked-ones/xretried ones; update
-                        * block-ack window
-@@ -451,6 +458,7 @@ static void ath_tx_complete_aggr(struct 
-                               !txfail, sendbar);
-               } else {
-                       /* retry the un-acked ones */
-+
-                       if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)) {
-                               if (bf->bf_next == NULL && bf_last->bf_stale) {
-                                       struct ath_buf *tbf;
-@@ -509,15 +517,12 @@ static void ath_tx_complete_aggr(struct 
-       }
-       if (tid->state & AGGR_CLEANUP) {
-+              ath_tx_flush_tid(sc, tid);
-+
-               if (tid->baw_head == tid->baw_tail) {
-                       tid->state &= ~AGGR_ADDBA_COMPLETE;
-                       tid->state &= ~AGGR_CLEANUP;
--
--                      /* send buffered frames as singles */
--                      ath_tx_flush_tid(sc, tid);
-               }
--              rcu_read_unlock();
--              return;
-       }
-       rcu_read_unlock();
-@@ -808,12 +813,6 @@ void ath_tx_aggr_stop(struct ath_softc *
-       struct ath_node *an = (struct ath_node *)sta->drv_priv;
-       struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
-       struct ath_txq *txq = &sc->tx.txq[txtid->ac->qnum];
--      struct ath_tx_status ts;
--      struct ath_buf *bf;
--      struct list_head bf_head;
--
--      memset(&ts, 0, sizeof(ts));
--      INIT_LIST_HEAD(&bf_head);
-       if (txtid->state & AGGR_CLEANUP)
-               return;
-@@ -823,31 +822,22 @@ void ath_tx_aggr_stop(struct ath_softc *
-               return;
-       }
--      /* drop all software retried frames and mark this TID */
-       spin_lock_bh(&txq->axq_lock);
-       txtid->paused = true;
--      while (!list_empty(&txtid->buf_q)) {
--              bf = list_first_entry(&txtid->buf_q, struct ath_buf, list);
--              if (!bf_isretried(bf)) {
--                      /*
--                       * NB: it's based on the assumption that
--                       * software retried frame will always stay
--                       * at the head of software queue.
--                       */
--                      break;
--              }
--              list_move_tail(&bf->list, &bf_head);
--              ath_tx_update_baw(sc, txtid, bf->bf_seqno);
--              ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0);
--      }
--      spin_unlock_bh(&txq->axq_lock);
--      if (txtid->baw_head != txtid->baw_tail) {
-+      /*
-+       * If frames are still being transmitted for this TID, they will be
-+       * cleaned up during tx completion. To prevent race conditions, this
-+       * TID can only be reused after all in-progress subframes have been
-+       * completed.
-+       */
-+      if (txtid->baw_head != txtid->baw_tail)
-               txtid->state |= AGGR_CLEANUP;
--      } else {
-+      else
-               txtid->state &= ~AGGR_ADDBA_COMPLETE;
--              ath_tx_flush_tid(sc, txtid);
--      }
-+      spin_unlock_bh(&txq->axq_lock);
-+
-+      ath_tx_flush_tid(sc, txtid);
- }
- void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
diff --git a/package/mac80211/patches/530-ath9k_eeprom_debugfs.patch b/package/mac80211/patches/530-ath9k_eeprom_debugfs.patch
deleted file mode 100644 (file)
index 62a5d31..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/debug.c
-+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -897,6 +897,53 @@ static const struct file_operations fops
-       .owner = THIS_MODULE
- };
-+static ssize_t read_file_eeprom(struct file *file, char __user *user_buf,
-+                           size_t count, loff_t *ppos)
-+{
-+      struct ath_softc *sc = file->private_data;
-+      struct ath_hw *ah = sc->sc_ah;
-+      struct ath_common *common = ath9k_hw_common(ah);
-+      int bytes = 0;
-+      int pos = *ppos;
-+      int size = 4096;
-+      u16 val;
-+      int i;
-+
-+      if (AR_SREV_9300_20_OR_LATER(ah))
-+              size = 16384;
-+
-+      if (*ppos < 0)
-+              return -EINVAL;
-+
-+      if (count > size - *ppos)
-+              count = size - *ppos;
-+
-+      for (i = *ppos / 2; count > 0; count -= bytes, *ppos += bytes, i++) {
-+              void *from = &val;
-+
-+              if (!common->bus_ops->eeprom_read(common, i, &val))
-+                      val = 0xffff;
-+
-+              if (*ppos % 2) {
-+                      from++;
-+                      bytes = 1;
-+              } else if (count == 1) {
-+                      bytes = 1;
-+              } else {
-+                      bytes = 2;
-+              }
-+              copy_to_user(user_buf, from, bytes);
-+              user_buf += bytes;
-+      }
-+      return *ppos - pos;
-+}
-+
-+static const struct file_operations fops_eeprom = {
-+      .read = read_file_eeprom,
-+      .open = ath9k_debugfs_open,
-+      .owner = THIS_MODULE
-+};
-+
- int ath9k_init_debug(struct ath_hw *ah)
- {
-       struct ath_common *common = ath9k_hw_common(ah);
-@@ -960,6 +1007,10 @@ int ath9k_init_debug(struct ath_hw *ah)
-                       sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
-               goto err;
-+      if (!debugfs_create_file("eeprom", S_IRUSR,
-+                      sc->debug.debugfs_phy, sc, &fops_eeprom))
-+              goto err;
-+
-       sc->debug.regidx = 0;
-       return 0;
- err: