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.
openwrt/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

25 lines
413 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
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