diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-09-24 15:43:24 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-09-24 15:43:24 +0000 |
commit | d0a48c1d4292773bb676d5eb89c036a19b606bce (patch) | |
tree | 96551678d0fa0a8e552e1b12e7c9a701413a2037 | |
parent | 1898cdc737c0f4e46820c6816f8af9d6578aebf4 (diff) | |
download | upstream-d0a48c1d4292773bb676d5eb89c036a19b606bce.tar.gz upstream-d0a48c1d4292773bb676d5eb89c036a19b606bce.tar.bz2 upstream-d0a48c1d4292773bb676d5eb89c036a19b606bce.zip |
ath9k: fix handling of tx headroom for padding
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
7 files changed, 34 insertions, 12 deletions
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 index 0000000000..c420d20bae --- /dev/null +++ b/package/kernel/mac80211/patches/397-ath9k-declare-required-extra-tx-headroom.patch @@ -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; diff --git a/package/kernel/mac80211/patches/500-ath9k_eeprom_debugfs.patch b/package/kernel/mac80211/patches/500-ath9k_eeprom_debugfs.patch index c6f50be572..a7f9d9f8b9 100644 --- a/package/kernel/mac80211/patches/500-ath9k_eeprom_debugfs.patch +++ b/package/kernel/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 -@@ -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); diff --git a/package/kernel/mac80211/patches/501-ath9k_ahb_init.patch b/package/kernel/mac80211/patches/501-ath9k_ahb_init.patch index 0bdcae4999..5892c3e17a 100644 --- a/package/kernel/mac80211/patches/501-ath9k_ahb_init.patch +++ b/package/kernel/mac80211/patches/501-ath9k_ahb_init.patch @@ -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; diff --git a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch index c0fbf5ed62..5ecf528e59 100644 --- a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch +++ b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/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); diff --git a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch index b0fb9fea46..7512811e70 100644 --- a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch +++ b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch @@ -165,7 +165,7 @@ void ath_fill_led_pin(struct ath_softc *sc) --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -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 */ @@ -176,7 +176,7 @@ #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, }; @@ -238,7 +238,7 @@ 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); diff --git a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch index 631a692dd4..08c5a0ffc0 100644 --- a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch @@ -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 diff --git a/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch b/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch index a8f1999453..8c9b34cb0a 100644 --- a/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch +++ b/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch @@ -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 |