0014-ar71xx-fix-D-Link-DIR-615-rev.-C1-WLAN-MAC-address.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Wed, 28 Jan 2015 14:56:03 +0100
  3. Subject: ar71xx: fix D-Link DIR-615 rev. C1 WLAN MAC address
  4. Fix the WLAN MAC address to match the one printed on the label by using the
  5. correct address from the ART instead of the address of the LAN interface.
  6. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  7. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
  8. index 425be30..e55a43f 100644
  9. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
  10. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
  11. @@ -38,6 +38,8 @@
  12. #define DIR_615C1_CONFIG_ADDR 0x1f020000
  13. #define DIR_615C1_CONFIG_SIZE 0x10000
  14. +#define DIR_615C1_WLAN_MAC_ADDR 0x1f3fffb4
  15. +
  16. static struct gpio_led dir_615c1_leds_gpio[] __initdata = {
  17. {
  18. .name = "d-link:orange:status",
  19. @@ -96,16 +98,16 @@ static void __init dir_615c1_setup(void)
  20. {
  21. const char *config = (char *) KSEG1ADDR(DIR_615C1_CONFIG_ADDR);
  22. u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
  23. - u8 mac[6];
  24. - u8 *wlan_mac = NULL;
  25. + u8 mac[ETH_ALEN], wlan_mac[ETH_ALEN];
  26. if (ath79_nvram_parse_mac_addr(config, DIR_615C1_CONFIG_SIZE,
  27. "lan_mac=", mac) == 0) {
  28. ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
  29. ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
  30. - wlan_mac = mac;
  31. }
  32. + ath79_parse_ascii_mac((char *) KSEG1ADDR(DIR_615C1_WLAN_MAC_ADDR), wlan_mac);
  33. +
  34. ath79_register_mdio(0, DIR_615C1_MDIO_MASK);
  35. ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;