ath9k: fix handling of tx headroom for padding
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 24 Sep 2015 15:43:24 +0000 (15:43 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 24 Sep 2015 15:43:24 +0000 (15:43 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Backport of r47042

git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47044 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/kernel/mac80211/patches/397-ath9k-declare-required-extra-tx-headroom.patch [new file with mode: 0644]
package/kernel/mac80211/patches/500-ath9k_eeprom_debugfs.patch
package/kernel/mac80211/patches/501-ath9k_ahb_init.patch
package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch

diff --git a/package/kernel/mac80211/patches/397-ath9k-declare-required-extra-tx-headroom.patch b/package/kernel/mac80211/patches/397-ath9k-declare-required-extra-tx-headroom.patch
new file mode 100644 (file)
index 0000000..c420d20
--- /dev/null
@@ -0,0 +1,22 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Thu, 24 Sep 2015 16:57:37 +0200
+Subject: [PATCH] ath9k: declare required extra tx headroom
+
+ath9k inserts padding between the 802.11 header and the data area (to
+align it). Since it didn't declare this extra required headroom, this
+led to some nasty issues like randomly dropped packets in some setups.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/init.c
++++ b/drivers/net/wireless/ath/ath9k/init.c
+@@ -867,6 +867,7 @@ static void ath9k_set_hw_capab(struct at
+       hw->max_rate_tries = 10;
+       hw->sta_data_size = sizeof(struct ath_node);
+       hw->vif_data_size = sizeof(struct ath_vif);
++      hw->extra_tx_headroom = 4;
+       hw->wiphy->available_antennas_rx = BIT(ah->caps.max_rxchains) - 1;
+       hw->wiphy->available_antennas_tx = BIT(ah->caps.max_txchains) - 1;
index c6f50be..a7f9d9f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1299,6 +1299,53 @@ void ath9k_deinit_debug(struct ath_softc
+@@ -1301,6 +1301,53 @@ void ath9k_deinit_debug(struct ath_softc
        ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
  }
  
@@ -54,7 +54,7 @@
  int ath9k_init_debug(struct ath_hw *ah)
  {
        struct ath_common *common = ath9k_hw_common(ah);
-@@ -1318,6 +1365,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1320,6 +1367,8 @@ int ath9k_init_debug(struct ath_hw *ah)
        ath9k_tx99_init_debug(sc);
        ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
  
index 0bdcae4..5892c3e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -1023,23 +1023,23 @@ static int __init ath9k_init(void)
+@@ -1024,23 +1024,23 @@ static int __init ath9k_init(void)
  {
        int error;
  
index c0fbf5e..5ecf528 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1346,6 +1346,52 @@ static const struct file_operations fops
+@@ -1348,6 +1348,52 @@ static const struct file_operations fops
        .owner = THIS_MODULE
  };
  
@@ -53,7 +53,7 @@
  int ath9k_init_debug(struct ath_hw *ah)
  {
        struct ath_common *common = ath9k_hw_common(ah);
-@@ -1367,6 +1413,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1369,6 +1415,8 @@ int ath9k_init_debug(struct ath_hw *ah)
  
        debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
                            &fops_eeprom);
index b0fb9fe..7512811 100644 (file)
  void ath_fill_led_pin(struct ath_softc *sc)
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -935,7 +935,7 @@ int ath9k_init_device(u16 devid, struct
+@@ -936,7 +936,7 @@ int ath9k_init_device(u16 devid, struct
  
  #ifdef CPTCFG_MAC80211_LEDS
        /* must be initialized before ieee80211_register_hw */
  #endif
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1391,6 +1391,61 @@ static const struct file_operations fops
+@@ -1393,6 +1393,61 @@ static const struct file_operations fops
        .llseek = default_llseek,
  };
  
  
  int ath9k_init_debug(struct ath_hw *ah)
  {
-@@ -1415,6 +1470,10 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1417,6 +1472,10 @@ int ath9k_init_debug(struct ath_hw *ah)
                            &fops_eeprom);
        debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
                            sc, &fops_chanbw);
index 631a692..08c5a0f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1447,6 +1447,50 @@ static const struct file_operations fops
+@@ -1449,6 +1449,50 @@ static const struct file_operations fops
  #endif
  
  
@@ -51,7 +51,7 @@
  int ath9k_init_debug(struct ath_hw *ah)
  {
        struct ath_common *common = ath9k_hw_common(ah);
-@@ -1474,6 +1518,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1476,6 +1520,8 @@ int ath9k_init_debug(struct ath_hw *ah)
        debugfs_create_file("gpio_led", S_IWUSR,
                           sc->debug.debugfs_phy, sc, &fops_gpio_led);
  #endif
index a8f1999..8c9b34c 100644 (file)
@@ -65,7 +65,7 @@
  }
  
  static const struct ieee80211_iface_limit if_limits[] = {
-@@ -895,6 +896,18 @@ static void ath9k_set_hw_capab(struct at
+@@ -896,6 +897,18 @@ static void ath9k_set_hw_capab(struct at
        SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
  }
  
@@ -84,7 +84,7 @@
  int ath9k_init_device(u16 devid, struct ath_softc *sc,
                    const struct ath_bus_ops *bus_ops)
  {
-@@ -940,6 +953,8 @@ int ath9k_init_device(u16 devid, struct
+@@ -941,6 +954,8 @@ int ath9k_init_device(u16 devid, struct
                ARRAY_SIZE(ath9k_tpt_blink));
  #endif