0047-ar71xx-fix-TP-Link-Archer-C7-v4-switch-LEDs.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From: David Bauer <mail@david-bauer.net>
  2. Date: Sat, 16 Dec 2017 15:43:02 +0100
  3. Subject: ar71xx: fix TP-Link Archer C7 v4 switch LEDs
  4. This fixes wrong switch LEDs on TP-Link Archer C7 v4.
  5. Signed-off-by: David Bauer <mail@david-bauer.net>
  6. diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
  7. index 44b1c2837e8392596eed14b4bc0d761042109715..47b90d9cb2f81936aed22cdf7d1f6d870d23c16e 100755
  8. --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
  9. +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
  10. @@ -53,8 +53,7 @@ ap121f)
  11. ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
  12. ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
  13. ;;
  14. -archer-c25-v1|\
  15. -archer-c7-v4)
  16. +archer-c25-v1)
  17. ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
  18. ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt"
  19. ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
  20. @@ -62,12 +61,6 @@ archer-c7-v4)
  21. ucidef_set_led_switch "lan2" "LAN2" "$board:green:lan2" "switch0" "0x08"
  22. ucidef_set_led_switch "lan3" "LAN3" "$board:green:lan3" "switch0" "0x04"
  23. ucidef_set_led_switch "lan4" "LAN4" "$board:green:lan4" "switch0" "0x02"
  24. - case "$board" in
  25. - archer-c7-v4)
  26. - ucidef_set_led_usbdev "usb1" "USB1" "$board:green:usb1" "1-1"
  27. - ucidef_set_led_usbdev "usb2" "USB2" "$board:green:usb2" "2-1"
  28. - ;;
  29. - esac
  30. ;;
  31. arduino-yun)
  32. ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt"
  33. @@ -635,6 +628,17 @@ archer-c7)
  34. ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy1tpt"
  35. ucidef_set_led_wlan "wlan5g" "WLAN5G" "tp-link:blue:wlan5g" "phy0tpt"
  36. ;;
  37. +archer-c7-v4)
  38. + ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt"
  39. + ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
  40. + ucidef_set_led_switch "wan" "WAN" "$board:green:wan" "switch0" "0x02"
  41. + ucidef_set_led_switch "lan1" "LAN1" "$board:green:lan1" "switch0" "0x04"
  42. + ucidef_set_led_switch "lan2" "LAN2" "$board:green:lan2" "switch0" "0x08"
  43. + ucidef_set_led_switch "lan3" "LAN3" "$board:green:lan3" "switch0" "0x10"
  44. + ucidef_set_led_switch "lan4" "LAN4" "$board:green:lan4" "switch0" "0x20"
  45. + ucidef_set_led_usbdev "usb1" "USB1" "$board:green:usb1" "1-1"
  46. + ucidef_set_led_usbdev "usb2" "USB2" "$board:green:usb2" "2-1"
  47. + ;;
  48. tl-wpa8630)
  49. ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
  50. ucidef_set_led_netdev "wlan" "WLAN" "$board:green:wlan" "wlan1"
  51. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7-v4.c
  52. index 64955c79945c0b2c28d5a93be6e45662200e60ed..9688b015356cb766c5966be2190e1aae29420d8d 100644
  53. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7-v4.c
  54. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7-v4.c
  55. @@ -58,10 +58,10 @@
  56. #define ARCHER_C7_74HC_GPIO_BASE QCA956X_GPIO_COUNT
  57. #define ARCHER_C7_GPIO_LED_WPS (ARCHER_C7_74HC_GPIO_BASE + 0)
  58. -#define ARCHER_C7_GPIO_LED_LAN1 (ARCHER_C7_74HC_GPIO_BASE + 1)
  59. -#define ARCHER_C7_GPIO_LED_LAN2 (ARCHER_C7_74HC_GPIO_BASE + 2)
  60. -#define ARCHER_C7_GPIO_LED_LAN3 (ARCHER_C7_74HC_GPIO_BASE + 3)
  61. -#define ARCHER_C7_GPIO_LED_LAN4 (ARCHER_C7_74HC_GPIO_BASE + 4)
  62. +#define ARCHER_C7_GPIO_LED_LAN4 (ARCHER_C7_74HC_GPIO_BASE + 1)
  63. +#define ARCHER_C7_GPIO_LED_LAN3 (ARCHER_C7_74HC_GPIO_BASE + 2)
  64. +#define ARCHER_C7_GPIO_LED_LAN2 (ARCHER_C7_74HC_GPIO_BASE + 3)
  65. +#define ARCHER_C7_GPIO_LED_LAN1 (ARCHER_C7_74HC_GPIO_BASE + 4)
  66. #define ARCHER_C7_GPIO_LED_WAN_GREEN (ARCHER_C7_74HC_GPIO_BASE + 5)
  67. #define ARCHER_C7_GPIO_LED_WAN_AMBER (ARCHER_C7_74HC_GPIO_BASE + 6)
  68. #define ARCHER_C7_GPIO_LED_WLAN2 (ARCHER_C7_74HC_GPIO_BASE + 7)