0045-Revert-ath9k-drop-obsolete-patch.patch 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Tue, 15 Aug 2017 04:08:08 +0200
  3. Subject: Revert "ath9k: drop obsolete patch"
  4. This reverts commit 4a4c00e7c4bd3c752fdfecb2c10dc16277e63856.
  5. diff --git a/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch
  6. new file mode 100644
  7. index 0000000000000000000000000000000000000000..ddb3fe60e8535b2d547f9b05ecb956d6a5b2b904
  8. --- /dev/null
  9. +++ b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch
  10. @@ -0,0 +1,39 @@
  11. +From: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
  12. +Date: Sun, 31 Jan 2016 20:45:57 +0100
  13. +Subject: [PATCH v4 1/8] mac80211: ath9k: enable platform WLAN LED name
  14. +
  15. +Enable platform-supplied WLAN LED name for ath9k device. It replaces generic
  16. +'ath9k-phy*' label with string set during platform initialization.
  17. +
  18. +Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
  19. +---
  20. + drivers/net/wireless/ath/ath9k/gpio.c | 7 +++++--
  21. + include/linux/ath9k_platform.h | 1 +
  22. + 2 files changed, 6 insertions(+), 2 deletions(-)
  23. +
  24. +--- a/drivers/net/wireless/ath/ath9k/gpio.c
  25. ++++ b/drivers/net/wireless/ath/ath9k/gpio.c
  26. +@@ -166,8 +166,11 @@ void ath_init_leds(struct ath_softc *sc)
  27. + if (sc->sc_ah->led_pin < 0)
  28. + return;
  29. +
  30. +- snprintf(led_name, sizeof(led_name), "ath9k-%s",
  31. +- wiphy_name(sc->hw->wiphy));
  32. ++ if (pdata && pdata->led_name)
  33. ++ strncpy(led_name, pdata->led_name, sizeof(led_name));
  34. ++ else
  35. ++ snprintf(led_name, sizeof(led_name), "ath9k-%s",
  36. ++ wiphy_name(sc->hw->wiphy));
  37. +
  38. + if (ath9k_led_blink)
  39. + trigger = sc->led_default_trigger;
  40. +--- a/include/linux/ath9k_platform.h
  41. ++++ b/include/linux/ath9k_platform.h
  42. +@@ -49,6 +49,7 @@ struct ath9k_platform_data {
  43. +
  44. + int num_leds;
  45. + const struct gpio_led *leds;
  46. ++ const char *led_name;
  47. + };
  48. +
  49. + #endif /* _LINUX_ATH9K_PLATFORM_H */
  50. diff --git a/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch b/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch
  51. index 31dac29ad77b89626d300d9a82ba3bd2cc2210a1..86917eb6eeb18c9fb56d1cb7ec565ad1aef5c277 100644
  52. --- a/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch
  53. +++ b/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch
  54. @@ -237,7 +237,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  55. ath_fill_led_pin(sc);
  56. if (pdata && pdata->leds && pdata->num_leds)
  57. -@@ -180,6 +324,7 @@ void ath_init_leds(struct ath_softc *sc)
  58. +@@ -183,6 +327,7 @@ void ath_init_leds(struct ath_softc *sc)
  59. ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger,
  60. !sc->sc_ah->config.led_active_high);
  61. }
  62. diff --git a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch
  63. index f3fead0a1aef41e05957fda39128b13eaebb9652..4e165dde99938d3436b6497b8c2b08491c74f601 100644
  64. --- a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch
  65. +++ b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch
  66. @@ -127,10 +127,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  67. for (i = 0; i < pdata->num_leds; i++) {
  68. --- a/include/linux/ath9k_platform.h
  69. +++ b/include/linux/ath9k_platform.h
  70. -@@ -49,6 +49,10 @@ struct ath9k_platform_data {
  71. -
  72. +@@ -50,6 +50,10 @@ struct ath9k_platform_data {
  73. int num_leds;
  74. const struct gpio_led *leds;
  75. + const char *led_name;
  76. +
  77. + unsigned num_btns;
  78. + const struct gpio_keys_button *btns;
  79. diff --git a/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch
  80. index bcb0026a69afdc52b3bf5ba074418435b343d1be..45284c71eed616bcaa5c875e85c209fbefc738a5 100644
  81. --- a/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch
  82. +++ b/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch
  83. @@ -375,7 +375,7 @@
  84. --- a/include/linux/ath9k_platform.h
  85. +++ b/include/linux/ath9k_platform.h
  86. -@@ -53,6 +53,8 @@ struct ath9k_platform_data {
  87. +@@ -54,6 +54,8 @@ struct ath9k_platform_data {
  88. unsigned num_btns;
  89. const struct gpio_keys_button *btns;
  90. unsigned btn_poll_interval;
  91. diff --git a/target/linux/generic/files/include/linux/ath9k_platform.h b/target/linux/generic/files/include/linux/ath9k_platform.h
  92. index f1f2ad419c752fc4a6a07c6b7fe366bf0ae8e38f..558445ff63a0f7f7bfff35286c39f89e243156de 100644
  93. --- a/target/linux/generic/files/include/linux/ath9k_platform.h
  94. +++ b/target/linux/generic/files/include/linux/ath9k_platform.h
  95. @@ -49,6 +49,7 @@ struct ath9k_platform_data {
  96. int num_leds;
  97. const struct gpio_led *leds;
  98. + const char *led_name;
  99. unsigned num_btns;
  100. const struct gpio_keys_button *btns;