diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index c30d292a433..b3a8960fe86 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:=5.12.19-1 +PKG_VERSION:=5.13.19-1 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.12.19/ -PKG_HASH:=4233002bcf26237783cd517d93c27807e534234cef64def7e550c5f06b779d18 +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.13.19/ +PKG_HASH:=1eb761c1664d59a0a2d52847f240c9d02fc2e56fb27d862d2949bfb275187eef PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch index c3a28a361cb..e4e72786fe3 100644 --- a/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/ath10k/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 -@@ -9818,6 +9818,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -9820,6 +9820,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[] = { -@@ -10170,6 +10185,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -10172,6 +10187,12 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; diff --git a/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch index e4699f323bc..1f1e8d958d0 100644 --- a/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch @@ -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 -@@ -10187,7 +10187,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10189,7 +10189,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/mac80211/patches/ath9k/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch b/package/kernel/mac80211/patches/ath9k/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch index 9016da963b3..385eea0116d 100644 --- a/package/kernel/mac80211/patches/ath9k/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch +++ b/package/kernel/mac80211/patches/ath9k/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 -@@ -2975,7 +2975,8 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2977,7 +2977,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) -@@ -2987,9 +2988,14 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2989,9 +2990,14 @@ void ath9k_hw_apply_txpower(struct ath_h channel = chan->chan; chan_pwr = min_t(int, channel->max_power * 2, MAX_COMBINED_POWER); new_pwr = min_t(int, chan_pwr, reg->power_limit); diff --git a/package/kernel/mac80211/patches/ath9k/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch b/package/kernel/mac80211/patches/ath9k/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch index 5e5f3e4f102..0c3edc1260f 100644 --- a/package/kernel/mac80211/patches/ath9k/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch +++ b/package/kernel/mac80211/patches/ath9k/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 -@@ -2994,6 +2994,10 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2996,6 +2996,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/ath9k/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch index 0e75b86cbfc..85c5a9deb6d 100644 --- a/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch @@ -94,7 +94,7 @@ struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah, --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1882,6 +1882,20 @@ u32 ath9k_hw_get_tsf_offset(struct times +@@ -1881,6 +1881,20 @@ u32 ath9k_hw_get_tsf_offset(struct times } EXPORT_SYMBOL(ath9k_hw_get_tsf_offset); @@ -115,7 +115,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, struct ath9k_hw_cal_data *caldata, bool fastcc) { -@@ -2090,6 +2104,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st +@@ -2089,6 +2103,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st ar9003_hw_disable_phy_restart(ah); ath9k_hw_apply_gpio_override(ah); diff --git a/package/kernel/mac80211/patches/ath9k/544-ath9k-ar933x-usb-hang-workaround.patch b/package/kernel/mac80211/patches/ath9k/544-ath9k-ar933x-usb-hang-workaround.patch index 6e2c252b23d..23a81864faa 100644 --- a/package/kernel/mac80211/patches/ath9k/544-ath9k-ar933x-usb-hang-workaround.patch +++ b/package/kernel/mac80211/patches/ath9k/544-ath9k-ar933x-usb-hang-workaround.patch @@ -40,7 +40,7 @@ return true; } -@@ -1860,8 +1879,14 @@ static int ath9k_hw_do_fastcc(struct ath +@@ -1859,8 +1878,14 @@ static int ath9k_hw_do_fastcc(struct ath if (AR_SREV_9271(ah)) ar9002_hw_load_ani_reg(ah, chan); @@ -55,7 +55,7 @@ return -EINVAL; } -@@ -2115,6 +2140,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st +@@ -2114,6 +2139,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st ath9k_hw_set_radar_params(ah); } diff --git a/package/kernel/mac80211/patches/rtl/002-v5.13-rtlwifi-implement-set_tim-by-update-beacon-content.patch b/package/kernel/mac80211/patches/rtl/002-v5.13-rtlwifi-implement-set_tim-by-update-beacon-content.patch deleted file mode 100644 index 0e734233f0c..00000000000 --- a/package/kernel/mac80211/patches/rtl/002-v5.13-rtlwifi-implement-set_tim-by-update-beacon-content.patch +++ /dev/null @@ -1,118 +0,0 @@ -Date: Mon, 19 Apr 2021 14:59:56 +0800 -From: Ping-Ke Shih -To: -CC: , , - -Subject: [PATCH] rtlwifi: implement set_tim by update beacon content - -Once beacon content is changed, we update the content to wifi card by -send_beacon_frame(). Then, STA with PS can wake up properly to receive its -packets. - -Since we update beacon content to PCI wifi devices every beacon interval, -the only one usb device, 8192CU, needs to update beacon content when -mac80211 calling set_tim. - -Reported-by: Maciej S. Szmigiero -Signed-off-by: Ping-Ke Shih -Tested-by: Maciej S. Szmigiero ---- - drivers/net/wireless/realtek/rtlwifi/core.c | 32 +++++++++++++++++++++ - drivers/net/wireless/realtek/rtlwifi/core.h | 1 + - drivers/net/wireless/realtek/rtlwifi/usb.c | 3 ++ - drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + - 4 files changed, 37 insertions(+) - ---- a/drivers/net/wireless/realtek/rtlwifi/core.c -+++ b/drivers/net/wireless/realtek/rtlwifi/core.c -@@ -1018,6 +1018,25 @@ static void send_beacon_frame(struct iee - } - } - -+void rtl_update_beacon_work_callback(struct work_struct *work) -+{ -+ struct rtl_works *rtlworks = -+ container_of(work, struct rtl_works, update_beacon_work); -+ struct ieee80211_hw *hw = rtlworks->hw; -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ struct ieee80211_vif *vif = rtlpriv->mac80211.vif; -+ -+ if (!vif) { -+ WARN_ONCE(true, "no vif to update beacon\n"); -+ return; -+ } -+ -+ mutex_lock(&rtlpriv->locks.conf_mutex); -+ send_beacon_frame(hw, vif); -+ mutex_unlock(&rtlpriv->locks.conf_mutex); -+} -+EXPORT_SYMBOL_GPL(rtl_update_beacon_work_callback); -+ - static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *bss_conf, -@@ -1747,6 +1766,18 @@ static void rtl_op_flush(struct ieee8021 - rtlpriv->intf_ops->flush(hw, queues, drop); - } - -+static int rtl_op_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, -+ bool set) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); -+ -+ if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192CU) -+ schedule_work(&rtlpriv->works.update_beacon_work); -+ -+ return 0; -+} -+ - /* Description: - * This routine deals with the Power Configuration CMD - * parsing for RTL8723/RTL8188E Series IC. -@@ -1903,6 +1934,7 @@ const struct ieee80211_ops rtl_ops = { - .sta_add = rtl_op_sta_add, - .sta_remove = rtl_op_sta_remove, - .flush = rtl_op_flush, -+ .set_tim = rtl_op_set_tim, - }; - EXPORT_SYMBOL_GPL(rtl_ops); - ---- a/drivers/net/wireless/realtek/rtlwifi/core.h -+++ b/drivers/net/wireless/realtek/rtlwifi/core.h -@@ -60,5 +60,6 @@ void rtl_bb_delay(struct ieee80211_hw *h - bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb); - bool rtl_btc_status_false(void); - void rtl_dm_diginit(struct ieee80211_hw *hw, u32 cur_igval); -+void rtl_update_beacon_work_callback(struct work_struct *work); - - #endif ---- a/drivers/net/wireless/realtek/rtlwifi/usb.c -+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c -@@ -805,6 +805,7 @@ static void rtl_usb_stop(struct ieee8021 - - tasklet_kill(&rtlusb->rx_work_tasklet); - cancel_work_sync(&rtlpriv->works.lps_change_work); -+ cancel_work_sync(&rtlpriv->works.update_beacon_work); - - flush_workqueue(rtlpriv->works.rtl_wq); - -@@ -1031,6 +1032,8 @@ int rtl_usb_probe(struct usb_interface * - rtl_fill_h2c_cmd_work_callback); - INIT_WORK(&rtlpriv->works.lps_change_work, - rtl_lps_change_work_callback); -+ INIT_WORK(&rtlpriv->works.update_beacon_work, -+ rtl_update_beacon_work_callback); - - rtlpriv->usb_data_index = 0; - init_completion(&rtlpriv->firmware_loading_complete); ---- a/drivers/net/wireless/realtek/rtlwifi/wifi.h -+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h -@@ -2487,6 +2487,7 @@ struct rtl_works { - - struct work_struct lps_change_work; - struct work_struct fill_h2c_cmd; -+ struct work_struct update_beacon_work; - }; - - struct rtl_debug { diff --git a/package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch b/package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch deleted file mode 100644 index 4ee448bdf31..00000000000 --- a/package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- a/include/uapi/linux/nl80211.h -+++ b/include/uapi/linux/nl80211.h -@@ -655,6 +655,9 @@ - * When a security association was established on an 802.1X network using - * fast transition, this event should be followed by an - * %NL80211_CMD_PORT_AUTHORIZED event. -+ * Following a %NL80211_CMD_ROAM event userspace can issue -+ * %NL80211_CMD_GET_SCAN in order to obtain the scan information for the -+ * new BSS the card/driver roamed to. - * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify - * userspace that a connection was dropped by the AP or due to other - * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and -@@ -5937,6 +5940,16 @@ enum nl80211_feature_flags { - * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate - * configuration (AP/mesh) with HE rates. - * -+ * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement -+ * exchange protocol. -+ * -+ * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement -+ * exchange protocol. -+ * -+ * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management -+ * frame protection for all management frames exchanged during the -+ * negotiation and range measurement procedure. -+ * - * @NUM_NL80211_EXT_FEATURES: number of extended features. - * @MAX_NL80211_EXT_FEATURES: highest extended feature index. - */ -@@ -5998,6 +6011,9 @@ enum nl80211_ext_feature_index { - NL80211_EXT_FEATURE_FILS_DISCOVERY, - NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP, - NL80211_EXT_FEATURE_BEACON_RATE_HE, -+ NL80211_EXT_FEATURE_SECURE_LTF, -+ NL80211_EXT_FEATURE_SECURE_RTT, -+ NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE, - - /* add new features before the definition below */ - NUM_NL80211_EXT_FEATURES, -@@ -6295,11 +6311,13 @@ struct nl80211_vendor_cmd_info { - * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable. - * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable. - * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable. -+ * @NL80211_TDLS_PEER_HE: TDLS peer is HE capable. - */ - enum nl80211_tdls_peer_capability { - NL80211_TDLS_PEER_HT = 1<<0, - NL80211_TDLS_PEER_VHT = 1<<1, - NL80211_TDLS_PEER_WMM = 1<<2, -+ NL80211_TDLS_PEER_HE = 1<<3, - }; - - /** -@@ -6891,6 +6909,9 @@ enum nl80211_peer_measurement_ftm_capa { - * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor - * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based - * ranging will be used. -+ * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only -+ * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or -+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set. - * - * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal - * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number -@@ -6909,6 +6930,7 @@ enum nl80211_peer_measurement_ftm_req { - NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC, - NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED, - NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED, -+ NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK, - - /* keep last */ - NUM_NL80211_PMSR_FTM_REQ_ATTR, diff --git a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch index a63a2e2ee6a..227eacf49ae 100644 --- a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch @@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1287,7 +1287,6 @@ static int ieee80211_stop_ap(struct wiph +@@ -1306,7 +1306,6 @@ static int ieee80211_stop_ap(struct wiph sdata->vif.bss_conf.ftmr_params = NULL; __sta_info_flush(sdata, true); 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 b149031da06..0cd1cfdd31c 100644 --- a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch +++ b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -328,7 +328,7 @@ void ieee80211_restart_hw(struct ieee802 +@@ -337,7 +337,7 @@ void ieee80211_restart_hw(struct ieee802 } EXPORT_SYMBOL(ieee80211_restart_hw); @@ -9,7 +9,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -387,7 +387,7 @@ static int ieee80211_ifa_changed(struct +@@ -396,7 +396,7 @@ static int ieee80211_ifa_changed(struct } #endif @@ -18,7 +18,7 @@ static int ieee80211_ifa6_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -1310,14 +1310,14 @@ int ieee80211_register_hw(struct ieee802 +@@ -1319,14 +1319,14 @@ int ieee80211_register_hw(struct ieee802 wiphy_unlock(hw->wiphy); rtnl_unlock(); @@ -35,7 +35,7 @@ local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed; result = register_inet6addr_notifier(&local->ifa6_notifier); if (result) -@@ -1326,13 +1326,13 @@ int ieee80211_register_hw(struct ieee802 +@@ -1335,13 +1335,13 @@ int ieee80211_register_hw(struct ieee802 return 0; @@ -52,7 +52,7 @@ fail_ifa: #endif wiphy_unregister(local->hw.wiphy); -@@ -1360,10 +1360,10 @@ void ieee80211_unregister_hw(struct ieee +@@ -1369,10 +1369,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 96e6195a299..708cf7b0d5b 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 -@@ -2443,7 +2443,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2462,7 +2462,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/355-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch b/package/kernel/mac80211/patches/subsys/355-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch index 63cb6834cf2..7cbc8c01d05 100644 --- a/package/kernel/mac80211/patches/subsys/355-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch +++ b/package/kernel/mac80211/patches/subsys/355-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch @@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau static u16 __minstrel_ht_get_sample_rate(struct minstrel_ht_sta *mi, enum minstrel_sample_type type) -@@ -1109,8 +1078,6 @@ minstrel_ht_update_stats(struct minstrel +@@ -1107,8 +1076,6 @@ minstrel_ht_update_stats(struct minstrel mi->max_prob_rate = tmp_max_prob_rate; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau minstrel_ht_refill_sample_rates(mi); #ifdef CPTCFG_MAC80211_DEBUGFS -@@ -1155,7 +1122,7 @@ minstrel_ht_txstat_valid(struct minstrel +@@ -1153,7 +1120,7 @@ minstrel_ht_txstat_valid(struct minstrel } static void @@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau { int group, orig_group; -@@ -1170,11 +1137,7 @@ minstrel_downgrade_rate(struct minstrel_ +@@ -1168,11 +1135,7 @@ minstrel_downgrade_rate(struct minstrel_ minstrel_mcs_groups[orig_group].streams) continue; @@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau } } -@@ -1208,7 +1171,7 @@ minstrel_ht_tx_status(void *priv, struct +@@ -1206,7 +1169,7 @@ minstrel_ht_tx_status(void *priv, struct struct ieee80211_tx_info *info = st->info; struct minstrel_ht_sta *mi = priv_sta; struct ieee80211_tx_rate *ar = info->status.rates; @@ -126,7 +126,7 @@ Signed-off-by: Felix Fietkau struct minstrel_priv *mp = priv; u32 update_interval = mp->update_interval; bool last, update = false; -@@ -1254,18 +1217,13 @@ minstrel_ht_tx_status(void *priv, struct +@@ -1252,18 +1215,13 @@ minstrel_ht_tx_status(void *priv, struct /* * check for sudden death of spatial multiplexing, * downgrade to a lower number of streams if necessary. diff --git a/package/kernel/mac80211/patches/subsys/371-mac80211-don-t-apply-flow-control-on-management-fram.patch b/package/kernel/mac80211/patches/subsys/371-mac80211-don-t-apply-flow-control-on-management-fram.patch deleted file mode 100644 index 26f295e6805..00000000000 --- a/package/kernel/mac80211/patches/subsys/371-mac80211-don-t-apply-flow-control-on-management-fram.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: Johannes Berg -Date: Fri, 19 Mar 2021 23:28:01 +0100 -Subject: [PATCH] mac80211: don't apply flow control on management frames - -In some cases (depending on the driver, but it's true e.g. for -iwlwifi) we're using an internal TXQ for management packets, -mostly to simplify the code and to have a place to queue them. -However, it appears that in certain cases we can confuse the -code and management frames are dropped, which is certainly not -what we want. - -Short-circuit the processing of management frames. To keep the -impact minimal, only put them on the frags queue and check the -tid == management only for doing that and to skip the airtime -fairness checks, if applicable. - -Signed-off-by: Johannes Berg ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -5,7 +5,7 @@ - * Copyright 2006-2007 Jiri Benc - * Copyright 2007 Johannes Berg - * Copyright 2013-2014 Intel Mobile Communications GmbH -- * Copyright (C) 2018-2020 Intel Corporation -+ * Copyright (C) 2018-2021 Intel Corporation - * - * Transmit and frame generation functions. - */ -@@ -1388,8 +1388,17 @@ static void ieee80211_txq_enqueue(struct - ieee80211_set_skb_enqueue_time(skb); - - spin_lock_bh(&fq->lock); -- fq_tin_enqueue(fq, tin, flow_idx, skb, -- fq_skb_free_func); -+ /* -+ * For management frames, don't really apply codel etc., -+ * we don't want to apply any shaping or anything we just -+ * want to simplify the driver API by having them on the -+ * txqi. -+ */ -+ if (unlikely(txqi->txq.tid == IEEE80211_NUM_TIDS)) -+ __skb_queue_tail(&txqi->frags, skb); -+ else -+ fq_tin_enqueue(fq, tin, flow_idx, skb, -+ fq_skb_free_func); - spin_unlock_bh(&fq->lock); - } - -@@ -3853,6 +3862,9 @@ bool ieee80211_txq_airtime_check(struct - if (!txq->sta) - return true; - -+ if (unlikely(txq->tid == IEEE80211_NUM_TIDS)) -+ return true; -+ - sta = container_of(txq->sta, struct sta_info, sta); - if (atomic_read(&sta->airtime[txq->ac].aql_tx_pending) < - sta->airtime[txq->ac].aql_limit_low) diff --git a/package/kernel/mac80211/patches/subsys/372-mac80211-set-sk_pacing_shift-for-802.3-txpath.patch b/package/kernel/mac80211/patches/subsys/372-mac80211-set-sk_pacing_shift-for-802.3-txpath.patch deleted file mode 100644 index 98bbed5afc6..00000000000 --- a/package/kernel/mac80211/patches/subsys/372-mac80211-set-sk_pacing_shift-for-802.3-txpath.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Lorenzo Bianconi -Date: Mon, 8 Mar 2021 23:01:49 +0100 -Subject: [PATCH] mac80211: set sk_pacing_shift for 802.3 txpath - -Similar to 802.11 txpath, set socket sk_pacing_shift for 802.3 tx path. - -Signed-off-by: Lorenzo Bianconi ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -4180,6 +4180,9 @@ static bool ieee80211_tx_8023(struct iee - unsigned long flags; - int q = info->hw_queue; - -+ if (sta) -+ sk_pacing_shift_update(skb->sk, local->hw.tx_sk_pacing_shift); -+ - if (ieee80211_queue_skb(local, sdata, sta, skb)) - return true; - diff --git a/package/kernel/mac80211/patches/subsys/374-mac80211-move-A-MPDU-session-check-from-minstrel_ht-.patch b/package/kernel/mac80211/patches/subsys/374-mac80211-move-A-MPDU-session-check-from-minstrel_ht-.patch index 1e70d778b87..dc511880e58 100644 --- a/package/kernel/mac80211/patches/subsys/374-mac80211-move-A-MPDU-session-check-from-minstrel_ht-.patch +++ b/package/kernel/mac80211/patches/subsys/374-mac80211-move-A-MPDU-session-check-from-minstrel_ht-.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -6188,6 +6188,11 @@ enum rate_control_capabilities { +@@ -6192,6 +6192,11 @@ enum rate_control_capabilities { * otherwise the NSS difference doesn't bother us. */ RATE_CTRL_CAPA_VHT_EXT_NSS_BW = BIT(0), @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau struct rate_control_ops { --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -1142,29 +1142,6 @@ minstrel_downgrade_prob_rate(struct mins +@@ -1140,29 +1140,6 @@ minstrel_downgrade_prob_rate(struct mins } static void @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau minstrel_ht_tx_status(void *priv, struct ieee80211_supported_band *sband, void *priv_sta, struct ieee80211_tx_status *st) { -@@ -1459,10 +1436,6 @@ minstrel_ht_get_rate(void *priv, struct +@@ -1457,10 +1434,6 @@ minstrel_ht_get_rate(void *priv, struct struct minstrel_priv *mp = priv; u16 sample_idx; @@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau info->flags |= mi->tx_flags; #ifdef CPTCFG_MAC80211_DEBUGFS -@@ -1868,6 +1841,7 @@ static u32 minstrel_ht_get_expected_thro +@@ -1866,6 +1839,7 @@ static u32 minstrel_ht_get_expected_thro static const struct rate_control_ops mac80211_minstrel_ht = { .name = "minstrel_ht", @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau .rate_init = minstrel_ht_rate_init, --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3940,6 +3940,29 @@ void ieee80211_txq_schedule_start(struct +@@ -3951,6 +3951,29 @@ void ieee80211_txq_schedule_start(struct } EXPORT_SYMBOL(ieee80211_txq_schedule_start); @@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau void __ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev, u32 info_flags, -@@ -3970,6 +3993,8 @@ void __ieee80211_subif_start_xmit(struct +@@ -3981,6 +4004,8 @@ void __ieee80211_subif_start_xmit(struct skb_get_hash(skb); } @@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau if (sta) { struct ieee80211_fast_tx *fast_tx; -@@ -4233,6 +4258,8 @@ static void ieee80211_8023_xmit(struct i +@@ -4244,6 +4269,8 @@ static void ieee80211_8023_xmit(struct i memset(info, 0, sizeof(*info)); diff --git a/package/kernel/mac80211/patches/subsys/375-mac80211-call-ieee80211_tx_h_rate_ctrl-when-dequeue.patch b/package/kernel/mac80211/patches/subsys/375-mac80211-call-ieee80211_tx_h_rate_ctrl-when-dequeue.patch index a09d97cab3f..346c6468f82 100644 --- a/package/kernel/mac80211/patches/subsys/375-mac80211-call-ieee80211_tx_h_rate_ctrl-when-dequeue.patch +++ b/package/kernel/mac80211/patches/subsys/375-mac80211-call-ieee80211_tx_h_rate_ctrl-when-dequeue.patch @@ -10,7 +10,7 @@ Signed-off-by: Ryder Lee --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -1765,8 +1765,6 @@ static int invoke_tx_handlers_early(stru +@@ -1768,8 +1768,6 @@ static int invoke_tx_handlers_early(stru CALL_TXH(ieee80211_tx_h_ps_buf); CALL_TXH(ieee80211_tx_h_check_control_port_protocol); CALL_TXH(ieee80211_tx_h_select_key); @@ -19,7 +19,7 @@ Signed-off-by: Ryder Lee txh_done: if (unlikely(res == TX_DROP)) { -@@ -1799,6 +1797,9 @@ static int invoke_tx_handlers_late(struc +@@ -1802,6 +1800,9 @@ static int invoke_tx_handlers_late(struc goto txh_done; } @@ -29,7 +29,7 @@ Signed-off-by: Ryder Lee CALL_TXH(ieee80211_tx_h_michael_mic_add); CALL_TXH(ieee80211_tx_h_sequence); CALL_TXH(ieee80211_tx_h_fragment); -@@ -3386,15 +3387,21 @@ out: +@@ -3391,15 +3392,21 @@ out: * Can be called while the sta lock is held. Anything that can cause packets to * be generated will cause deadlock! */ @@ -55,7 +55,7 @@ Signed-off-by: Ryder Lee if (key) info->control.hw_key = &key->conf; -@@ -3443,6 +3450,8 @@ static void ieee80211_xmit_fast_finish(s +@@ -3448,6 +3455,8 @@ static void ieee80211_xmit_fast_finish(s break; } } @@ -64,7 +64,7 @@ Signed-off-by: Ryder Lee } static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, -@@ -3546,24 +3555,17 @@ static bool ieee80211_xmit_fast(struct i +@@ -3551,24 +3560,17 @@ static bool ieee80211_xmit_fast(struct i tx.sta = sta; tx.key = fast_tx->key; @@ -97,7 +97,7 @@ Signed-off-by: Ryder Lee if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) sdata = container_of(sdata->bss, -@@ -3674,8 +3676,12 @@ begin: +@@ -3685,8 +3687,12 @@ begin: (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) pn_offs = ieee80211_hdrlen(hdr->frame_control); diff --git a/package/kernel/mac80211/patches/subsys/376-mac80211-add-rate-control-support-for-encap-offload.patch b/package/kernel/mac80211/patches/subsys/376-mac80211-add-rate-control-support-for-encap-offload.patch index 01bbde045b8..b9f34213d59 100644 --- a/package/kernel/mac80211/patches/subsys/376-mac80211-add-rate-control-support-for-encap-offload.patch +++ b/package/kernel/mac80211/patches/subsys/376-mac80211-add-rate-control-support-for-encap-offload.patch @@ -81,7 +81,7 @@ Signed-off-by: Ryder Lee tx->sta->tx_stats.last_rate = txrc.reported_rate; } else if (tx->sta) tx->sta->tx_stats.last_rate = txrc.reported_rate; -@@ -3664,8 +3666,16 @@ begin: +@@ -3675,8 +3677,16 @@ begin: else info->flags &= ~IEEE80211_TX_CTL_AMPDU; @@ -101,7 +101,7 @@ Signed-off-by: Ryder Lee struct sta_info *sta = container_of(txq->sta, struct sta_info, --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -6761,4 +6761,22 @@ struct sk_buff *ieee80211_get_fils_disco +@@ -6765,4 +6765,22 @@ struct sk_buff *ieee80211_get_fils_disco struct sk_buff * ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw, struct ieee80211_vif *vif); diff --git a/package/kernel/mac80211/patches/subsys/379-mac80211-fix-starting-aggregation-sessions-on-mesh-i.patch b/package/kernel/mac80211/patches/subsys/379-mac80211-fix-starting-aggregation-sessions-on-mesh-i.patch index 234ca676248..74947348bc5 100644 --- a/package/kernel/mac80211/patches/subsys/379-mac80211-fix-starting-aggregation-sessions-on-mesh-i.patch +++ b/package/kernel/mac80211/patches/subsys/379-mac80211-fix-starting-aggregation-sessions-on-mesh-i.patch @@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau if (tid_tx) { bool queued; -@@ -3956,29 +3986,6 @@ void ieee80211_txq_schedule_start(struct +@@ -3967,29 +3997,6 @@ void ieee80211_txq_schedule_start(struct } EXPORT_SYMBOL(ieee80211_txq_schedule_start); diff --git a/package/kernel/mac80211/patches/subsys/382-mac80211-Switch-to-a-virtual-time-based-airtime-sche.patch b/package/kernel/mac80211/patches/subsys/382-mac80211-Switch-to-a-virtual-time-based-airtime-sche.patch index d99ca5961c2..49f9349ec83 100644 --- a/package/kernel/mac80211/patches/subsys/382-mac80211-Switch-to-a-virtual-time-based-airtime-sche.patch +++ b/package/kernel/mac80211/patches/subsys/382-mac80211-Switch-to-a-virtual-time-based-airtime-sche.patch @@ -50,7 +50,7 @@ Signed-off-by: Johannes Berg --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -6585,9 +6585,6 @@ static inline void ieee80211_txq_schedul +@@ -6589,9 +6589,6 @@ static inline void ieee80211_txq_schedul { } @@ -60,7 +60,7 @@ Signed-off-by: Johannes Berg /** * ieee80211_schedule_txq - schedule a TXQ for transmission * -@@ -6600,11 +6597,7 @@ void __ieee80211_schedule_txq(struct iee +@@ -6604,11 +6601,7 @@ void __ieee80211_schedule_txq(struct iee * The driver may call this function if it has buffered packets for * this TXQ internally. */ @@ -73,7 +73,7 @@ Signed-off-by: Johannes Berg /** * ieee80211_return_txq - return a TXQ previously acquired by ieee80211_next_txq() -@@ -6616,12 +6609,8 @@ ieee80211_schedule_txq(struct ieee80211_ +@@ -6620,12 +6613,8 @@ ieee80211_schedule_txq(struct ieee80211_ * The driver may set force=true if it has buffered packets for this TXQ * internally. */ @@ -90,7 +90,7 @@ Signed-off-by: Johannes Berg * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1441,6 +1441,38 @@ static void sta_apply_mesh_params(struct +@@ -1460,6 +1460,38 @@ static void sta_apply_mesh_params(struct #endif } @@ -129,7 +129,7 @@ Signed-off-by: Johannes Berg static int sta_apply_parameters(struct ieee80211_local *local, struct sta_info *sta, struct station_parameters *params) -@@ -1628,7 +1660,8 @@ static int sta_apply_parameters(struct i +@@ -1647,7 +1679,8 @@ static int sta_apply_parameters(struct i sta_apply_mesh_params(local, sta, params); if (params->airtime_weight) @@ -227,7 +227,7 @@ Signed-off-by: Johannes Berg #ifdef CONFIG_PM static ssize_t reset_write(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) -@@ -631,7 +671,11 @@ void debugfs_hw_add(struct ieee80211_loc +@@ -632,7 +672,11 @@ void debugfs_hw_add(struct ieee80211_loc if (local->ops->wake_tx_queue) DEBUGFS_ADD_MODE(aqm, 0600); @@ -573,7 +573,7 @@ Signed-off-by: Johannes Berg static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) { return ether_addr_equal(raddr, addr) || -@@ -1814,6 +1964,14 @@ int ieee80211_tx_control_port(struct wip +@@ -1816,6 +1966,14 @@ int ieee80211_tx_control_port(struct wip u64 *cookie); int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev, const u8 *buf, size_t len); @@ -590,7 +590,7 @@ Signed-off-by: Johannes Berg void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -2018,6 +2018,9 @@ int ieee80211_if_add(struct ieee80211_lo +@@ -2041,6 +2041,9 @@ int ieee80211_if_add(struct ieee80211_lo } } @@ -602,7 +602,7 @@ Signed-off-by: Johannes Berg sdata->ap_power_level = IEEE80211_UNSET_POWER_LEVEL; --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -698,10 +698,13 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -707,10 +707,13 @@ struct ieee80211_hw *ieee80211_alloc_hw_ spin_lock_init(&local->queue_stop_reason_lock); for (i = 0; i < IEEE80211_NUM_ACS; i++) { @@ -622,7 +622,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -1562,12 +1562,8 @@ static void sta_ps_start(struct sta_info +@@ -1563,12 +1563,8 @@ static void sta_ps_start(struct sta_info for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) { struct ieee80211_txq *txq = sta->sta.txq[tid]; @@ -819,7 +819,7 @@ Signed-off-by: Johannes Berg #include #include #include -@@ -1476,7 +1477,7 @@ void ieee80211_txq_init(struct ieee80211 +@@ -1479,7 +1480,7 @@ void ieee80211_txq_init(struct ieee80211 codel_vars_init(&txqi->def_cvars); codel_stats_init(&txqi->cstats); __skb_queue_head_init(&txqi->frags); @@ -828,7 +828,7 @@ Signed-off-by: Johannes Berg txqi->txq.vif = &sdata->vif; -@@ -1520,9 +1521,7 @@ void ieee80211_txq_purge(struct ieee8021 +@@ -1523,9 +1524,7 @@ void ieee80211_txq_purge(struct ieee8021 ieee80211_purge_tx_queue(&local->hw, &txqi->frags); spin_unlock_bh(&fq->lock); @@ -839,7 +839,7 @@ Signed-off-by: Johannes Berg } void ieee80211_txq_set_params(struct ieee80211_local *local) -@@ -3801,102 +3800,259 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); +@@ -3812,102 +3811,259 @@ 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); @@ -1161,7 +1161,7 @@ Signed-off-by: Johannes Berg struct ieee80211_local *local = hw_to_local(hw); if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) -@@ -3911,15 +4067,12 @@ bool ieee80211_txq_airtime_check(struct +@@ -3922,15 +4078,12 @@ bool ieee80211_txq_airtime_check(struct if (unlikely(txq->tid == IEEE80211_NUM_TIDS)) return true; @@ -1179,7 +1179,7 @@ Signed-off-by: Johannes Berg return true; return false; -@@ -3929,60 +4082,59 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec +@@ -3940,60 +4093,59 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw, struct ieee80211_txq *txq) { diff --git a/package/kernel/mac80211/patches/subsys/386-mac80211-check-per-vif-offload_flags-in-Tx-path.patch b/package/kernel/mac80211/patches/subsys/386-mac80211-check-per-vif-offload_flags-in-Tx-path.patch index 5973b426b6c..e195d0bcadf 100644 --- a/package/kernel/mac80211/patches/subsys/386-mac80211-check-per-vif-offload_flags-in-Tx-path.patch +++ b/package/kernel/mac80211/patches/subsys/386-mac80211-check-per-vif-offload_flags-in-Tx-path.patch @@ -14,7 +14,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3313,6 +3313,9 @@ static bool ieee80211_amsdu_aggregate(st +@@ -3318,6 +3318,9 @@ static bool ieee80211_amsdu_aggregate(st if (!ieee80211_hw_check(&local->hw, TX_AMSDU)) return false; diff --git a/package/kernel/mac80211/patches/subsys/387-nl80211-add-support-for-BSS-coloring.patch b/package/kernel/mac80211/patches/subsys/387-nl80211-add-support-for-BSS-coloring.patch index 3ed4543adbb..69893751802 100644 --- a/package/kernel/mac80211/patches/subsys/387-nl80211-add-support-for-BSS-coloring.patch +++ b/package/kernel/mac80211/patches/subsys/387-nl80211-add-support-for-BSS-coloring.patch @@ -23,7 +23,7 @@ Signed-off-by: Johannes Berg --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -1248,6 +1248,27 @@ struct cfg80211_csa_settings { +@@ -1253,6 +1253,27 @@ struct cfg80211_csa_settings { #define CFG80211_MAX_NUM_DIFFERENT_CHANNELS 10 /** @@ -51,7 +51,7 @@ Signed-off-by: Johannes Berg * struct iface_combination_params - input parameters for interface combinations * * Used to pass interface combination parameters -@@ -3983,6 +4004,8 @@ struct mgmt_frame_regs { +@@ -3991,6 +4012,8 @@ struct mgmt_frame_regs { * given TIDs. This callback may sleep. * * @set_sar_specs: Update the SAR (TX power) settings. @@ -60,7 +60,7 @@ Signed-off-by: Johannes Berg */ struct cfg80211_ops { int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); -@@ -4310,6 +4333,9 @@ struct cfg80211_ops { +@@ -4318,6 +4341,9 @@ struct cfg80211_ops { const u8 *peer, u8 tids); int (*set_sar_specs)(struct wiphy *wiphy, struct cfg80211_sar_specs *sar); @@ -70,7 +70,7 @@ Signed-off-by: Johannes Berg }; /* -@@ -8193,4 +8219,70 @@ void cfg80211_update_owe_info_event(stru +@@ -8209,4 +8235,70 @@ void cfg80211_update_owe_info_event(stru */ void cfg80211_bss_flush(struct wiphy *wiphy); @@ -230,7 +230,7 @@ Signed-off-by: Johannes Berg NUM_NL80211_EXT_FEATURES, --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -774,6 +774,10 @@ static const struct nla_policy nl80211_p +@@ -776,6 +776,10 @@ static const struct nla_policy nl80211_p [NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT }, [NL80211_ATTR_SAR_SPEC] = NLA_POLICY_NESTED(sar_policy), [NL80211_ATTR_DISABLE_HE] = { .type = NLA_FLAG }, @@ -241,7 +241,7 @@ Signed-off-by: Johannes Berg }; /* policy for the key attributes */ -@@ -14813,6 +14817,106 @@ bad_tid_conf: +@@ -14815,6 +14819,106 @@ bad_tid_conf: return ret; } @@ -348,7 +348,7 @@ Signed-off-by: Johannes Berg #define NL80211_FLAG_NEED_WIPHY 0x01 #define NL80211_FLAG_NEED_NETDEV 0x02 #define NL80211_FLAG_NEED_RTNL 0x04 -@@ -15813,6 +15917,14 @@ static const struct genl_small_ops nl802 +@@ -15815,6 +15919,14 @@ static const struct genl_small_ops nl802 .internal_flags = NL80211_FLAG_NEED_WIPHY | NL80211_FLAG_NEED_RTNL, }, @@ -363,7 +363,7 @@ Signed-off-by: Johannes Berg }; static struct genl_family nl80211_fam __genl_ro_after_init = { -@@ -17444,6 +17556,51 @@ void cfg80211_ch_switch_started_notify(s +@@ -17446,6 +17558,51 @@ void cfg80211_ch_switch_started_notify(s } EXPORT_SYMBOL(cfg80211_ch_switch_started_notify); diff --git a/package/kernel/mac80211/patches/subsys/388-mac80211-add-support-for-BSS-color-change.patch b/package/kernel/mac80211/patches/subsys/388-mac80211-add-support-for-BSS-color-change.patch index 79572396276..320570d0340 100644 --- a/package/kernel/mac80211/patches/subsys/388-mac80211-add-support-for-BSS-color-change.patch +++ b/package/kernel/mac80211/patches/subsys/388-mac80211-add-support-for-BSS-color-change.patch @@ -40,7 +40,7 @@ Signed-off-by: Johannes Berg /* must be last */ u8 drv_priv[] __aligned(sizeof(void *)); }; -@@ -4988,6 +4995,16 @@ void ieee80211_csa_finish(struct ieee802 +@@ -4992,6 +4999,16 @@ void ieee80211_csa_finish(struct ieee802 bool ieee80211_beacon_cntdwn_is_complete(struct ieee80211_vif *vif); /** @@ -57,7 +57,7 @@ Signed-off-by: Johannes Berg * ieee80211_proberesp_get - retrieve a Probe Response template * @hw: pointer obtained from ieee80211_alloc_hw(). * @vif: &struct ieee80211_vif pointer from the add_interface callback. -@@ -6752,6 +6769,18 @@ ieee80211_get_unsol_bcast_probe_resp_tmp +@@ -6756,6 +6773,18 @@ ieee80211_get_unsol_bcast_probe_resp_tmp struct ieee80211_vif *vif); /** @@ -78,7 +78,7 @@ Signed-off-by: Johannes Berg * The function is used to check if a frame is a data frame. Frames with --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -809,9 +809,11 @@ static int ieee80211_set_monitor_channel +@@ -828,9 +828,11 @@ static int ieee80211_set_monitor_channel return ret; } @@ -93,7 +93,7 @@ Signed-off-by: Johannes Berg { struct probe_resp *new, *old; -@@ -831,6 +833,8 @@ static int ieee80211_set_probe_resp(stru +@@ -850,6 +852,8 @@ static int ieee80211_set_probe_resp(stru memcpy(new->cntdwn_counter_offsets, csa->counter_offsets_presp, csa->n_counter_offsets_presp * sizeof(new->cntdwn_counter_offsets[0])); @@ -102,7 +102,7 @@ Signed-off-by: Johannes Berg rcu_assign_pointer(sdata->u.ap.probe_resp, new); if (old) -@@ -936,7 +940,8 @@ static int ieee80211_set_ftm_responder_p +@@ -955,7 +959,8 @@ static int ieee80211_set_ftm_responder_p static int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata, struct cfg80211_beacon_data *params, @@ -112,7 +112,7 @@ Signed-off-by: Johannes Berg { struct beacon_data *new, *old; int new_head_len, new_tail_len; -@@ -985,6 +990,9 @@ static int ieee80211_assign_beacon(struc +@@ -1004,6 +1009,9 @@ static int ieee80211_assign_beacon(struc memcpy(new->cntdwn_counter_offsets, csa->counter_offsets_beacon, csa->n_counter_offsets_beacon * sizeof(new->cntdwn_counter_offsets[0])); @@ -122,7 +122,7 @@ Signed-off-by: Johannes Berg } /* copy in head */ -@@ -1001,7 +1009,7 @@ static int ieee80211_assign_beacon(struc +@@ -1020,7 +1028,7 @@ static int ieee80211_assign_beacon(struc memcpy(new->tail, old->tail, new_tail_len); err = ieee80211_set_probe_resp(sdata, params->probe_resp, @@ -131,7 +131,7 @@ Signed-off-by: Johannes Berg if (err < 0) { kfree(new); return err; -@@ -1156,7 +1164,7 @@ static int ieee80211_start_ap(struct wip +@@ -1175,7 +1183,7 @@ static int ieee80211_start_ap(struct wip if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) sdata->vif.bss_conf.beacon_tx_rate = params->beacon_rate; @@ -140,7 +140,7 @@ Signed-off-by: Johannes Berg if (err < 0) goto error; changed |= err; -@@ -1211,17 +1219,17 @@ static int ieee80211_change_beacon(struc +@@ -1230,17 +1238,17 @@ static int ieee80211_change_beacon(struc sdata = IEEE80211_DEV_TO_SUB_IF(dev); sdata_assert_lock(sdata); @@ -161,7 +161,7 @@ Signed-off-by: Johannes Berg if (err < 0) return err; ieee80211_bss_info_change_notify(sdata, err); -@@ -3144,7 +3152,7 @@ static int ieee80211_set_after_csa_beaco +@@ -3163,7 +3171,7 @@ static int ieee80211_set_after_csa_beaco switch (sdata->vif.type) { case NL80211_IFTYPE_AP: err = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon, @@ -170,7 +170,7 @@ Signed-off-by: Johannes Berg kfree(sdata->u.ap.next_beacon); sdata->u.ap.next_beacon = NULL; -@@ -3310,7 +3318,7 @@ static int ieee80211_set_csa_beacon(stru +@@ -3329,7 +3337,7 @@ static int ieee80211_set_csa_beacon(stru csa.n_counter_offsets_presp = params->n_counter_offsets_presp; csa.count = params->count; @@ -179,7 +179,7 @@ Signed-off-by: Johannes Berg if (err < 0) { kfree(sdata->u.ap.next_beacon); return err; -@@ -3399,6 +3407,15 @@ static int ieee80211_set_csa_beacon(stru +@@ -3418,6 +3426,15 @@ static int ieee80211_set_csa_beacon(stru return 0; } @@ -195,7 +195,7 @@ Signed-off-by: Johannes Berg static int __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_csa_settings *params) -@@ -3467,6 +3484,10 @@ __ieee80211_channel_switch(struct wiphy +@@ -3486,6 +3503,10 @@ __ieee80211_channel_switch(struct wiphy goto out; } @@ -206,7 +206,7 @@ Signed-off-by: Johannes Berg err = ieee80211_set_csa_beacon(sdata, params, &changed); if (err) { ieee80211_vif_unreserve_chanctx(sdata); -@@ -4118,6 +4139,196 @@ static int ieee80211_set_sar_specs(struc +@@ -4137,6 +4158,196 @@ static int ieee80211_set_sar_specs(struc return local->ops->set_sar_specs(&local->hw, sar); } @@ -403,7 +403,7 @@ Signed-off-by: Johannes Berg const struct cfg80211_ops mac80211_config_ops = { .add_virtual_intf = ieee80211_add_iface, .del_virtual_intf = ieee80211_del_iface, -@@ -4221,4 +4432,5 @@ const struct cfg80211_ops mac80211_confi +@@ -4240,4 +4451,5 @@ const struct cfg80211_ops mac80211_confi .set_tid_config = ieee80211_set_tid_config, .reset_tid_config = ieee80211_reset_tid_config, .set_sar_specs = ieee80211_set_sar_specs, @@ -433,7 +433,7 @@ Signed-off-by: Johannes Berg struct list_head assigned_chanctx_list; /* protected by chanctx_mtx */ struct list_head reserved_chanctx_list; /* protected by chanctx_mtx */ -@@ -1893,6 +1901,9 @@ void ieee80211_csa_finalize_work(struct +@@ -1895,6 +1903,9 @@ void ieee80211_csa_finalize_work(struct int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_csa_settings *params); @@ -445,7 +445,7 @@ Signed-off-by: Johannes Berg NETIF_F_HW_CSUM | NETIF_F_SG | \ --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -461,6 +461,7 @@ static void ieee80211_do_stop(struct iee +@@ -462,6 +462,7 @@ static void ieee80211_do_stop(struct iee sdata_unlock(sdata); cancel_work_sync(&sdata->csa_finalize_work); @@ -453,7 +453,7 @@ Signed-off-by: Johannes Berg cancel_delayed_work_sync(&sdata->dfs_cac_timer_work); -@@ -1572,6 +1573,7 @@ static void ieee80211_setup_sdata(struct +@@ -1595,6 +1596,7 @@ static void ieee80211_setup_sdata(struct INIT_WORK(&sdata->work, ieee80211_iface_work); INIT_WORK(&sdata->recalc_smps, ieee80211_recalc_smps_work); INIT_WORK(&sdata->csa_finalize_work, ieee80211_csa_finalize_work); @@ -463,7 +463,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -4773,11 +4773,11 @@ static int ieee80211_beacon_add_tim(stru +@@ -4784,11 +4784,11 @@ static int ieee80211_beacon_add_tim(stru static void ieee80211_set_beacon_cntdwn(struct ieee80211_sub_if_data *sdata, struct beacon_data *beacon) { @@ -477,7 +477,7 @@ Signed-off-by: Johannes Berg switch (sdata->vif.type) { case NL80211_IFTYPE_AP: -@@ -4797,21 +4797,27 @@ static void ieee80211_set_beacon_cntdwn( +@@ -4808,21 +4808,27 @@ static void ieee80211_set_beacon_cntdwn( } rcu_read_lock(); @@ -514,7 +514,7 @@ Signed-off-by: Johannes Berg } rcu_read_unlock(); } -@@ -5021,6 +5027,7 @@ __ieee80211_beacon_get(struct ieee80211_ +@@ -5032,6 +5038,7 @@ __ieee80211_beacon_get(struct ieee80211_ if (offs) { offs->tim_offset = beacon->head_len; offs->tim_length = skb->len - beacon->head_len; diff --git a/package/kernel/mac80211/patches/subsys/389-ieee80211-add-TWT-element-definitions.patch b/package/kernel/mac80211/patches/subsys/389-ieee80211-add-TWT-element-definitions.patch index d2b1881ddc0..cf45c6d0722 100644 --- a/package/kernel/mac80211/patches/subsys/389-ieee80211-add-TWT-element-definitions.patch +++ b/package/kernel/mac80211/patches/subsys/389-ieee80211-add-TWT-element-definitions.patch @@ -73,7 +73,7 @@ Signed-off-by: Johannes Berg } u; } __packed action; } u; -@@ -2881,6 +2927,7 @@ enum ieee80211_eid { +@@ -2879,6 +2925,7 @@ enum ieee80211_eid { WLAN_EID_AID_RESPONSE = 211, WLAN_EID_S1G_BCN_COMPAT = 213, WLAN_EID_S1G_SHORT_BCN_INTERVAL = 214, @@ -81,7 +81,7 @@ Signed-off-by: Johannes Berg WLAN_EID_S1G_CAPABILITIES = 217, WLAN_EID_VENDOR_SPECIFIC = 221, WLAN_EID_QOS_PARAMETER = 222, -@@ -2949,6 +2996,7 @@ enum ieee80211_category { +@@ -2947,6 +2994,7 @@ enum ieee80211_category { WLAN_CATEGORY_FST = 18, WLAN_CATEGORY_UNPROT_DMG = 20, WLAN_CATEGORY_VHT = 21, @@ -89,7 +89,7 @@ Signed-off-by: Johannes Berg WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, WLAN_CATEGORY_VENDOR_SPECIFIC = 127, }; -@@ -3022,6 +3070,20 @@ enum ieee80211_key_len { +@@ -3020,6 +3068,20 @@ enum ieee80211_key_len { WLAN_KEY_LEN_BIP_GMAC_256 = 32, }; diff --git a/package/kernel/mac80211/patches/subsys/390-mac80211-introduce-individual-TWT-support-in-AP-mode.patch b/package/kernel/mac80211/patches/subsys/390-mac80211-introduce-individual-TWT-support-in-AP-mode.patch index cdb88255f51..2b7bdabfe3d 100644 --- a/package/kernel/mac80211/patches/subsys/390-mac80211-introduce-individual-TWT-support-in-AP-mode.patch +++ b/package/kernel/mac80211/patches/subsys/390-mac80211-introduce-individual-TWT-support-in-AP-mode.patch @@ -27,7 +27,7 @@ Signed-off-by: Johannes Berg --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -4225,6 +4225,11 @@ struct ieee80211_ops { +@@ -4229,6 +4229,11 @@ struct ieee80211_ops { void (*sta_set_decap_offload)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, bool enabled); @@ -92,7 +92,7 @@ Signed-off-by: Johannes Berg u8 needed_rx_chains; enum ieee80211_smps_mode smps_mode; -@@ -2086,6 +2087,11 @@ ieee80211_he_op_ie_to_bss_conf(struct ie +@@ -2088,6 +2089,11 @@ ieee80211_he_op_ie_to_bss_conf(struct ie /* S1G */ void ieee80211_s1g_sta_rate_init(struct sta_info *sta); @@ -106,7 +106,7 @@ Signed-off-by: Johannes Berg void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -551,6 +551,7 @@ static void ieee80211_do_stop(struct iee +@@ -552,6 +552,7 @@ static void ieee80211_do_stop(struct iee */ ieee80211_free_keys(sdata, true); skb_queue_purge(&sdata->skb_queue); @@ -114,7 +114,7 @@ Signed-off-by: Johannes Berg } spin_lock_irqsave(&local->queue_stop_reason_lock, flags); -@@ -1032,6 +1033,7 @@ int ieee80211_add_virtual_monitor(struct +@@ -1055,6 +1056,7 @@ int ieee80211_add_virtual_monitor(struct } skb_queue_head_init(&sdata->skb_queue); @@ -122,7 +122,7 @@ Signed-off-by: Johannes Berg INIT_WORK(&sdata->work, ieee80211_iface_work); return 0; -@@ -1373,6 +1375,24 @@ static void ieee80211_if_setup_no_queue( +@@ -1396,6 +1398,24 @@ static void ieee80211_if_setup_no_queue( dev->priv_flags |= IFF_NO_QUEUE; } @@ -147,7 +147,7 @@ Signed-off-by: Johannes Berg static void ieee80211_iface_work(struct work_struct *work) { struct ieee80211_sub_if_data *sdata = -@@ -1451,6 +1471,16 @@ static void ieee80211_iface_work(struct +@@ -1474,6 +1494,16 @@ static void ieee80211_iface_work(struct WARN_ON(1); break; } @@ -164,7 +164,7 @@ Signed-off-by: Johannes Berg } else if (ieee80211_is_ext(mgmt->frame_control)) { if (sdata->vif.type == NL80211_IFTYPE_STATION) ieee80211_sta_rx_queued_ext(sdata, skb); -@@ -1507,6 +1537,12 @@ static void ieee80211_iface_work(struct +@@ -1530,6 +1560,12 @@ static void ieee80211_iface_work(struct kcov_remote_stop(); } @@ -177,7 +177,7 @@ Signed-off-by: Johannes Berg /* then other type-dependent work */ switch (sdata->vif.type) { case NL80211_IFTYPE_STATION: -@@ -1570,6 +1606,7 @@ static void ieee80211_setup_sdata(struct +@@ -1593,6 +1629,7 @@ static void ieee80211_setup_sdata(struct } skb_queue_head_init(&sdata->skb_queue); @@ -187,7 +187,7 @@ Signed-off-by: Johannes Berg INIT_WORK(&sdata->csa_finalize_work, ieee80211_csa_finalize_work); --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -3197,6 +3197,68 @@ ieee80211_rx_h_mgmt_check(struct ieee802 +@@ -3198,6 +3198,68 @@ ieee80211_rx_h_mgmt_check(struct ieee802 return RX_CONTINUE; } @@ -256,7 +256,7 @@ Signed-off-by: Johannes Berg static ieee80211_rx_result debug_noinline ieee80211_rx_h_action(struct ieee80211_rx_data *rx) { -@@ -3476,6 +3538,17 @@ ieee80211_rx_h_action(struct ieee80211_r +@@ -3477,6 +3539,17 @@ ieee80211_rx_h_action(struct ieee80211_r !mesh_path_sel_is_hwmp(sdata)) break; goto queue; diff --git a/package/kernel/mac80211/patches/subsys/391-wireless-align-some-HE-capabilities-with-the-spec.patch b/package/kernel/mac80211/patches/subsys/391-wireless-align-some-HE-capabilities-with-the-spec.patch deleted file mode 100644 index ea1091bb99f..00000000000 --- a/package/kernel/mac80211/patches/subsys/391-wireless-align-some-HE-capabilities-with-the-spec.patch +++ /dev/null @@ -1,227 +0,0 @@ -From: Johannes Berg -Date: Fri, 9 Apr 2021 12:40:17 +0300 -Subject: [PATCH] wireless: align some HE capabilities with the spec - -Some names were changed, align that with the spec as of -802.11ax-D6.1. - -Signed-off-by: Luca Coelho -Link: https://lore.kernel.org/r/iwlwifi.20210409123755.b1e5fbab0d8c.I3eb6076cb0714ec6aec6b8f9dee613ce4a05d825@changeid -Signed-off-by: Johannes Berg ---- - ---- a/drivers/net/wireless/ath/ath11k/mac.c -+++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -3813,7 +3813,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee - IEEE80211_HE_MAC_CAP4_BQR; - he_cap_elem->mac_cap_info[4] &= ~m; - -- m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION | -+ m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION | - IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU | - IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING | - IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX; -@@ -3823,7 +3823,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee - IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO; - he_cap_elem->phy_cap_info[2] &= ~m; - -- m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA | -+ m = IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU | - IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK | - IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK; - he_cap_elem->phy_cap_info[3] &= ~m; -@@ -3835,13 +3835,13 @@ ath11k_mac_filter_he_cap_mesh(struct iee - he_cap_elem->phy_cap_info[5] &= ~m; - - m = IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU | -- IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB | -+ IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB | - IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB | - IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO; - he_cap_elem->phy_cap_info[6] &= ~m; - -- m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR | -- IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR | -+ m = IEEE80211_HE_PHY_CAP7_PSR_BASED_SR | -+ IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP | - IEEE80211_HE_PHY_CAP7_STBC_TX_ABOVE_80MHZ | - IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ; - he_cap_elem->phy_cap_info[7] &= ~m; ---- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c -+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c -@@ -424,8 +424,8 @@ mt7915_set_stream_he_txbf_caps(struct ie - IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_MASK; - elem->phy_cap_info[5] &= ~c; - -- c = IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB | -- IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB; -+ c = IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB | -+ IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB; - elem->phy_cap_info[6] &= ~c; - - elem->phy_cap_info[7] &= ~IEEE80211_HE_PHY_CAP7_MAX_NC_MASK; -@@ -465,8 +465,8 @@ mt7915_set_stream_he_txbf_caps(struct ie - c = (nss - 1) | (max_t(int, le16_to_cpu(mcs->tx_mcs_160), 1) << 3); - elem->phy_cap_info[5] |= c; - -- c = IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB | -- IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB; -+ c = IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB | -+ IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB; - elem->phy_cap_info[6] |= c; - } - -@@ -589,7 +589,7 @@ mt7915_init_he_caps(struct mt7915_phy *p - IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE | - IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT; - he_cap_elem->phy_cap_info[7] |= -- IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR | -+ IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP | - IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI; - he_cap_elem->phy_cap_info[8] |= - IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G | ---- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c -+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c -@@ -1840,9 +1840,9 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_ - - bf->tx_mode = MT_PHY_TYPE_HE_SU; - mt7915_mcu_sta_sounding_rate(bf); -- bf->trigger_su = HE_PHY(CAP6_TRIG_SU_BEAMFORMER_FB, -+ bf->trigger_su = HE_PHY(CAP6_TRIG_SU_BEAMFORMING_FB, - pe->phy_cap_info[6]); -- bf->trigger_mu = HE_PHY(CAP6_TRIG_MU_BEAMFORMER_FB, -+ bf->trigger_mu = HE_PHY(CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB, - pe->phy_cap_info[6]); - bfer_nr = HE_PHY(CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK, - ve->phy_cap_info[5]); ---- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c -+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c -@@ -107,7 +107,7 @@ mt7921_init_he_caps(struct mt7921_phy *p - IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE | - IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT; - he_cap_elem->phy_cap_info[7] |= -- IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR | -+ IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP | - IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI; - he_cap_elem->phy_cap_info[8] |= - IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G | ---- a/include/linux/ieee80211.h -+++ b/include/linux/ieee80211.h -@@ -2066,7 +2066,7 @@ int ieee80211_get_vht_max_nss(struct iee - #define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x01 - #define IEEE80211_HE_MAC_CAP4_QTP 0x02 - #define IEEE80211_HE_MAC_CAP4_BQR 0x04 --#define IEEE80211_HE_MAC_CAP4_SRP_RESP 0x08 -+#define IEEE80211_HE_MAC_CAP4_PSR_RESP 0x08 - #define IEEE80211_HE_MAC_CAP4_NDP_FB_REP 0x10 - #define IEEE80211_HE_MAC_CAP4_OPS 0x20 - #define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x40 -@@ -2077,7 +2077,7 @@ int ieee80211_get_vht_max_nss(struct iee - - #define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 0x01 - #define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41 0x02 --#define IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION 0x04 -+#define IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION 0x04 - #define IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU 0x08 - #define IEEE80211_HE_MAC_CAP5_OM_CTRL_UL_MU_DATA_DIS_RX 0x10 - #define IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS 0x20 -@@ -2135,7 +2135,7 @@ int ieee80211_get_vht_max_nss(struct iee - #define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK 0x18 - #define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x00 - #define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_2 0x20 --#define IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA 0x40 -+#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x40 - #define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER 0x80 - - #define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE 0x01 -@@ -2182,15 +2182,15 @@ int ieee80211_get_vht_max_nss(struct iee - - #define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU 0x01 - #define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU 0x02 --#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB 0x04 --#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB 0x08 -+#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB 0x04 -+#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB 0x08 - #define IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB 0x10 - #define IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE 0x20 - #define IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO 0x40 - #define IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT 0x80 - --#define IEEE80211_HE_PHY_CAP7_SRP_BASED_SR 0x01 --#define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR 0x02 -+#define IEEE80211_HE_PHY_CAP7_PSR_BASED_SR 0x01 -+#define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP 0x02 - #define IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI 0x04 - #define IEEE80211_HE_PHY_CAP7_MAX_NC_1 0x08 - #define IEEE80211_HE_PHY_CAP7_MAX_NC_2 0x10 ---- a/net/mac80211/debugfs_sta.c -+++ b/net/mac80211/debugfs_sta.c -@@ -732,15 +732,15 @@ static ssize_t sta_he_capa_read(struct f - PFLAG(MAC, 4, BSRP_BQRP_A_MPDU_AGG, "BSRP-BQRP-A-MPDU-AGG"); - PFLAG(MAC, 4, QTP, "QTP"); - PFLAG(MAC, 4, BQR, "BQR"); -- PFLAG(MAC, 4, SRP_RESP, "SRP-RESP"); -+ PFLAG(MAC, 4, PSR_RESP, "PSR-RESP"); - PFLAG(MAC, 4, NDP_FB_REP, "NDP-FB-REP"); - PFLAG(MAC, 4, OPS, "OPS"); - PFLAG(MAC, 4, AMDSU_IN_AMPDU, "AMSDU-IN-AMPDU"); - - PRINT("MULTI-TID-AGG-TX-QOS-%d", ((cap[5] << 1) | (cap[4] >> 7)) & 0x7); - -- PFLAG(MAC, 5, SUBCHAN_SELECVITE_TRANSMISSION, -- "SUBCHAN-SELECVITE-TRANSMISSION"); -+ PFLAG(MAC, 5, SUBCHAN_SELECTIVE_TRANSMISSION, -+ "SUBCHAN-SELECTIVE-TRANSMISSION"); - PFLAG(MAC, 5, UL_2x996_TONE_RU, "UL-2x996-TONE-RU"); - PFLAG(MAC, 5, OM_CTRL_UL_MU_DATA_DIS_RX, "OM-CTRL-UL-MU-DATA-DIS-RX"); - PFLAG(MAC, 5, HE_DYNAMIC_SM_PS, "HE-DYNAMIC-SM-PS"); -@@ -832,8 +832,8 @@ static ssize_t sta_he_capa_read(struct f - - PFLAG(PHY, 3, DCM_MAX_RX_NSS_1, "DCM-MAX-RX-NSS-1"); - PFLAG(PHY, 3, DCM_MAX_RX_NSS_2, "DCM-MAX-RX-NSS-2"); -- PFLAG(PHY, 3, RX_HE_MU_PPDU_FROM_NON_AP_STA, -- "RX-HE-MU-PPDU-FROM-NON-AP-STA"); -+ PFLAG(PHY, 3, RX_PARTIAL_BW_SU_IN_20MHZ_MU, -+ "RX-PARTIAL-BW-SU-IN-20MHZ-MU"); - PFLAG(PHY, 3, SU_BEAMFORMER, "SU-BEAMFORMER"); - - PFLAG(PHY, 4, SU_BEAMFORMEE, "SU-BEAMFORMEE"); -@@ -853,16 +853,17 @@ static ssize_t sta_he_capa_read(struct f - - PFLAG(PHY, 6, CODEBOOK_SIZE_42_SU, "CODEBOOK-SIZE-42-SU"); - PFLAG(PHY, 6, CODEBOOK_SIZE_75_MU, "CODEBOOK-SIZE-75-MU"); -- PFLAG(PHY, 6, TRIG_SU_BEAMFORMER_FB, "TRIG-SU-BEAMFORMER-FB"); -- PFLAG(PHY, 6, TRIG_MU_BEAMFORMER_FB, "TRIG-MU-BEAMFORMER-FB"); -+ PFLAG(PHY, 6, TRIG_SU_BEAMFORMING_FB, "TRIG-SU-BEAMFORMING-FB"); -+ PFLAG(PHY, 6, TRIG_MU_BEAMFORMING_PARTIAL_BW_FB, -+ "MU-BEAMFORMING-PARTIAL-BW-FB"); - PFLAG(PHY, 6, TRIG_CQI_FB, "TRIG-CQI-FB"); - PFLAG(PHY, 6, PARTIAL_BW_EXT_RANGE, "PARTIAL-BW-EXT-RANGE"); - PFLAG(PHY, 6, PARTIAL_BANDWIDTH_DL_MUMIMO, - "PARTIAL-BANDWIDTH-DL-MUMIMO"); - PFLAG(PHY, 6, PPE_THRESHOLD_PRESENT, "PPE-THRESHOLD-PRESENT"); - -- PFLAG(PHY, 7, SRP_BASED_SR, "SRP-BASED-SR"); -- PFLAG(PHY, 7, POWER_BOOST_FACTOR_AR, "POWER-BOOST-FACTOR-AR"); -+ PFLAG(PHY, 7, PSR_BASED_SR, "PSR-BASED-SR"); -+ PFLAG(PHY, 7, POWER_BOOST_FACTOR_SUPP, "POWER-BOOST-FACTOR-SUPP"); - PFLAG(PHY, 7, HE_SU_MU_PPDU_4XLTF_AND_08_US_GI, - "HE-SU-MU-PPDU-4XLTF-AND-08-US-GI"); - PFLAG_RANGE(PHY, 7, MAX_NC, 0, 1, 1, "MAX-NC-%d"); ---- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c -+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c -@@ -583,11 +583,11 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 | - IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2, - .phy_cap_info[6] = -- IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB | -- IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB | -+ IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB | -+ IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB | - IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT, - .phy_cap_info[7] = -- IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR | -+ IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP | - IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI | - IEEE80211_HE_PHY_CAP7_MAX_NC_1, - .phy_cap_info[8] = diff --git a/package/kernel/mac80211/patches/subsys/392-wireless-fix-spelling-of-A-MSDU-in-HE-capabilities.patch b/package/kernel/mac80211/patches/subsys/392-wireless-fix-spelling-of-A-MSDU-in-HE-capabilities.patch deleted file mode 100644 index 9c5ba683902..00000000000 --- a/package/kernel/mac80211/patches/subsys/392-wireless-fix-spelling-of-A-MSDU-in-HE-capabilities.patch +++ /dev/null @@ -1,113 +0,0 @@ -From: Johannes Berg -Date: Fri, 9 Apr 2021 12:40:24 +0300 -Subject: [PATCH] wireless: fix spelling of A-MSDU in HE capabilities - -In the HE capabilities, spell A-MSDU correctly, not "A-MDSU". - -Signed-off-by: Luca Coelho -Link: https://lore.kernel.org/r/iwlwifi.20210409123755.9e6ff1af1181.If6868bc6902ccd9a95c74c78f716c4b41473ef14@changeid -Signed-off-by: Johannes Berg ---- - ---- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c -+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c -@@ -552,7 +552,7 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | - IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, - .mac_cap_info[4] = -- IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU | -+ IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU | - IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39, - .mac_cap_info[5] = - IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 | -@@ -638,7 +638,7 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | - IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, - .mac_cap_info[4] = -- IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU, -+ IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .mac_cap_info[5] = - IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU, - .phy_cap_info[0] = ---- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c -+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c -@@ -532,7 +532,7 @@ mt7915_init_he_caps(struct mt7915_phy *p - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | - IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED; - he_cap_elem->mac_cap_info[4] = -- IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU; -+ IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU; - - if (band == NL80211_BAND_2GHZ) - he_cap_elem->phy_cap_info[0] = ---- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c -+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c -@@ -1343,7 +1343,7 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *sk - if (elem->mac_cap_info[3] & IEEE80211_HE_MAC_CAP3_OMI_CONTROL) - cap |= STA_REC_HE_CAP_OM; - -- if (elem->mac_cap_info[4] & IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU) -+ if (elem->mac_cap_info[4] & IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU) - cap |= STA_REC_HE_CAP_AMSDU_IN_AMPDU; - - if (elem->mac_cap_info[4] & IEEE80211_HE_MAC_CAP4_BQR) ---- a/include/linux/ieee80211.h -+++ b/include/linux/ieee80211.h -@@ -2069,7 +2069,7 @@ int ieee80211_get_vht_max_nss(struct iee - #define IEEE80211_HE_MAC_CAP4_PSR_RESP 0x08 - #define IEEE80211_HE_MAC_CAP4_NDP_FB_REP 0x10 - #define IEEE80211_HE_MAC_CAP4_OPS 0x20 --#define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x40 -+#define IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU 0x40 - /* Multi TID agg TX is split between byte #4 and #5 - * The value is a combination of B39,B40,B41 - */ ---- a/net/mac80211/debugfs_sta.c -+++ b/net/mac80211/debugfs_sta.c -@@ -735,7 +735,7 @@ static ssize_t sta_he_capa_read(struct f - PFLAG(MAC, 4, PSR_RESP, "PSR-RESP"); - PFLAG(MAC, 4, NDP_FB_REP, "NDP-FB-REP"); - PFLAG(MAC, 4, OPS, "OPS"); -- PFLAG(MAC, 4, AMDSU_IN_AMPDU, "AMSDU-IN-AMPDU"); -+ PFLAG(MAC, 4, AMSDU_IN_AMPDU, "AMSDU-IN-AMPDU"); - - PRINT("MULTI-TID-AGG-TX-QOS-%d", ((cap[5] << 1) | (cap[4] >> 7)) & 0x7); - ---- a/drivers/net/wireless/mac80211_hwsim.c -+++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -2818,7 +2818,7 @@ static const struct ieee80211_sband_ifty - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | - IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -- .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU, -+ .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .phy_cap_info[1] = - IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK | - IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A | -@@ -2862,7 +2862,7 @@ static const struct ieee80211_sband_ifty - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | - IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -- .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU, -+ .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .phy_cap_info[1] = - IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK | - IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A | -@@ -2908,7 +2908,7 @@ static const struct ieee80211_sband_ifty - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | - IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -- .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU, -+ .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .phy_cap_info[0] = - IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G | - IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G | -@@ -2956,7 +2956,7 @@ static const struct ieee80211_sband_ifty - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | - IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -- .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU, -+ .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .phy_cap_info[0] = - IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G | - IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G | diff --git a/package/kernel/mac80211/patches/subsys/393-wireless-align-HE-capabilities-A-MPDU-Length-Exponen.patch b/package/kernel/mac80211/patches/subsys/393-wireless-align-HE-capabilities-A-MPDU-Length-Exponen.patch deleted file mode 100644 index 34829a74628..00000000000 --- a/package/kernel/mac80211/patches/subsys/393-wireless-align-HE-capabilities-A-MPDU-Length-Exponen.patch +++ /dev/null @@ -1,148 +0,0 @@ -From: Johannes Berg -Date: Fri, 9 Apr 2021 12:40:20 +0300 -Subject: [PATCH] wireless: align HE capabilities A-MPDU Length Exponent - Extension - -The A-MPDU length exponent extension is defined differently in -802.11ax D6.1, align with that. - -Signed-off-by: Luca Coelho -Link: https://lore.kernel.org/r/iwlwifi.20210409123755.c2a257d3e2df.I3455245d388c52c61dace7e7958dbed7e807cfb6@changeid -Signed-off-by: Johannes Berg ---- - ---- a/drivers/net/wireless/ath/ath11k/mac.c -+++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -1265,9 +1265,8 @@ static void ath11k_peer_assoc_h_he(struc - * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu - * length. - */ -- ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] & -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >> -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT; -+ ampdu_factor = u8_get_bits(he_cap->he_cap_elem.mac_cap_info[3], -+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK); - - if (ampdu_factor) { - if (sta->vht_cap.vht_supported) ---- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c -+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c -@@ -550,7 +550,7 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP, - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2, - .mac_cap_info[4] = - IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU | - IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39, -@@ -636,7 +636,7 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_MAC_CAP2_BSR, - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2, - .mac_cap_info[4] = - IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .mac_cap_info[5] = ---- a/drivers/net/wireless/mac80211_hwsim.c -+++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -2817,7 +2817,7 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_MAC_CAP2_ACK_EN, - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3, - .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .phy_cap_info[1] = - IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK | -@@ -2861,7 +2861,7 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_MAC_CAP2_ACK_EN, - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3, - .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .phy_cap_info[1] = - IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK | -@@ -2907,7 +2907,7 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_MAC_CAP2_ACK_EN, - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3, - .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .phy_cap_info[0] = - IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G | -@@ -2955,7 +2955,7 @@ static const struct ieee80211_sband_ifty - IEEE80211_HE_MAC_CAP2_ACK_EN, - .mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2, -+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3, - .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU, - .phy_cap_info[0] = - IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G | ---- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c -+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c -@@ -530,7 +530,7 @@ mt7915_init_he_caps(struct mt7915_phy *p - IEEE80211_HE_MAC_CAP0_HTC_HE; - he_cap_elem->mac_cap_info[3] = - IEEE80211_HE_MAC_CAP3_OMI_CONTROL | -- IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED; -+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3; - he_cap_elem->mac_cap_info[4] = - IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU; - ---- a/include/linux/ieee80211.h -+++ b/include/linux/ieee80211.h -@@ -2052,17 +2052,15 @@ int ieee80211_get_vht_max_nss(struct iee - * A-MDPU Length Exponent field in the HT capabilities, VHT capabilities and the - * same field in the HE capabilities. - */ --#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_USE_VHT 0x00 --#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_1 0x08 --#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2 0x10 --#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED 0x18 -+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_0 0x00 -+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 0x08 -+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 0x10 -+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x18 - #define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x18 - #define IEEE80211_HE_MAC_CAP3_AMSDU_FRAG 0x20 - #define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x40 - #define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80 - --#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT 3 -- - #define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x01 - #define IEEE80211_HE_MAC_CAP4_QTP 0x02 - #define IEEE80211_HE_MAC_CAP4_BQR 0x04 ---- a/net/mac80211/debugfs_sta.c -+++ b/net/mac80211/debugfs_sta.c -@@ -711,17 +711,17 @@ static ssize_t sta_he_capa_read(struct f - PFLAG(MAC, 3, OFDMA_RA, "OFDMA-RA"); - - switch (cap[3] & IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) { -- case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_USE_VHT: -- PRINT("MAX-AMPDU-LEN-EXP-USE-VHT"); -+ case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_0: -+ PRINT("MAX-AMPDU-LEN-EXP-USE-EXT-0"); - break; -- case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_1: -- PRINT("MAX-AMPDU-LEN-EXP-VHT-1"); -+ case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1: -+ PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-1"); - break; -- case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2: -- PRINT("MAX-AMPDU-LEN-EXP-VHT-2"); -+ case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2: -+ PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-2"); - break; -- case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED: -- PRINT("MAX-AMPDU-LEN-EXP-RESERVED"); -+ case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3: -+ PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-3"); - break; - } - diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index f341fb399e9..6d4a9c21a57 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3818,6 +3818,7 @@ struct mgmt_frame_regs { +@@ -3826,6 +3826,7 @@ struct mgmt_frame_regs { * (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 @@ * * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting * functions to adjust rfkill hw state -@@ -4142,6 +4143,7 @@ struct cfg80211_ops { +@@ -4150,6 +4151,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); @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2749,6 +2749,19 @@ static int ieee80211_get_tx_power(struct +@@ -2768,6 +2768,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static void ieee80211_rfkill_poll(struct wiphy *wiphy) { struct ieee80211_local *local = wiphy_priv(wiphy); -@@ -4384,6 +4397,7 @@ const struct cfg80211_ops mac80211_confi +@@ -4403,6 +4416,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, @@ -119,7 +119,7 @@ if (local->hw.conf.power_level != power) { changed |= IEEE80211_CONF_CHANGE_POWER; local->hw.conf.power_level = power; -@@ -670,6 +676,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -679,6 +685,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ IEEE80211_RADIOTAP_MCS_HAVE_BW; local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI | IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH; @@ -129,7 +129,7 @@ local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -778,6 +778,7 @@ static const struct nla_policy nl80211_p +@@ -780,6 +780,7 @@ static const struct nla_policy nl80211_p [NL80211_ATTR_COLOR_CHANGE_COUNT] = { .type = NLA_U8 }, [NL80211_ATTR_COLOR_CHANGE_COLOR] = { .type = NLA_U8 }, [NL80211_ATTR_COLOR_CHANGE_ELEMS] = NLA_POLICY_NESTED(nl80211_policy), @@ -137,7 +137,7 @@ }; /* policy for the key attributes */ -@@ -3315,6 +3316,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3317,6 +3318,20 @@ static int nl80211_set_wiphy(struct sk_b goto out; } diff --git a/package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index 3724013146b..26af6a2fb98 100644 --- a/package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -1,238 +1,29 @@ -From 83216e3988cd196183542937c9bd58b279f946af Mon Sep 17 00:00:00 2001 -From: Michael Walle -Date: Mon, 12 Apr 2021 19:47:17 +0200 -Subject: of: net: pass the dst buffer to of_get_mac_address() - -of_get_mac_address() returns a "const void*" pointer to a MAC address. -Lately, support to fetch the MAC address by an NVMEM provider was added. -But this will only work with platform devices. It will not work with -PCI devices (e.g. of an integrated root complex) and esp. not with DSA -ports. - -There is an of_* variant of the nvmem binding which works without -devices. The returned data of a nvmem_cell_read() has to be freed after -use. On the other hand the return of_get_mac_address() points to some -static data without a lifetime. The trick for now, was to allocate a -device resource managed buffer which is then returned. This will only -work if we have an actual device. - -Change it, so that the caller of of_get_mac_address() has to supply a -buffer where the MAC address is written to. Unfortunately, this will -touch all drivers which use the of_get_mac_address(). - -Usually the code looks like: - - const char *addr; - addr = of_get_mac_address(np); - if (!IS_ERR(addr)) - ether_addr_copy(ndev->dev_addr, addr); - -This can then be simply rewritten as: - - of_get_mac_address(np, ndev->dev_addr); - -Sometimes is_valid_ether_addr() is used to test the MAC address. -of_get_mac_address() already makes sure, it just returns a valid MAC -address. Thus we can just test its return code. But we have to be -careful if there are still other sources for the MAC address before the -of_get_mac_address(). In this case we have to keep the -is_valid_ether_addr() call. - -The following coccinelle patch was used to convert common cases to the -new style. Afterwards, I've manually gone over the drivers and fixed the -return code variable: either used a new one or if one was already -available use that. Mansour Moufid, thanks for that coccinelle patch! - - -@a@ -identifier x; -expression y, z; -@@ -- x = of_get_mac_address(y); -+ x = of_get_mac_address(y, z); - <... -- ether_addr_copy(z, x); - ...> - -@@ -identifier a.x; -@@ -- if (<+... x ...+>) {} - -@@ -identifier a.x; -@@ - if (<+... x ...+>) { - ... - } -- else {} - -@@ -identifier a.x; -expression e; -@@ -- if (<+... x ...+>@e) -- {} -- else -+ if (!(e)) - {...} - -@@ -expression x, y, z; -@@ -- x = of_get_mac_address(y, z); -+ of_get_mac_address(y, z); - ... when != x - - -All drivers, except drivers/net/ethernet/aeroflex/greth.c, were -compile-time tested. - -Suggested-by: Andrew Lunn -Signed-off-by: Michael Walle -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - arch/arm/mach-mvebu/kirkwood.c | 3 +- - arch/powerpc/sysdev/tsi108_dev.c | 5 +- - drivers/net/ethernet/aeroflex/greth.c | 6 +-- - drivers/net/ethernet/allwinner/sun4i-emac.c | 10 ++-- - drivers/net/ethernet/altera/altera_tse_main.c | 7 +-- - drivers/net/ethernet/arc/emac_main.c | 8 +-- - drivers/net/ethernet/atheros/ag71xx.c | 7 +-- - drivers/net/ethernet/broadcom/bcm4908_enet.c | 7 +-- - drivers/net/ethernet/broadcom/bcmsysport.c | 7 +-- - drivers/net/ethernet/broadcom/bgmac-bcma.c | 10 ++-- - drivers/net/ethernet/broadcom/bgmac-platform.c | 11 ++-- - drivers/net/ethernet/cadence/macb_main.c | 11 ++-- - drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 8 +-- - drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 5 +- - drivers/net/ethernet/davicom/dm9000.c | 10 ++-- - drivers/net/ethernet/ethoc.c | 6 +-- - drivers/net/ethernet/ezchip/nps_enet.c | 7 +-- - drivers/net/ethernet/freescale/fec_main.c | 7 +-- - drivers/net/ethernet/freescale/fec_mpc52xx.c | 7 +-- - drivers/net/ethernet/freescale/fman/mac.c | 9 ++-- - .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 5 +- - drivers/net/ethernet/freescale/gianfar.c | 8 +-- - drivers/net/ethernet/freescale/ucc_geth.c | 5 +- - drivers/net/ethernet/hisilicon/hisi_femac.c | 7 +-- - drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 7 +-- - drivers/net/ethernet/lantiq_xrx200.c | 7 +-- - drivers/net/ethernet/marvell/mv643xx_eth.c | 5 +- - drivers/net/ethernet/marvell/mvneta.c | 6 +-- - .../net/ethernet/marvell/prestera/prestera_main.c | 11 ++-- - drivers/net/ethernet/marvell/pxa168_eth.c | 9 +--- - drivers/net/ethernet/marvell/sky2.c | 8 ++- - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ++-- - drivers/net/ethernet/micrel/ks8851_common.c | 7 ++- - drivers/net/ethernet/microchip/lan743x_main.c | 5 +- - drivers/net/ethernet/nxp/lpc_eth.c | 4 +- - drivers/net/ethernet/qualcomm/qca_spi.c | 10 ++-- - drivers/net/ethernet/qualcomm/qca_uart.c | 9 +--- - drivers/net/ethernet/renesas/ravb_main.c | 12 +++-- - drivers/net/ethernet/renesas/sh_eth.c | 5 +- - .../net/ethernet/samsung/sxgbe/sxgbe_platform.c | 13 ++--- - drivers/net/ethernet/socionext/sni_ave.c | 10 ++-- - .../net/ethernet/stmicro/stmmac/dwmac-anarion.c | 2 +- - .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 2 +- - .../net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +- - .../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 2 +- - .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +- - .../net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 2 +- - .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 2 +- - .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 2 +- - .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +- - .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +- - .../net/ethernet/stmicro/stmmac/dwmac-visconti.c | 2 +- - drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +- - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- - .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 14 ++--- - .../net/ethernet/stmicro/stmmac/stmmac_platform.h | 2 +- - drivers/net/ethernet/ti/am65-cpsw-nuss.c | 19 ++++--- - drivers/net/ethernet/ti/cpsw.c | 7 +-- - drivers/net/ethernet/ti/cpsw_new.c | 7 +-- - drivers/net/ethernet/ti/davinci_emac.c | 8 +-- - drivers/net/ethernet/ti/netcp_core.c | 7 +-- - drivers/net/ethernet/wiznet/w5100-spi.c | 8 ++- - drivers/net/ethernet/wiznet/w5100.c | 2 +- - drivers/net/ethernet/xilinx/ll_temac_main.c | 8 +-- - drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 15 +++--- - drivers/net/ethernet/xilinx/xilinx_emaclite.c | 8 +-- - drivers/net/wireless/ath/ath9k/init.c | 5 +- - drivers/net/wireless/mediatek/mt76/eeprom.c | 9 +--- - drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 6 +-- - drivers/of/of_net.c | 60 ++++++++++------------ - drivers/staging/octeon/ethernet.c | 10 ++-- - drivers/staging/wfx/main.c | 7 ++- - include/linux/of_net.h | 6 +-- - include/net/dsa.h | 2 +- - net/dsa/dsa2.c | 2 +- - net/dsa/slave.c | 2 +- - net/ethernet/eth.c | 11 ++-- - 85 files changed, 218 insertions(+), 364 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/init.c -+++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -617,7 +617,6 @@ static int ath9k_of_init(struct ath_soft - struct ath_hw *ah = sc->sc_ah; - struct ath_common *common = ath9k_hw_common(ah); - enum ath_bus_type bus_type = common->bus_ops->ath_bus_type; -- const char *mac; - char eeprom_name[100]; - int ret; - -@@ -640,9 +639,7 @@ static int ath9k_of_init(struct ath_soft - ah->ah_flags |= AH_NO_EEP_SWAP; - } - -- mac = of_get_mac_address(np); -- if (!IS_ERR(mac)) -- ether_addr_copy(common->macaddr, mac); -+ of_get_mac_address(np, common->macaddr); - - return 0; - } ---- a/drivers/net/wireless/mediatek/mt76/eeprom.c -+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c -@@ -91,16 +91,9 @@ void - mt76_eeprom_override(struct mt76_phy *phy) - { - struct mt76_dev *dev = phy->dev; +--- a/backport-include/linux/of_net.h ++++ /dev/null +@@ -1,26 +0,0 @@ +-#ifndef _BP_OF_NET_H +-#define _BP_OF_NET_H +-#include_next +-#include +-#include - --#ifdef CONFIG_OF - struct device_node *np = dev->dev->of_node; -- const u8 *mac = NULL; - -- if (np) -- mac = of_get_mac_address(np); -- if (!IS_ERR_OR_NULL(mac)) -- ether_addr_copy(phy->macaddr, mac); --#endif -+ of_get_mac_address(np, phy->macaddr); - - if (!is_valid_ether_addr(phy->macaddr)) { - eth_random_addr(phy->macaddr); ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -989,11 +989,7 @@ static void rt2x00lib_rate(struct ieee80 - - void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr) - { -- const char *mac_addr; +-/* The behavior of of_get_mac_address() changed in kernel 5.2, it now +- * returns an error code and not NULL in case of an error. +- */ +-#if LINUX_VERSION_IS_LESS(5,13,0) +-static inline int backport_of_get_mac_address(struct device_node *np, u8 *mac_out) +-{ +- const void *mac = of_get_mac_address(np); - -- mac_addr = of_get_mac_address(rt2x00dev->dev->of_node); -- if (!IS_ERR(mac_addr)) -- ether_addr_copy(eeprom_mac_addr, mac_addr); -+ of_get_mac_address(rt2x00dev->dev->of_node, eeprom_mac_addr); - - if (!is_valid_ether_addr(eeprom_mac_addr)) { - eth_random_addr(eeprom_mac_addr); +- if (!mac) +- return -ENODEV; +- if (IS_ERR(mac)) +- return PTR_ERR(mac); +- ether_addr_copy(mac_out, mac); +- +- return 0; +-} +-#define of_get_mac_address LINUX_BACKPORT(of_get_mac_address) +-#endif /* < 5.2 */ +- +-#endif /* _BP_OF_NET_H */