0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-09-21 02:59:23 +00:00
Files
openwrt/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
Shiji Yang 0db4f9785c ath79: convert ath10k calibration data to NVMEM (ASCII MAC)
This patch converts ath10k calibration data to NVMEM format for
wave 1 devices with mtd ASCII MAC address. The "calibration"
NVMEM cell size is 0x844. All unportable MAC address settings
have been moved to '10_fix_wifi_mac' scripts.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-02-01 17:09:03 +01:00

27 lines
581 B
Plaintext

[ "$ACTION" = "add" ] || exit 0
PHYNBR=${DEVPATH##*/phy}
[ -n $PHYNBR ] || exit 0
. /lib/functions.sh
. /lib/functions/system.sh
board=$(board_name)
case $board in
glinet,gl-e750)
# Set mac address for 5g device
[ "$PHYNBR" -eq 0 ] && \
macaddr_add $(mtd_get_mac_binary art 0x0) 2 > /sys${DEVPATH}/macaddress
;;
zyxel,emg2926-q10a|\
zyxel,nbg6716)
ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
[ "$PHYNBR" -eq 0 ] && \
macaddr_add $ethaddr 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" -eq 1 ] && \
echo -n $ethaddr > /sys${DEVPATH}/macaddress
;;
esac