From: Shiji Yang Date: Fri, 27 Sep 2024 01:51:22 +0000 (+0800) Subject: mac80211: remove outdated patches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a4c95f1444b0cf43fbb6e3610451211eb2d1d017;p=openwrt%2Fstaging%2Fwigyori.git mac80211: remove outdated patches The only supported kernel in the main branch now is version 6.6. It's time to clean up these useless codes and patches. Signed-off-by: Shiji Yang --- diff --git a/package/kernel/mac80211/patches/ath9k/548-ath9k_enable_gpio_chip.patch b/package/kernel/mac80211/patches/ath9k/548-ath9k_enable_gpio_chip.patch index bb0127b011..9fb549cc19 100644 --- a/package/kernel/mac80211/patches/ath9k/548-ath9k_enable_gpio_chip.patch +++ b/package/kernel/mac80211/patches/ath9k/548-ath9k_enable_gpio_chip.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau #ifdef CPTCFG_ATH9K_DEBUGFS --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c -@@ -16,13 +16,139 @@ +@@ -16,13 +16,135 @@ #include "ath9k.h" #include @@ -127,11 +127,7 @@ Signed-off-by: Felix Fietkau + snprintf(gc->label, sizeof(gc->label), "ath9k-%s", + wiphy_name(sc->hw->wiphy)); +#ifdef CONFIG_OF -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) + gc->gchip.parent = sc->dev; -+#else -+ gc->gchip.dev = sc->dev; -+#endif +#endif + gc->gchip.label = gc->label; + gc->gchip.base = -1; /* determine base automatically */ @@ -187,7 +183,7 @@ Signed-off-by: Felix Fietkau static void ath_fill_led_pin(struct ath_softc *sc) { struct ath_hw *ah = sc->sc_ah; -@@ -80,6 +206,12 @@ static int ath_add_led(struct ath_softc +@@ -80,6 +202,12 @@ static int ath_add_led(struct ath_softc else ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low); @@ -200,7 +196,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -136,17 +268,24 @@ void ath_deinit_leds(struct ath_softc *s +@@ -136,17 +264,24 @@ void ath_deinit_leds(struct ath_softc *s while (!list_empty(&sc->leds)) { led = list_first_entry(&sc->leds, struct ath_led, list); @@ -225,7 +221,7 @@ Signed-off-by: Felix Fietkau char led_name[32]; const char *trigger; int i; -@@ -156,6 +295,15 @@ void ath_init_leds(struct ath_softc *sc) +@@ -156,6 +291,15 @@ void ath_init_leds(struct ath_softc *sc) if (AR_SREV_9100(sc->sc_ah)) return; @@ -241,7 +237,7 @@ Signed-off-by: Felix Fietkau ath_fill_led_pin(sc); if (pdata && pdata->leds && pdata->num_leds) -@@ -180,6 +328,7 @@ void ath_init_leds(struct ath_softc *sc) +@@ -180,6 +324,7 @@ void ath_init_leds(struct ath_softc *sc) ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, !sc->sc_ah->config.led_active_high); } diff --git a/package/kernel/mac80211/patches/ath9k/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/ath9k/549-ath9k_enable_gpio_buttons.patch index f8aed716f5..d164d89031 100644 --- a/package/kernel/mac80211/patches/ath9k/549-ath9k_enable_gpio_buttons.patch +++ b/package/kernel/mac80211/patches/ath9k/549-ath9k_enable_gpio_buttons.patch @@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau #ifdef CPTCFG_MAC80211_LEDS -@@ -133,6 +135,67 @@ static void ath9k_unregister_gpio_chip(s +@@ -129,6 +131,67 @@ static void ath9k_unregister_gpio_chip(s sc->gpiochip = NULL; } @@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau #else /* CONFIG_GPIOLIB */ static inline void ath9k_register_gpio_chip(struct ath_softc *sc) -@@ -143,6 +206,14 @@ static inline void ath9k_unregister_gpio +@@ -139,6 +202,14 @@ static inline void ath9k_unregister_gpio { } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau #endif /* CONFIG_GPIOLIB */ /********************************/ -@@ -266,6 +337,7 @@ void ath_deinit_leds(struct ath_softc *s +@@ -262,6 +333,7 @@ void ath_deinit_leds(struct ath_softc *s { struct ath_led *led; @@ -120,7 +120,7 @@ Signed-off-by: Felix Fietkau while (!list_empty(&sc->leds)) { led = list_first_entry(&sc->leds, struct ath_led, list); #ifdef CONFIG_GPIOLIB -@@ -305,6 +377,7 @@ void ath_init_leds(struct ath_softc *sc) +@@ -301,6 +373,7 @@ void ath_init_leds(struct ath_softc *sc) } ath_fill_led_pin(sc); diff --git a/package/kernel/mac80211/patches/build/110-backport_namepace_const.patch b/package/kernel/mac80211/patches/build/110-backport_namepace_const.patch deleted file mode 100644 index 6dca708edf..0000000000 --- a/package/kernel/mac80211/patches/build/110-backport_namepace_const.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/net/wireless/sysfs.c -+++ b/net/wireless/sysfs.c -@@ -154,7 +154,11 @@ static SIMPLE_DEV_PM_OPS(wiphy_pm_ops, w - #define WIPHY_PM_OPS NULL - #endif - -+#if LINUX_VERSION_IS_GEQ(6,2,0) - static const void *wiphy_namespace(const struct device *d) -+#else -+static const void *wiphy_namespace(struct device *d) -+#endif - { - struct wiphy *wiphy = container_of(d, struct wiphy, dev); - diff --git a/package/kernel/mac80211/patches/build/120-headers_version_fix.patch b/package/kernel/mac80211/patches/build/120-headers_version_fix.patch index 21cf0b3134..29f500a4d0 100644 --- a/package/kernel/mac80211/patches/build/120-headers_version_fix.patch +++ b/package/kernel/mac80211/patches/build/120-headers_version_fix.patch @@ -1,14 +1,3 @@ ---- a/backport-include/linux/random.h -+++ b/backport-include/linux/random.h -@@ -15,7 +15,7 @@ static inline u16 get_random_u16(void) - } - #endif - --#if LINUX_VERSION_IS_LESS(6,2,0) -+#if LINUX_VERSION_IS_LESS(6,1,4) - static inline u32 __get_random_u32_below(u32 ceil) - { - /* --- a/backport-include/net/dropreason.h +++ b/backport-include/net/dropreason.h @@ -3,10 +3,9 @@ diff --git a/package/kernel/mac80211/patches/build/130-iommu_backport.patch b/package/kernel/mac80211/patches/build/130-iommu_backport.patch deleted file mode 100644 index 2d3ef88d64..0000000000 --- a/package/kernel/mac80211/patches/build/130-iommu_backport.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- /dev/null -+++ b/backport-include/linux/iommu.h -@@ -0,0 +1,23 @@ -+#ifndef __BACKPORT_LINUX_IOMMU_H -+#define __BACKPORT_LINUX_IOMMU_H -+ -+#include_next -+#include -+ -+#if LINUX_VERSION_IS_LESS(6,3,0) -+ -+static inline int LINUX_BACKPORT(iommu_map)(struct iommu_domain *domain, -+ unsigned long iova, -+ phys_addr_t paddr, size_t size, -+ int prot, gfp_t gfp) -+{ -+ if (gfp == GFP_ATOMIC) -+ return iommu_map_atomic(domain, iova, paddr, size, prot); -+ -+ return iommu_map(domain, iova, paddr, size, prot); -+} -+#define iommu_map LINUX_BACKPORT(iommu_map) -+ -+#endif /* < 6.3 */ -+ -+#endif diff --git a/package/kernel/mac80211/patches/build/210-backport_genl_split_ops.patch b/package/kernel/mac80211/patches/build/210-backport_genl_split_ops.patch deleted file mode 100644 index 0898f33bda..0000000000 --- a/package/kernel/mac80211/patches/build/210-backport_genl_split_ops.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -16529,9 +16529,14 @@ static u32 nl80211_internal_flags[] = { - #undef SELECTOR - }; - -+#if LINUX_VERSION_IS_LESS(6,2,0) -+static int nl80211_pre_doit(const struct genl_ops *ops, struct sk_buff *skb, -+ struct genl_info *info) -+#else - static int nl80211_pre_doit(const struct genl_split_ops *ops, - struct sk_buff *skb, - struct genl_info *info) -+#endif - { - struct cfg80211_registered_device *rdev = NULL; - struct wireless_dev *wdev = NULL; -@@ -16631,9 +16636,14 @@ out_unlock: - return err; - } - -+#if LINUX_VERSION_IS_LESS(6,2,0) -+static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb, -+ struct genl_info *info) -+#else - static void nl80211_post_doit(const struct genl_split_ops *ops, - struct sk_buff *skb, - struct genl_info *info) -+#endif - { - u32 internal_flags = nl80211_internal_flags[ops->internal_flags]; - diff --git a/package/kernel/mac80211/patches/build/220-list-don-t-backport-list_count_nodes.patch b/package/kernel/mac80211/patches/build/220-list-don-t-backport-list_count_nodes.patch deleted file mode 100644 index 6d3000278b..0000000000 --- a/package/kernel/mac80211/patches/build/220-list-don-t-backport-list_count_nodes.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Fri, 15 Dec 2023 10:17:21 +0100 -Subject: [PATCH] list: don't backport list_count_nodes() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It's redundant in OpenWrt as it backports it on its own. This fixes: -backport-include/linux/list.h:11:22: error: redefinition of 'list_count_nodes' - -Signed-off-by: Rafał Miłecki ---- - backport-include/linux/list.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/backport-include/linux/list.h -+++ b/backport-include/linux/list.h -@@ -3,7 +3,7 @@ - #include_next - #include - --#if LINUX_VERSION_IS_LESS(6,3,0) -+#if 0 /* OpenWrt backports list_count_nodes() on its own */ - /** - * list_count_nodes - count nodes in the list - * @head: the head for your list. diff --git a/package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch b/package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch index d576661bd2..edec97cce9 100644 --- a/package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch +++ b/package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch @@ -28,15 +28,11 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -565,6 +565,11 @@ __sta_info_alloc(struct ieee80211_sub_if +@@ -565,6 +565,7 @@ __sta_info_alloc(struct ieee80211_sub_if spin_lock_init(&sta->ps_lock); INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames); wiphy_work_init(&sta->ampdu_mlme.work, ieee80211_ba_session_work); -+#if LINUX_VERSION_IS_LESS(6,2,0) -+ sta->ampdu_mlme.dialog_token_allocator = prandom_u32_max(U8_MAX); -+#else + sta->ampdu_mlme.dialog_token_allocator = get_random_u32_below(U8_MAX); -+#endif #ifdef CPTCFG_MAC80211_MESH if (ieee80211_vif_is_mesh(&sdata->vif)) { sta->mesh = kzalloc(sizeof(*sta->mesh), gfp); diff --git a/package/kernel/mac80211/patches/subsys/330-mac80211-add-AQL-support-for-broadcast-packets.patch b/package/kernel/mac80211/patches/subsys/330-mac80211-add-AQL-support-for-broadcast-packets.patch index 82fe546509..3b6cba48e7 100644 --- a/package/kernel/mac80211/patches/subsys/330-mac80211-add-AQL-support-for-broadcast-packets.patch +++ b/package/kernel/mac80211/patches/subsys/330-mac80211-add-AQL-support-for-broadcast-packets.patch @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau spin_lock_init(&local->active_txq_lock[i]); --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -2357,13 +2357,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre +@@ -2353,13 +2353,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, struct sta_info *sta, u8 ac, diff --git a/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch index e64ca1753b..ae400b78a1 100644 --- a/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch +++ b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch @@ -18,7 +18,7 @@ Signed-off-by: David Bauer --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -2459,6 +2459,13 @@ static void sta_stats_decode_rate(struct +@@ -2455,6 +2455,13 @@ static void sta_stats_decode_rate(struct sband = local->hw.wiphy->bands[band]; 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 deleted file mode 100644 index 26af6a2fb9..0000000000 --- a/package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- 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 -- --/* 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); -- -- 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 */