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>
This commit is contained in:
committed by
Christian Marangi
parent
2f1c62e5af
commit
0db4f9785c
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||
|
||||
. /lib/functions/caldata.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$FIRMWARE" in
|
||||
"ath10k/cal-pci-0000:00:00.0.bin")
|
||||
case $board in
|
||||
zyxel,emg2926-q10a|\
|
||||
zyxel,nbg6716)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -17,8 +17,10 @@ case $board in
|
||||
;;
|
||||
zyxel,emg2926-q10a|\
|
||||
zyxel,nbg6716)
|
||||
# Set mac address for 2.4g device
|
||||
ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add $ethaddr 1 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
|
||||
echo -n $ethaddr > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user