10-fix-wifi-mac 506 B

123456789101112131415161718192021222324
  1. [ "$ACTION" = "add" ] || exit 0
  2. PHYNBR=${DEVPATH##*/phy}
  3. [ -n $PHYNBR ] || exit 0
  4. . /lib/functions.sh
  5. . /lib/functions/system.sh
  6. board=$(board_name)
  7. case $board in
  8. glinet,gl-e750)
  9. # Set mac address for 5g device
  10. [ "$PHYNBR" -eq 0 ] && \
  11. macaddr_add $(mtd_get_mac_binary art 0x0) 2 > /sys${DEVPATH}/macaddress
  12. ;;
  13. zyxel,emg2926-q10a|\
  14. zyxel,nbg6716)
  15. # Set mac address for 2.4g device
  16. [ "$PHYNBR" -eq 1 ] && \
  17. mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
  18. ;;
  19. esac