Skip to content

Commit

Permalink
mac80211: remove outdated patches
Browse files Browse the repository at this point in the history
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 <yangshiji66@qq.com>
  • Loading branch information
DragonBluep authored and nbd168 committed Sep 27, 2024
1 parent f03163a commit a4c95f1
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 158 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#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 <linux/ath9k_platform.h>
Expand Down Expand Up @@ -127,11 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ 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 */
Expand Down Expand Up @@ -187,7 +183,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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);

Expand All @@ -200,7 +196,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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);
Expand All @@ -225,7 +221,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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;

Expand All @@ -241,7 +237,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

#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;
}

Expand Down Expand Up @@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#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
{
}

Expand All @@ -112,15 +112,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#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;

+ ath9k_deinit_buttons(sc);
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);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 @@
Expand Down
26 changes: 0 additions & 26 deletions package/kernel/mac80211/patches/build/130-iommu_backport.patch

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>

--- 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);
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>

--- 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];

Expand Down

This file was deleted.

0 comments on commit a4c95f1

Please sign in to comment.