You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
669 B
Bash
31 lines
669 B
Bash
#!/bin/ash
|
|
|
|
[ "$ACTION" == "add" ] || exit 0
|
|
|
|
PHYNBR=${DEVPATH##*/phy}
|
|
|
|
[ -n $PHYNBR ] || exit 0
|
|
|
|
. /lib/functions.sh
|
|
. /lib/functions/system.sh
|
|
. /lib/functions/k2t.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
iodata,wn-ag300dgr)
|
|
# There is no eeprom data for 5 GHz wlan in "art" partition
|
|
# which would allow to patch the macaddress
|
|
[ "$PHYNBR" -eq 1 ] && \
|
|
echo $(macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1) > /sys${DEVPATH}/macaddress
|
|
;;
|
|
phicomm,k2t)
|
|
# The K2T factory firmware does use LAN mac address as the 2.4G wifi mac address
|
|
[ "$PHYNBR" -eq 1 ] && \
|
|
echo $(k2t_get_mac "lan_mac") > /sys${DEVPATH}/macaddress
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|