mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-09-21 02:59:23 +00:00
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>
27 lines
581 B
Plaintext
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
|