Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. From e9dec98528c202243a2c1e251deb28335e9750fc Mon Sep 17 00:00:00 2001
  2. Message-Id: <e9dec98528c202243a2c1e251deb28335e9750fc.1422245853.git.mschiffer@universe-factory.net>
  3. From: Matthias Schiffer <mschiffer@universe-factory.net>
  4. Date: Mon, 26 Jan 2015 05:16:58 +0100
  5. Subject: [PATCH] ar71xx: fix DIR615 C1 WLAN MAC address
  6.  
  7. ---
  8. target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c | 8 +++++---
  9. 1 file changed, 5 insertions(+), 3 deletions(-)
  10.  
  11. 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
  12. index 425be30..e55a43f 100644
  13. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
  14. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
  15. @@ -38,6 +38,8 @@
  16. #define DIR_615C1_CONFIG_ADDR 0x1f020000
  17. #define DIR_615C1_CONFIG_SIZE 0x10000
  18.  
  19. +#define DIR_615C1_WLAN_MAC_ADDR 0x1f3fffb4
  20. +
  21. static struct gpio_led dir_615c1_leds_gpio[] __initdata = {
  22. {
  23. .name = "d-link:orange:status",
  24. @@ -96,16 +98,16 @@ static void __init dir_615c1_setup(void)
  25. {
  26. const char *config = (char *) KSEG1ADDR(DIR_615C1_CONFIG_ADDR);
  27. u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
  28. - u8 mac[6];
  29. - u8 *wlan_mac = NULL;
  30. + u8 mac[ETH_ALEN], wlan_mac[ETH_ALEN];
  31.  
  32. if (ath79_nvram_parse_mac_addr(config, DIR_615C1_CONFIG_SIZE,
  33. "lan_mac=", mac) == 0) {
  34. ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
  35. ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
  36. - wlan_mac = mac;
  37. }
  38.  
  39. + ath79_parse_ascii_mac((char *) KSEG1ADDR(DIR_615C1_WLAN_MAC_ADDR), wlan_mac);
  40. +
  41. ath79_register_mdio(0, DIR_615C1_MDIO_MASK);
  42.  
  43. ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
  44. --
  45. 2.2.2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement