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 bb0127b011c..9fb549cc19b 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 f8aed716f5e..d164d890314 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 6dca708edf7..00000000000 --- 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 21cf0b3134d..29f500a4d06 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 2d3ef88d645..00000000000 --- 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 0898f33bdab..00000000000 --- 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 6d3000278b1..00000000000 --- 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 d576661bd20..edec97cce94 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 82fe546509f..3b6cba48e71 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 e64ca1753bd..ae400b78a1a 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 26af6a2fb98..00000000000 --- 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 */