From: Hauke Mehrtens Date: Fri, 15 Feb 2019 22:09:45 +0000 (+0100) Subject: mac80211: update to version 5.0.5-1 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ba5b3ce570ea3abb7a05d00fd6d4d4a32804b0e4;p=openwrt%2Fstaging%2Fhauke.git mac80211: update to version 5.0.5-1 Signed-off-by: Hauke Mehrtens --- diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 3d2adf660b..c51b47a431 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=4.20.17-1 +PKG_VERSION:=5.0.5-1 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.20.17/ -PKG_HASH:=c7efc87babef35c08251a04cb26ffd683026d1365f5bbf8226c9e22462c41592 +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.0.5/ +PKG_HASH:=9fe6eeaf2043a6eadbc5a13277b0ac62905451af55d7afaa6ac2d91a3aa8c298 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/broadcom.mk b/package/kernel/mac80211/broadcom.mk index 4b05c13dba..d2422257d9 100644 --- a/package/kernel/mac80211/broadcom.mk +++ b/package/kernel/mac80211/broadcom.mk @@ -105,7 +105,7 @@ define KernelPackage/b43 CONFIG_HW_RANDOM=y # Depend on PCI_SUPPORT to make sure we can select kmod-bcma or kmod-ssb DEPENDS += \ - @PCI_SUPPORT +kmod-mac80211 \ + @PCI_SUPPORT +kmod-mac80211 +kmod-lib-cordic \ $(if $(CONFIG_PACKAGE_B43_USE_SSB),+kmod-ssb) \ $(if $(CONFIG_PACKAGE_B43_USE_BCMA),+kmod-bcma) FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/b43/b43.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 236f3b6226..b72170e7e1 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 -@@ -87,6 +87,12 @@ config ATH10K_TRACING +@@ -86,6 +86,12 @@ config ATH10K_TRACING ---help--- Select this to ath10k use tracing infrastructure. @@ -37,7 +37,7 @@ void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature); --- a/local-symbols +++ b/local-symbols -@@ -137,6 +137,7 @@ ATH10K_SNOC= +@@ -138,6 +138,7 @@ ATH10K_SNOC= ATH10K_DEBUG= ATH10K_DEBUGFS= ATH10K_SPECTRAL= 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 --- 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/402-ath_regd_optional.patch b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch index ff48e54e94..e914f1008c 100644 --- a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch +++ b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch @@ -82,7 +82,7 @@ ---help--- --- a/local-symbols +++ b/local-symbols -@@ -81,6 +81,7 @@ ADM8211= +@@ -82,6 +82,7 @@ ADM8211= ATH_COMMON= WLAN_VENDOR_ATH= ATH_DEBUG= 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 326e9c924f..003c6cd93c 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 -@@ -2988,6 +2988,8 @@ void regulatory_hint_country_ie(struct w +@@ -2993,6 +2993,8 @@ void regulatory_hint_country_ie(struct w enum environment_cap env = ENVIRON_ANY; struct regulatory_request *request = NULL, *lr; @@ -9,7 +9,7 @@ /* IE len must be evenly divisible by 2 */ if (country_ie_len & 0x01) return; -@@ -3213,6 +3215,7 @@ static bool is_wiphy_all_set_reg_flag(en +@@ -3218,6 +3220,7 @@ static bool is_wiphy_all_set_reg_flag(en void regulatory_hint_disconnect(void) { 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 6149df0075..76a1aa9020 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 @@ -386,7 +386,7 @@ #endif /* _LINUX_ATH9K_PLATFORM_H */ --- a/local-symbols +++ b/local-symbols -@@ -108,6 +108,7 @@ ATH9K_WOW= +@@ -109,6 +109,7 @@ ATH9K_WOW= ATH9K_RFKILL= ATH9K_CHANNEL_CONTEXT= ATH9K_PCOEM= 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 -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 -Signed-off-by: Lorenzo Bianconi ---- - ---- 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 -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 -Signed-off-by: Lorenzo Bianconi ---- - ---- 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 2781f0fb50..4e6b2705f8 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,7 +14,7 @@ Signed-off-by: Sven Eckelmann --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -2978,6 +2978,16 @@ int ath10k_core_register(struct ath10k * +@@ -2981,6 +2981,16 @@ int ath10k_core_register(struct ath10k * ar->dev_type = bus_params->dev_type; queue_work(ar->workqueue, &ar->register_work); 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 7e43e40e33..4549514fd4 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 -@@ -8383,6 +8383,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -8414,6 +8414,21 @@ static int ath10k_mac_init_rd(struct ath return 0; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -8695,6 +8710,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -8726,6 +8741,12 @@ int ath10k_mac_register(struct ath10k *a wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 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 ef66955a87..3cbd2f04b7 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 -@@ -2485,7 +2485,7 @@ static void ath10k_peer_assoc_h_vht(stru +@@ -2486,7 +2486,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; -@@ -2545,23 +2545,45 @@ static void ath10k_peer_assoc_h_vht(stru +@@ -2546,23 +2546,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, -@@ -2713,9 +2735,9 @@ static int ath10k_peer_assoc_prepare(str +@@ -2714,9 +2736,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 -@@ -7416,12 +7416,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a +@@ -7475,12 +7475,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 -@@ -6387,7 +6387,19 @@ struct wmi_10_2_peer_assoc_complete_cmd +@@ -6417,7 +6417,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 688087ac4c..3805ced22b 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 -@@ -4489,13 +4489,6 @@ static struct ieee80211_sta_vht_cap ath1 +@@ -4490,13 +4490,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 -@@ -1678,13 +1678,18 @@ void ath10k_wmi_put_wmi_channel(struct w +@@ -1683,13 +1683,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 8a43ff9f30..d1026ad708 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 -@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS +@@ -70,6 +70,16 @@ config ATH10K_DEBUGFS If unsure, say Y to make it easier to debug problems. @@ -114,7 +114,7 @@ v13: ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o --- a/local-symbols +++ b/local-symbols -@@ -140,6 +140,7 @@ ATH10K_DEBUG= +@@ -141,6 +141,7 @@ ATH10K_DEBUG= ATH10K_DEBUGFS= ATH10K_SPECTRAL= ATH10K_THERMAL= @@ -172,7 +172,7 @@ v13: .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -2695,6 +2701,10 @@ int ath10k_core_start(struct ath10k *ar, +@@ -2698,6 +2704,10 @@ int ath10k_core_start(struct ath10k *ar, if (status) goto err_hif_stop; @@ -183,7 +183,7 @@ v13: return 0; err_hif_stop: -@@ -2951,9 +2961,18 @@ static void ath10k_core_register_work(st +@@ -2954,9 +2964,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: -@@ -2999,6 +3018,8 @@ void ath10k_core_unregister(struct ath10 +@@ -3002,6 +3021,8 @@ void ath10k_core_unregister(struct ath10 if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) return; @@ -221,7 +221,7 @@ v13: #include "htt.h" #include "htc.h" -@@ -1147,6 +1148,13 @@ struct ath10k { +@@ -1153,6 +1154,13 @@ struct ath10k { } testmode; struct { @@ -397,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 @@ +@@ -34,6 +34,7 @@ #include "wmi-tlv.h" #include "wmi-ops.h" #include "wow.h" @@ -407,10 +407,10 @@ v13: /* Rates */ --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h -@@ -219,7 +219,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); +@@ -222,7 +222,10 @@ struct wmi_ops { + 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); @@ -418,7 +418,7 @@ v13: }; int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); -@@ -1057,6 +1060,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * +@@ -1060,6 +1063,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid); } @@ -467,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 -@@ -7236,6 +7236,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +@@ -7295,6 +7295,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -517,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) -@@ -8847,6 +8890,9 @@ static const struct wmi_ops wmi_ops = { +@@ -8927,6 +8970,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, @@ -527,7 +527,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -8917,6 +8963,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -8997,6 +9043,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, @@ -536,7 +536,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -8988,6 +9036,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -9068,6 +9116,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, @@ -545,16 +545,16 @@ v13: /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -9058,6 +9108,8 @@ static const struct wmi_ops wmi_10_2_4_o - .gen_pdev_enable_adaptive_cca = +@@ -9139,6 +9189,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 */ -@@ -9137,6 +9189,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -9218,6 +9270,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, @@ -565,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 -@@ -2960,6 +2960,41 @@ enum wmi_10_4_feature_mask { +@@ -2975,6 +2975,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 fc5e7ac819..da9e2051d4 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,7 +16,7 @@ Signed-off-by: Mathias Kresin --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -1193,6 +1193,10 @@ struct ath10k { +@@ -1199,6 +1199,10 @@ struct ath10k { struct ath10k_radar_found_info last_radar_info; struct work_struct radar_confirmation_work; @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -8727,7 +8727,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -8758,7 +8758,7 @@ int ath10k_mac_register(struct ath10k *a wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); #ifdef CPTCFG_MAC80211_LEDS 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 d6ab6045a0..3b1d9f3c9c 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 -@@ -5491,8 +5491,8 @@ static void ath10k_bss_info_changed(stru +@@ -5549,8 +5549,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,7 +28,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/ enum nl80211_band band; const struct ieee80211_supported_band *sband; -@@ -5665,7 +5665,11 @@ static void ath10k_bss_info_changed(stru +@@ -5723,7 +5723,11 @@ static void ath10k_bss_info_changed(stru if (changed & BSS_CHANGED_MCAST_RATE && !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) { band = def.chan->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 0ddb818de8..9cd23ce1b7 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 -@@ -1019,7 +1019,7 @@ static int ath10k_monitor_vdev_start(str +@@ -1020,7 +1020,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); -@@ -1461,7 +1461,7 @@ static int ath10k_vdev_start_restart(str +@@ -1462,7 +1462,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; -@@ -3138,7 +3138,7 @@ static int ath10k_update_channel_list(st +@@ -3139,7 +3139,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 6e4114934e..3793cfd958 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,7 +28,7 @@ Forwarded: no --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -987,6 +987,40 @@ static inline int ath10k_vdev_setup_sync +@@ -988,6 +988,40 @@ static inline int ath10k_vdev_setup_sync return ar->last_wmi_vdev_start_status; } @@ -69,7 +69,7 @@ Forwarded: no static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id) { struct cfg80211_chan_def *chandef = NULL; -@@ -1019,7 +1053,8 @@ static int ath10k_monitor_vdev_start(str +@@ -1020,7 +1054,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); -@@ -1461,7 +1496,8 @@ static int ath10k_vdev_start_restart(str +@@ -1462,7 +1497,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; -@@ -3138,7 +3174,8 @@ static int ath10k_update_channel_list(st +@@ -3139,7 +3175,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; diff --git a/package/kernel/mac80211/patches/brcm/320-v5.0-0001-brcmfmac-Remove-firmware-loading-code-duplication.patch b/package/kernel/mac80211/patches/brcm/320-v5.0-0001-brcmfmac-Remove-firmware-loading-code-duplication.patch deleted file mode 100644 index eca15a516e..0000000000 --- a/package/kernel/mac80211/patches/brcm/320-v5.0-0001-brcmfmac-Remove-firmware-loading-code-duplication.patch +++ /dev/null @@ -1,102 +0,0 @@ -From a1a3b762163868ad07a4499a73df324f40d5ab0b Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 10 Oct 2018 13:00:58 +0200 -Subject: [PATCH] brcmfmac: Remove firmware-loading code duplication - -brcmf_fw_request_next_item and brcmf_fw_request_done both have identical -code to complete the fw-request depending on the item-type. - -This commit adds a new brcmf_fw_complete_request helper removing this code -duplication. - -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/firmware.c | 62 +++++++++++----------- - 1 file changed, 31 insertions(+), 31 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -@@ -504,6 +504,34 @@ fail: - return -ENOENT; - } - -+static int brcmf_fw_complete_request(const struct firmware *fw, -+ struct brcmf_fw *fwctx) -+{ -+ struct brcmf_fw_item *cur = &fwctx->req->items[fwctx->curpos]; -+ int ret = 0; -+ -+ brcmf_dbg(TRACE, "firmware %s %sfound\n", cur->path, fw ? "" : "not "); -+ -+ switch (cur->type) { -+ case BRCMF_FW_TYPE_NVRAM: -+ ret = brcmf_fw_request_nvram_done(fw, fwctx); -+ break; -+ case BRCMF_FW_TYPE_BINARY: -+ if (fw) -+ cur->binary = fw; -+ else -+ ret = -ENOENT; -+ break; -+ default: -+ /* something fishy here so bail out early */ -+ brcmf_err("unknown fw type: %d\n", cur->type); -+ release_firmware(fw); -+ ret = -EINVAL; -+ } -+ -+ return (cur->flags & BRCMF_FW_REQF_OPTIONAL) ? 0 : ret; -+} -+ - static int brcmf_fw_request_next_item(struct brcmf_fw *fwctx, bool async) - { - struct brcmf_fw_item *cur; -@@ -525,15 +553,7 @@ static int brcmf_fw_request_next_item(st - if (ret < 0) { - brcmf_fw_request_done(NULL, fwctx); - } else if (!async && fw) { -- brcmf_dbg(TRACE, "firmware %s %sfound\n", cur->path, -- fw ? "" : "not "); -- if (cur->type == BRCMF_FW_TYPE_BINARY) -- cur->binary = fw; -- else if (cur->type == BRCMF_FW_TYPE_NVRAM) -- brcmf_fw_request_nvram_done(fw, fwctx); -- else -- release_firmware(fw); -- -+ brcmf_fw_complete_request(fw, fwctx); - return -EAGAIN; - } - return 0; -@@ -547,28 +567,8 @@ static void brcmf_fw_request_done(const - - cur = &fwctx->req->items[fwctx->curpos]; - -- brcmf_dbg(TRACE, "enter: firmware %s %sfound\n", cur->path, -- fw ? "" : "not "); -- -- if (!fw) -- ret = -ENOENT; -- -- switch (cur->type) { -- case BRCMF_FW_TYPE_NVRAM: -- ret = brcmf_fw_request_nvram_done(fw, fwctx); -- break; -- case BRCMF_FW_TYPE_BINARY: -- cur->binary = fw; -- break; -- default: -- /* something fishy here so bail out early */ -- brcmf_err("unknown fw type: %d\n", cur->type); -- release_firmware(fw); -- ret = -EINVAL; -- goto fail; -- } -- -- if (ret < 0 && !(cur->flags & BRCMF_FW_REQF_OPTIONAL)) -+ ret = brcmf_fw_complete_request(fw, fwctx); -+ if (ret < 0) - goto fail; - - do { diff --git a/package/kernel/mac80211/patches/brcm/320-v5.0-0002-brcmfmac-Remove-recursion-from-firmware-load-error-h.patch b/package/kernel/mac80211/patches/brcm/320-v5.0-0002-brcmfmac-Remove-recursion-from-firmware-load-error-h.patch deleted file mode 100644 index 1a4a1ec348..0000000000 --- a/package/kernel/mac80211/patches/brcm/320-v5.0-0002-brcmfmac-Remove-recursion-from-firmware-load-error-h.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 5b587496dc63595b71265d986ce69728c2724370 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 10 Oct 2018 13:00:59 +0200 -Subject: [PATCH] brcmfmac: Remove recursion from firmware load error handling - -Before this commit brcmf_fw_request_done would call -brcmf_fw_request_next_item to load the next item, which on an error would -call brcmf_fw_request_done, which if the error is recoverable (*) will -then continue calling brcmf_fw_request_next_item for the next item again -which on an error will call brcmf_fw_request_done again... - -This does not blow up because we only have a limited number of items so -we never recurse too deep. But the recursion is still quite ugly and -frankly is giving me a headache, so lets fix this. - -This commit fixes this by removing brcmf_fw_request_next_item and by -making brcmf_fw_get_firmwares and brcmf_fw_request_done directly call -firmware_request_nowait resp. firmware_request themselves. - -*) brcmf_fw_request_nvram_done fallback path succeeds or - BRCMF_FW_REQF_OPTIONAL is set - -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/firmware.c | 65 +++++++--------------- - 1 file changed, 19 insertions(+), 46 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -@@ -532,33 +532,6 @@ static int brcmf_fw_complete_request(con - return (cur->flags & BRCMF_FW_REQF_OPTIONAL) ? 0 : ret; - } - --static int brcmf_fw_request_next_item(struct brcmf_fw *fwctx, bool async) --{ -- struct brcmf_fw_item *cur; -- const struct firmware *fw = NULL; -- int ret; -- -- cur = &fwctx->req->items[fwctx->curpos]; -- -- brcmf_dbg(TRACE, "%srequest for %s\n", async ? "async " : "", -- cur->path); -- -- if (async) -- ret = request_firmware_nowait(THIS_MODULE, true, cur->path, -- fwctx->dev, GFP_KERNEL, fwctx, -- brcmf_fw_request_done); -- else -- ret = request_firmware(&fw, cur->path, fwctx->dev); -- -- if (ret < 0) { -- brcmf_fw_request_done(NULL, fwctx); -- } else if (!async && fw) { -- brcmf_fw_complete_request(fw, fwctx); -- return -EAGAIN; -- } -- return 0; --} -- - static void brcmf_fw_request_done(const struct firmware *fw, void *ctx) - { - struct brcmf_fw *fwctx = ctx; -@@ -568,26 +541,19 @@ static void brcmf_fw_request_done(const - cur = &fwctx->req->items[fwctx->curpos]; - - ret = brcmf_fw_complete_request(fw, fwctx); -- if (ret < 0) -- goto fail; - -- do { -- if (++fwctx->curpos == fwctx->req->n_items) { -- ret = 0; -- goto done; -- } -- -- ret = brcmf_fw_request_next_item(fwctx, false); -- } while (ret == -EAGAIN); -- -- return; -- --fail: -- brcmf_dbg(TRACE, "failed err=%d: dev=%s, fw=%s\n", ret, -- dev_name(fwctx->dev), cur->path); -- brcmf_fw_free_request(fwctx->req); -- fwctx->req = NULL; --done: -+ while (ret == 0 && ++fwctx->curpos < fwctx->req->n_items) { -+ cur = &fwctx->req->items[fwctx->curpos]; -+ request_firmware(&fw, cur->path, fwctx->dev); -+ ret = brcmf_fw_complete_request(fw, ctx); -+ } -+ -+ if (ret) { -+ brcmf_dbg(TRACE, "failed err=%d: dev=%s, fw=%s\n", ret, -+ dev_name(fwctx->dev), cur->path); -+ brcmf_fw_free_request(fwctx->req); -+ fwctx->req = NULL; -+ } - fwctx->done(fwctx->dev, ret, fwctx->req); - kfree(fwctx); - } -@@ -611,7 +577,9 @@ int brcmf_fw_get_firmwares(struct device - void (*fw_cb)(struct device *dev, int err, - struct brcmf_fw_request *req)) - { -+ struct brcmf_fw_item *first = &req->items[0]; - struct brcmf_fw *fwctx; -+ int ret; - - brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev)); - if (!fw_cb) -@@ -628,7 +596,12 @@ int brcmf_fw_get_firmwares(struct device - fwctx->req = req; - fwctx->done = fw_cb; - -- brcmf_fw_request_next_item(fwctx, true); -+ ret = request_firmware_nowait(THIS_MODULE, true, first->path, -+ fwctx->dev, GFP_KERNEL, fwctx, -+ brcmf_fw_request_done); -+ if (ret < 0) -+ brcmf_fw_request_done(NULL, fwctx); -+ - return 0; - } - diff --git a/package/kernel/mac80211/patches/brcm/320-v5.0-0003-brcmfmac-Add-support-for-first-trying-to-get-a-board.patch b/package/kernel/mac80211/patches/brcm/320-v5.0-0003-brcmfmac-Add-support-for-first-trying-to-get-a-board.patch deleted file mode 100644 index 727dcbe85a..0000000000 --- a/package/kernel/mac80211/patches/brcm/320-v5.0-0003-brcmfmac-Add-support-for-first-trying-to-get-a-board.patch +++ /dev/null @@ -1,77 +0,0 @@ -From eae8e50669e15002b195177212a6e25afbe7cf4d Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 10 Oct 2018 13:01:00 +0200 -Subject: [PATCH] brcmfmac: Add support for first trying to get a board - specific nvram file - -The nvram files which some brcmfmac chips need are board-specific. To be -able to distribute these as part of linux-firmware, so that devices with -such a wifi chip will work OOTB, multiple (one per board) versions must -co-exist under /lib/firmware. - -This commit adds support for callers of the brcmfmac/firmware.c code to -pass in a board_type parameter through the request structure. - -If that parameter is set then the code will first try to load -chipmodel.board_type.txt before falling back to the old chipmodel.txt name. - -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/firmware.c | 27 +++++++++++++++++++++- - .../broadcom/brcm80211/brcmfmac/firmware.h | 1 + - 2 files changed, 27 insertions(+), 1 deletion(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -@@ -532,6 +532,31 @@ static int brcmf_fw_complete_request(con - return (cur->flags & BRCMF_FW_REQF_OPTIONAL) ? 0 : ret; - } - -+static int brcmf_fw_request_firmware(const struct firmware **fw, -+ struct brcmf_fw *fwctx) -+{ -+ struct brcmf_fw_item *cur = &fwctx->req->items[fwctx->curpos]; -+ int ret; -+ -+ /* nvram files are board-specific, first try a board-specific path */ -+ if (cur->type == BRCMF_FW_TYPE_NVRAM && fwctx->req->board_type) { -+ char alt_path[BRCMF_FW_NAME_LEN]; -+ -+ strlcpy(alt_path, cur->path, BRCMF_FW_NAME_LEN); -+ /* strip .txt at the end */ -+ alt_path[strlen(alt_path) - 4] = 0; -+ strlcat(alt_path, ".", BRCMF_FW_NAME_LEN); -+ strlcat(alt_path, fwctx->req->board_type, BRCMF_FW_NAME_LEN); -+ strlcat(alt_path, ".txt", BRCMF_FW_NAME_LEN); -+ -+ ret = request_firmware(fw, alt_path, fwctx->dev); -+ if (ret == 0) -+ return ret; -+ } -+ -+ return request_firmware(fw, cur->path, fwctx->dev); -+} -+ - static void brcmf_fw_request_done(const struct firmware *fw, void *ctx) - { - struct brcmf_fw *fwctx = ctx; -@@ -544,7 +569,7 @@ static void brcmf_fw_request_done(const - - while (ret == 0 && ++fwctx->curpos < fwctx->req->n_items) { - cur = &fwctx->req->items[fwctx->curpos]; -- request_firmware(&fw, cur->path, fwctx->dev); -+ brcmf_fw_request_firmware(&fw, fwctx); - ret = brcmf_fw_complete_request(fw, ctx); - } - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h -@@ -70,6 +70,7 @@ struct brcmf_fw_request { - u16 domain_nr; - u16 bus_nr; - u32 n_items; -+ const char *board_type; - struct brcmf_fw_item items[0]; - }; - diff --git a/package/kernel/mac80211/patches/brcm/320-v5.0-0004-brcmfmac-Set-board_type-used-for-nvram-file-selectio.patch b/package/kernel/mac80211/patches/brcm/320-v5.0-0004-brcmfmac-Set-board_type-used-for-nvram-file-selectio.patch deleted file mode 100644 index a33ceaa21e..0000000000 --- a/package/kernel/mac80211/patches/brcm/320-v5.0-0004-brcmfmac-Set-board_type-used-for-nvram-file-selectio.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 0ad4b55b2f29784f93875e6231bf57cd233624a2 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 10 Oct 2018 13:01:01 +0200 -Subject: [PATCH] brcmfmac: Set board_type used for nvram file selection to - machine-compatible - -For of/devicetree using machines, set the board_type used for nvram file -selection to the first string listed in the top-level's node compatible -string, aka the machine-compatible as used by of_machine_is_compatible(). - -The board_type setting is used to load the board-specific nvram file with -a board-specific name so that we can ship files for each supported board -in linux-firmware. - -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h | 1 + - drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 11 ++++++++++- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 + - drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 + - 4 files changed, 13 insertions(+), 1 deletion(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -@@ -59,6 +59,7 @@ struct brcmf_mp_device { - bool iapp; - bool ignore_probe_fail; - struct brcmfmac_pd_cc *country_codes; -+ const char *board_type; - union { - struct brcmfmac_sdio_pd sdio; - } bus; ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c -@@ -27,11 +27,20 @@ void brcmf_of_probe(struct device *dev, - struct brcmf_mp_device *settings) - { - struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio; -- struct device_node *np = dev->of_node; -+ struct device_node *root, *np = dev->of_node; -+ struct property *prop; - int irq; - u32 irqf; - u32 val; - -+ /* Set board-type to the first string of the machine compatible prop */ -+ root = of_find_node_by_path("/"); -+ if (root) { -+ prop = of_find_property(root, "compatible", NULL); -+ settings->board_type = of_prop_next_string(prop, NULL); -+ of_node_put(root); -+ } -+ - if (!np || bus_type != BRCMF_BUSTYPE_SDIO || - !of_device_is_compatible(np, "brcm,bcm4329-fmac")) - return; ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -@@ -1785,6 +1785,7 @@ brcmf_pcie_prepare_fw_request(struct brc - fwreq->items[BRCMF_PCIE_FW_CODE].type = BRCMF_FW_TYPE_BINARY; - fwreq->items[BRCMF_PCIE_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM; - fwreq->items[BRCMF_PCIE_FW_NVRAM].flags = BRCMF_FW_REQF_OPTIONAL; -+ fwreq->board_type = devinfo->settings->board_type; - /* NVRAM reserves PCI domain 0 for Broadcom's SDK faked bus */ - fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1; - fwreq->bus_nr = devinfo->pdev->bus->number; ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -4174,6 +4174,7 @@ brcmf_sdio_prepare_fw_request(struct brc - - fwreq->items[BRCMF_SDIO_FW_CODE].type = BRCMF_FW_TYPE_BINARY; - fwreq->items[BRCMF_SDIO_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM; -+ fwreq->board_type = bus->sdiodev->settings->board_type; - - return fwreq; - } diff --git a/package/kernel/mac80211/patches/brcm/320-v5.0-0005-brcmfmac-Set-board_type-from-DMI-on-x86-based-machin.patch b/package/kernel/mac80211/patches/brcm/320-v5.0-0005-brcmfmac-Set-board_type-from-DMI-on-x86-based-machin.patch deleted file mode 100644 index 25426e3f10..0000000000 --- a/package/kernel/mac80211/patches/brcm/320-v5.0-0005-brcmfmac-Set-board_type-from-DMI-on-x86-based-machin.patch +++ /dev/null @@ -1,179 +0,0 @@ -From bd1e82bb420adf4ad7cd468d8a482cde622dd69d Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 10 Oct 2018 13:01:02 +0200 -Subject: [PATCH] brcmfmac: Set board_type from DMI on x86 based machines - -For x86 based machines, set the board_type used for nvram file selection -based on the DMI sys-vendor and product-name strings. - -Since on some models these strings are too generic, this commit also adds -a quirk table overriding the strings for models listed in that table. - -The board_type setting is used to load the board-specific nvram file with -a board-specific name so that we can ship files for each supported board -in linux-firmware. - -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - .../wireless/broadcom/brcm80211/brcmfmac/Makefile | 2 + - .../wireless/broadcom/brcm80211/brcmfmac/common.c | 3 +- - .../wireless/broadcom/brcm80211/brcmfmac/common.h | 7 ++ - .../net/wireless/broadcom/brcm80211/brcmfmac/dmi.c | 116 +++++++++++++++++++++ - 4 files changed, 127 insertions(+), 1 deletion(-) - create mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile -@@ -54,3 +54,5 @@ brcmfmac-$(CPTCFG_BRCM_TRACING) += \ - tracepoint.o - brcmfmac-$(CONFIG_OF) += \ - of.o -+brcmfmac-$(CONFIG_DMI) += \ -+ dmi.o ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -@@ -448,8 +448,9 @@ struct brcmf_mp_device *brcmf_get_module - } - } - if (!found) { -- /* No platform data for this device, try OF (Open Firwmare) */ -+ /* No platform data for this device, try OF and DMI data */ - brcmf_of_probe(dev, bus_type, settings); -+ brcmf_dmi_probe(settings, chip, chiprev); - } - return settings; - } ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -@@ -75,4 +75,11 @@ void brcmf_release_module_param(struct b - /* Sets dongle media info (drv_version, mac address). */ - int brcmf_c_preinit_dcmds(struct brcmf_if *ifp); - -+#ifdef CONFIG_DMI -+void brcmf_dmi_probe(struct brcmf_mp_device *settings, u32 chip, u32 chiprev); -+#else -+static inline void -+brcmf_dmi_probe(struct brcmf_mp_device *settings, u32 chip, u32 chiprev) {} -+#endif -+ - #endif /* BRCMFMAC_COMMON_H */ ---- /dev/null -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c -@@ -0,0 +1,116 @@ -+/* -+ * Copyright 2018 Hans de Goede -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include -+#include -+#include "core.h" -+#include "common.h" -+#include "brcm_hw_ids.h" -+ -+/* The DMI data never changes so we can use a static buf for this */ -+static char dmi_board_type[128]; -+ -+struct brcmf_dmi_data { -+ u32 chip; -+ u32 chiprev; -+ const char *board_type; -+}; -+ -+/* NOTE: Please keep all entries sorted alphabetically */ -+ -+static const struct brcmf_dmi_data gpd_win_pocket_data = { -+ BRCM_CC_4356_CHIP_ID, 2, "gpd-win-pocket" -+}; -+ -+static const struct brcmf_dmi_data jumper_ezpad_mini3_data = { -+ BRCM_CC_43430_CHIP_ID, 0, "jumper-ezpad-mini3" -+}; -+ -+static const struct brcmf_dmi_data meegopad_t08_data = { -+ BRCM_CC_43340_CHIP_ID, 2, "meegopad-t08" -+}; -+ -+static const struct dmi_system_id dmi_platform_data[] = { -+ { -+ /* Match for the GPDwin which unfortunately uses somewhat -+ * generic dmi strings, which is why we test for 4 strings. -+ * Comparing against 23 other byt/cht boards, board_vendor -+ * and board_name are unique to the GPDwin, where as only one -+ * other board has the same board_serial and 3 others have -+ * the same default product_name. Also the GPDwin is the -+ * only device to have both board_ and product_name not set. -+ */ -+ .matches = { -+ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), -+ DMI_MATCH(DMI_BOARD_NAME, "Default string"), -+ DMI_MATCH(DMI_BOARD_SERIAL, "Default string"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"), -+ }, -+ .driver_data = (void *)&gpd_win_pocket_data, -+ }, -+ { -+ /* Jumper EZpad mini3 */ -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"), -+ /* jumperx.T87.KFBNEEA02 with the version-nr dropped */ -+ DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"), -+ }, -+ .driver_data = (void *)&jumper_ezpad_mini3_data, -+ }, -+ { -+ /* Meegopad T08 */ -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "Default string"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"), -+ DMI_MATCH(DMI_BOARD_NAME, "T3 MRD"), -+ DMI_MATCH(DMI_BOARD_VERSION, "V1.1"), -+ }, -+ .driver_data = (void *)&meegopad_t08_data, -+ }, -+ {} -+}; -+ -+void brcmf_dmi_probe(struct brcmf_mp_device *settings, u32 chip, u32 chiprev) -+{ -+ const struct dmi_system_id *match; -+ const struct brcmf_dmi_data *data; -+ const char *sys_vendor; -+ const char *product_name; -+ -+ /* Some models have DMI strings which are too generic, e.g. -+ * "Default string", we use a quirk table for these. -+ */ -+ for (match = dmi_first_match(dmi_platform_data); -+ match; -+ match = dmi_first_match(match + 1)) { -+ data = match->driver_data; -+ -+ if (data->chip == chip && data->chiprev == chiprev) { -+ settings->board_type = data->board_type; -+ return; -+ } -+ } -+ -+ /* Not found in the quirk-table, use sys_vendor-product_name */ -+ sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR); -+ product_name = dmi_get_system_info(DMI_PRODUCT_NAME); -+ if (sys_vendor && product_name) { -+ snprintf(dmi_board_type, sizeof(dmi_board_type), "%s-%s", -+ sys_vendor, product_name); -+ settings->board_type = dmi_board_type; -+ } -+} diff --git a/package/kernel/mac80211/patches/brcm/320-v5.0-0006-brcmfmac-Cleanup-brcmf_fw_request_done.patch b/package/kernel/mac80211/patches/brcm/320-v5.0-0006-brcmfmac-Cleanup-brcmf_fw_request_done.patch deleted file mode 100644 index 211e9e4a9f..0000000000 --- a/package/kernel/mac80211/patches/brcm/320-v5.0-0006-brcmfmac-Cleanup-brcmf_fw_request_done.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 55e491edbf14b2da5419c2a319ea3b1d6368d9a2 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 10 Oct 2018 13:01:03 +0200 -Subject: [PATCH] brcmfmac: Cleanup brcmf_fw_request_done() - -The "cur" variable is now only used for a debug print and we already -print the same info from brcmf_fw_complete_request(), so the debug print -does not provide any extra info and we can remove it. - -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -@@ -560,22 +560,16 @@ static int brcmf_fw_request_firmware(con - static void brcmf_fw_request_done(const struct firmware *fw, void *ctx) - { - struct brcmf_fw *fwctx = ctx; -- struct brcmf_fw_item *cur; -- int ret = 0; -- -- cur = &fwctx->req->items[fwctx->curpos]; -+ int ret; - - ret = brcmf_fw_complete_request(fw, fwctx); - - while (ret == 0 && ++fwctx->curpos < fwctx->req->n_items) { -- cur = &fwctx->req->items[fwctx->curpos]; - brcmf_fw_request_firmware(&fw, fwctx); - ret = brcmf_fw_complete_request(fw, ctx); - } - - if (ret) { -- brcmf_dbg(TRACE, "failed err=%d: dev=%s, fw=%s\n", ret, -- dev_name(fwctx->dev), cur->path); - brcmf_fw_free_request(fwctx->req); - fwctx->req = NULL; - } diff --git a/package/kernel/mac80211/patches/brcm/321-v5.0-0001-brcmfmac-Add-support-for-getting-nvram-contents-from.patch b/package/kernel/mac80211/patches/brcm/321-v5.0-0001-brcmfmac-Add-support-for-getting-nvram-contents-from.patch deleted file mode 100644 index 88e5c67735..0000000000 --- a/package/kernel/mac80211/patches/brcm/321-v5.0-0001-brcmfmac-Add-support-for-getting-nvram-contents-from.patch +++ /dev/null @@ -1,132 +0,0 @@ -From ce2e6db554fad444fa0b3904fc3015336e0ef765 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Thu, 11 Oct 2018 11:51:06 +0200 -Subject: [PATCH] brcmfmac: Add support for getting nvram contents from EFI - variables - -Various X86 laptops with a SDIO attached brcmfmac wifi chip, store the -nvram contents in a special EFI variable. This commit adds support for -getting nvram directly from this EFI variable, without the user needing -to manually copy it. - -This makes Wifi / Bluetooth work out of the box on these devices instead of -requiring manual setup. - -This has been tested on the following models: Acer Iconia Tab8 w1-810, -Acer One 10, Asus T100CHI, Asus T100HA, Asus T100TA, Asus T200TA and a -Lenovo Mixx 2 8. - -Tested-by: Hans de Goede -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/firmware.c | 63 +++++++++++++++++++--- - 1 file changed, 57 insertions(+), 6 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -@@ -14,6 +14,7 @@ - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#include - #include - #include - #include -@@ -445,6 +446,51 @@ struct brcmf_fw { - - static void brcmf_fw_request_done(const struct firmware *fw, void *ctx); - -+#ifdef CONFIG_EFI -+static u8 *brcmf_fw_nvram_from_efi(size_t *data_len_ret) -+{ -+ const u16 name[] = { 'n', 'v', 'r', 'a', 'm', 0 }; -+ struct efivar_entry *nvram_efivar; -+ unsigned long data_len = 0; -+ u8 *data = NULL; -+ int err; -+ -+ nvram_efivar = kzalloc(sizeof(*nvram_efivar), GFP_KERNEL); -+ if (!nvram_efivar) -+ return NULL; -+ -+ memcpy(&nvram_efivar->var.VariableName, name, sizeof(name)); -+ nvram_efivar->var.VendorGuid = EFI_GUID(0x74b00bd9, 0x805a, 0x4d61, -+ 0xb5, 0x1f, 0x43, 0x26, -+ 0x81, 0x23, 0xd1, 0x13); -+ -+ err = efivar_entry_size(nvram_efivar, &data_len); -+ if (err) -+ goto fail; -+ -+ data = kmalloc(data_len, GFP_KERNEL); -+ if (!data) -+ goto fail; -+ -+ err = efivar_entry_get(nvram_efivar, NULL, &data_len, data); -+ if (err) -+ goto fail; -+ -+ brcmf_info("Using nvram EFI variable\n"); -+ -+ kfree(nvram_efivar); -+ *data_len_ret = data_len; -+ return data; -+ -+fail: -+ kfree(data); -+ kfree(nvram_efivar); -+ return NULL; -+} -+#else -+static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; } -+#endif -+ - static void brcmf_fw_free_request(struct brcmf_fw_request *req) - { - struct brcmf_fw_item *item; -@@ -463,11 +509,12 @@ static int brcmf_fw_request_nvram_done(c - { - struct brcmf_fw *fwctx = ctx; - struct brcmf_fw_item *cur; -+ bool free_bcm47xx_nvram = false; -+ bool kfree_nvram = false; - u32 nvram_length = 0; - void *nvram = NULL; - u8 *data = NULL; - size_t data_len; -- bool raw_nvram; - - brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(fwctx->dev)); - -@@ -476,12 +523,13 @@ static int brcmf_fw_request_nvram_done(c - if (fw && fw->data) { - data = (u8 *)fw->data; - data_len = fw->size; -- raw_nvram = false; - } else { -- data = bcm47xx_nvram_get_contents(&data_len); -- if (!data && !(cur->flags & BRCMF_FW_REQF_OPTIONAL)) -+ if ((data = bcm47xx_nvram_get_contents(&data_len))) -+ free_bcm47xx_nvram = true; -+ else if ((data = brcmf_fw_nvram_from_efi(&data_len))) -+ kfree_nvram = true; -+ else if (!(cur->flags & BRCMF_FW_REQF_OPTIONAL)) - goto fail; -- raw_nvram = true; - } - - if (data) -@@ -489,8 +537,11 @@ static int brcmf_fw_request_nvram_done(c - fwctx->req->domain_nr, - fwctx->req->bus_nr); - -- if (raw_nvram) -+ if (free_bcm47xx_nvram) - bcm47xx_nvram_release_contents(data); -+ if (kfree_nvram) -+ kfree(data); -+ - release_firmware(fw); - if (!nvram && !(cur->flags & BRCMF_FW_REQF_OPTIONAL)) - goto fail; diff --git a/package/kernel/mac80211/patches/brcm/321-v5.0-0002-brcmfmac-Fix-ccode-from-EFI-nvram-when-necessary.patch b/package/kernel/mac80211/patches/brcm/321-v5.0-0002-brcmfmac-Fix-ccode-from-EFI-nvram-when-necessary.patch deleted file mode 100644 index c2fd620d6c..0000000000 --- a/package/kernel/mac80211/patches/brcm/321-v5.0-0002-brcmfmac-Fix-ccode-from-EFI-nvram-when-necessary.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 29ec3394f0bd85c22674ab6693d92da5e2324610 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Thu, 11 Oct 2018 11:51:07 +0200 -Subject: [PATCH] brcmfmac: Fix ccode from EFI nvram when necessary - -In some cases the EFI-var stored nvram contains "ccode=ALL" or "ccode=XV" -to specify "worldwide" compatible settings, but these 2 ccode-s do not work -properly. - -I've tested the different known "worldwide" ccode-s used in various nvram -sources with the latest firmwares from linux-firmware for various brcmfmac -models, here is a simplified (*) table with what each setting results in: - -ALL: 12-14 disab, U-NII-1, U-NII-2 no-IR/radar, U-NII-3 -XV: 12-14 no-IR, disables all 5G channels -XY: 12-13 enab, 14 disab, U-NII-1 enab, U-NII-2 no-IR/radar, U-NII-3 disab -X2: 12-13 no-IR, 14 dis, U-NII-1 no-IR, U-NII-2 no-IR/radar, U-NII-3 no-IR - -Where 12,13,14 are 2.4G channels 12-14 and U-NII-1/2/3 are the 3 different -5G channel groups. no-IR is no-Initiate-Radiation, we will never send on -these channels without first having received valid wifi traffic there. - -This immediately shows that both ALL and XV are not as worldwide as we want -them to be. ALL causes channels 12 and 13 to not be available and XV causes -all 5GHz channels to not be available. Also ALL unconditionally enables the -U-NII-1 and U-NII-3 5G groups, while we really should be using no-IR for -these. - -This commit replace XV and ALL with X2, which allows usage of chan 12-13 -and 5G channels, but only after receiving valid wifi traffic there first. - -Note that this configure the firmware's channel limits, the kernels own -regulatory restrictions based on e.g. regulatory info received from the -access-point, will be applied on top of this. - -This fixes channels 12+13 not working on the Asus T200TA and the Lenovo -Mixx 2 8 and 5G channels not working on the Asus T100HA. - -This has been tested on the following models: Acer Iconia Tab8 w1-810, -Acer One 10, Asus T100CHI, Asus T100HA, Asus T100TA, Asus T200TA and a -Lenovo Mixx 2 8. - -*) There are some exceptions to this table: -1) On really old firmware e.g. linux-firmware's 2011 brcmfmac4330-sdio.bin - ALL really means all, unconditionally enabling everything -2) The exact meaning might be influenced by setting the regrev nvram var. - Specifically using ccode=XV + regrev=1 on brcmfmac43241b4 leads to: - 12-14 no-ir, U-NII-1 no-ir, U-NII-2 no-ir/radar, U-NII-3 no-ir - But only on the brcmfmac43241b4 and not on e.g. the brcmfmac43340 - -Tested-by: Hans de Goede -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/firmware.c | 24 ++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -@@ -447,6 +447,29 @@ struct brcmf_fw { - static void brcmf_fw_request_done(const struct firmware *fw, void *ctx); - - #ifdef CONFIG_EFI -+/* In some cases the EFI-var stored nvram contains "ccode=ALL" or "ccode=XV" -+ * to specify "worldwide" compatible settings, but these 2 ccode-s do not work -+ * properly. "ccode=ALL" causes channels 12 and 13 to not be available, -+ * "ccode=XV" causes all 5GHz channels to not be available. So we replace both -+ * with "ccode=X2" which allows channels 12+13 and 5Ghz channels in -+ * no-Initiate-Radiation mode. This means that we will never send on these -+ * channels without first having received valid wifi traffic on the channel. -+ */ -+static void brcmf_fw_fix_efi_nvram_ccode(char *data, unsigned long data_len) -+{ -+ char *ccode; -+ -+ ccode = strnstr((char *)data, "ccode=ALL", data_len); -+ if (!ccode) -+ ccode = strnstr((char *)data, "ccode=XV\r", data_len); -+ if (!ccode) -+ return; -+ -+ ccode[6] = 'X'; -+ ccode[7] = '2'; -+ ccode[8] = '\r'; -+} -+ - static u8 *brcmf_fw_nvram_from_efi(size_t *data_len_ret) - { - const u16 name[] = { 'n', 'v', 'r', 'a', 'm', 0 }; -@@ -476,6 +499,7 @@ static u8 *brcmf_fw_nvram_from_efi(size_ - if (err) - goto fail; - -+ brcmf_fw_fix_efi_nvram_ccode(data, data_len); - brcmf_info("Using nvram EFI variable\n"); - - kfree(nvram_efivar); diff --git a/package/kernel/mac80211/patches/brcm/322-v5.0-0001-brcmfmac-fix-spelling-mistake-Retreiving-Retrieving.patch b/package/kernel/mac80211/patches/brcm/322-v5.0-0001-brcmfmac-fix-spelling-mistake-Retreiving-Retrieving.patch deleted file mode 100644 index c1aea25cba..0000000000 --- a/package/kernel/mac80211/patches/brcm/322-v5.0-0001-brcmfmac-fix-spelling-mistake-Retreiving-Retrieving.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e966a79c2f761a696dec9cfb0e2d4aa977bf78cb Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Tue, 16 Oct 2018 18:43:42 +0100 -Subject: [PATCH] brcmfmac: fix spelling mistake "Retreiving" -> "Retrieving" - -Trivial fix to spelling mistake in brcmf_err error message. - -Signed-off-by: Colin Ian King -Acked-by: Arend van Spriel -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -@@ -214,7 +214,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i - err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr, - sizeof(ifp->mac_addr)); - if (err < 0) { -- brcmf_err("Retreiving cur_etheraddr failed, %d\n", err); -+ brcmf_err("Retrieving cur_etheraddr failed, %d\n", err); - goto done; - } - memcpy(ifp->drvr->wiphy->perm_addr, ifp->drvr->mac, ETH_ALEN); -@@ -269,7 +269,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i - strcpy(buf, "ver"); - err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf)); - if (err < 0) { -- brcmf_err("Retreiving version information failed, %d\n", -+ brcmf_err("Retrieving version information failed, %d\n", - err); - goto done; - } diff --git a/package/kernel/mac80211/patches/brcm/323-v5.0-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch b/package/kernel/mac80211/patches/brcm/323-v5.0-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch deleted file mode 100644 index 566336cbc3..0000000000 --- a/package/kernel/mac80211/patches/brcm/323-v5.0-0001-brcmutil-print-invalid-chanspec-when-WARN-ing.patch +++ /dev/null @@ -1,83 +0,0 @@ -From ae5848cb4511bbbfe0306fcdbe5d9a95cd9546a9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Fri, 26 Oct 2018 13:22:32 +0200 -Subject: [PATCH] brcmutil: print invalid chanspec when WARN-ing -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -On one of my devices I got WARNINGs when brcmfmac tried to decode -chanspec. I couldn't tell if it was some unsupported format or just a -malformed value passed by a firmware. - -Print chanspec value so it's possible to debug a possible problem. - -Signed-off-by: Rafał Miłecki -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c -@@ -128,7 +128,7 @@ static void brcmu_d11n_decchspec(struct - } - break; - default: -- WARN_ON_ONCE(1); -+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec); - break; - } - -@@ -140,7 +140,7 @@ static void brcmu_d11n_decchspec(struct - ch->band = BRCMU_CHAN_BAND_2G; - break; - default: -- WARN_ON_ONCE(1); -+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec); - break; - } - } -@@ -167,7 +167,7 @@ static void brcmu_d11ac_decchspec(struct - ch->sb = BRCMU_CHAN_SB_U; - ch->control_ch_num += CH_10MHZ_APART; - } else { -- WARN_ON_ONCE(1); -+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec); - } - break; - case BRCMU_CHSPEC_D11AC_BW_80: -@@ -188,7 +188,7 @@ static void brcmu_d11ac_decchspec(struct - ch->control_ch_num += CH_30MHZ_APART; - break; - default: -- WARN_ON_ONCE(1); -+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec); - break; - } - break; -@@ -222,13 +222,13 @@ static void brcmu_d11ac_decchspec(struct - ch->control_ch_num += CH_70MHZ_APART; - break; - default: -- WARN_ON_ONCE(1); -+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec); - break; - } - break; - case BRCMU_CHSPEC_D11AC_BW_8080: - default: -- WARN_ON_ONCE(1); -+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec); - break; - } - -@@ -240,7 +240,7 @@ static void brcmu_d11ac_decchspec(struct - ch->band = BRCMU_CHAN_BAND_2G; - break; - default: -- WARN_ON_ONCE(1); -+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec); - break; - } - } diff --git a/package/kernel/mac80211/patches/brcm/325-v5.0-brcmfmac-support-STA-info-struct-v7.patch b/package/kernel/mac80211/patches/brcm/325-v5.0-brcmfmac-support-STA-info-struct-v7.patch deleted file mode 100644 index 8ff42462b0..0000000000 --- a/package/kernel/mac80211/patches/brcm/325-v5.0-brcmfmac-support-STA-info-struct-v7.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 4282ff17e557d319e1b988fa4f582792cfaf6fff Mon Sep 17 00:00:00 2001 -From: Dan Haab -Date: Fri, 9 Nov 2018 09:38:55 -0700 -Subject: [PATCH] brcmfmac: support STA info struct v7 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The newest firmwares provide STA info using v7 of the struct. As v7 -isn't backward compatible, a union is needed. - -Even though brcmfmac does not use any of the new info it's important to -provide the proper struct buffer. Without this change new firmwares will -fallback to the very limited v3 instead of something in between such as -v4. - -Signed-off-by: Dan Haab -Reviewed-by: Rafał Miłecki -Reviewed-by: Arend van Spriel -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/fwil_types.h | 40 +++++++++++++++---- - 1 file changed, 33 insertions(+), 7 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h -@@ -176,6 +176,8 @@ - - #define BRCMF_VHT_CAP_MCS_MAP_NSS_MAX 8 - -+#define BRCMF_HE_CAP_MCS_MAP_NSS_MAX 8 -+ - /* MAX_CHUNK_LEN is the maximum length for data passing to firmware in each - * ioctl. It is relatively small because firmware has small maximum size input - * playload restriction for ioctls. -@@ -601,13 +603,37 @@ struct brcmf_sta_info_le { - __le32 rx_pkts_retried; /* # rx with retry bit set */ - __le32 tx_rate_fallback; /* lowest fallback TX rate */ - -- /* Fields valid for ver >= 5 */ -- struct { -- __le32 count; /* # rates in this set */ -- u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */ -- u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */ -- __le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */ -- } rateset_adv; -+ union { -+ struct { -+ struct { -+ __le32 count; /* # rates in this set */ -+ u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */ -+ u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */ -+ __le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */ -+ } rateset_adv; -+ } v5; -+ -+ struct { -+ __le32 rx_dur_total; /* total user RX duration (estimated) */ -+ __le16 chanspec; /** chanspec this sta is on */ -+ __le16 pad_1; -+ struct { -+ __le16 version; /* version */ -+ __le16 len; /* length */ -+ __le32 count; /* # rates in this set */ -+ u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */ -+ u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */ -+ __le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */ -+ __le16 he_mcs[BRCMF_HE_CAP_MCS_MAP_NSS_MAX]; /* supported he mcs index bit map per nss */ -+ } rateset_adv; /* rateset along with mcs index bitmap */ -+ __le16 wpauth; /* authentication type */ -+ u8 algo; /* crypto algorithm */ -+ u8 pad_2; -+ __le32 tx_rspec; /* Rate of last successful tx frame */ -+ __le32 rx_rspec; /* Rate of last successful rx frame */ -+ __le32 wnm_cap; /* wnm capabilities */ -+ } v7; -+ }; - }; - - struct brcmf_chanspec_list { diff --git a/package/kernel/mac80211/patches/brcm/326-v5.0-brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch b/package/kernel/mac80211/patches/brcm/326-v5.0-brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch deleted file mode 100644 index 01621561c1..0000000000 --- a/package/kernel/mac80211/patches/brcm/326-v5.0-brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 554da3868eb1d7174710c18b4ddd6ff01f6d612c Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 23 Nov 2018 10:11:48 +0100 -Subject: [PATCH] brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe - -ARM systems with UEFI may have both devicetree (of) and DMI data in this -case we end up setting brcmf_mp_device.board_type twice. - -In this case we should prefer the devicetree data, because: -1) The devicerree data is more reliable -2) Some ARM systems (e.g. the Raspberry Pi 3 models) support both UEFI and - classic uboot booting, the devicetree data is always there, so using it - makes sure we ask for the same nvram file independent of how we booted. - -This commit moves the brcmf_dmi_probe call to before the brcmf_of_probe -call, so that the latter can override the value of the first if both are -set. - -Fixes: bd1e82bb420a ("brcmfmac: Set board_type from DMI on x86 based ...") -Cc: Peter Robinson -Tested-and-reported-by: Peter Robinson -Signed-off-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -@@ -449,8 +449,8 @@ struct brcmf_mp_device *brcmf_get_module - } - if (!found) { - /* No platform data for this device, try OF and DMI data */ -- brcmf_of_probe(dev, bus_type, settings); - brcmf_dmi_probe(settings, chip, chiprev); -+ brcmf_of_probe(dev, bus_type, settings); - } - return settings; - } diff --git a/package/kernel/mac80211/patches/brcm/328-v5.0-0001-brcmfmac-add-credit-numbers-updating-support.patch b/package/kernel/mac80211/patches/brcm/328-v5.0-0001-brcmfmac-add-credit-numbers-updating-support.patch deleted file mode 100644 index dd40ee2b1f..0000000000 --- a/package/kernel/mac80211/patches/brcm/328-v5.0-0001-brcmfmac-add-credit-numbers-updating-support.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 153e22c0ff1260035cd7fe72c8aeead1f5fac757 Mon Sep 17 00:00:00 2001 -From: Wright Feng -Date: Mon, 5 Nov 2018 05:51:54 +0000 -Subject: [PATCH] brcmfmac: add credit numbers updating support - -The credit numbers are static and tunable per chip in firmware side. -However the credit number may be changed that is based on packet pool -length and will send BRCMF_E_FIFO_CREDIT_MAP event to notify host driver -updates the credit numbers during interface up. -The purpose of this patch is making host driver has ability of updating -the credit numbers when receiving the BRCMF_E_FIFO_CREDIT_MAP event. - -Signed-off-by: Wright Feng -Acked-by: Arend van Spriel -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/fwsignal.c | 23 ++++++++++++------- - 1 file changed, 15 insertions(+), 8 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c -@@ -511,6 +511,7 @@ struct brcmf_fws_info { - struct work_struct fws_dequeue_work; - u32 fifo_enqpkt[BRCMF_FWS_FIFO_COUNT]; - int fifo_credit[BRCMF_FWS_FIFO_COUNT]; -+ int init_fifo_credit[BRCMF_FWS_FIFO_COUNT]; - int credits_borrowed[BRCMF_FWS_FIFO_AC_VO + 1]; - int deq_node_pos[BRCMF_FWS_FIFO_COUNT]; - u32 fifo_credit_map; -@@ -1237,6 +1238,9 @@ static void brcmf_fws_return_credits(str - } - - fws->fifo_credit[fifo] += credits; -+ if (fws->fifo_credit[fifo] > fws->init_fifo_credit[fifo]) -+ fws->fifo_credit[fifo] = fws->init_fifo_credit[fifo]; -+ - } - - static void brcmf_fws_schedule_deq(struct brcmf_fws_info *fws) -@@ -1595,19 +1599,21 @@ static int brcmf_fws_notify_credit_map(s - brcmf_err("event payload too small (%d)\n", e->datalen); - return -EINVAL; - } -- if (fws->creditmap_received) -- return 0; - - fws->creditmap_received = true; - - brcmf_dbg(TRACE, "enter: credits %pM\n", credits); - brcmf_fws_lock(fws); - for (i = 0; i < ARRAY_SIZE(fws->fifo_credit); i++) { -- if (*credits) -+ fws->fifo_credit[i] += credits[i] - fws->init_fifo_credit[i]; -+ fws->init_fifo_credit[i] = credits[i]; -+ if (fws->fifo_credit[i] > 0) - fws->fifo_credit_map |= 1 << i; - else - fws->fifo_credit_map &= ~(1 << i); -- fws->fifo_credit[i] = *credits++; -+ WARN_ONCE(fws->fifo_credit[i] < 0, -+ "fifo_credit[%d] is negative(%d)\n", i, -+ fws->fifo_credit[i]); - } - brcmf_fws_schedule_deq(fws); - brcmf_fws_unlock(fws); -@@ -2013,7 +2019,7 @@ static int brcmf_fws_borrow_credit(struc - } - - for (lender_ac = 0; lender_ac <= BRCMF_FWS_FIFO_AC_VO; lender_ac++) { -- if (fws->fifo_credit[lender_ac]) { -+ if (fws->fifo_credit[lender_ac] > 0) { - fws->credits_borrowed[lender_ac]++; - fws->fifo_credit[lender_ac]--; - if (fws->fifo_credit[lender_ac] == 0) -@@ -2210,8 +2216,9 @@ static void brcmf_fws_dequeue_worker(str - } - continue; - } -- while ((fws->fifo_credit[fifo]) || ((!fws->bcmc_credit_check) && -- (fifo == BRCMF_FWS_FIFO_BCMC))) { -+ while ((fws->fifo_credit[fifo] > 0) || -+ ((!fws->bcmc_credit_check) && -+ (fifo == BRCMF_FWS_FIFO_BCMC))) { - skb = brcmf_fws_deq(fws, fifo); - if (!skb) - break; -@@ -2222,7 +2229,7 @@ static void brcmf_fws_dequeue_worker(str - break; - } - if ((fifo == BRCMF_FWS_FIFO_AC_BE) && -- (fws->fifo_credit[fifo] == 0) && -+ (fws->fifo_credit[fifo] <= 0) && - (!fws->bus_flow_blocked)) { - while (brcmf_fws_borrow_credit(fws) == 0) { - skb = brcmf_fws_deq(fws, fifo); diff --git a/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch b/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch deleted file mode 100644 index 6e74169995..0000000000 --- a/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch +++ /dev/null @@ -1,42 +0,0 @@ -From a3bdc6deb60bf6be4405058ca49a686c4db08c39 Mon Sep 17 00:00:00 2001 -From: Wright Feng -Date: Mon, 5 Nov 2018 05:51:59 +0000 -Subject: [PATCH] brcmfmac: enable frameburst mode in default firmware setting - -The frameburst feature can enable per-packet framebursting in firmware -side and get higher TX throughput in High Throughput(HT) mode. To enhance -TX throughput, we enable frameburst mode in default firmware setting. - -Signed-off-by: Wright Feng -Acked-by: Arend van Spriel -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++ - drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h | 1 + - 2 files changed, 7 insertions(+) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6646,6 +6646,12 @@ static s32 brcmf_config_dongle(struct br - - brcmf_configure_arp_nd_offload(ifp, true); - -+ err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1); -+ if (err) { -+ brcmf_err("failed to set frameburst mode\n"); -+ goto default_conf_out; -+ } -+ - cfg->dongle_up = true; - default_conf_out: - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h -@@ -80,6 +80,7 @@ - #define BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON 201 - #define BRCMF_C_SET_ASSOC_PREFER 205 - #define BRCMF_C_GET_VALID_CHANNELS 217 -+#define BRCMF_C_SET_FAKEFRAG 219 - #define BRCMF_C_GET_KEY_PRIMARY 235 - #define BRCMF_C_SET_KEY_PRIMARY 236 - #define BRCMF_C_SET_SCAN_PASSIVE_TIME 258 diff --git a/package/kernel/mac80211/patches/brcm/328-v5.0-0003-brcmfmac-handle-compressed-tx-status-signal.patch b/package/kernel/mac80211/patches/brcm/328-v5.0-0003-brcmfmac-handle-compressed-tx-status-signal.patch deleted file mode 100644 index d44c8737ad..0000000000 --- a/package/kernel/mac80211/patches/brcm/328-v5.0-0003-brcmfmac-handle-compressed-tx-status-signal.patch +++ /dev/null @@ -1,229 +0,0 @@ -From e4af3ffb43d50f070134aa1b40d5c3573f57deb1 Mon Sep 17 00:00:00 2001 -From: Chung-Hsien Hsu -Date: Mon, 5 Nov 2018 05:52:05 +0000 -Subject: [PATCH] brcmfmac: handle compressed tx status signal - -Firmware inform the driver about tx status by normal tx status signal -or compressed tx status signal. This patch adds support to handle the -compressed tx status signal. - -Signed-off-by: Chung-Hsien Hsu -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Wright Feng -Acked-by: Arend van Spriel -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/fwsignal.c | 121 ++++++++++-------- - 1 file changed, 71 insertions(+), 50 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c -@@ -1455,9 +1455,10 @@ static int brcmf_fws_txstatus_suppressed - - static int - brcmf_fws_txs_process(struct brcmf_fws_info *fws, u8 flags, u32 hslot, -- u32 genbit, u16 seq) -+ u32 genbit, u16 seq, u8 compcnt) - { - u32 fifo; -+ u8 cnt = 0; - int ret; - bool remove_from_hanger = true; - struct sk_buff *skb; -@@ -1468,60 +1469,71 @@ brcmf_fws_txs_process(struct brcmf_fws_i - brcmf_dbg(DATA, "flags %d\n", flags); - - if (flags == BRCMF_FWS_TXSTATUS_DISCARD) -- fws->stats.txs_discard++; -+ fws->stats.txs_discard += compcnt; - else if (flags == BRCMF_FWS_TXSTATUS_CORE_SUPPRESS) { -- fws->stats.txs_supp_core++; -+ fws->stats.txs_supp_core += compcnt; - remove_from_hanger = false; - } else if (flags == BRCMF_FWS_TXSTATUS_FW_PS_SUPPRESS) { -- fws->stats.txs_supp_ps++; -+ fws->stats.txs_supp_ps += compcnt; - remove_from_hanger = false; - } else if (flags == BRCMF_FWS_TXSTATUS_FW_TOSSED) -- fws->stats.txs_tossed++; -+ fws->stats.txs_tossed += compcnt; - else if (flags == BRCMF_FWS_TXSTATUS_HOST_TOSSED) -- fws->stats.txs_host_tossed++; -+ fws->stats.txs_host_tossed += compcnt; - else - brcmf_err("unexpected txstatus\n"); - -- ret = brcmf_fws_hanger_poppkt(&fws->hanger, hslot, &skb, -- remove_from_hanger); -- if (ret != 0) { -- brcmf_err("no packet in hanger slot: hslot=%d\n", hslot); -- return ret; -- } -+ while (cnt < compcnt) { -+ ret = brcmf_fws_hanger_poppkt(&fws->hanger, hslot, &skb, -+ remove_from_hanger); -+ if (ret != 0) { -+ brcmf_err("no packet in hanger slot: hslot=%d\n", -+ hslot); -+ goto cont; -+ } - -- skcb = brcmf_skbcb(skb); -- entry = skcb->mac; -- if (WARN_ON(!entry)) { -- brcmu_pkt_buf_free_skb(skb); -- return -EINVAL; -- } -- entry->transit_count--; -- if (entry->suppressed && entry->suppr_transit_count) -- entry->suppr_transit_count--; -- -- brcmf_dbg(DATA, "%s flags %d htod %X seq %X\n", entry->name, flags, -- skcb->htod, seq); -- -- /* pick up the implicit credit from this packet */ -- fifo = brcmf_skb_htod_tag_get_field(skb, FIFO); -- if ((fws->fcmode == BRCMF_FWS_FCMODE_IMPLIED_CREDIT) || -- (brcmf_skb_if_flags_get_field(skb, REQ_CREDIT)) || -- (flags == BRCMF_FWS_TXSTATUS_HOST_TOSSED)) { -- brcmf_fws_return_credits(fws, fifo, 1); -- brcmf_fws_schedule_deq(fws); -- } -- brcmf_fws_macdesc_return_req_credit(skb); -+ skcb = brcmf_skbcb(skb); -+ entry = skcb->mac; -+ if (WARN_ON(!entry)) { -+ brcmu_pkt_buf_free_skb(skb); -+ goto cont; -+ } -+ entry->transit_count--; -+ if (entry->suppressed && entry->suppr_transit_count) -+ entry->suppr_transit_count--; - -- ret = brcmf_proto_hdrpull(fws->drvr, false, skb, &ifp); -- if (ret) { -- brcmu_pkt_buf_free_skb(skb); -- return -EINVAL; -+ brcmf_dbg(DATA, "%s flags %d htod %X seq %X\n", entry->name, -+ flags, skcb->htod, seq); -+ -+ /* pick up the implicit credit from this packet */ -+ fifo = brcmf_skb_htod_tag_get_field(skb, FIFO); -+ if (fws->fcmode == BRCMF_FWS_FCMODE_IMPLIED_CREDIT || -+ (brcmf_skb_if_flags_get_field(skb, REQ_CREDIT)) || -+ flags == BRCMF_FWS_TXSTATUS_HOST_TOSSED) { -+ brcmf_fws_return_credits(fws, fifo, 1); -+ brcmf_fws_schedule_deq(fws); -+ } -+ brcmf_fws_macdesc_return_req_credit(skb); -+ -+ ret = brcmf_proto_hdrpull(fws->drvr, false, skb, &ifp); -+ if (ret) { -+ brcmu_pkt_buf_free_skb(skb); -+ goto cont; -+ } -+ if (!remove_from_hanger) -+ ret = brcmf_fws_txstatus_suppressed(fws, fifo, skb, -+ genbit, seq); -+ if (remove_from_hanger || ret) -+ brcmf_txfinalize(ifp, skb, true); -+ -+cont: -+ hslot = (hslot + 1) & (BRCMF_FWS_TXSTAT_HSLOT_MASK >> -+ BRCMF_FWS_TXSTAT_HSLOT_SHIFT); -+ if (BRCMF_FWS_MODE_GET_REUSESEQ(fws->mode)) -+ seq = (seq + 1) & BRCMF_SKB_HTOD_SEQ_NR_MASK; -+ -+ cnt++; - } -- if (!remove_from_hanger) -- ret = brcmf_fws_txstatus_suppressed(fws, fifo, skb, -- genbit, seq); -- if (remove_from_hanger || ret) -- brcmf_txfinalize(ifp, skb, true); - - return 0; - } -@@ -1547,7 +1559,8 @@ static int brcmf_fws_fifocreditback_indi - return BRCMF_FWS_RET_OK_SCHEDULE; - } - --static int brcmf_fws_txstatus_indicate(struct brcmf_fws_info *fws, u8 *data) -+static int brcmf_fws_txstatus_indicate(struct brcmf_fws_info *fws, u8 type, -+ u8 *data) - { - __le32 status_le; - __le16 seq_le; -@@ -1556,23 +1569,31 @@ static int brcmf_fws_txstatus_indicate(s - u32 genbit; - u8 flags; - u16 seq; -+ u8 compcnt; -+ u8 compcnt_offset = BRCMF_FWS_TYPE_TXSTATUS_LEN; - -- fws->stats.txs_indicate++; - memcpy(&status_le, data, sizeof(status_le)); - status = le32_to_cpu(status_le); - flags = brcmf_txstatus_get_field(status, FLAGS); - hslot = brcmf_txstatus_get_field(status, HSLOT); - genbit = brcmf_txstatus_get_field(status, GENERATION); - if (BRCMF_FWS_MODE_GET_REUSESEQ(fws->mode)) { -- memcpy(&seq_le, &data[BRCMF_FWS_TYPE_PKTTAG_LEN], -+ memcpy(&seq_le, &data[BRCMF_FWS_TYPE_TXSTATUS_LEN], - sizeof(seq_le)); - seq = le16_to_cpu(seq_le); -+ compcnt_offset += BRCMF_FWS_TYPE_SEQ_LEN; - } else { - seq = 0; - } - -+ if (type == BRCMF_FWS_TYPE_COMP_TXSTATUS) -+ compcnt = data[compcnt_offset]; -+ else -+ compcnt = 1; -+ fws->stats.txs_indicate += compcnt; -+ - brcmf_fws_lock(fws); -- brcmf_fws_txs_process(fws, flags, hslot, genbit, seq); -+ brcmf_fws_txs_process(fws, flags, hslot, genbit, seq, compcnt); - brcmf_fws_unlock(fws); - return BRCMF_FWS_RET_OK_NOSCHEDULE; - } -@@ -1888,8 +1909,6 @@ void brcmf_fws_hdrpull(struct brcmf_if * - - err = BRCMF_FWS_RET_OK_NOSCHEDULE; - switch (type) { -- case BRCMF_FWS_TYPE_COMP_TXSTATUS: -- break; - case BRCMF_FWS_TYPE_HOST_REORDER_RXPKTS: - rd = (struct brcmf_skb_reorder_data *)skb->cb; - rd->reorder = data; -@@ -1912,7 +1931,8 @@ void brcmf_fws_hdrpull(struct brcmf_if * - err = brcmf_fws_request_indicate(fws, type, data); - break; - case BRCMF_FWS_TYPE_TXSTATUS: -- brcmf_fws_txstatus_indicate(fws, data); -+ case BRCMF_FWS_TYPE_COMP_TXSTATUS: -+ brcmf_fws_txstatus_indicate(fws, type, data); - break; - case BRCMF_FWS_TYPE_FIFO_CREDITBACK: - err = brcmf_fws_fifocreditback_indicate(fws, data); -@@ -2001,7 +2021,7 @@ static void brcmf_fws_rollback_toq(struc - fws->stats.rollback_failed++; - hslot = brcmf_skb_htod_tag_get_field(skb, HSLOT); - brcmf_fws_txs_process(fws, BRCMF_FWS_TXSTATUS_HOST_TOSSED, -- hslot, 0, 0); -+ hslot, 0, 0, 1); - } else { - fws->stats.rollback_success++; - brcmf_fws_return_credits(fws, fifo, 1); -@@ -2462,7 +2482,8 @@ void brcmf_fws_bustxfail(struct brcmf_fw - } - brcmf_fws_lock(fws); - hslot = brcmf_skb_htod_tag_get_field(skb, HSLOT); -- brcmf_fws_txs_process(fws, BRCMF_FWS_TXSTATUS_HOST_TOSSED, hslot, 0, 0); -+ brcmf_fws_txs_process(fws, BRCMF_FWS_TXSTATUS_HOST_TOSSED, hslot, 0, 0, -+ 1); - brcmf_fws_unlock(fws); - } - diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0001-brcmfmac-add-4354-raw-pcie-device-id.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0001-brcmfmac-add-4354-raw-pcie-device-id.patch deleted file mode 100644 index ead33db0d5..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0001-brcmfmac-add-4354-raw-pcie-device-id.patch +++ /dev/null @@ -1,36 +0,0 @@ -From eb6b33bfb8f56859df7264dccc2ca8ab7c57342a Mon Sep 17 00:00:00 2001 -From: Winnie Chang -Date: Wed, 21 Nov 2018 07:53:42 +0000 -Subject: [PATCH] brcmfmac: add 4354 raw pcie device id - -Add the raw 4354 PCIe device ID for unprogrammed Cypress boards. - -Reviewed-by: Arend Van Spriel -Signed-off-by: Winnie Chang -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 + - drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 1 + - 2 files changed, 2 insertions(+) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -@@ -2019,6 +2019,7 @@ static const struct dev_pm_ops brcmf_pci - static const struct pci_device_id brcmf_pcie_devid_table[] = { - BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID), - BRCMF_PCIE_DEVICE_SUB(0x4355, BRCM_PCIE_VENDOR_ID_BROADCOM, 0x4355), -+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4354_RAW_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID), ---- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -@@ -74,6 +74,7 @@ - /* PCIE Device IDs */ - #define BRCM_PCIE_4350_DEVICE_ID 0x43a3 - #define BRCM_PCIE_4354_DEVICE_ID 0x43df -+#define BRCM_PCIE_4354_RAW_DEVICE_ID 0x4354 - #define BRCM_PCIE_4356_DEVICE_ID 0x43ec - #define BRCM_PCIE_43567_DEVICE_ID 0x43d3 - #define BRCM_PCIE_43570_DEVICE_ID 0x43d9 diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0002-brcmfmac-set-F2-watermark-to-256-for-4373.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0002-brcmfmac-set-F2-watermark-to-256-for-4373.patch deleted file mode 100644 index a915473b8c..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0002-brcmfmac-set-F2-watermark-to-256-for-4373.patch +++ /dev/null @@ -1,73 +0,0 @@ -From e1a08730eeb0bad4d82c3bc40e74854872de618d Mon Sep 17 00:00:00 2001 -From: Wright Feng -Date: Wed, 21 Nov 2018 07:53:44 +0000 -Subject: [PATCH] brcmfmac: set F2 watermark to 256 for 4373 - -We got SDIO_CRC_ERROR with 4373 on SDR104 when doing bi-directional -throughput test. Enable watermark to 256 to guarantee the operation -stability. - -Reviewed-by: Arend van Spriel -Signed-off-by: Wright Feng -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/sdio.c | 26 +++++++++++++++++-- - 1 file changed, 24 insertions(+), 2 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -49,6 +49,10 @@ - #define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500) - #define CTL_DONE_TIMEOUT msecs_to_jiffies(2500) - -+/* watermark expressed in number of words */ -+#define DEFAULT_F2_WATERMARK 0x8 -+#define CY_4373_F2_WATERMARK 0x40 -+ - #ifdef DEBUG - - #define BRCMF_TRAP_INFO_SIZE 80 -@@ -138,6 +142,8 @@ struct rte_console { - /* 1: isolate internal sdio signals, put external pads in tri-state; requires - * sdio bus power cycle to clear (rev 9) */ - #define SBSDIO_DEVCTL_PADS_ISO 0x08 -+/* 1: enable F2 Watermark */ -+#define SBSDIO_DEVCTL_F2WM_ENAB 0x10 - /* Force SD->SB reset mapping (rev 11) */ - #define SBSDIO_DEVCTL_SB_RST_CTL 0x30 - /* Determined by CoreControl bit */ -@@ -4046,6 +4052,7 @@ static void brcmf_sdio_firmware_callback - void *nvram; - u32 nvram_len; - u8 saveclk; -+ u8 devctl; - - brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); - -@@ -4101,8 +4108,23 @@ static void brcmf_sdio_firmware_callback - brcmf_sdiod_writel(sdiod, core->base + SD_REG(hostintmask), - bus->hostintmask, NULL); - -- -- brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, 8, &err); -+ switch (sdiod->func1->device) { -+ case SDIO_DEVICE_ID_CYPRESS_4373: -+ brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", -+ CY_4373_F2_WATERMARK); -+ brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, -+ CY_4373_F2_WATERMARK, &err); -+ devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL, -+ &err); -+ devctl |= SBSDIO_DEVCTL_F2WM_ENAB; -+ brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, -+ &err); -+ break; -+ default: -+ brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, -+ DEFAULT_F2_WATERMARK, &err); -+ break; -+ } - } else { - /* Disable F2 again */ - sdio_disable_func(sdiod->func2); diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0003-brcmfmac-set-SDIO-F1-MesBusyCtrl-for-CYW4373.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0003-brcmfmac-set-SDIO-F1-MesBusyCtrl-for-CYW4373.patch deleted file mode 100644 index 0e22a1545e..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0003-brcmfmac-set-SDIO-F1-MesBusyCtrl-for-CYW4373.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 58e4bbea0c1d9b5ace11df968c5dc096ce052a73 Mon Sep 17 00:00:00 2001 -From: Madhan Mohan R -Date: Wed, 21 Nov 2018 07:53:45 +0000 -Subject: [PATCH] brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373 - -Along with F2 watermark (existing) configuration, F1 MesBusyCtrl -should be enabled & sdio device RX FIFO watermark should be -configured to avoid overflow errors. - -Reviewed-by: Arend van Spriel -Signed-off-by: Madhan Mohan R -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 +++ - drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 9 ++++++++- - 2 files changed, 11 insertions(+), 1 deletion(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -4119,6 +4119,9 @@ static void brcmf_sdio_firmware_callback - devctl |= SBSDIO_DEVCTL_F2WM_ENAB; - brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, - &err); -+ brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, -+ CY_4373_F2_WATERMARK | -+ SBSDIO_MESBUSYCTRL_ENAB, &err); - break; - default: - brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h -@@ -77,7 +77,7 @@ - #define SBSDIO_GPIO_OUT 0x10006 - /* gpio enable */ - #define SBSDIO_GPIO_EN 0x10007 --/* rev < 7, watermark for sdio device */ -+/* rev < 7, watermark for sdio device TX path */ - #define SBSDIO_WATERMARK 0x10008 - /* control busy signal generation */ - #define SBSDIO_DEVICE_CTL 0x10009 -@@ -104,6 +104,13 @@ - #define SBSDIO_FUNC1_RFRAMEBCHI 0x1001C - /* MesBusyCtl (rev 11) */ - #define SBSDIO_FUNC1_MESBUSYCTRL 0x1001D -+/* Watermark for sdio device RX path */ -+#define SBSDIO_MESBUSY_RXFIFO_WM_MASK 0x7F -+#define SBSDIO_MESBUSY_RXFIFO_WM_SHIFT 0 -+/* Enable busy capability for MES access */ -+#define SBSDIO_MESBUSYCTRL_ENAB 0x80 -+#define SBSDIO_MESBUSYCTRL_ENAB_SHIFT 7 -+ - /* Sdio Core Rev 12 */ - #define SBSDIO_FUNC1_WAKEUPCTRL 0x1001E - #define SBSDIO_FUNC1_WCTRL_ALPWAIT_MASK 0x1 diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0004-brcmfmac-add-support-for-CYW43012-SDIO-chipset.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0004-brcmfmac-add-support-for-CYW43012-SDIO-chipset.patch deleted file mode 100644 index e53d4bafa0..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0004-brcmfmac-add-support-for-CYW43012-SDIO-chipset.patch +++ /dev/null @@ -1,253 +0,0 @@ -From 35cb51b2162a1a7c5cd977f92595e60ab14d3b22 Mon Sep 17 00:00:00 2001 -From: Chi-Hsien Lin -Date: Wed, 21 Nov 2018 07:53:47 +0000 -Subject: [PATCH] brcmfmac: add support for CYW43012 SDIO chipset - -CYW43012 is a 1x1 802.11a/b/g/n Dual-Band HT20, 256-QAM/Turbo QAM. It -is an Ultra Low Power WLAN+BT combo chip. - -Reviewed-by: Arend van Spriel -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Praveen Babu C -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 + - .../broadcom/brcm80211/brcmfmac/chip.c | 14 +++- - .../broadcom/brcm80211/brcmfmac/sdio.c | 74 ++++++++++++++++--- - .../broadcom/brcm80211/include/brcm_hw_ids.h | 1 + - include/linux/mmc/sdio_ids.h | 1 + - 5 files changed, 78 insertions(+), 13 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c -@@ -972,6 +972,7 @@ static const struct sdio_device_id brcmf - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_4373), -+ BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_43012), - { /* end: all zeroes */ } - }; - MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids); ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -@@ -165,6 +165,7 @@ struct sbconfig { - #define SRCI_LSS_MASK 0x00f00000 - #define SRCI_LSS_SHIFT 20 - #define SRCI_SRNB_MASK 0xf0 -+#define SRCI_SRNB_MASK_EXT 0x100 - #define SRCI_SRNB_SHIFT 4 - #define SRCI_SRBSZ_MASK 0xf - #define SRCI_SRBSZ_SHIFT 0 -@@ -592,7 +593,13 @@ static void brcmf_chip_socram_ramsize(st - if (lss != 0) - *ramsize += (1 << ((lss - 1) + SR_BSZ_BASE)); - } else { -- nb = (coreinfo & SRCI_SRNB_MASK) >> SRCI_SRNB_SHIFT; -+ /* length of SRAM Banks increased for corerev greater than 23 */ -+ if (sr->pub.rev >= 23) { -+ nb = (coreinfo & (SRCI_SRNB_MASK | SRCI_SRNB_MASK_EXT)) -+ >> SRCI_SRNB_SHIFT; -+ } else { -+ nb = (coreinfo & SRCI_SRNB_MASK) >> SRCI_SRNB_SHIFT; -+ } - for (i = 0; i < nb; i++) { - retent = brcmf_chip_socram_banksize(sr, i, &banksize); - *ramsize += banksize; -@@ -1356,6 +1363,11 @@ bool brcmf_chip_sr_capable(struct brcmf_ - addr = CORE_CC_REG(base, sr_control1); - reg = chip->ops->read32(chip->ctx, addr); - return reg != 0; -+ case CY_CC_43012_CHIP_ID: -+ addr = CORE_CC_REG(pmu->base, retention_ctl); -+ reg = chip->ops->read32(chip->ctx, addr); -+ return (reg & (PMU_RCTL_MACPHY_DISABLE_MASK | -+ PMU_RCTL_LOGIC_DISABLE_MASK)) == 0; - default: - addr = CORE_CC_REG(pmu->base, pmucapabilities_ext); - reg = chip->ops->read32(chip->ctx, addr); ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -624,6 +624,7 @@ BRCMF_FW_DEF(43455, "brcmfmac43455-sdio" - BRCMF_FW_DEF(4354, "brcmfmac4354-sdio"); - BRCMF_FW_DEF(4356, "brcmfmac4356-sdio"); - BRCMF_FW_DEF(4373, "brcmfmac4373-sdio"); -+BRCMF_FW_DEF(43012, "brcmfmac43012-sdio"); - - static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { - BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143), -@@ -643,7 +644,8 @@ static const struct brcmf_firmware_mappi - BRCMF_FW_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFFC0, 43455), - BRCMF_FW_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354), - BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356), -- BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373) -+ BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373), -+ BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012) - }; - - static void pkt_align(struct sk_buff *p, int len, int align) -@@ -677,6 +679,14 @@ brcmf_sdio_kso_control(struct brcmf_sdio - /* 1st KSO write goes to AOS wake up core if device is asleep */ - brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_SLEEPCSR, wr_val, &err); - -+ /* In case of 43012 chip, the chip could go down immediately after -+ * KSO bit is cleared. So the further reads of KSO register could -+ * fail. Thereby just bailing out immediately after clearing KSO -+ * bit, to avoid polling of KSO bit. -+ */ -+ if (!on && bus->ci->chip == CY_CC_43012_CHIP_ID) -+ return err; -+ - if (on) { - /* device WAKEUP through KSO: - * write bit 0 & read back until -@@ -2402,6 +2412,14 @@ static int brcmf_sdio_tx_ctrlframe(struc - return ret; - } - -+static bool brcmf_chip_is_ulp(struct brcmf_chip *ci) -+{ -+ if (ci->chip == CY_CC_43012_CHIP_ID) -+ return true; -+ else -+ return false; -+} -+ - static void brcmf_sdio_bus_stop(struct device *dev) - { - struct brcmf_bus *bus_if = dev_get_drvdata(dev); -@@ -2409,7 +2427,7 @@ static void brcmf_sdio_bus_stop(struct d - struct brcmf_sdio *bus = sdiodev->bus; - struct brcmf_core *core = bus->sdio_core; - u32 local_hostintmask; -- u8 saveclk; -+ u8 saveclk, bpreq; - int err; - - brcmf_dbg(TRACE, "Enter\n"); -@@ -2436,9 +2454,14 @@ static void brcmf_sdio_bus_stop(struct d - /* Force backplane clocks to assure F2 interrupt propagates */ - saveclk = brcmf_sdiod_readb(sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, - &err); -- if (!err) -- brcmf_sdiod_writeb(sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, -- (saveclk | SBSDIO_FORCE_HT), &err); -+ if (!err) { -+ bpreq = saveclk; -+ bpreq |= brcmf_chip_is_ulp(bus->ci) ? -+ SBSDIO_HT_AVAIL_REQ : SBSDIO_FORCE_HT; -+ brcmf_sdiod_writeb(sdiodev, -+ SBSDIO_FUNC1_CHIPCLKCSR, -+ bpreq, &err); -+ } - if (err) - brcmf_err("Failed to force clock for F2: err %d\n", - err); -@@ -3328,20 +3351,45 @@ err: - return bcmerror; - } - -+static bool brcmf_sdio_aos_no_decode(struct brcmf_sdio *bus) -+{ -+ if (bus->ci->chip == CY_CC_43012_CHIP_ID) -+ return true; -+ else -+ return false; -+} -+ - static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) - { - int err = 0; - u8 val; -+ u8 wakeupctrl; -+ u8 cardcap; -+ u8 chipclkcsr; - - brcmf_dbg(TRACE, "Enter\n"); - -+ if (brcmf_chip_is_ulp(bus->ci)) { -+ wakeupctrl = SBSDIO_FUNC1_WCTRL_ALPWAIT_SHIFT; -+ chipclkcsr = SBSDIO_HT_AVAIL_REQ; -+ } else { -+ wakeupctrl = SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT; -+ chipclkcsr = SBSDIO_FORCE_HT; -+ } -+ -+ if (brcmf_sdio_aos_no_decode(bus)) { -+ cardcap = SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC; -+ } else { -+ cardcap = (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | -+ SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT); -+ } -+ - val = brcmf_sdiod_readb(bus->sdiodev, SBSDIO_FUNC1_WAKEUPCTRL, &err); - if (err) { - brcmf_err("error reading SBSDIO_FUNC1_WAKEUPCTRL\n"); - return; - } -- -- val |= 1 << SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT; -+ val |= 1 << wakeupctrl; - brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_WAKEUPCTRL, val, &err); - if (err) { - brcmf_err("error writing SBSDIO_FUNC1_WAKEUPCTRL\n"); -@@ -3350,8 +3398,7 @@ static void brcmf_sdio_sr_init(struct br - - /* Add CMD14 Support */ - brcmf_sdiod_func0_wb(bus->sdiodev, SDIO_CCCR_BRCM_CARDCAP, -- (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | -- SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT), -+ cardcap, - &err); - if (err) { - brcmf_err("error writing SDIO_CCCR_BRCM_CARDCAP\n"); -@@ -3359,7 +3406,7 @@ static void brcmf_sdio_sr_init(struct br - } - - brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, -- SBSDIO_FORCE_HT, &err); -+ chipclkcsr, &err); - if (err) { - brcmf_err("error writing SBSDIO_FUNC1_CHIPCLKCSR\n"); - return; -@@ -4051,7 +4098,7 @@ static void brcmf_sdio_firmware_callback - const struct firmware *code; - void *nvram; - u32 nvram_len; -- u8 saveclk; -+ u8 saveclk, bpreq; - u8 devctl; - - brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); -@@ -4085,8 +4132,11 @@ static void brcmf_sdio_firmware_callback - /* Force clocks on backplane to be sure F2 interrupt propagates */ - saveclk = brcmf_sdiod_readb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, &err); - if (!err) { -+ bpreq = saveclk; -+ bpreq |= brcmf_chip_is_ulp(bus->ci) ? -+ SBSDIO_HT_AVAIL_REQ : SBSDIO_FORCE_HT; - brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, -- (saveclk | SBSDIO_FORCE_HT), &err); -+ bpreq, &err); - } - if (err) { - brcmf_err("Failed to force clock for F2: err %d\n", err); ---- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -@@ -60,6 +60,7 @@ - #define BRCM_CC_43664_CHIP_ID 43664 - #define BRCM_CC_4371_CHIP_ID 0x4371 - #define CY_CC_4373_CHIP_ID 0x4373 -+#define CY_CC_43012_CHIP_ID 43012 - - /* USB Device IDs */ - #define BRCM_USB_43143_DEVICE_ID 0xbd1e ---- a/include/linux/mmc/sdio_ids.h -+++ b/include/linux/mmc/sdio_ids.h -@@ -42,6 +42,7 @@ - #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 - #define SDIO_DEVICE_ID_BROADCOM_4356 0x4356 - #define SDIO_DEVICE_ID_CYPRESS_4373 0x4373 -+#define SDIO_DEVICE_ID_CYPRESS_43012 43012 - - #define SDIO_VENDOR_ID_INTEL 0x0089 - #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402 diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0005-brcmfmac-allow-GCI-core-enumuration.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0005-brcmfmac-allow-GCI-core-enumuration.patch deleted file mode 100644 index 809ee9a516..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0005-brcmfmac-allow-GCI-core-enumuration.patch +++ /dev/null @@ -1,60 +0,0 @@ -From b021a6bc1175442609af0b66d64f850883e155fb Mon Sep 17 00:00:00 2001 -From: Chi-Hsien Lin -Date: Wed, 21 Nov 2018 07:53:48 +0000 -Subject: [PATCH] brcmfmac: allow GCI core enumuration - -GCI core is needed for ULP operation. Allow GCI core enumuration with -below changes: - - Allow GCI to be added to core list even when it doesn't have a wrapper. - - Allow 8K address space size. - - Don't overwrite the address value when an additional size descriptor - is in place. - -Reviewed-by: Arend van Spriel -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Kalle Valo ---- - .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -@@ -786,7 +786,7 @@ static int brcmf_chip_dmp_get_regaddr(st - u32 *regbase, u32 *wrapbase) - { - u8 desc; -- u32 val; -+ u32 val, szdesc; - u8 mpnum = 0; - u8 stype, sztype, wraptype; - -@@ -832,14 +832,15 @@ static int brcmf_chip_dmp_get_regaddr(st - - /* next size descriptor can be skipped */ - if (sztype == DMP_SLAVE_SIZE_DESC) { -- val = brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); -+ szdesc = brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); - /* skip upper size descriptor if present */ -- if (val & DMP_DESC_ADDRSIZE_GT32) -+ if (szdesc & DMP_DESC_ADDRSIZE_GT32) - brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); - } - -- /* only look for 4K register regions */ -- if (sztype != DMP_SLAVE_SIZE_4K) -+ /* look for 4K or 8K register regions */ -+ if (sztype != DMP_SLAVE_SIZE_4K && -+ sztype != DMP_SLAVE_SIZE_8K) - continue; - - stype = (val & DMP_SLAVE_TYPE) >> DMP_SLAVE_TYPE_S; -@@ -896,7 +897,8 @@ int brcmf_chip_dmp_erom_scan(struct brcm - - /* need core with ports */ - if (nmw + nsw == 0 && -- id != BCMA_CORE_PMU) -+ id != BCMA_CORE_PMU && -+ id != BCMA_CORE_GCI) - continue; - - /* try to obtain register address info */ diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0006-brcmfmac-update-43012-F2-watermark-setting-to-fix-DM.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0006-brcmfmac-update-43012-F2-watermark-setting-to-fix-DM.patch deleted file mode 100644 index 3b44952af4..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0006-brcmfmac-update-43012-F2-watermark-setting-to-fix-DM.patch +++ /dev/null @@ -1,49 +0,0 @@ -From f95a8d9c6aca196f1ace5b2e53a3dd3bc491b1b3 Mon Sep 17 00:00:00 2001 -From: Naveen Gupta -Date: Wed, 21 Nov 2018 07:53:49 +0000 -Subject: [PATCH] brcmfmac: update 43012 F2 watermark setting to fix DMA Error - during UDP RX Traffic - -The number of words that the read FIFO has to contain except -the end of frame before sends data back to the host. -Max watermark = (512B - 2* (BurstLength))/4 = -(512 - 128)/4 = 384/4 = 0x60 -so if burst length (i.e. BurstLength = 64) is increased, -watermark has to be reduced. This is the optimal setting for this chip. - -Reviewed-by: Arend van Spriel -Signed-off-by: Naveen Gupta -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Kalle Valo ---- - .../net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -52,6 +52,7 @@ - /* watermark expressed in number of words */ - #define DEFAULT_F2_WATERMARK 0x8 - #define CY_4373_F2_WATERMARK 0x40 -+#define CY_43012_F2_WATERMARK 0x60 - - #ifdef DEBUG - -@@ -4173,6 +4174,17 @@ static void brcmf_sdio_firmware_callback - CY_4373_F2_WATERMARK | - SBSDIO_MESBUSYCTRL_ENAB, &err); - break; -+ case SDIO_DEVICE_ID_CYPRESS_43012: -+ brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", -+ CY_43012_F2_WATERMARK); -+ brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, -+ CY_43012_F2_WATERMARK, &err); -+ devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL, -+ &err); -+ devctl |= SBSDIO_DEVCTL_F2WM_ENAB; -+ brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, -+ &err); -+ break; - default: - brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, - DEFAULT_F2_WATERMARK, &err); diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0007-brcmfmac-4373-save-restore-support.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0007-brcmfmac-4373-save-restore-support.patch deleted file mode 100644 index 61c65692de..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0007-brcmfmac-4373-save-restore-support.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 2f2d389efda4caa4c1b69cb4fa2ab217f0fe6d6f Mon Sep 17 00:00:00 2001 -From: Chi-Hsien Lin -Date: Wed, 21 Nov 2018 07:53:50 +0000 -Subject: [PATCH] brcmfmac: 4373 save-restore support - -Use chipcommon sr_control0 register to check 4373 sr support. - -Reviewed-by: Arend van Spriel -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Kalle Valo ---- - .../broadcom/brcm80211/brcmfmac/chip.c | 5 +++++ - .../broadcom/brcm80211/include/chipcommon.h | 19 +++++++++++++++++++ - 2 files changed, 24 insertions(+) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -@@ -1365,6 +1365,11 @@ bool brcmf_chip_sr_capable(struct brcmf_ - addr = CORE_CC_REG(base, sr_control1); - reg = chip->ops->read32(chip->ctx, addr); - return reg != 0; -+ case CY_CC_4373_CHIP_ID: -+ /* explicitly check SR engine enable bit */ -+ addr = CORE_CC_REG(base, sr_control0); -+ reg = chip->ops->read32(chip->ctx, addr); -+ return (reg & CC_SR_CTL0_ENABLE_MASK) != 0; - case CY_CC_43012_CHIP_ID: - addr = CORE_CC_REG(pmu->base, retention_ctl); - reg = chip->ops->read32(chip->ctx, addr); ---- a/drivers/net/wireless/broadcom/brcm80211/include/chipcommon.h -+++ b/drivers/net/wireless/broadcom/brcm80211/include/chipcommon.h -@@ -269,6 +269,25 @@ struct chipcregs { - /* GSIO (spi/i2c) present, rev >= 37 */ - #define CC_CAP2_GSIO 0x00000002 - -+/* sr_control0, rev >= 48 */ -+#define CC_SR_CTL0_ENABLE_MASK BIT(0) -+#define CC_SR_CTL0_ENABLE_SHIFT 0 -+#define CC_SR_CTL0_EN_SR_ENG_CLK_SHIFT 1 /* sr_clk to sr_memory enable */ -+#define CC_SR_CTL0_RSRC_TRIGGER_SHIFT 2 /* Rising edge resource trigger 0 to -+ * sr_engine -+ */ -+#define CC_SR_CTL0_MIN_DIV_SHIFT 6 /* Min division value for fast clk -+ * in sr_engine -+ */ -+#define CC_SR_CTL0_EN_SBC_STBY_SHIFT 16 -+#define CC_SR_CTL0_EN_SR_ALP_CLK_MASK_SHIFT 18 -+#define CC_SR_CTL0_EN_SR_HT_CLK_SHIFT 19 -+#define CC_SR_CTL0_ALLOW_PIC_SHIFT 20 /* Allow pic to separate power -+ * domains -+ */ -+#define CC_SR_CTL0_MAX_SR_LQ_CLK_CNT_SHIFT 25 -+#define CC_SR_CTL0_EN_MEM_DISABLE_FOR_SLEEP 30 -+ - /* pmucapabilities */ - #define PCAP_REV_MASK 0x000000ff - #define PCAP_RC_MASK 0x00001f00 diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0008-brcmfmac-disable-command-decode-in-sdio_aos.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0008-brcmfmac-disable-command-decode-in-sdio_aos.patch deleted file mode 100644 index a1125e588d..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0008-brcmfmac-disable-command-decode-in-sdio_aos.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 29f6589140a10ece8c1d73f58043ea5b3473ab3e Mon Sep 17 00:00:00 2001 -From: Wright Feng -Date: Wed, 21 Nov 2018 07:53:52 +0000 -Subject: [PATCH] brcmfmac: disable command decode in sdio_aos - -AOS is a part of the SDIOD core that becomes active when the rest of -SDIOD is sleeping to keep SDIO bus alive responding to reduced set of -commands. - -Transaction between AOS and SDIOD is not protected, and if cmd 52 is -received in AOS and in the middle of response state changed from AOS to -SDIOD, response is corrupted and it causes to SDIO Host controller to -hang. - -Command decode for below chips are disabled in this commit: - - 4339 - - 4345 - - 4354 - - 4373 - -Reviewed-by: Arend van Spriel -Signed-off-by: Wright Feng -Signed-off-by: Double Lo -Signed-off-by: Madhan Mohan R -Signed-off-by: Chi-Hsien Lin -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -3354,7 +3354,11 @@ err: - - static bool brcmf_sdio_aos_no_decode(struct brcmf_sdio *bus) - { -- if (bus->ci->chip == CY_CC_43012_CHIP_ID) -+ if (bus->ci->chip == CY_CC_43012_CHIP_ID || -+ bus->ci->chip == CY_CC_4373_CHIP_ID || -+ bus->ci->chip == BRCM_CC_4339_CHIP_ID || -+ bus->ci->chip == BRCM_CC_4345_CHIP_ID || -+ bus->ci->chip == BRCM_CC_4354_CHIP_ID) - return true; - else - return false; diff --git a/package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch b/package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch deleted file mode 100644 index 5d454fd3ee..0000000000 --- a/package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 412dd15c8177d93abe0c8787b83b31c5eb061405 Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -Date: Mon, 10 Dec 2018 21:55:37 +0100 -Subject: [PATCH] brcmfmac: fix false-positive -Wmaybe-unintialized warning - -When CONFIG_NO_AUTO_INLINE is set, we get a false-postive warning -for the brcmf_fw_request_nvram_done() function, after gcc figures -out that brcmf_fw_nvram_from_efi() might not set the 'data_len' -variable, but fails to notice that it always returns NULL: - -drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c: In function 'brcmf_fw_request_nvram_done': -drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:560:11: error: 'data_len' may be used uninitialized in this function [-Werror=maybe-uninitialized] - -Mark it 'inline' to force gcc to understand this. - -Fixes: ce2e6db554fa ("brcmfmac: Add support for getting nvram contents from EFI variables") -Signed-off-by: Arnd Bergmann -Reviewed-by: Hans de Goede -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c -@@ -512,7 +512,7 @@ fail: - return NULL; - } - #else --static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; } -+static inline u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; } - #endif - - static void brcmf_fw_free_request(struct brcmf_fw_request *req) diff --git a/package/kernel/mac80211/patches/brcm/332-v5.0-0001-brcmfmac-Fix-access-point-mode.patch b/package/kernel/mac80211/patches/brcm/332-v5.0-0001-brcmfmac-Fix-access-point-mode.patch deleted file mode 100644 index 7381ea8278..0000000000 --- a/package/kernel/mac80211/patches/brcm/332-v5.0-0001-brcmfmac-Fix-access-point-mode.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 861cb5eb467f5e38dce1aabe4e8db379255bd89b Mon Sep 17 00:00:00 2001 -From: Stefan Wahren -Date: Wed, 12 Dec 2018 20:20:06 +0100 -Subject: [PATCH] brcmfmac: Fix access point mode - -Since commit 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag") -the Raspberry Pi 3 A+ (BCM43455) isn't able to operate in AP mode with -hostapd (device_ap_sme=1 use_monitor=0): - -brcmfmac: brcmf_cfg80211_stop_ap: setting AP mode failed -52 - -So add the missing mgmt_stypes for AP mode to fix this. - -Fixes: 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag") -Suggested-by: Arend van Spriel -Signed-off-by: Stefan Wahren -Acked-by: Arend van Spriel -Signed-off-by: Kalle Valo ---- - .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6316,6 +6316,16 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] = - .tx = 0xffff, - .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | - BIT(IEEE80211_STYPE_PROBE_REQ >> 4) -+ }, -+ [NL80211_IFTYPE_AP] = { -+ .tx = 0xffff, -+ .rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) | -+ BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) | -+ BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | -+ BIT(IEEE80211_STYPE_DISASSOC >> 4) | -+ BIT(IEEE80211_STYPE_AUTH >> 4) | -+ BIT(IEEE80211_STYPE_DEAUTH >> 4) | -+ BIT(IEEE80211_STYPE_ACTION >> 4) - } - }; - diff --git a/package/kernel/mac80211/patches/brcm/368-v5.2-brcmfmac-fix-leak-of-mypkt-on-error-return-path.patch b/package/kernel/mac80211/patches/brcm/368-v5.2-brcmfmac-fix-leak-of-mypkt-on-error-return-path.patch index a9a9d74c10..5dcb58a448 100644 --- a/package/kernel/mac80211/patches/brcm/368-v5.2-brcmfmac-fix-leak-of-mypkt-on-error-return-path.patch +++ b/package/kernel/mac80211/patches/brcm/368-v5.2-brcmfmac-fix-leak-of-mypkt-on-error-return-path.patch @@ -20,7 +20,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c -@@ -617,15 +617,13 @@ int brcmf_sdiod_send_buf(struct brcmf_sd +@@ -628,15 +628,13 @@ int brcmf_sdiod_send_buf(struct brcmf_sd err = brcmf_sdiod_set_backplane_window(sdiodev, addr); if (err) diff --git a/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch b/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch index 5eb1dc550a..0dbf15e4dd 100644 --- a/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch +++ b/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch @@ -75,7 +75,7 @@ #endif /* B43_PIO_H_ */ --- a/drivers/net/wireless/broadcom/b43/Kconfig +++ b/drivers/net/wireless/broadcom/b43/Kconfig -@@ -98,7 +98,7 @@ config B43_BCMA_PIO +@@ -99,7 +99,7 @@ config B43_BCMA_PIO default y config B43_PIO diff --git a/package/kernel/mac80211/patches/build/015-ipw200-mtu.patch b/package/kernel/mac80211/patches/build/015-ipw200-mtu.patch index d57d821fea..95816e93bf 100644 --- a/package/kernel/mac80211/patches/build/015-ipw200-mtu.patch +++ b/package/kernel/mac80211/patches/build/015-ipw200-mtu.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c -@@ -11498,6 +11498,15 @@ static const struct attribute_group ipw_ +@@ -11495,6 +11495,15 @@ static const struct attribute_group ipw_ .attrs = ipw_sysfs_entries, }; @@ -16,7 +16,7 @@ #ifdef CPTCFG_IPW2200_PROMISCUOUS static int ipw_prom_open(struct net_device *dev) { -@@ -11546,15 +11555,6 @@ static netdev_tx_t ipw_prom_hard_start_x +@@ -11543,15 +11552,6 @@ static netdev_tx_t ipw_prom_hard_start_x return NETDEV_TX_OK; } diff --git a/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch b/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch index 5714317839..295866d50f 100644 --- a/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch +++ b/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch @@ -1,9 +1,9 @@ --- a/local-symbols +++ b/local-symbols -@@ -398,43 +398,6 @@ USB_IPHETH= - USB_SIERRA_NET= +@@ -400,43 +400,6 @@ USB_SIERRA_NET= USB_VL600= USB_NET_CH9200= + USB_NET_AQC111= -SSB_POSSIBLE= -SSB= -SSB_SPROM= @@ -46,7 +46,7 @@ USB_WDM= --- a/drivers/net/wireless/broadcom/b43/Kconfig +++ b/drivers/net/wireless/broadcom/b43/Kconfig -@@ -61,21 +61,21 @@ endchoice +@@ -62,21 +62,21 @@ endchoice config B43_PCI_AUTOSELECT bool depends on B43 && SSB_PCIHOST_POSSIBLE @@ -72,7 +72,7 @@ ---help--- Broadcom 43xx device support for Soft-MAC SDIO devices. -@@ -94,13 +94,13 @@ config B43_SDIO +@@ -95,13 +95,13 @@ config B43_SDIO config B43_BCMA_PIO bool depends on B43 && B43_BCMA @@ -192,10 +192,10 @@ select BRCMUTIL --- a/Kconfig.local +++ b/Kconfig.local -@@ -1198,117 +1198,6 @@ config BACKPORTED_USB_VL600 - config BACKPORTED_USB_NET_CH9200 +@@ -1204,117 +1204,6 @@ config BACKPORTED_USB_NET_CH9200 + config BACKPORTED_USB_NET_AQC111 tristate - default USB_NET_CH9200 + default USB_NET_AQC111 -config BACKPORTED_SSB_POSSIBLE - tristate - default SSB_POSSIBLE diff --git a/package/kernel/mac80211/patches/rt2x00/007-rt2x00-rt2400pci-mark-expected-switch-fall-through.patch b/package/kernel/mac80211/patches/rt2x00/007-rt2x00-rt2400pci-mark-expected-switch-fall-through.patch deleted file mode 100644 index 2161ad9ef3..0000000000 --- a/package/kernel/mac80211/patches/rt2x00/007-rt2x00-rt2400pci-mark-expected-switch-fall-through.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6eba8fd2235237784dfd01da55c3210d493aebdb Mon Sep 17 00:00:00 2001 -From: "Gustavo A. R. Silva" -Date: Mon, 22 Oct 2018 22:44:34 +0200 -Subject: [PATCH 07/28] rt2x00: rt2400pci: mark expected switch fall-through - -In preparation to enabling -Wimplicit-fallthrough, mark switch cases -where we are expecting to fall through. - -Signed-off-by: Gustavo A. R. Silva -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c -@@ -1302,7 +1302,7 @@ static void rt2400pci_txdone(struct rt2x - break; - case 2: /* Failure, excessive retries */ - __set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags); -- /* Don't break, this is a failed frame! */ -+ /* Fall through - this is a failed frame! */ - default: /* Failure */ - __set_bit(TXDONE_FAILURE, &txdesc.flags); - } diff --git a/package/kernel/mac80211/patches/rt2x00/008-rt2x00-rt2500pci-mark-expected-switch-fall-through.patch b/package/kernel/mac80211/patches/rt2x00/008-rt2x00-rt2500pci-mark-expected-switch-fall-through.patch deleted file mode 100644 index d10de6b0e5..0000000000 --- a/package/kernel/mac80211/patches/rt2x00/008-rt2x00-rt2500pci-mark-expected-switch-fall-through.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 10bb92217747c3384a01ebec005faa2f5e72bbd8 Mon Sep 17 00:00:00 2001 -From: "Gustavo A. R. Silva" -Date: Mon, 22 Oct 2018 22:45:19 +0200 -Subject: [PATCH 08/28] rt2x00: rt2500pci: mark expected switch fall-through - -In preparation to enabling -Wimplicit-fallthrough, mark switch cases -where we are expecting to fall through. - -Signed-off-by: Gustavo A. R. Silva -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c -@@ -1430,7 +1430,7 @@ static void rt2500pci_txdone(struct rt2x - break; - case 2: /* Failure, excessive retries */ - __set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags); -- /* Don't break, this is a failed frame! */ -+ /* Fall through - this is a failed frame! */ - default: /* Failure */ - __set_bit(TXDONE_FAILURE, &txdesc.flags); - } diff --git a/package/kernel/mac80211/patches/rt2x00/009-rt2x00-rt2800lib-mark-expected-switch-fall-throughs.patch b/package/kernel/mac80211/patches/rt2x00/009-rt2x00-rt2800lib-mark-expected-switch-fall-throughs.patch deleted file mode 100644 index 99f971b95f..0000000000 --- a/package/kernel/mac80211/patches/rt2x00/009-rt2x00-rt2800lib-mark-expected-switch-fall-throughs.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 916e6bbcfcff6cc5d7d33bba8557a30f3af50326 Mon Sep 17 00:00:00 2001 -From: "Gustavo A. R. Silva" -Date: Mon, 22 Oct 2018 22:46:03 +0200 -Subject: [PATCH 09/28] rt2x00: rt2800lib: mark expected switch fall-throughs - -In preparation to enabling -Wimplicit-fallthrough, mark switch cases -where we are expecting to fall through. - -Addresses-Coverity-ID: 145198 ("Missing break in switch") -Signed-off-by: Gustavo A. R. Silva -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -2482,6 +2482,7 @@ static void rt2800_config_channel_rf3052 - switch (rt2x00dev->default_ant.tx_chain_num) { - case 1: - rt2x00_set_field8(&rfcsr, RFCSR1_TX1_PD, 1); -+ /* fall through */ - case 2: - rt2x00_set_field8(&rfcsr, RFCSR1_TX2_PD, 1); - break; -@@ -2490,6 +2491,7 @@ static void rt2800_config_channel_rf3052 - switch (rt2x00dev->default_ant.rx_chain_num) { - case 1: - rt2x00_set_field8(&rfcsr, RFCSR1_RX1_PD, 1); -+ /* fall through */ - case 2: - rt2x00_set_field8(&rfcsr, RFCSR1_RX2_PD, 1); - break; -@@ -9457,8 +9459,10 @@ static int rt2800_probe_hw_mode(struct r - switch (rx_chains) { - case 3: - spec->ht.mcs.rx_mask[2] = 0xff; -+ /* fall through */ - case 2: - spec->ht.mcs.rx_mask[1] = 0xff; -+ /* fall through */ - case 1: - spec->ht.mcs.rx_mask[0] = 0xff; - spec->ht.mcs.rx_mask[4] = 0x1; /* MCS32 */ diff --git a/package/kernel/mac80211/patches/rt2x00/010-rt2x00-rt61pci-mark-expected-switch-fall-through.patch b/package/kernel/mac80211/patches/rt2x00/010-rt2x00-rt61pci-mark-expected-switch-fall-through.patch deleted file mode 100644 index 5b0f96d293..0000000000 --- a/package/kernel/mac80211/patches/rt2x00/010-rt2x00-rt61pci-mark-expected-switch-fall-through.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 641dd8068ecb078e7d12efe465df202bc16ca5eb Mon Sep 17 00:00:00 2001 -From: "Gustavo A. R. Silva" -Date: Mon, 22 Oct 2018 22:46:47 +0200 -Subject: [PATCH 10/28] rt2x00: rt61pci: mark expected switch fall-through - -In preparation to enabling -Wimplicit-fallthrough, mark switch cases -where we are expecting to fall through. - -Signed-off-by: Gustavo A. R. Silva -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/ralink/rt2x00/rt61pci.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c -@@ -2226,7 +2226,7 @@ static void rt61pci_txdone(struct rt2x00 - break; - case 6: /* Failure, excessive retries */ - __set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags); -- /* Don't break, this is a failed frame! */ -+ /* Fall through - this is a failed frame! */ - default: /* Failure */ - __set_bit(TXDONE_FAILURE, &txdesc.flags); - } diff --git a/package/kernel/mac80211/patches/rt2x00/011-cross-tree-phase-out-dma_zalloc_coherent.patch b/package/kernel/mac80211/patches/rt2x00/011-cross-tree-phase-out-dma_zalloc_coherent.patch deleted file mode 100644 index 8100eb063b..0000000000 --- a/package/kernel/mac80211/patches/rt2x00/011-cross-tree-phase-out-dma_zalloc_coherent.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 750afb08ca71310fcf0c4e2cb1565c63b8235b60 Mon Sep 17 00:00:00 2001 -From: Luis Chamberlain -Date: Fri, 4 Jan 2019 09:23:09 +0100 -Subject: [PATCH 11/28] cross-tree: phase out dma_zalloc_coherent() - -We already need to zero out memory for dma_alloc_coherent(), as such -using dma_zalloc_coherent() is superflous. Phase it out. - -This change was generated with the following Coccinelle SmPL patch: - -@ replace_dma_zalloc_coherent @ -expression dev, size, data, handle, flags; -@@ - --dma_zalloc_coherent(dev, size, handle, flags) -+dma_alloc_coherent(dev, size, handle, flags) - -Suggested-by: Christoph Hellwig -Signed-off-by: Luis Chamberlain -[hch: re-ran the script on the latest tree] -Signed-off-by: Christoph Hellwig ---- - drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c -@@ -119,9 +119,9 @@ static int rt2x00mmio_alloc_queue_dma(st - /* - * Allocate DMA memory for descriptor and buffer. - */ -- addr = dma_zalloc_coherent(rt2x00dev->dev, -- queue->limit * queue->desc_size, &dma, -- GFP_KERNEL); -+ addr = dma_alloc_coherent(rt2x00dev->dev, -+ queue->limit * queue->desc_size, &dma, -+ GFP_KERNEL); - if (!addr) - return -ENOMEM; - diff --git a/package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch b/package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch index 4821466d75..f7ed1511bc 100644 --- a/package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch +++ b/package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch @@ -25,7 +25,7 @@ Signed-off-by: Stanislaw Gruszka --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -6666,6 +6666,11 @@ int cfg80211_external_auth_request(struc +@@ -6940,6 +6940,11 @@ void cfg80211_pmsr_complete(struct wirel #define wiphy_info(wiphy, format, args...) \ dev_info(&(wiphy)->dev, format, ##args) diff --git a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch index 3b1aa7f596..707fad3911 100644 --- a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch +++ b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -307,6 +307,7 @@ RT2X00_LIB_FIRMWARE= +@@ -308,6 +308,7 @@ RT2X00_LIB_FIRMWARE= RT2X00_LIB_CRYPTO= RT2X00_LIB_LEDS= RT2X00_LIB_DEBUGFS= diff --git a/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch b/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch index ed96d260bd..c062909852 100644 --- a/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch +++ b/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3834,6 +3834,12 @@ out: +@@ -3837,6 +3837,12 @@ out: netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev) { diff --git a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch index d70a36bb26..4b517d32f0 100644 --- a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch +++ b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch @@ -18,7 +18,7 @@ static int ieee80211_ifa6_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -1232,14 +1232,14 @@ int ieee80211_register_hw(struct ieee802 +@@ -1234,14 +1234,14 @@ int ieee80211_register_hw(struct ieee802 rtnl_unlock(); @@ -35,7 +35,7 @@ local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed; result = register_inet6addr_notifier(&local->ifa6_notifier); if (result) -@@ -1248,13 +1248,13 @@ int ieee80211_register_hw(struct ieee802 +@@ -1250,13 +1250,13 @@ int ieee80211_register_hw(struct ieee802 return 0; @@ -52,7 +52,7 @@ fail_ifa: #endif rtnl_lock(); -@@ -1283,10 +1283,10 @@ void ieee80211_unregister_hw(struct ieee +@@ -1285,10 +1285,10 @@ void ieee80211_unregister_hw(struct ieee tasklet_kill(&local->tx_pending_tasklet); tasklet_kill(&local->tasklet); diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index 8a203bc102..07567b64a7 100644 --- a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2253,7 +2253,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2256,7 +2256,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/subsys/311-mac80211-fix-memory-accounting-with-A-MSDU-aggregati.patch b/package/kernel/mac80211/patches/subsys/311-mac80211-fix-memory-accounting-with-A-MSDU-aggregati.patch index f761b1df2e..025ea09b6f 100644 --- a/package/kernel/mac80211/patches/subsys/311-mac80211-fix-memory-accounting-with-A-MSDU-aggregati.patch +++ b/package/kernel/mac80211/patches/subsys/311-mac80211-fix-memory-accounting-with-A-MSDU-aggregati.patch @@ -30,10 +30,10 @@ Signed-off-by: Felix Fietkau __be16 len; void *data; bool ret = false; -@@ -3249,12 +3250,13 @@ static bool ieee80211_amsdu_aggregate(st +@@ -3252,12 +3253,13 @@ static bool ieee80211_amsdu_aggregate(st flow = fq_flow_classify(fq, tin, skb, fq_flow_get_default_func); head = skb_peek_tail(&flow->queue); - if (!head) + if (!head || skb_is_gso(head)) - goto out; + goto unlock; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau nfrags = 1 + skb_shinfo(skb)->nr_frags; nfrags += 1 + skb_shinfo(head)->nr_frags; -@@ -3315,6 +3317,9 @@ out_recalc: +@@ -3318,6 +3320,9 @@ out_recalc: fq_recalc_backlog(fq, tin, flow); } out: diff --git a/package/kernel/mac80211/patches/subsys/312-mac80211-minstrel_ht-add-flag-to-indicate-missing-in.patch b/package/kernel/mac80211/patches/subsys/312-mac80211-minstrel_ht-add-flag-to-indicate-missing-in.patch index bc7d894572..dff665fe96 100644 --- a/package/kernel/mac80211/patches/subsys/312-mac80211-minstrel_ht-add-flag-to-indicate-missing-in.patch +++ b/package/kernel/mac80211/patches/subsys/312-mac80211-minstrel_ht-add-flag-to-indicate-missing-in.patch @@ -14,7 +14,7 @@ Signed-off-by: Johannes Berg --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -2181,6 +2181,9 @@ struct ieee80211_txq { +@@ -2184,6 +2184,9 @@ struct ieee80211_txq { * MMPDUs on station interfaces. This of course requires the driver to use * TXQs to start with. * @@ -24,7 +24,7 @@ Signed-off-by: Johannes Berg * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ enum ieee80211_hw_flags { -@@ -2229,6 +2232,7 @@ enum ieee80211_hw_flags { +@@ -2232,6 +2235,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_BUFF_MMPDU_TXQ, IEEE80211_HW_SUPPORTS_VHT_EXT_NSS_BW, IEEE80211_HW_STA_MMPDU_TXQ, diff --git a/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch b/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch index 9997b90fa2..30cda6dd6c 100644 --- a/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch +++ b/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch @@ -49,7 +49,7 @@ Signed-off-by: Johannes Berg * * For AP powersave TIM handling, the driver only needs to indicate if it has * buffered packets in the driver specific data structures by calling -@@ -6092,7 +6098,8 @@ void ieee80211_unreserve_tid(struct ieee +@@ -6107,7 +6113,8 @@ void ieee80211_unreserve_tid(struct ieee * ieee80211_tx_dequeue - dequeue a packet from a software tx queue * * @hw: pointer as obtained from ieee80211_alloc_hw() @@ -58,8 +58,8 @@ Signed-off-by: Johannes Berg + * ieee80211_next_txq() * * Returns the skb if successful, %NULL if no frame was available. - */ -@@ -6100,6 +6107,54 @@ struct sk_buff *ieee80211_tx_dequeue(str + * +@@ -6123,6 +6130,54 @@ struct sk_buff *ieee80211_tx_dequeue(str struct ieee80211_txq *txq); /** @@ -127,8 +127,8 @@ Signed-off-by: Johannes Berg } --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h -@@ -1202,6 +1202,15 @@ drv_get_ftm_responder_stats(struct ieee8 - return ret; +@@ -1236,6 +1236,15 @@ static inline void drv_abort_pmsr(struct + trace_drv_return_void(local); } +static inline void schedule_and_wake_txq(struct ieee80211_local *local, @@ -145,7 +145,7 @@ Signed-off-by: Johannes Berg struct cfg80211_nan_conf *conf) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -830,6 +830,8 @@ enum txq_info_flags { +@@ -831,6 +831,8 @@ enum txq_info_flags { * a fq_flow which is already owned by a different tin * @def_cvars: codel vars for @def_flow * @frags: used to keep fragments created after dequeue @@ -154,7 +154,7 @@ Signed-off-by: Johannes Berg */ struct txq_info { struct fq_tin tin; -@@ -837,6 +839,8 @@ struct txq_info { +@@ -838,6 +840,8 @@ struct txq_info { struct codel_vars def_cvars; struct codel_stats cstats; struct sk_buff_head frags; @@ -163,7 +163,7 @@ Signed-off-by: Johannes Berg unsigned long flags; /* keep last! */ -@@ -1128,6 +1132,11 @@ struct ieee80211_local { +@@ -1129,6 +1133,11 @@ struct ieee80211_local { struct codel_vars *cvars; struct codel_params cparams; @@ -229,7 +229,7 @@ Signed-off-by: Johannes Berg return true; } -@@ -3638,6 +3642,60 @@ out: +@@ -3641,6 +3645,60 @@ out: } EXPORT_SYMBOL(ieee80211_tx_dequeue); diff --git a/package/kernel/mac80211/patches/subsys/321-cfg80211-Add-airtime-statistics-and-settings.patch b/package/kernel/mac80211/patches/subsys/321-cfg80211-Add-airtime-statistics-and-settings.patch index 927979f841..136bc85c15 100644 --- a/package/kernel/mac80211/patches/subsys/321-cfg80211-Add-airtime-statistics-and-settings.patch +++ b/package/kernel/mac80211/patches/subsys/321-cfg80211-Add-airtime-statistics-and-settings.patch @@ -19,7 +19,7 @@ Signed-off-by: Johannes Berg --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -1001,6 +1001,7 @@ enum station_parameters_apply_mask { +@@ -1003,6 +1003,7 @@ enum station_parameters_apply_mask { * @support_p2p_ps: information if station supports P2P PS mechanism * @he_capa: HE capabilities of station * @he_capa_len: the length of the HE capabilities @@ -27,7 +27,7 @@ Signed-off-by: Johannes Berg */ struct station_parameters { const u8 *supported_rates; -@@ -1030,6 +1031,7 @@ struct station_parameters { +@@ -1032,6 +1033,7 @@ struct station_parameters { int support_p2p_ps; const struct ieee80211_he_cap_elem *he_capa; u8 he_capa_len; @@ -35,16 +35,16 @@ Signed-off-by: Johannes Berg }; /** -@@ -1297,6 +1299,8 @@ struct cfg80211_tid_stats { - * @rx_beacon_signal_avg: signal strength average (in dBm) for beacons received +@@ -1300,6 +1302,8 @@ struct cfg80211_tid_stats { * from this peer + * @connected_to_gate: true if mesh STA has a path to mesh gate * @rx_duration: aggregate PPDU duration(usecs) for all the frames from a peer + * @tx_duration: aggregate PPDU duration(usecs) for all the frames to a peer + * @airtime_weight: current airtime scheduling weight * @pertid: per-TID statistics, see &struct cfg80211_tid_stats, using the last * (IEEE80211_NUM_TIDS) index for MSDUs not encapsulated in QoS-MPDUs. * Note that this doesn't use the @filled bit, but is used if non-NULL. -@@ -1347,8 +1351,9 @@ struct station_info { +@@ -1350,8 +1354,9 @@ struct station_info { u32 expected_throughput; @@ -53,9 +53,9 @@ Signed-off-by: Johannes Berg u64 rx_duration; + u64 rx_beacon; u8 rx_beacon_signal_avg; - struct cfg80211_tid_stats *pertid; - s8 ack_signal; -@@ -1356,6 +1361,8 @@ struct station_info { + u8 connected_to_gate; + +@@ -1361,6 +1366,8 @@ struct station_info { u32 rx_mpdu_count; u32 fcs_err_count; @@ -64,7 +64,7 @@ Signed-off-by: Johannes Berg }; #if IS_ENABLED(CPTCFG_CFG80211) -@@ -2381,6 +2388,8 @@ enum wiphy_params_flags { +@@ -2391,6 +2398,8 @@ enum wiphy_params_flags { WIPHY_PARAM_TXQ_QUANTUM = 1 << 8, }; @@ -75,9 +75,9 @@ Signed-off-by: Johannes Berg * --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h -@@ -2254,6 +2254,9 @@ enum nl80211_commands { - * @NL80211_ATTR_FTM_RESPONDER_STATS: Nested attribute with FTM responder - * statistics, see &enum nl80211_ftm_responder_stats. +@@ -2299,6 +2299,9 @@ enum nl80211_commands { + * This is also used for capability advertisement in the wiphy information, + * with the appropriate sub-attributes. * + * @NL80211_ATTR_AIRTIME_WEIGHT: Station's weight when scheduled by the airtime + * scheduler. @@ -85,43 +85,36 @@ Signed-off-by: Johannes Berg * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2699,6 +2702,12 @@ enum nl80211_attrs { +@@ -2748,6 +2751,8 @@ enum nl80211_attrs { - NL80211_ATTR_FTM_RESPONDER_STATS, + NL80211_ATTR_PEER_MEASUREMENTS, -+ /* not backported yet */ -+ NL80211_ATTR_TIMEOUT, -+ NL80211_ATTR_PEER_MEASUREMENTS, -+ + NL80211_ATTR_AIRTIME_WEIGHT, + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, -@@ -3074,6 +3083,9 @@ enum nl80211_sta_bss_param { - * with an FCS error (u32, from this station). This count may not include - * some packets with an FCS error due to TA corruption. Hence this counter +@@ -3125,6 +3130,9 @@ enum nl80211_sta_bss_param { * might not be fully accurate. + * @NL80211_STA_INFO_CONNECTED_TO_GATE: set to true if STA has a path to a + * mesh gate (u8, 0 or 1) + * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames + * sent to the station (u64, usec) + * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16) * @__NL80211_STA_INFO_AFTER_LAST: internal * @NL80211_STA_INFO_MAX: highest possible station info attribute */ -@@ -3117,6 +3129,12 @@ enum nl80211_sta_info { - NL80211_STA_INFO_RX_MPDUS, +@@ -3169,6 +3177,9 @@ enum nl80211_sta_info { NL80211_STA_INFO_FCS_ERROR_COUNT, + NL80211_STA_INFO_CONNECTED_TO_GATE, -+ /* not backported yet */ -+ NL80211_STA_INFO_CONNECTED_TO_GATE, -+ + NL80211_STA_INFO_TX_DURATION, + NL80211_STA_INFO_AIRTIME_WEIGHT, + /* keep last */ __NL80211_STA_INFO_AFTER_LAST, NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1 -@@ -5258,6 +5276,10 @@ enum nl80211_feature_flags { +@@ -5316,6 +5327,10 @@ enum nl80211_feature_flags { * if this flag is not set. Ignoring this can leak clear text packets and/or * freeze the connection. * @@ -132,7 +125,7 @@ Signed-off-by: Johannes Berg * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. */ -@@ -5298,6 +5320,8 @@ enum nl80211_ext_feature_index { +@@ -5356,6 +5371,8 @@ enum nl80211_ext_feature_index { NL80211_EXT_FEATURE_CAN_REPLACE_PTK0, NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER, @@ -143,15 +136,15 @@ Signed-off-by: Johannes Berg MAX_NL80211_EXT_FEATURES = NUM_NL80211_EXT_FEATURES - 1 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -497,6 +497,7 @@ static const struct nla_policy nl80211_p - .type = NLA_NESTED, - .validation_data = nl80211_ftm_responder_policy, - }, +@@ -557,6 +557,7 @@ const struct nla_policy nl80211_policy[N + [NL80211_ATTR_PEER_MEASUREMENTS] = + NLA_POLICY_NESTED(NL80211_PMSR_ATTR_MAX, + nl80211_pmsr_attr_policy), + [NL80211_ATTR_AIRTIME_WEIGHT] = NLA_POLICY_MIN(NLA_U16, 1), }; /* policy for the key attributes */ -@@ -4694,6 +4695,11 @@ static int nl80211_send_station(struct s +@@ -4855,6 +4856,11 @@ static int nl80211_send_station(struct s PUT_SINFO(PLID, plid, u16); PUT_SINFO(PLINK_STATE, plink_state, u8); PUT_SINFO_U64(RX_DURATION, rx_duration); @@ -163,7 +156,7 @@ Signed-off-by: Johannes Berg switch (rdev->wiphy.signal_type) { case CFG80211_SIGNAL_TYPE_MBM: -@@ -5312,6 +5318,15 @@ static int nl80211_set_station(struct sk +@@ -5474,6 +5480,15 @@ static int nl80211_set_station(struct sk nla_get_u8(info->attrs[NL80211_ATTR_OPMODE_NOTIF]); } @@ -179,7 +172,7 @@ Signed-off-by: Johannes Berg /* Include parameters for TDLS peer (will check later) */ err = nl80211_set_station_tdls(info, ¶ms); if (err) -@@ -5440,6 +5455,15 @@ static int nl80211_new_station(struct sk +@@ -5602,6 +5617,15 @@ static int nl80211_new_station(struct sk params.plink_action = nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]); diff --git a/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch b/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch index 8a7336c28e..1975add1c0 100644 --- a/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch +++ b/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch @@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -2361,6 +2361,9 @@ enum ieee80211_hw_flags { +@@ -2364,6 +2364,9 @@ enum ieee80211_hw_flags { * @tx_sk_pacing_shift: Pacing shift to set on TCP sockets when frames from * them are encountered. The default should typically not be changed, * unless the driver has good reasons for needing more buffers. @@ -46,7 +46,7 @@ Signed-off-by: Johannes Berg */ struct ieee80211_hw { struct ieee80211_conf conf; -@@ -2397,6 +2400,7 @@ struct ieee80211_hw { +@@ -2400,6 +2403,7 @@ struct ieee80211_hw { const struct ieee80211_cipher_scheme *cipher_schemes; u8 max_nan_de_entries; u8 tx_sk_pacing_shift; @@ -54,7 +54,7 @@ Signed-off-by: Johannes Berg }; static inline bool _ieee80211_hw_check(struct ieee80211_hw *hw, -@@ -5397,6 +5401,34 @@ void ieee80211_sta_eosp(struct ieee80211 +@@ -5412,6 +5416,34 @@ void ieee80211_sta_eosp(struct ieee80211 void ieee80211_send_eosp_nullfunc(struct ieee80211_sta *pubsta, int tid); /** @@ -89,7 +89,7 @@ Signed-off-by: Johannes Berg * ieee80211_iter_keys - iterate keys programmed into the device * @hw: pointer obtained from ieee80211_alloc_hw() * @vif: virtual interface to iterate, may be %NULL for all -@@ -6155,6 +6187,33 @@ void ieee80211_txq_schedule_end(struct i +@@ -6178,6 +6210,33 @@ void ieee80211_txq_schedule_end(struct i __releases(txq_lock); /** @@ -240,7 +240,7 @@ Signed-off-by: Johannes Berg sta->debugfs_dir, --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1137,6 +1137,8 @@ struct ieee80211_local { +@@ -1138,6 +1138,8 @@ struct ieee80211_local { struct list_head active_txqs[IEEE80211_NUM_ACS]; u16 schedule_round[IEEE80211_NUM_ACS]; @@ -373,7 +373,7 @@ Signed-off-by: Johannes Berg struct sta_info; /** -@@ -563,6 +573,9 @@ struct sta_info { +@@ -565,6 +575,9 @@ struct sta_info { } tx_stats; u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1]; @@ -412,7 +412,7 @@ Signed-off-by: Johannes Berg spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]); list_del_init(&txqi->schedule_order); spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]); -@@ -3649,11 +3652,28 @@ struct ieee80211_txq *ieee80211_next_txq +@@ -3652,11 +3655,28 @@ struct ieee80211_txq *ieee80211_next_txq lockdep_assert_held(&local->active_txq_lock[ac]); @@ -442,7 +442,7 @@ Signed-off-by: Johannes Berg return NULL; list_del_init(&txqi->schedule_order); -@@ -3671,12 +3691,74 @@ void ieee80211_return_txq(struct ieee802 +@@ -3674,12 +3694,74 @@ void ieee80211_return_txq(struct ieee802 lockdep_assert_held(&local->active_txq_lock[txq->ac]); if (list_empty(&txqi->schedule_order) && diff --git a/package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch b/package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch index 14b8d021be..5192a547e9 100644 --- a/package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch +++ b/package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch @@ -16,7 +16,7 @@ Signed-off-by: Johannes Berg --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -6187,6 +6187,19 @@ void ieee80211_txq_schedule_end(struct i +@@ -6210,6 +6210,19 @@ void ieee80211_txq_schedule_end(struct i __releases(txq_lock); /** @@ -38,7 +38,7 @@ Signed-off-by: Johannes Berg * This function is used to check whether given txq is allowed to transmit by --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h -@@ -1205,9 +1205,7 @@ drv_get_ftm_responder_stats(struct ieee8 +@@ -1239,9 +1239,7 @@ static inline void drv_abort_pmsr(struct static inline void schedule_and_wake_txq(struct ieee80211_local *local, struct txq_info *txqi) { @@ -51,7 +51,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3711,6 +3711,19 @@ void ieee80211_return_txq(struct ieee802 +@@ -3714,6 +3714,19 @@ void ieee80211_return_txq(struct ieee802 } EXPORT_SYMBOL(ieee80211_return_txq); diff --git a/package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch b/package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch index cceb4716fc..079ad241db 100644 --- a/package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch +++ b/package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau if (likely(sta)) { if (!IS_ERR(sta)) tx->sta = sta; -@@ -3561,6 +3561,7 @@ begin: +@@ -3564,6 +3564,7 @@ begin: tx.local = local; tx.skb = skb; tx.sdata = vif_to_sdata(info->control.vif); @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau if (txq->sta) tx.sta = container_of(txq->sta, struct sta_info, sta); -@@ -3587,7 +3588,7 @@ begin: +@@ -3590,7 +3591,7 @@ begin: if (tx.key && (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) @@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs, tx.key, skb); -@@ -4038,6 +4039,7 @@ ieee80211_build_data_template(struct iee +@@ -4041,6 +4042,7 @@ ieee80211_build_data_template(struct iee hdr = (void *)skb->data; tx.sta = sta_info_get(sdata, hdr->addr1); tx.skb = skb; @@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau rcu_read_unlock(); --- a/net/mac80211/util.c +++ b/net/mac80211/util.c -@@ -1414,6 +1414,7 @@ void ieee80211_send_auth(struct ieee8021 +@@ -1416,6 +1416,7 @@ void ieee80211_send_auth(struct ieee8021 struct ieee80211_local *local = sdata->local; struct sk_buff *skb; struct ieee80211_mgmt *mgmt; @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau int err; /* 24 + 6 = header + auth_algo + auth_transaction + status_code */ -@@ -1437,8 +1438,10 @@ void ieee80211_send_auth(struct ieee8021 +@@ -1439,8 +1440,10 @@ void ieee80211_send_auth(struct ieee8021 skb_put_data(skb, extra, extra_len); if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) { diff --git a/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch b/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch index 7139182e7e..85a788d2b9 100644 --- a/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch +++ b/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -2190,6 +2190,9 @@ struct ieee80211_txq { +@@ -2193,6 +2193,9 @@ struct ieee80211_txq { * @IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN: Driver does not report accurate A-MPDU * length in tx status information * @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ enum ieee80211_hw_flags { -@@ -2239,6 +2242,7 @@ enum ieee80211_hw_flags { +@@ -2242,6 +2245,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_SUPPORTS_VHT_EXT_NSS_BW, IEEE80211_HW_STA_MMPDU_TXQ, IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN, @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* keep last, obviously */ NUM_IEEE80211_HW_FLAGS -@@ -2530,6 +2534,40 @@ ieee80211_get_alt_retry_rate(const struc +@@ -2533,6 +2537,40 @@ ieee80211_get_alt_retry_rate(const struc void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb); /** @@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau if (!(mshdr->flags & MESH_FLAGS_AE)) { --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2639,7 +2639,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 +@@ -2643,7 +2643,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 struct ieee80211_local *local = rx->local; struct ieee80211_sub_if_data *sdata = rx->sdata; struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; @@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau int tailroom = 0; hdr = (struct ieee80211_hdr *) skb->data; -@@ -2732,7 +2732,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 +@@ -2736,7 +2736,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 if (sdata->crypto_tx_tailroom_needed_cnt) tailroom = IEEE80211_ENCRYPT_TAILROOM; @@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau sdata->encrypt_headroom, tailroom, GFP_ATOMIC); if (!fwd_skb) -@@ -2764,6 +2766,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 +@@ -2768,6 +2770,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 return RX_DROP_MONITOR; } @@ -274,7 +274,7 @@ Signed-off-by: Felix Fietkau /* We store the key here so there's no point in using rcu_dereference() * but that's fine because the code that changes the pointers will call * this function after doing so. For a single CPU that would be enough, -@@ -3561,7 +3567,7 @@ begin: +@@ -3564,7 +3570,7 @@ begin: tx.local = local; tx.skb = skb; tx.sdata = vif_to_sdata(info->control.vif); @@ -283,7 +283,7 @@ Signed-off-by: Felix Fietkau if (txq->sta) tx.sta = container_of(txq->sta, struct sta_info, sta); -@@ -4039,7 +4045,7 @@ ieee80211_build_data_template(struct iee +@@ -4042,7 +4048,7 @@ ieee80211_build_data_template(struct iee hdr = (void *)skb->data; tx.sta = sta_info_get(sdata, hdr->addr1); tx.skb = skb; diff --git a/package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch b/package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch index d2c1a842f6..02e8a06c0c 100644 --- a/package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch +++ b/package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -6182,8 +6182,6 @@ struct sk_buff *ieee80211_tx_dequeue(str +@@ -6205,8 +6205,6 @@ struct sk_buff *ieee80211_tx_dequeue(str * @hw: pointer as obtained from ieee80211_alloc_hw() * @ac: AC number to return packets from. * @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau * Returns the next txq if successful, %NULL if no queue is eligible. If a txq * is returned, it should be returned with ieee80211_return_txq() after the * driver has finished scheduling it. -@@ -6191,51 +6189,41 @@ struct sk_buff *ieee80211_tx_dequeue(str +@@ -6214,51 +6212,41 @@ struct sk_buff *ieee80211_tx_dequeue(str struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac); /** @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3655,16 +3655,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); +@@ -3658,16 +3658,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) { struct ieee80211_local *local = hw_to_local(hw); @@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau if (txqi->txq.sta) { struct sta_info *sta = container_of(txqi->txq.sta, -@@ -3681,21 +3682,25 @@ struct ieee80211_txq *ieee80211_next_txq +@@ -3684,21 +3685,25 @@ struct ieee80211_txq *ieee80211_next_txq if (txqi->schedule_round == local->schedule_round[ac]) @@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau if (list_empty(&txqi->schedule_order) && (!skb_queue_empty(&txqi->frags) || txqi->tin.backlog_packets)) { -@@ -3715,18 +3720,7 @@ void ieee80211_return_txq(struct ieee802 +@@ -3718,18 +3723,7 @@ void ieee80211_return_txq(struct ieee802 list_add_tail(&txqi->schedule_order, &local->active_txqs[txq->ac]); } @@ -165,7 +165,7 @@ Signed-off-by: Felix Fietkau spin_unlock_bh(&local->active_txq_lock[txq->ac]); } EXPORT_SYMBOL(ieee80211_schedule_txq); -@@ -3739,7 +3733,7 @@ bool ieee80211_txq_may_transmit(struct i +@@ -3742,7 +3736,7 @@ bool ieee80211_txq_may_transmit(struct i struct sta_info *sta; u8 ac = txq->ac; @@ -174,7 +174,7 @@ Signed-off-by: Felix Fietkau if (!txqi->txq.sta) goto out; -@@ -3769,34 +3763,27 @@ bool ieee80211_txq_may_transmit(struct i +@@ -3772,34 +3766,27 @@ bool ieee80211_txq_may_transmit(struct i sta->airtime[ac].deficit += sta->airtime_weight; list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]); diff --git a/package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch b/package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch index dbf71105d6..17fad4ca6a 100644 --- a/package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch +++ b/package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch @@ -103,7 +103,7 @@ Signed-off-by: Felix Fietkau int orig_truesize; __be16 len; void *data; -@@ -3253,6 +3255,8 @@ static bool ieee80211_amsdu_aggregate(st +@@ -3256,6 +3258,8 @@ static bool ieee80211_amsdu_aggregate(st max_amsdu_len = min_t(int, max_amsdu_len, sta->sta.max_tid_amsdu_len[tid]); @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau spin_lock_bh(&fq->lock); /* TODO: Ideally aggregation should be done on dequeue to remain -@@ -3260,7 +3264,8 @@ static bool ieee80211_amsdu_aggregate(st +@@ -3263,7 +3267,8 @@ static bool ieee80211_amsdu_aggregate(st */ tin = &txqi->tin; @@ -120,5 +120,5 @@ Signed-off-by: Felix Fietkau + flow = fq_flow_classify(fq, tin, flow_idx, skb, + fq_flow_get_default_func); head = skb_peek_tail(&flow->queue); - if (!head) + if (!head || skb_is_gso(head)) goto unlock; diff --git a/package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch b/package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch index 7f74bf462a..65c5a9e191 100644 --- a/package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch +++ b/package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3543,6 +3543,7 @@ struct sk_buff *ieee80211_tx_dequeue(str +@@ -3546,6 +3546,7 @@ struct sk_buff *ieee80211_tx_dequeue(str ieee80211_tx_result r; struct ieee80211_vif *vif = txq->vif; @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau spin_lock_bh(&fq->lock); if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) || -@@ -3559,11 +3560,12 @@ struct sk_buff *ieee80211_tx_dequeue(str +@@ -3562,11 +3563,12 @@ struct sk_buff *ieee80211_tx_dequeue(str if (skb) goto out; @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau hdr = (struct ieee80211_hdr *)skb->data; info = IEEE80211_SKB_CB(skb); -@@ -3609,8 +3611,11 @@ begin: +@@ -3612,8 +3614,11 @@ begin: skb = __skb_dequeue(&tx.skbs); @@ -44,8 +44,8 @@ Signed-off-by: Felix Fietkau + } } - if (skb && skb_has_frag_list(skb) && -@@ -3649,6 +3654,7 @@ begin: + if (skb_has_frag_list(skb) && +@@ -3652,6 +3657,7 @@ begin: } IEEE80211_SKB_CB(skb)->control.vif = vif; diff --git a/package/kernel/mac80211/patches/subsys/357-mac80211-optimize-skb-resizing.patch b/package/kernel/mac80211/patches/subsys/357-mac80211-optimize-skb-resizing.patch index 6db383fd80..0e0a1b87ac 100644 --- a/package/kernel/mac80211/patches/subsys/357-mac80211-optimize-skb-resizing.patch +++ b/package/kernel/mac80211/patches/subsys/357-mac80211-optimize-skb-resizing.patch @@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1765,6 +1765,9 @@ void ieee80211_clear_fast_xmit(struct st +@@ -1766,6 +1766,9 @@ void ieee80211_clear_fast_xmit(struct st int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev, const u8 *buf, size_t len, const u8 *dest, __be16 proto, bool unencrypted); @@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau } if (encaps_data) -@@ -3413,7 +3403,6 @@ static bool ieee80211_xmit_fast(struct i +@@ -3416,7 +3406,6 @@ static bool ieee80211_xmit_fast(struct i struct ieee80211_local *local = sdata->local; u16 ethertype = (skb->data[12] << 8) | skb->data[13]; int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); @@ -188,7 +188,7 @@ Signed-off-by: Felix Fietkau struct ethhdr eth; struct ieee80211_tx_info *info; struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; -@@ -3465,10 +3454,7 @@ static bool ieee80211_xmit_fast(struct i +@@ -3468,10 +3457,7 @@ static bool ieee80211_xmit_fast(struct i * as the may-encrypt argument for the resize to not account for * more room than we already have in 'extra_head' */ diff --git a/package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch b/package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch index 050efad27b..7469c47fbd 100644 --- a/package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch +++ b/package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -6203,26 +6203,42 @@ static inline void ieee80211_txq_schedul +@@ -6226,26 +6226,42 @@ static inline void ieee80211_txq_schedul { } @@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau /** --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3691,8 +3691,9 @@ out: +@@ -3694,8 +3694,9 @@ out: } EXPORT_SYMBOL(ieee80211_next_txq); @@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau { struct ieee80211_local *local = hw_to_local(hw); struct txq_info *txqi = to_txq_info(txq); -@@ -3700,7 +3701,8 @@ void ieee80211_schedule_txq(struct ieee8 +@@ -3703,7 +3704,8 @@ void ieee80211_schedule_txq(struct ieee8 spin_lock_bh(&local->active_txq_lock[txq->ac]); if (list_empty(&txqi->schedule_order) && @@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau /* If airtime accounting is active, always enqueue STAs at the * head of the list to ensure that they only get moved to the * back by the airtime DRR scheduler once they have a negative -@@ -3720,7 +3722,7 @@ void ieee80211_schedule_txq(struct ieee8 +@@ -3723,7 +3725,7 @@ void ieee80211_schedule_txq(struct ieee8 spin_unlock_bh(&local->active_txq_lock[txq->ac]); } diff --git a/package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch b/package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch index 4215f3fbdf..5497c21faf 100644 --- a/package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch +++ b/package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -1547,7 +1547,15 @@ static void sta_ps_start(struct sta_info +@@ -1551,7 +1551,15 @@ static void sta_ps_start(struct sta_info return; for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) { diff --git a/package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch b/package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch index 88ed453dd9..4fd8ff63ea 100644 --- a/package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch +++ b/package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3789,6 +3789,7 @@ void __ieee80211_subif_start_xmit(struct +@@ -3792,6 +3792,7 @@ void __ieee80211_subif_start_xmit(struct u32 info_flags) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau struct sta_info *sta; struct sk_buff *next; -@@ -3802,7 +3803,15 @@ void __ieee80211_subif_start_xmit(struct +@@ -3805,7 +3806,15 @@ void __ieee80211_subif_start_xmit(struct if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) goto out_free; diff --git a/package/kernel/mac80211/patches/subsys/390-nl-mac-80211-allow-4addr-AP-operation-on-crypto-cont.patch b/package/kernel/mac80211/patches/subsys/390-nl-mac-80211-allow-4addr-AP-operation-on-crypto-cont.patch index 674a2dc266..ff313ff3b7 100644 --- a/package/kernel/mac80211/patches/subsys/390-nl-mac-80211-allow-4addr-AP-operation-on-crypto-cont.patch +++ b/package/kernel/mac80211/patches/subsys/390-nl-mac-80211-allow-4addr-AP-operation-on-crypto-cont.patch @@ -38,7 +38,7 @@ Signed-off-by: Johannes Berg --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3518,7 +3518,8 @@ struct cfg80211_ops { +@@ -3719,7 +3719,8 @@ struct cfg80211_ops { * on wiphy_new(), but can be changed by the driver if it has a good * reason to override the default * @WIPHY_FLAG_4ADDR_AP: supports 4addr mode even on AP (with a single station @@ -50,7 +50,7 @@ Signed-off-by: Johannes Berg * control port protocol ethertype. The device also honours the --- a/net/mac80211/util.c +++ b/net/mac80211/util.c -@@ -3667,7 +3667,9 @@ int ieee80211_check_combinations(struct +@@ -3673,7 +3673,9 @@ int ieee80211_check_combinations(struct } /* Always allow software iftypes */ @@ -63,7 +63,7 @@ Signed-off-by: Johannes Berg return 0; --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -1362,8 +1362,12 @@ static int cfg80211_netdev_notifier_call +@@ -1412,8 +1412,12 @@ static int cfg80211_netdev_notifier_call } break; case NETDEV_PRE_UP: @@ -79,7 +79,7 @@ Signed-off-by: Johannes Berg break; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -3233,8 +3233,7 @@ static int nl80211_new_interface(struct +@@ -3395,8 +3395,7 @@ static int nl80211_new_interface(struct if (info->attrs[NL80211_ATTR_IFTYPE]) type = nla_get_u32(info->attrs[NL80211_ATTR_IFTYPE]); @@ -89,7 +89,7 @@ Signed-off-by: Johannes Berg return -EOPNOTSUPP; if ((type == NL80211_IFTYPE_P2P_DEVICE || type == NL80211_IFTYPE_NAN || -@@ -3253,6 +3252,11 @@ static int nl80211_new_interface(struct +@@ -3415,6 +3414,11 @@ static int nl80211_new_interface(struct return err; } diff --git a/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch index 8e677c5a73..4cb3da144f 100644 --- a/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3022,6 +3022,7 @@ struct cfg80211_ftm_responder_stats { +@@ -3216,6 +3216,7 @@ struct cfg80211_pmsr_request { * (as advertised by the nl80211 feature flag.) * @get_tx_power: store the current TX power into the dbm variable; * return 0 if successful @@ -8,7 +8,7 @@ * * @set_wds_peer: set the WDS peer for a WDS interface * -@@ -3325,6 +3326,7 @@ struct cfg80211_ops { +@@ -3521,6 +3522,7 @@ struct cfg80211_ops { enum nl80211_tx_power_setting type, int mbm); int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm); @@ -18,7 +18,7 @@ const u8 *addr); --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1428,6 +1428,7 @@ enum ieee80211_smps_mode { +@@ -1431,6 +1431,7 @@ enum ieee80211_smps_mode { * * @power_level: requested transmit power (in dBm), backward compatibility * value only that is set to the minimum of all interfaces @@ -26,7 +26,7 @@ * * @chandef: the channel definition to tune to * @radar_enabled: whether radar detection is enabled -@@ -1448,6 +1449,7 @@ enum ieee80211_smps_mode { +@@ -1451,6 +1452,7 @@ enum ieee80211_smps_mode { struct ieee80211_conf { u32 flags; int power_level, dynamic_ps_timeout; @@ -36,7 +36,7 @@ u8 ps_dtim_period; --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h -@@ -2257,6 +2257,9 @@ enum nl80211_commands { +@@ -2302,6 +2302,9 @@ enum nl80211_commands { * @NL80211_ATTR_AIRTIME_WEIGHT: Station's weight when scheduled by the airtime * scheduler. * @@ -46,7 +46,7 @@ * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2708,6 +2711,8 @@ enum nl80211_attrs { +@@ -2753,6 +2756,8 @@ enum nl80211_attrs { NL80211_ATTR_AIRTIME_WEIGHT, @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2521,6 +2521,19 @@ static int ieee80211_get_tx_power(struct +@@ -2524,6 +2524,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -3914,6 +3927,7 @@ const struct cfg80211_ops mac80211_confi +@@ -3937,6 +3950,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -87,7 +87,7 @@ CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1369,6 +1369,7 @@ struct ieee80211_local { +@@ -1370,6 +1370,7 @@ struct ieee80211_local { int dynamic_ps_forced_timeout; int user_power_level; /* in dBm, for all interfaces */ @@ -129,15 +129,15 @@ local->user_power_level = IEEE80211_UNSET_POWER_LEVEL; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -498,6 +498,7 @@ static const struct nla_policy nl80211_p - .validation_data = nl80211_ftm_responder_policy, - }, +@@ -558,6 +558,7 @@ const struct nla_policy nl80211_policy[N + NLA_POLICY_NESTED(NL80211_PMSR_ATTR_MAX, + nl80211_pmsr_attr_policy), [NL80211_ATTR_AIRTIME_WEIGHT] = NLA_POLICY_MIN(NLA_U16, 1), + [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 }, }; /* policy for the key attributes */ -@@ -2636,6 +2637,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -2796,6 +2797,20 @@ static int nl80211_set_wiphy(struct sk_b if (result) return result; }