diff options
Diffstat (limited to 'package/kernel/mac80211/patches/ath')
39 files changed, 110 insertions, 644 deletions
diff --git a/package/kernel/mac80211/patches/ath/070-ath_common_config.patch b/package/kernel/mac80211/patches/ath/070-ath_common_config.patch index 41774fe53e..cc84c1b5de 100644 --- a/package/kernel/mac80211/patches/ath/070-ath_common_config.patch +++ b/package/kernel/mac80211/patches/ath/070-ath_common_config.patch @@ -1,6 +1,7 @@ --- a/drivers/net/wireless/ath/Kconfig +++ b/drivers/net/wireless/ath/Kconfig -@@ -1,5 +1,5 @@ +@@ -1,6 +1,6 @@ + # SPDX-License-Identifier: GPL-2.0-only config ATH_COMMON - tristate + tristate "ath.ko" diff --git a/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch b/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch index a86cbc6e54..cef57f09c9 100644 --- a/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch +++ b/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/Kconfig +++ b/drivers/net/wireless/ath/ath10k/Kconfig -@@ -85,6 +85,12 @@ config ATH10K_TRACING +@@ -87,6 +87,12 @@ config ATH10K_TRACING ---help--- Select this to ath10k use tracing infrastructure. @@ -26,7 +26,7 @@ ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o --- a/drivers/net/wireless/ath/ath10k/thermal.h +++ b/drivers/net/wireless/ath/ath10k/thermal.h -@@ -36,7 +36,7 @@ struct ath10k_thermal { +@@ -25,7 +25,7 @@ struct ath10k_thermal { int temperature; }; diff --git a/package/kernel/mac80211/patches/ath/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch b/package/kernel/mac80211/patches/ath/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch index 3adcb8b796..38b5c51302 100644 --- a/package/kernel/mac80211/patches/ath/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch +++ b/package/kernel/mac80211/patches/ath/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch @@ -8,7 +8,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411. --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -2962,7 +2962,8 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2963,7 +2963,8 @@ void ath9k_hw_apply_txpower(struct ath_h { struct ath_regulatory *reg = ath9k_hw_regulatory(ah); struct ieee80211_channel *channel; @@ -18,7 +18,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411. u16 ctl = NO_CTL; if (!chan) -@@ -2974,9 +2975,14 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2975,9 +2976,14 @@ void ath9k_hw_apply_txpower(struct ath_h channel = chan->chan; chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER); new_pwr = min_t(int, chan_pwr, reg->power_limit); diff --git a/package/kernel/mac80211/patches/ath/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch b/package/kernel/mac80211/patches/ath/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch index 363e9aa9a3..4b458f74ab 100644 --- a/package/kernel/mac80211/patches/ath/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch +++ b/package/kernel/mac80211/patches/ath/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -2981,6 +2981,10 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2982,6 +2982,10 @@ void ath9k_hw_apply_txpower(struct ath_h if (ant_gain > max_gain) ant_reduction = ant_gain - max_gain; diff --git a/package/kernel/mac80211/patches/ath/381-ath9k-fix-tx99-with-monitor-mode-interface.patch b/package/kernel/mac80211/patches/ath/381-ath9k-fix-tx99-with-monitor-mode-interface.patch deleted file mode 100644 index d5c37825fd..0000000000 --- a/package/kernel/mac80211/patches/ath/381-ath9k-fix-tx99-with-monitor-mode-interface.patch +++ /dev/null @@ -1,92 +0,0 @@ -From: Felix Fietkau <nbd@nbd.name> -Date: Mon, 20 Aug 2018 11:35:05 +0200 -Subject: [PATCH] ath9k: fix tx99 with monitor mode interface - -Tx99 is typically configured via a monitor mode interface, which does -not get added to the driver as a vif. Since the code currently expects -a configured virtual interface for tx99, enabling tx99 via debugfs fails. -Since the vif is not needed anyway, remove all checks for it. - -Signed-off-by: Felix Fietkau <nbd@nbd.name> ---- - ---- a/drivers/net/wireless/ath/ath9k/ath9k.h -+++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -1074,7 +1074,6 @@ struct ath_softc { - - struct ath_spec_scan_priv spec_priv; - -- struct ieee80211_vif *tx99_vif; - struct sk_buff *tx99_skb; - bool tx99_state; - s16 tx99_power; ---- a/drivers/net/wireless/ath/ath9k/main.c -+++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -1251,15 +1251,10 @@ static int ath9k_add_interface(struct ie - struct ath_vif *avp = (void *)vif->drv_priv; - struct ath_node *an = &avp->mcast_node; - -- mutex_lock(&sc->mutex); -+ if (IS_ENABLED(CPTCFG_ATH9K_TX99)) -+ return -EOPNOTSUPP; - -- if (IS_ENABLED(CPTCFG_ATH9K_TX99)) { -- if (sc->cur_chan->nvifs >= 1) { -- mutex_unlock(&sc->mutex); -- return -EOPNOTSUPP; -- } -- sc->tx99_vif = vif; -- } -+ mutex_lock(&sc->mutex); - - ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); - sc->cur_chan->nvifs++; -@@ -1342,7 +1337,6 @@ static void ath9k_remove_interface(struc - ath9k_p2p_remove_vif(sc, vif); - - sc->cur_chan->nvifs--; -- sc->tx99_vif = NULL; - if (!ath9k_is_chanctx_enabled()) - list_del(&avp->list); - ---- a/drivers/net/wireless/ath/ath9k/tx99.c -+++ b/drivers/net/wireless/ath/ath9k/tx99.c -@@ -54,12 +54,6 @@ static struct sk_buff *ath9k_build_tx99_ - struct ieee80211_hdr *hdr; - struct ieee80211_tx_info *tx_info; - struct sk_buff *skb; -- struct ath_vif *avp; -- -- if (!sc->tx99_vif) -- return NULL; -- -- avp = (struct ath_vif *)sc->tx99_vif->drv_priv; - - skb = alloc_skb(len, GFP_KERNEL); - if (!skb) -@@ -77,14 +71,11 @@ static struct sk_buff *ath9k_build_tx99_ - memcpy(hdr->addr2, hw->wiphy->perm_addr, ETH_ALEN); - memcpy(hdr->addr3, hw->wiphy->perm_addr, ETH_ALEN); - -- hdr->seq_ctrl |= cpu_to_le16(avp->seq_no); -- - tx_info = IEEE80211_SKB_CB(skb); - memset(tx_info, 0, sizeof(*tx_info)); - rate = &tx_info->control.rates[0]; - tx_info->band = sc->cur_chan->chandef.chan->band; - tx_info->flags = IEEE80211_TX_CTL_NO_ACK; -- tx_info->control.vif = sc->tx99_vif; - rate->count = 1; - if (ah->curchan && IS_CHAN_HT(ah->curchan)) { - rate->flags |= IEEE80211_TX_RC_MCS; ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -2974,7 +2974,7 @@ int ath9k_tx99_send(struct ath_softc *sc - return -EINVAL; - } - -- ath_set_rates(sc->tx99_vif, NULL, bf); -+ ath_set_rates(NULL, NULL, bf); - - ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, bf->bf_daddr); - ath9k_hw_tx99_start(sc->sc_ah, txctl->txq->axq_qnum); diff --git a/package/kernel/mac80211/patches/ath/395-ath9k-add-back-support-for-using-active-monitor-inte.patch b/package/kernel/mac80211/patches/ath/395-ath9k-add-back-support-for-using-active-monitor-inte.patch deleted file mode 100644 index 7f30de9862..0000000000 --- a/package/kernel/mac80211/patches/ath/395-ath9k-add-back-support-for-using-active-monitor-inte.patch +++ /dev/null @@ -1,96 +0,0 @@ -From: Felix Fietkau <nbd@nbd.name> -Date: Sat, 22 Sep 2018 15:20:50 +0200 -Subject: [PATCH] ath9k: add back support for using active monitor interfaces - for tx99 - -Various documented examples on how to set up tx99 with ath9k rely -on setting up a regular monitor interface for setting the channel. -My previous patch "ath9k: fix tx99 with monitor mode interface" made -it possible to set it up this way again. However, it was removing support -for using an active monitor interface, which is required for controlling -the bitrate as well, since the bitrate is not passed down with a regular -monitor interface. - -This patch partially reverts the previous one, but keeps support for using -a regular monitor interface to keep documented steps working in cases -where the bitrate does not matter - -Fixes: d9c52fd17cb48 ("ath9k: fix tx99 with monitor mode interface") -Signed-off-by: Felix Fietkau <nbd@nbd.name> ---- - ---- a/drivers/net/wireless/ath/ath9k/ath9k.h -+++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -1074,6 +1074,7 @@ struct ath_softc { - - struct ath_spec_scan_priv spec_priv; - -+ struct ieee80211_vif *tx99_vif; - struct sk_buff *tx99_skb; - bool tx99_state; - s16 tx99_power; ---- a/drivers/net/wireless/ath/ath9k/main.c -+++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -1251,8 +1251,13 @@ static int ath9k_add_interface(struct ie - struct ath_vif *avp = (void *)vif->drv_priv; - struct ath_node *an = &avp->mcast_node; - -- if (IS_ENABLED(CPTCFG_ATH9K_TX99)) -- return -EOPNOTSUPP; -+ if (IS_ENABLED(CPTCFG_ATH9K_TX99)) { -+ if (sc->cur_chan->nvifs >= 1) { -+ mutex_unlock(&sc->mutex); -+ return -EOPNOTSUPP; -+ } -+ sc->tx99_vif = vif; -+ } - - mutex_lock(&sc->mutex); - -@@ -1337,6 +1342,7 @@ static void ath9k_remove_interface(struc - ath9k_p2p_remove_vif(sc, vif); - - sc->cur_chan->nvifs--; -+ sc->tx99_vif = NULL; - if (!ath9k_is_chanctx_enabled()) - list_del(&avp->list); - ---- a/drivers/net/wireless/ath/ath9k/tx99.c -+++ b/drivers/net/wireless/ath/ath9k/tx99.c -@@ -54,6 +54,7 @@ static struct sk_buff *ath9k_build_tx99_ - struct ieee80211_hdr *hdr; - struct ieee80211_tx_info *tx_info; - struct sk_buff *skb; -+ struct ath_vif *avp; - - skb = alloc_skb(len, GFP_KERNEL); - if (!skb) -@@ -71,11 +72,17 @@ static struct sk_buff *ath9k_build_tx99_ - memcpy(hdr->addr2, hw->wiphy->perm_addr, ETH_ALEN); - memcpy(hdr->addr3, hw->wiphy->perm_addr, ETH_ALEN); - -+ if (sc->tx99_vif) { -+ avp = (struct ath_vif *) sc->tx99_vif->drv_priv; -+ hdr->seq_ctrl |= cpu_to_le16(avp->seq_no); -+ } -+ - tx_info = IEEE80211_SKB_CB(skb); - memset(tx_info, 0, sizeof(*tx_info)); - rate = &tx_info->control.rates[0]; - tx_info->band = sc->cur_chan->chandef.chan->band; - tx_info->flags = IEEE80211_TX_CTL_NO_ACK; -+ tx_info->control.vif = sc->tx99_vif; - rate->count = 1; - if (ah->curchan && IS_CHAN_HT(ah->curchan)) { - rate->flags |= IEEE80211_TX_RC_MCS; ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -2974,7 +2974,7 @@ int ath9k_tx99_send(struct ath_softc *sc - return -EINVAL; - } - -- ath_set_rates(NULL, NULL, bf); -+ ath_set_rates(sc->tx99_vif, NULL, bf); - - ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, bf->bf_daddr); - ath9k_hw_tx99_start(sc->sc_ah, txctl->txq->axq_qnum); diff --git a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch index 03c12df1a8..cae3c5c0dd 100644 --- a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch +++ b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch @@ -70,7 +70,7 @@ --- a/drivers/net/wireless/ath/Kconfig +++ b/drivers/net/wireless/ath/Kconfig -@@ -23,6 +23,9 @@ config WLAN_VENDOR_ATH +@@ -24,6 +24,9 @@ config WLAN_VENDOR_ATH if WLAN_VENDOR_ATH diff --git a/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch b/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch index ec95206acb..e4d1a6daab 100644 --- a/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch +++ b/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch @@ -1,6 +1,6 @@ --- a/net/wireless/reg.c +++ b/net/wireless/reg.c -@@ -2982,6 +2982,8 @@ void regulatory_hint_country_ie(struct w +@@ -3032,6 +3032,8 @@ void regulatory_hint_country_ie(struct w enum environment_cap env = ENVIRON_ANY; struct regulatory_request *request = NULL, *lr; @@ -9,11 +9,11 @@ /* IE len must be evenly divisible by 2 */ if (country_ie_len & 0x01) return; -@@ -3188,6 +3190,7 @@ static void restore_regulatory_settings( +@@ -3283,6 +3285,7 @@ static bool is_wiphy_all_set_reg_flag(en void regulatory_hint_disconnect(void) { + return; - pr_debug("All devices are disconnected, going to restore regulatory settings\n"); - restore_regulatory_settings(false); - } + /* Restore of regulatory settings is not required when wiphy(s) + * ignore IE from connected access point but clearance of beacon hints + * is required when wiphy(s) supports beacon hints. diff --git a/package/kernel/mac80211/patches/ath/405-ath_regd_us.patch b/package/kernel/mac80211/patches/ath/405-ath_regd_us.patch index 8cb7f00ff9..088833199d 100644 --- a/package/kernel/mac80211/patches/ath/405-ath_regd_us.patch +++ b/package/kernel/mac80211/patches/ath/405-ath_regd_us.patch @@ -21,6 +21,6 @@ {CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"}, {CTRY_UNITED_STATES, FCC3_FCCA, "US"}, + {CTRY_UNITED_STATES, FCC3_FCCA_2, "US"}, + {CTRY_UNITED_STATES2, FCC3_FCCA, "US"}, + {CTRY_UNITED_STATES3, FCC3_FCCA, "US"}, /* This "PS" is for US public safety actually... to support this we - * would need to assign new special alpha2 to CRDA db as with the world - * regdomain and use another alpha2 */ diff --git a/package/kernel/mac80211/patches/ath/407-regd_add_extra_country_codes.patch b/package/kernel/mac80211/patches/ath/407-regd_add_extra_country_codes.patch deleted file mode 100644 index 8f621002fe..0000000000 --- a/package/kernel/mac80211/patches/ath/407-regd_add_extra_country_codes.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Oever Gonzalez <notengobattery@gmail.com> -Date: Mon, 7 Jan 2019 01:07:12 +0200 -Subject: [PATCH] ath: regd: add extra coutry codes - -This patch adds several country codes to the regd.h and regd_common.h -files in order to support devices whose country codes are not present in -the original list. Without this patch, all devices whose manufacturer -programmed any of these code in their EEPROM will not work. - -Signed-off-by: Oever Gonzalez <notengobattery@gmail.com> ---- - ---- a/drivers/net/wireless/ath/regd.h -+++ b/drivers/net/wireless/ath/regd.h -@@ -185,7 +185,9 @@ enum CountryCode { - CTRY_UKRAINE = 804, - CTRY_UNITED_KINGDOM = 826, - CTRY_UNITED_STATES = 840, -+ CTRY_UNITED_STATES2 = 841, - CTRY_UNITED_STATES_FCC49 = 842, -+ CTRY_UNITED_STATES3 = 843, - CTRY_URUGUAY = 858, - CTRY_UZBEKISTAN = 860, - CTRY_VENEZUELA = 862, ---- a/drivers/net/wireless/ath/regd_common.h -+++ b/drivers/net/wireless/ath/regd_common.h -@@ -486,6 +486,8 @@ static struct country_code_to_enum_rd al - {CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"}, - {CTRY_UNITED_STATES, FCC3_FCCA, "US"}, - {CTRY_UNITED_STATES, FCC3_FCCA_2, "US"}, -+ {CTRY_UNITED_STATES2, FCC3_FCCA, "US"}, -+ {CTRY_UNITED_STATES3, FCC3_FCCA, "US"}, - /* This "PS" is for US public safety actually... to support this we - * would need to assign new special alpha2 to CRDA db as with the world - * regdomain and use another alpha2 */ diff --git a/package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch b/package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch index 25c236b12c..bdf784968f 100644 --- a/package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch +++ b/package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -833,6 +833,7 @@ static const struct ieee80211_iface_limi +@@ -831,6 +831,7 @@ static const struct ieee80211_iface_limi BIT(NL80211_IFTYPE_AP) }, { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO) }, diff --git a/package/kernel/mac80211/patches/ath/411-ath5k_allow_adhoc_and_ap.patch b/package/kernel/mac80211/patches/ath/411-ath5k_allow_adhoc_and_ap.patch index 2a5ab3d428..9dbe047c9a 100644 --- a/package/kernel/mac80211/patches/ath/411-ath5k_allow_adhoc_and_ap.patch +++ b/package/kernel/mac80211/patches/ath/411-ath5k_allow_adhoc_and_ap.patch @@ -18,7 +18,7 @@ goto end; --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c -@@ -1965,7 +1965,7 @@ ath5k_beacon_send(struct ath5k_hw *ah) +@@ -1964,7 +1964,7 @@ ath5k_beacon_send(struct ath5k_hw *ah) } if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs + @@ -27,7 +27,7 @@ ah->opmode == NL80211_IFTYPE_MESH_POINT) { u64 tsf = ath5k_hw_get_tsf64(ah); u32 tsftu = TSF_TO_TU(tsf); -@@ -2051,7 +2051,7 @@ ath5k_beacon_update_timers(struct ath5k_ +@@ -2050,7 +2050,7 @@ ath5k_beacon_update_timers(struct ath5k_ intval = ah->bintval & AR5K_BEACON_PERIOD; if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs @@ -36,7 +36,7 @@ intval /= ATH_BCBUF; /* staggered multi-bss beacons */ if (intval < 15) ATH5K_WARN(ah, "intval %u is too low, min 15\n", -@@ -2518,6 +2518,7 @@ static const struct ieee80211_iface_limi +@@ -2516,6 +2516,7 @@ static const struct ieee80211_iface_limi BIT(NL80211_IFTYPE_MESH_POINT) | #endif BIT(NL80211_IFTYPE_AP) }, diff --git a/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch b/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch index b6dc45cd96..786a3ed3fb 100644 --- a/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch +++ b/package/kernel/mac80211/patches/ath/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 -@@ -1374,6 +1374,53 @@ void ath9k_deinit_debug(struct ath_softc +@@ -1361,6 +1361,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); -@@ -1393,6 +1440,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1380,6 +1427,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/ath/501-ath9k_ahb_init.patch b/package/kernel/mac80211/patches/ath/501-ath9k_ahb_init.patch index 5fc60dd0ae..b9c784eb25 100644 --- a/package/kernel/mac80211/patches/ath/501-ath9k_ahb_init.patch +++ b/package/kernel/mac80211/patches/ath/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 -@@ -1144,25 +1144,25 @@ static int __init ath9k_init(void) +@@ -1143,25 +1143,25 @@ static int __init ath9k_init(void) { int error; diff --git a/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch index 2d4a5688c8..80e33182f7 100644 --- a/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch +++ b/package/kernel/mac80211/patches/ath/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 -@@ -1421,6 +1421,52 @@ static const struct file_operations fops +@@ -1408,6 +1408,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); -@@ -1442,6 +1488,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1429,6 +1475,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/ath/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch index c13a72cbb0..1f19483064 100644 --- a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch +++ b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -850,6 +850,9 @@ static inline int ath9k_dump_btcoex(stru +@@ -843,6 +843,9 @@ static inline int ath9k_dump_btcoex(stru #ifdef CPTCFG_MAC80211_LEDS void ath_init_leds(struct ath_softc *sc); void ath_deinit_leds(struct ath_softc *sc); @@ -10,9 +10,9 @@ #else static inline void ath_init_leds(struct ath_softc *sc) { -@@ -991,6 +994,13 @@ void ath_ant_comb_scan(struct ath_softc - #define AIRTIME_USE_NEW_QUEUES BIT(2) - #define AIRTIME_ACTIVE(flags) (!!(flags & (AIRTIME_USE_TX|AIRTIME_USE_RX))) +@@ -979,6 +982,13 @@ void ath_ant_comb_scan(struct ath_softc + + #define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */ +struct ath_led { + struct list_head list; @@ -24,7 +24,7 @@ struct ath_softc { struct ieee80211_hw *hw; struct device *dev; -@@ -1046,9 +1056,8 @@ struct ath_softc { +@@ -1032,9 +1042,8 @@ struct ath_softc { spinlock_t chan_lock; #ifdef CPTCFG_MAC80211_LEDS @@ -181,7 +181,7 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -1056,7 +1056,7 @@ int ath9k_init_device(u16 devid, struct +@@ -1055,7 +1055,7 @@ int ath9k_init_device(u16 devid, struct #ifdef CPTCFG_MAC80211_LEDS /* must be initialized before ieee80211_register_hw */ @@ -192,7 +192,7 @@ #endif --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1466,6 +1466,61 @@ static const struct file_operations fops +@@ -1453,6 +1453,61 @@ static const struct file_operations fops .llseek = default_llseek, }; @@ -254,7 +254,7 @@ int ath9k_init_debug(struct ath_hw *ah) { -@@ -1490,6 +1545,10 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1477,6 +1532,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/ath/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch index 55896c834b..e9ba4a9483 100644 --- a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath/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 -@@ -1522,6 +1522,50 @@ static const struct file_operations fops +@@ -1509,6 +1509,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); -@@ -1549,6 +1593,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1536,6 +1580,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/ath/543-ath9k_entropy_from_adc.patch b/package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch index b0a027564a..2e44b0095f 100644 --- a/package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch +++ b/package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch @@ -55,7 +55,7 @@ ops->spectral_scan_config = ar9003_hw_spectral_scan_config; --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -821,7 +821,8 @@ static void ath9k_init_txpower_limits(st +@@ -819,7 +819,8 @@ static void ath9k_init_txpower_limits(st if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ); @@ -65,8 +65,8 @@ } static const struct ieee80211_iface_limit if_limits[] = { -@@ -1016,6 +1017,18 @@ static void ath9k_set_hw_capab(struct at - wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); +@@ -1015,6 +1016,18 @@ static void ath9k_set_hw_capab(struct at + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS); } +static void ath_get_initial_entropy(struct ath_softc *sc) @@ -84,7 +84,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, const struct ath_bus_ops *bus_ops) { -@@ -1061,6 +1074,8 @@ int ath9k_init_device(u16 devid, struct +@@ -1060,6 +1073,8 @@ int ath9k_init_device(u16 devid, struct ARRAY_SIZE(ath9k_tpt_blink)); #endif @@ -110,7 +110,7 @@ static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c -@@ -1324,9 +1324,30 @@ void ar5008_hw_init_rate_txpower(struct +@@ -1320,9 +1320,30 @@ void ar5008_hw_init_rate_txpower(struct } } @@ -141,7 +141,7 @@ static const u32 ar5416_cca_regs[6] = { AR_PHY_CCA, AR_PHY_CH1_CCA, -@@ -1341,6 +1362,8 @@ int ar5008_hw_attach_phy_ops(struct ath_ +@@ -1337,6 +1358,8 @@ int ar5008_hw_attach_phy_ops(struct ath_ if (ret) return ret; diff --git a/package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch b/package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch index 3a3f244b9d..70db82a21e 100644 --- a/package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch +++ b/package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c -@@ -953,55 +953,6 @@ static bool ar5008_hw_ani_control_new(st +@@ -949,55 +949,6 @@ static bool ar5008_hw_ani_control_new(st * on == 0 means more noise imm */ u32 on = param ? 1 : 0; diff --git a/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch b/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch index eb9eb26a74..78206d2860 100644 --- a/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch +++ b/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> #include "common.h" #include "debug.h" -@@ -1001,6 +1002,14 @@ struct ath_led { +@@ -989,6 +990,14 @@ struct ath_led { struct led_classdev cdev; }; @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> struct ath_softc { struct ieee80211_hw *hw; struct device *dev; -@@ -1058,6 +1067,9 @@ struct ath_softc { +@@ -1044,6 +1053,9 @@ struct ath_softc { #ifdef CPTCFG_MAC80211_LEDS const char *led_default_trigger; struct list_head leds; diff --git a/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch index bd71b75e76..716e09f351 100644 --- a/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch +++ b/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -1069,6 +1069,7 @@ struct ath_softc { +@@ -1055,6 +1055,7 @@ struct ath_softc { struct list_head leds; #ifdef CONFIG_GPIOLIB struct ath9k_gpio_chip *gpiochip; diff --git a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch index 30eba27137..c28054d58d 100644 --- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch @@ -396,7 +396,7 @@ ATH9K_HWRNG= --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig -@@ -59,6 +59,19 @@ config ATH9K_AHB +@@ -60,6 +60,19 @@ config ATH9K_AHB Say Y, if you have a SoC with a compatible built-in wireless MAC. Say N if unsure. diff --git a/package/kernel/mac80211/patches/ath/552-ahb_of.patch b/package/kernel/mac80211/patches/ath/552-ahb_of.patch index 08735d2871..1170fc64bd 100644 --- a/package/kernel/mac80211/patches/ath/552-ahb_of.patch +++ b/package/kernel/mac80211/patches/ath/552-ahb_of.patch @@ -318,7 +318,7 @@ #include "common.h" #include "debug.h" -@@ -1023,6 +1024,9 @@ struct ath_softc { +@@ -1011,6 +1012,9 @@ struct ath_softc { struct ath_hw *sc_ah; void __iomem *mem; int irq; diff --git a/package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch b/package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch deleted file mode 100644 index 607722cc3d..0000000000 --- a/package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch +++ /dev/null @@ -1,88 +0,0 @@ -From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> -Date: Fri, 2 Nov 2018 21:49:56 +0100 -Subject: [PATCH] ath9k: dynack: move debug log after buffer increments - -Move debug log in ath_dynack_sample_tx_ts and ath_dynack_sample_ack_ts -after timestamp buffer head/tail increments in order to make debugging -more user friendly - -Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com> -Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> ---- - ---- a/drivers/net/wireless/ath/ath9k/dynack.c -+++ b/drivers/net/wireless/ath/ath9k/dynack.c -@@ -178,11 +178,12 @@ void ath_dynack_sample_tx_ts(struct ath_ - struct ath_tx_status *ts, - struct ieee80211_sta *sta) - { -- u8 ridx; - struct ieee80211_hdr *hdr; - struct ath_dynack *da = &ah->dynack; - struct ath_common *common = ath9k_hw_common(ah); - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -+ u32 dur = ts->duration; -+ u8 ridx; - - if (!da->enabled || (info->flags & IEEE80211_TX_CTL_NO_ACK)) - return; -@@ -217,14 +218,13 @@ void ath_dynack_sample_tx_ts(struct ath_ - ridx = ts->ts_rateindex; - - da->st_rbf.ts[da->st_rbf.t_rb].tstamp = ts->ts_tstamp; -- da->st_rbf.ts[da->st_rbf.t_rb].dur = ts->duration; - ether_addr_copy(da->st_rbf.addr[da->st_rbf.t_rb].h_dest, hdr->addr1); - ether_addr_copy(da->st_rbf.addr[da->st_rbf.t_rb].h_src, hdr->addr2); - - if (!(info->status.rates[ridx].flags & IEEE80211_TX_RC_MCS)) { -- u32 phy, sifs; - const struct ieee80211_rate *rate; - struct ieee80211_tx_rate *rates = info->status.rates; -+ u32 phy; - - rate = &common->sbands[info->band].bitrates[rates[ridx].idx]; - if (info->band == NL80211_BAND_2GHZ && -@@ -233,19 +233,18 @@ void ath_dynack_sample_tx_ts(struct ath_ - else - phy = WLAN_RC_PHY_OFDM; - -- sifs = ath_dynack_get_sifs(ah, phy); -- da->st_rbf.ts[da->st_rbf.t_rb].dur -= sifs; -+ dur -= ath_dynack_get_sifs(ah, phy); - } -- -- ath_dbg(common, DYNACK, "{%pM} tx sample %u [dur %u][h %u-t %u]\n", -- hdr->addr1, da->st_rbf.ts[da->st_rbf.t_rb].tstamp, -- da->st_rbf.ts[da->st_rbf.t_rb].dur, da->st_rbf.h_rb, -- (da->st_rbf.t_rb + 1) % ATH_DYN_BUF); -+ da->st_rbf.ts[da->st_rbf.t_rb].dur = dur; - - INCR(da->st_rbf.t_rb, ATH_DYN_BUF); - if (da->st_rbf.t_rb == da->st_rbf.h_rb) - INCR(da->st_rbf.h_rb, ATH_DYN_BUF); - -+ ath_dbg(common, DYNACK, "{%pM} tx sample %u [dur %u][h %u-t %u]\n", -+ hdr->addr1, ts->ts_tstamp, dur, da->st_rbf.h_rb, -+ da->st_rbf.t_rb); -+ - ath_dynack_compute_to(ah); - - spin_unlock_bh(&da->qlock); -@@ -272,14 +271,13 @@ void ath_dynack_sample_ack_ts(struct ath - spin_lock_bh(&da->qlock); - da->ack_rbf.tstamp[da->ack_rbf.t_rb] = ts; - -- ath_dbg(common, DYNACK, "rx sample %u [h %u-t %u]\n", -- da->ack_rbf.tstamp[da->ack_rbf.t_rb], -- da->ack_rbf.h_rb, (da->ack_rbf.t_rb + 1) % ATH_DYN_BUF); -- - INCR(da->ack_rbf.t_rb, ATH_DYN_BUF); - if (da->ack_rbf.t_rb == da->ack_rbf.h_rb) - INCR(da->ack_rbf.h_rb, ATH_DYN_BUF); - -+ ath_dbg(common, DYNACK, "rx sample %u [h %u-t %u]\n", -+ ts, da->ack_rbf.h_rb, da->ack_rbf.t_rb); -+ - ath_dynack_compute_to(ah); - - spin_unlock_bh(&da->qlock); diff --git a/package/kernel/mac80211/patches/ath/557-ath9k-dynack-remove-experimental-tag.patch b/package/kernel/mac80211/patches/ath/557-ath9k-dynack-remove-experimental-tag.patch deleted file mode 100644 index 2e4cffd1fa..0000000000 --- a/package/kernel/mac80211/patches/ath/557-ath9k-dynack-remove-experimental-tag.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> -Date: Fri, 2 Nov 2018 21:49:59 +0100 -Subject: [PATCH] ath9k: dynack: remove 'experimental' tag - -Remove experimental tag from dynack Kconfig entry since it has -been tested on outdoor 25Km links - -Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com> -Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> ---- - ---- a/drivers/net/wireless/ath/ath9k/Kconfig -+++ b/drivers/net/wireless/ath/ath9k/Kconfig -@@ -132,7 +132,7 @@ config ATH9K_DFS_CERTIFIED - except increase code size. - - config ATH9K_DYNACK -- bool "Atheros ath9k ACK timeout estimation algorithm (EXPERIMENTAL)" -+ bool "Atheros ath9k ACK timeout estimation algorithm" - depends on ATH9K - default n - ---help--- diff --git a/package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch b/package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch index 47ecc9c655..3a16b08a44 100644 --- a/package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch +++ b/package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch @@ -14,8 +14,8 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com> --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -2720,6 +2720,16 @@ int ath10k_core_register(struct ath10k * - ar->chip_id = chip_id; +@@ -3003,6 +3003,16 @@ int ath10k_core_register(struct ath10k * + queue_work(ar->workqueue, &ar->register_work); + /* OpenWrt requires all PHYs to be initialized to create the diff --git a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch index 3fd6bca819..352a49c4c3 100644 --- a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/ath/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 -@@ -8282,6 +8282,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -8483,6 +8483,21 @@ static int ath10k_mac_init_rd(struct ath return 0; } @@ -22,9 +22,9 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -8571,6 +8586,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -8806,6 +8821,12 @@ int ath10k_mac_register(struct ath10k *a - wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); + ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; +#ifdef CPTCFG_MAC80211_LEDS + ieee80211_create_tpt_led_trigger(ar->hw, diff --git a/package/kernel/mac80211/patches/ath/960-0010-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/mac80211/patches/ath/960-0010-ath10k-limit-htt-rx-ring-size.patch index 810e97a783..05fce6a168 100644 --- a/package/kernel/mac80211/patches/ath/960-0010-ath10k-limit-htt-rx-ring-size.patch +++ b/package/kernel/mac80211/patches/ath/960-0010-ath10k-limit-htt-rx-ring-size.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/htt.h +++ b/drivers/net/wireless/ath/ath10k/htt.h -@@ -238,7 +238,7 @@ enum htt_rx_ring_flags { +@@ -226,7 +226,7 @@ enum htt_rx_ring_flags { }; #define HTT_RX_RING_SIZE_MIN 128 diff --git a/package/kernel/mac80211/patches/ath/960-0011-ath10k-limit-pci-buffer-size.patch b/package/kernel/mac80211/patches/ath/960-0011-ath10k-limit-pci-buffer-size.patch index 283f4d819f..0c25fb3f04 100644 --- a/package/kernel/mac80211/patches/ath/960-0011-ath10k-limit-pci-buffer-size.patch +++ b/package/kernel/mac80211/patches/ath/960-0011-ath10k-limit-pci-buffer-size.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c -@@ -142,7 +142,7 @@ static struct ce_attr host_ce_config_wla +@@ -131,7 +131,7 @@ static struct ce_attr host_ce_config_wla .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, @@ -9,7 +9,7 @@ .recv_cb = ath10k_pci_htt_htc_rx_cb, }, -@@ -151,7 +151,7 @@ static struct ce_attr host_ce_config_wla +@@ -140,7 +140,7 @@ static struct ce_attr host_ce_config_wla .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, @@ -18,7 +18,7 @@ .recv_cb = ath10k_pci_htc_rx_cb, }, -@@ -178,7 +178,7 @@ static struct ce_attr host_ce_config_wla +@@ -167,7 +167,7 @@ static struct ce_attr host_ce_config_wla .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 512, @@ -27,7 +27,7 @@ .recv_cb = ath10k_pci_htt_rx_cb, }, -@@ -203,7 +203,7 @@ static struct ce_attr host_ce_config_wla +@@ -192,7 +192,7 @@ static struct ce_attr host_ce_config_wla .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, diff --git a/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch b/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch index d8f6887cd0..df4223fcb8 100644 --- a/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch +++ b/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch @@ -23,7 +23,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling 3 files changed, 52 insertions(+), 23 deletions(-) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -2469,7 +2469,7 @@ static void ath10k_peer_assoc_h_vht(stru +@@ -2475,7 +2475,7 @@ static void ath10k_peer_assoc_h_vht(stru const u16 *vht_mcs_mask; u8 ampdu_factor; u8 max_nss, vht_mcs; @@ -32,7 +32,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) return; -@@ -2529,23 +2529,45 @@ static void ath10k_peer_assoc_h_vht(stru +@@ -2535,23 +2535,45 @@ static void ath10k_peer_assoc_h_vht(stru __le16_to_cpu(vht_cap->vht_mcs.tx_highest); arg->peer_vht_rates.tx_mcs_set = ath10k_peer_assoc_h_vht_limit( __le16_to_cpu(vht_cap->vht_mcs.tx_mcs_map), vht_mcs_mask); @@ -92,7 +92,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling } static void ath10k_peer_assoc_h_qos(struct ath10k *ar, -@@ -2697,9 +2719,9 @@ static int ath10k_peer_assoc_prepare(str +@@ -2703,9 +2725,9 @@ static int ath10k_peer_assoc_prepare(str ath10k_peer_assoc_h_crypto(ar, vif, sta, arg); ath10k_peer_assoc_h_rates(ar, vif, sta, arg); ath10k_peer_assoc_h_ht(ar, vif, sta, arg); @@ -105,7 +105,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling } --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -7357,12 +7357,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a +@@ -7552,12 +7552,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf; ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg); @@ -121,7 +121,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling static int --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h -@@ -6357,7 +6357,19 @@ struct wmi_10_2_peer_assoc_complete_cmd +@@ -6468,7 +6468,19 @@ struct wmi_10_2_peer_assoc_complete_cmd __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */ } __packed; diff --git a/package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch b/package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch index 9a7c749cb1..2863e4b4b6 100644 --- a/package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch +++ b/package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch @@ -13,7 +13,7 @@ v2: fix trailing whitespace issue and fix some typos within the commit note 2 files changed, 8 insertions(+), 10 deletions(-) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -4473,13 +4473,6 @@ static struct ieee80211_sta_vht_cap ath1 +@@ -4533,13 +4533,6 @@ static struct ieee80211_sta_vht_cap ath1 vht_cap.cap |= val; } @@ -29,7 +29,7 @@ v2: fix trailing whitespace issue and fix some typos within the commit note if ((i < ar->num_rf_chains) && (ar->cfg_tx_chainmask & BIT(i))) --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -1677,13 +1677,18 @@ void ath10k_wmi_put_wmi_channel(struct w +@@ -1700,13 +1700,18 @@ void ath10k_wmi_put_wmi_channel(struct w flags |= WMI_CHAN_FLAG_HT40_PLUS; if (arg->chan_radar) flags |= WMI_CHAN_FLAG_DFS; diff --git a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index 50ed63b065..1fd255b121 100644 --- a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -85,7 +85,7 @@ v13: create mode 100644 drivers/net/wireless/ath/ath10k/leds.h --- a/drivers/net/wireless/ath/ath10k/Kconfig +++ b/drivers/net/wireless/ath/ath10k/Kconfig -@@ -69,6 +69,16 @@ config ATH10K_DEBUGFS +@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS If unsure, say Y to make it easier to debug problems. @@ -124,7 +124,7 @@ v13: WCN36XX= --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -34,6 +34,7 @@ +@@ -24,6 +24,7 @@ #include "testmode.h" #include "wmi-ops.h" #include "coredump.h" @@ -132,47 +132,47 @@ v13: unsigned int ath10k_debug_mask; static unsigned int ath10k_cryptmode_param; -@@ -64,6 +65,7 @@ static const struct ath10k_hw_params ath - .id = QCA988X_HW_2_0_VERSION, +@@ -55,6 +56,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA988X_2_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, .name = "qca988x hw2.0", + .led_pin = 1, .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -129,6 +131,7 @@ static const struct ath10k_hw_params ath - .id = QCA9887_HW_1_0_VERSION, +@@ -123,6 +125,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9887_1_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, .name = "qca9887 hw1.0", + .led_pin = 1, .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -293,6 +296,7 @@ static const struct ath10k_hw_params ath - .id = QCA99X0_HW_2_0_DEV_VERSION, +@@ -297,6 +300,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA99X0_2_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, .name = "qca99x0 hw2.0", + .led_pin = 17, .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .otp_exe_param = 0x00000700, -@@ -331,6 +335,7 @@ static const struct ath10k_hw_params ath - .id = QCA9984_HW_1_0_DEV_VERSION, +@@ -337,6 +341,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9984_1_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, .name = "qca9984/qca9994 hw1.0", + .led_pin = 17, .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -374,6 +379,7 @@ static const struct ath10k_hw_params ath - .id = QCA9888_HW_2_0_DEV_VERSION, +@@ -384,6 +389,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9888_2_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, .name = "qca9888 hw2.0", + .led_pin = 17, .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -2441,6 +2447,10 @@ int ath10k_core_start(struct ath10k *ar, +@@ -2720,6 +2726,10 @@ int ath10k_core_start(struct ath10k *ar, if (status) goto err_hif_stop; @@ -183,7 +183,7 @@ v13: return 0; err_hif_stop: -@@ -2695,9 +2705,18 @@ static void ath10k_core_register_work(st +@@ -2976,9 +2986,18 @@ static void ath10k_core_register_work(st goto err_spectral_destroy; } @@ -202,7 +202,7 @@ v13: err_spectral_destroy: ath10k_spectral_destroy(ar); err_debug_destroy: -@@ -2741,6 +2760,8 @@ void ath10k_core_unregister(struct ath10 +@@ -3024,6 +3043,8 @@ void ath10k_core_unregister(struct ath10 if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) return; @@ -213,7 +213,7 @@ v13: * relayfs debugfs file cleanly. Otherwise the parent debugfs tree --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -25,6 +25,7 @@ +@@ -14,6 +14,7 @@ #include <linux/pci.h> #include <linux/uuid.h> #include <linux/time.h> @@ -221,15 +221,7 @@ v13: #include "htt.h" #include "htc.h" -@@ -908,7 +909,6 @@ struct ath10k { - u32 low_5ghz_chan; - u32 high_5ghz_chan; - bool ani_enabled; -- - bool p2p; - - struct { -@@ -1099,6 +1099,13 @@ struct ath10k { +@@ -1150,6 +1151,13 @@ struct ath10k { } testmode; struct { @@ -245,7 +237,7 @@ v13: u32 fw_warm_reset_counter; --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h -@@ -504,6 +504,7 @@ struct ath10k_hw_params { +@@ -511,6 +511,7 @@ struct ath10k_hw_params { const char *name; u32 patch_load_addr; int uart_pin; @@ -405,7 +397,7 @@ v13: +#endif /* _LEDS_H_ */ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -33,6 +33,7 @@ +@@ -23,6 +23,7 @@ #include "wmi-tlv.h" #include "wmi-ops.h" #include "wow.h" @@ -416,9 +408,9 @@ v13: --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h @@ -216,7 +216,10 @@ struct wmi_ops { - struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value); - struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar, - u32 param); + struct sk_buff *(*gen_bb_timing) + (struct ath10k *ar, + const struct wmi_bb_timing_cfg_arg *arg); + struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num, + u32 input, u32 pull_type, u32 intr_mode); @@ -426,7 +418,7 @@ v13: }; int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); -@@ -1054,6 +1057,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * +@@ -1080,6 +1083,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid); } @@ -464,7 +456,7 @@ v13: { --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c -@@ -3976,6 +3976,8 @@ static const struct wmi_ops wmi_tlv_ops +@@ -4309,6 +4309,8 @@ static const struct wmi_ops wmi_tlv_ops .gen_echo = ath10k_wmi_tlv_op_gen_echo, .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, @@ -475,7 +467,7 @@ v13: static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -7177,6 +7177,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +@@ -7372,6 +7372,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -525,7 +517,7 @@ v13: static struct sk_buff * ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, enum wmi_sta_ps_mode psmode) -@@ -8788,6 +8831,9 @@ static const struct wmi_ops wmi_ops = { +@@ -9004,6 +9047,9 @@ static const struct wmi_ops wmi_ops = { .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -535,7 +527,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -8858,6 +8904,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -9074,6 +9120,8 @@ static const struct wmi_ops wmi_10_1_ops .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -544,7 +536,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -8929,6 +8977,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -9146,6 +9194,8 @@ static const struct wmi_ops wmi_10_2_ops .gen_delba_send = ath10k_wmi_op_gen_delba_send, .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, @@ -553,16 +545,16 @@ v13: /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -8999,6 +9049,8 @@ static const struct wmi_ops wmi_10_2_4_o - .gen_pdev_enable_adaptive_cca = +@@ -9217,6 +9267,8 @@ static const struct wmi_ops wmi_10_2_4_o ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, + .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, + .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, + .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9078,6 +9130,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -9297,6 +9349,8 @@ static const struct wmi_ops wmi_10_4_ops .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, .gen_echo = ath10k_wmi_op_gen_echo, .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, @@ -573,7 +565,7 @@ v13: int ath10k_wmi_attach(struct ath10k *ar) --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h -@@ -2942,6 +2942,41 @@ enum wmi_10_4_feature_mask { +@@ -2998,6 +2998,41 @@ enum wmi_10_4_feature_mask { }; diff --git a/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch index dfe2829468..60801243fb 100644 --- a/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch @@ -16,9 +16,9 @@ Signed-off-by: Mathias Kresin <dev@kresin.me> --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -1144,6 +1144,10 @@ struct ath10k { - struct ath10k_radar_found_info last_radar_info; +@@ -1198,6 +1198,10 @@ struct ath10k { struct work_struct radar_confirmation_work; + struct ath10k_bus_params bus_param; +#ifdef CPTCFG_MAC80211_LEDS + const char *led_default_trigger; @@ -42,8 +42,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me> if (ret) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -8603,7 +8603,7 @@ int ath10k_mac_register(struct ath10k *a - wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); +@@ -8838,7 +8838,7 @@ int ath10k_mac_register(struct ath10k *a + ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS - ieee80211_create_tpt_led_trigger(ar->hw, diff --git a/package/kernel/mac80211/patches/ath/976-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch b/package/kernel/mac80211/patches/ath/976-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch deleted file mode 100644 index 260c0c7867..0000000000 --- a/package/kernel/mac80211/patches/ath/976-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch +++ /dev/null @@ -1,39 +0,0 @@ -From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001 -From: Sven Eckelmann <sven.eckelmann@openmesh.com> -Date: Mon, 30 Jul 2018 17:31:41 +0200 -Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit - -Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in -the RX and TX path. These filtered channel can in theory still be used by -the hardware but the signal strength is reduced so much that it makes no -sense. - -There is already a DT property to limit the available channels but ath10k -has to manually call this functionality to limit the currrently set wiphy -channels further. - -Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com> - -Forwarded: https://patchwork.kernel.org/patch/10549245/ ---- - drivers/net/wireless/ath/ath10k/mac.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/net/wireless/ath/ath10k/mac.c -+++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -18,6 +18,7 @@ - - #include "mac.h" - -+#include <net/cfg80211.h> - #include <net/mac80211.h> - #include <linux/etherdevice.h> - #include <linux/acpi.h> -@@ -8390,6 +8391,7 @@ int ath10k_mac_register(struct ath10k *a - ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; - } - -+ wiphy_read_of_freq_limits(ar->hw->wiphy); - ath10k_mac_setup_ht_vht_cap(ar); - - ar->hw->wiphy->interface_modes = diff --git a/package/kernel/mac80211/patches/ath/977-ath10k-add-support-for-configuring-management-packet.patch b/package/kernel/mac80211/patches/ath/977-ath10k-add-support-for-configuring-management-packet.patch deleted file mode 100644 index 4f2f64a60a..0000000000 --- a/package/kernel/mac80211/patches/ath/977-ath10k-add-support-for-configuring-management-packet.patch +++ /dev/null @@ -1,89 +0,0 @@ -From: Sriram R <srirrama@codeaurora.org> -Date: Mon, 10 Sep 2018 11:09:40 +0530 -Subject: [PATCH] ath10k: add support for configuring management packet rate - -By default the firmware uses 1Mbps and 6Mbps rate for management packets -in 2G and 5G bands respectively. But when the user selects different -basic rates from the userspace, we need to send the management -packets at the lowest basic rate selected by the user. - -This change makes use of WMI_VDEV_PARAM_MGMT_RATE param for configuring the -management packets rate to the firmware. - -Chipsets Tested : QCA988X, QCA9887, QCA9984 -FW Tested : 10.2.4-1.0-41, 10.4-3.6.104 - -Signed-off-by: Sriram R <srirrama@codeaurora.org> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> - -Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f279294e9ee22a8f306fdc8e4181cf555e6f0f70 ---- ---- a/drivers/net/wireless/ath/ath10k/mac.c -+++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -158,6 +158,22 @@ u8 ath10k_mac_bitrate_to_idx(const struc - return 0; - } - -+static int ath10k_mac_get_rate_hw_value(int bitrate) -+{ -+ int i; -+ u8 hw_value_prefix = 0; -+ -+ if (ath10k_mac_bitrate_is_cck(bitrate)) -+ hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6; -+ -+ for (i = 0; i < sizeof(ath10k_rates); i++) { -+ if (ath10k_rates[i].bitrate == bitrate) -+ return hw_value_prefix | ath10k_rates[i].hw_value; -+ } -+ -+ return -EINVAL; -+} -+ - static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss) - { - switch ((mcs_map >> (2 * nss)) & 0x3) { -@@ -5468,9 +5484,10 @@ static void ath10k_bss_info_changed(stru - struct cfg80211_chan_def def; - u32 vdev_param, pdev_param, slottime, preamble; - u16 bitrate, hw_value; -- u8 rate; -- int rateidx, ret = 0; -+ u8 rate, basic_rate_idx; -+ int rateidx, ret = 0, hw_rate_code; - enum nl80211_band band; -+ const struct ieee80211_supported_band *sband; - - mutex_lock(&ar->conf_mutex); - -@@ -5676,6 +5693,30 @@ static void ath10k_bss_info_changed(stru - arvif->vdev_id, ret); - } - -+ if (changed & BSS_CHANGED_BASIC_RATES) { -+ if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) { -+ mutex_unlock(&ar->conf_mutex); -+ return; -+ } -+ -+ sband = ar->hw->wiphy->bands[def.chan->band]; -+ basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1; -+ bitrate = sband->bitrates[basic_rate_idx].bitrate; -+ -+ hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate); -+ if (hw_rate_code < 0) { -+ ath10k_warn(ar, "bitrate not supported %d\n", bitrate); -+ mutex_unlock(&ar->conf_mutex); -+ return; -+ } -+ -+ vdev_param = ar->wmi.vdev_param->mgmt_rate; -+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -+ hw_rate_code); -+ if (ret) -+ ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret); -+ } -+ - mutex_unlock(&ar->conf_mutex); - } - diff --git a/package/kernel/mac80211/patches/ath/978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch b/package/kernel/mac80211/patches/ath/978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch deleted file mode 100644 index b82b16a92b..0000000000 --- a/package/kernel/mac80211/patches/ath/978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Sriram R <srirrama@codeaurora.org> -Date: Wed, 3 Oct 2018 08:43:50 +0530 -Subject: [PATCH] ath10k: fix possible out of bound access of ath10k_rates array - -While using 'ath10k_mac_get_rate_hw_value()' to obtain the hw value -from the passed bitrate, there is a chance of out of bound array access -when wrong bitrate is passed. This is fixed by comparing the bitrates -within the correct size of the ath10k_rates array. - -Fixes commit f279294e9ee2 ("ath10k: add support for configuring management -packet rate"). Also correction made to some indents used in the above commit. - -Signed-off-by: Sriram R <srirrama@codeaurora.org> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> - -Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e141eea7dd8525dd1ef7a925459e455b4d307f ---- ---- a/drivers/net/wireless/ath/ath10k/mac.c -+++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -166,7 +166,7 @@ static int ath10k_mac_get_rate_hw_value( - if (ath10k_mac_bitrate_is_cck(bitrate)) - hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6; - -- for (i = 0; i < sizeof(ath10k_rates); i++) { -+ for (i = 0; i < ARRAY_SIZE(ath10k_rates); i++) { - if (ath10k_rates[i].bitrate == bitrate) - return hw_value_prefix | ath10k_rates[i].hw_value; - } -@@ -5699,22 +5699,22 @@ static void ath10k_bss_info_changed(stru - return; - } - -- sband = ar->hw->wiphy->bands[def.chan->band]; -- basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1; -- bitrate = sband->bitrates[basic_rate_idx].bitrate; -- -- hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate); -- if (hw_rate_code < 0) { -- ath10k_warn(ar, "bitrate not supported %d\n", bitrate); -- mutex_unlock(&ar->conf_mutex); -- return; -- } -+ sband = ar->hw->wiphy->bands[def.chan->band]; -+ basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1; -+ bitrate = sband->bitrates[basic_rate_idx].bitrate; -+ -+ hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate); -+ if (hw_rate_code < 0) { -+ ath10k_warn(ar, "bitrate not supported %d\n", bitrate); -+ mutex_unlock(&ar->conf_mutex); -+ return; -+ } - -- vdev_param = ar->wmi.vdev_param->mgmt_rate; -- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -- hw_rate_code); -- if (ret) -- ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret); -+ vdev_param = ar->wmi.vdev_param->mgmt_rate; -+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -+ hw_rate_code); -+ if (ret) -+ ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret); - } - - mutex_unlock(&ar->conf_mutex); diff --git a/package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch b/package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch index 8695b7e094..0c98be2ada 100644 --- a/package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch +++ b/package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch @@ -17,7 +17,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -5484,8 +5484,8 @@ static void ath10k_bss_info_changed(stru +@@ -5604,8 +5604,8 @@ static void ath10k_bss_info_changed(stru struct cfg80211_chan_def def; u32 vdev_param, pdev_param, slottime, preamble; u16 bitrate, hw_value; @@ -28,9 +28,9 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/ enum nl80211_band band; const struct ieee80211_supported_band *sband; -@@ -5658,7 +5658,11 @@ static void ath10k_bss_info_changed(stru +@@ -5792,7 +5792,11 @@ static void ath10k_bss_info_changed(stru if (changed & BSS_CHANGED_MCAST_RATE && - !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) { + !ath10k_mac_vif_chan(arvif->vif, &def)) { band = def.chan->band; - rateidx = vif->bss_conf.mcast_rate[band] - 1; + mcast_rate = vif->bss_conf.mcast_rate[band]; diff --git a/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch b/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch index 9cd23ce1b7..49f6057799 100644 --- a/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch +++ b/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch @@ -20,7 +20,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -1020,7 +1020,7 @@ static int ath10k_monitor_vdev_start(str +@@ -1009,7 +1009,7 @@ static int ath10k_monitor_vdev_start(str arg.channel.min_power = 0; arg.channel.max_power = channel->max_power * 2; arg.channel.max_reg_power = channel->max_reg_power * 2; @@ -29,7 +29,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/ reinit_completion(&ar->vdev_setup_done); -@@ -1462,7 +1462,7 @@ static int ath10k_vdev_start_restart(str +@@ -1451,7 +1451,7 @@ static int ath10k_vdev_start_restart(str arg.channel.min_power = 0; arg.channel.max_power = chandef->chan->max_power * 2; arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; @@ -38,7 +38,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/ if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { arg.ssid = arvif->u.ap.ssid; -@@ -3139,7 +3139,7 @@ static int ath10k_update_channel_list(st +@@ -3128,7 +3128,7 @@ static int ath10k_update_channel_list(st ch->min_power = 0; ch->max_power = channel->max_power * 2; ch->max_reg_power = channel->max_reg_power * 2; diff --git a/package/kernel/mac80211/patches/ath/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch b/package/kernel/mac80211/patches/ath/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch index 07247a0577..bea5eaa7ae 100644 --- a/package/kernel/mac80211/patches/ath/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch +++ b/package/kernel/mac80211/patches/ath/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch @@ -28,8 +28,8 @@ Forwarded: no --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -988,6 +988,40 @@ static inline int ath10k_vdev_setup_sync - return 0; +@@ -977,6 +977,40 @@ static inline int ath10k_vdev_setup_sync + return ar->last_wmi_vdev_start_status; } +static u32 ath10k_get_max_antenna_gain(struct ath10k *ar, @@ -69,7 +69,7 @@ Forwarded: no static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id) { struct cfg80211_chan_def *chandef = NULL; -@@ -1020,7 +1054,8 @@ static int ath10k_monitor_vdev_start(str +@@ -1009,7 +1043,8 @@ static int ath10k_monitor_vdev_start(str arg.channel.min_power = 0; arg.channel.max_power = channel->max_power * 2; arg.channel.max_reg_power = channel->max_reg_power * 2; @@ -79,7 +79,7 @@ Forwarded: no reinit_completion(&ar->vdev_setup_done); -@@ -1462,7 +1497,8 @@ static int ath10k_vdev_start_restart(str +@@ -1451,7 +1486,8 @@ static int ath10k_vdev_start_restart(str arg.channel.min_power = 0; arg.channel.max_power = chandef->chan->max_power * 2; arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; @@ -89,7 +89,7 @@ Forwarded: no if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { arg.ssid = arvif->u.ap.ssid; -@@ -3139,7 +3175,8 @@ static int ath10k_update_channel_list(st +@@ -3128,7 +3164,8 @@ static int ath10k_update_channel_list(st ch->min_power = 0; ch->max_power = channel->max_power * 2; ch->max_reg_power = channel->max_reg_power * 2; |