diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-06-29 11:01:16 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-07-02 19:34:50 +0200 |
commit | 76d09dcb015963e2d024e30acc2c9f0c2bca9f5f (patch) | |
tree | a1d50d72485abba89608b7d4095dfdd732025f44 /package | |
parent | d002aee42c4894b19eab811f1b7c158d0d435ba7 (diff) | |
download | mtk-20170518-76d09dcb015963e2d024e30acc2c9f0c2bca9f5f.zip mtk-20170518-76d09dcb015963e2d024e30acc2c9f0c2bca9f5f.tar.gz mtk-20170518-76d09dcb015963e2d024e30acc2c9f0c2bca9f5f.tar.bz2 |
ath10k: fix tx performance regression on older chipsets
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r-- | package/kernel/mac80211/patches/311-ath10k-disable-wake_tx_queue-for-older-devices.patch | 73 | ||||
-rw-r--r-- | package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch | 4 |
2 files changed, 75 insertions, 2 deletions
diff --git a/package/kernel/mac80211/patches/311-ath10k-disable-wake_tx_queue-for-older-devices.patch b/package/kernel/mac80211/patches/311-ath10k-disable-wake_tx_queue-for-older-devices.patch new file mode 100644 index 0000000..4cf26a6 --- /dev/null +++ b/package/kernel/mac80211/patches/311-ath10k-disable-wake_tx_queue-for-older-devices.patch @@ -0,0 +1,73 @@ +From: Michal Kazior <michal.kazior@tieto.com> +Date: Tue, 17 May 2016 14:47:01 +0200 +Subject: [PATCH] ath10k: disable wake_tx_queue for older devices + +Some setups suffer performance regressions with +current wake_tx_queue implementation. + +Signed-off-by: Michal Kazior <michal.kazior@tieto.com> +--- + +--- a/drivers/net/wireless/ath/ath10k/core.h ++++ b/drivers/net/wireless/ath/ath10k/core.h +@@ -667,6 +667,7 @@ struct ath10k_fw_components { + struct ath10k { + struct ath_common ath_common; + struct ieee80211_hw *hw; ++ struct ieee80211_ops *ops; + struct device *dev; + u8 mac_addr[ETH_ALEN]; + +--- a/drivers/net/wireless/ath/ath10k/mac.c ++++ b/drivers/net/wireless/ath/ath10k/mac.c +@@ -7497,21 +7497,32 @@ static const struct ieee80211_channel at + struct ath10k *ath10k_mac_create(size_t priv_size) + { + struct ieee80211_hw *hw; ++ struct ieee80211_ops *ops; + struct ath10k *ar; + +- hw = ieee80211_alloc_hw(sizeof(struct ath10k) + priv_size, &ath10k_ops); +- if (!hw) ++ ops = kmemdup(&ath10k_ops, sizeof(ath10k_ops), GFP_KERNEL); ++ if (!ops) ++ return NULL; ++ ++ hw = ieee80211_alloc_hw(sizeof(struct ath10k) + priv_size, ops); ++ if (!hw) { ++ kfree(ops); + return NULL; ++ } + + ar = hw->priv; + ar->hw = hw; ++ ar->ops = ops; + + return ar; + } + + void ath10k_mac_destroy(struct ath10k *ar) + { ++ struct ieee80211_ops *ops = ar->ops; ++ + ieee80211_free_hw(ar->hw); ++ kfree(ops); + } + + static const struct ieee80211_iface_limit ath10k_if_limits[] = { +@@ -7945,6 +7956,15 @@ int ath10k_mac_register(struct ath10k *a + ath10k_warn(ar, "failed to initialise DFS pattern detector\n"); + } + ++ /* Current wake_tx_queue implementation imposes a significant ++ * performance penalty in some setups. The tx scheduling code needs ++ * more work anyway so disable the wake_tx_queue unless firmware ++ * supports the pull-push mechanism. ++ */ ++ if (!test_bit(ATH10K_FW_FEATURE_PEER_FLOW_CONTROL, ++ ar->running_fw->fw_file.fw_features)) ++ ar->ops->wake_tx_queue = NULL; ++ + ret = ath_regd_init(&ar->ath_common.regulatory, ar->hw->wiphy, + ath10k_reg_notifier); + if (ret) { diff --git a/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch index 3795f75..83ca029 100644 --- a/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -7731,6 +7731,21 @@ struct ath10k_vif *ath10k_get_arvif(stru +@@ -7742,6 +7742,21 @@ struct ath10k_vif *ath10k_get_arvif(stru return arvif_iter.arvif; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -7955,6 +7970,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -7975,6 +7990,12 @@ int ath10k_mac_register(struct ath10k *a ar->hw->wiphy->cipher_suites = cipher_suites; ar->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); |