Skip to content

Commit

Permalink
wan mac address consistant with lan
Browse files Browse the repository at this point in the history
  • Loading branch information
kysonlok committed Jun 12, 2017
1 parent bc890a6 commit efb0518
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions patches/104-gl-mt300n-v2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
awapn2403)
ucidef_add_switch "switch0" \
"0:lan" "1:wan" "6@eth0"
@@ -425,6 +429,10 @@ ramips_setup_macs()
wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
lan_mac=$wan_mac
;;
+ gl-mt300n-v2)
+ lan_mac=$(mtd_get_mac_binary factory 4)
+ wan_mac=$(mtd_get_mac_binary factory 4)
+ ;;
*)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -208,6 +208,9 @@ ramips_board_detect() {
Expand Down
4 changes: 4 additions & 0 deletions target/linux/ramips/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ ramips_setup_macs()
wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
lan_mac=$wan_mac
;;
gl-mt300n-v2)
lan_mac=$(mtd_get_mac_binary factory 4)
wan_mac=$(mtd_get_mac_binary factory 4)
;;
*)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
Expand Down

0 comments on commit efb0518

Please sign in to comment.