aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/generic
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@qq.com>2024-02-01 19:39:51 +0800
committerChristian Marangi <ansuelsmth@gmail.com>2024-02-01 17:09:03 +0100
commit0db4f9785ca30f79fa1abbffb0fab5a6053f68f5 (patch)
tree8efe5e0f437bad716875a6fee534525fa7dae676 /target/linux/ath79/generic
parent2f1c62e5af071c05631209867acefdc1f112ae26 (diff)
downloadupstream-0db4f9785ca30f79fa1abbffb0fab5a6053f68f5.tar.gz
upstream-0db4f9785ca30f79fa1abbffb0fab5a6053f68f5.tar.bz2
upstream-0db4f9785ca30f79fa1abbffb0fab5a6053f68f5.zip
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>
Diffstat (limited to 'target/linux/ath79/generic')
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata40
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac23
2 files changed, 21 insertions, 42 deletions
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 02cc293a6e8..19b02a59052 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -7,46 +7,6 @@
board=$(board_name)
case "$FIRMWARE" in
-"ath10k/cal-pci-0000:00:00.0.bin")
- case $board in
- engenius,ecb1200|\
- engenius,ecb1750)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(mtd_get_mac_ascii u-boot-env athaddr)
- ;;
- engenius,ews511ap)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) 1)
- ;;
- extreme-networks,ws-ap3805i)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR0)
- ;;
- iodata,wn-ac1167dgr|\
- iodata,wn-ac1600dgr2|\
- sitecom,wlr-7100|\
- zyxel,nbg6616)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
- ;;
- nec,wg800hp)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(mtd_get_mac_text board_data 0x880)
- ;;
- qihoo,c301)
- caldata_extract "radiocfg" 0x5000 0x844
- ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
- ;;
- esac
- ;;
-"ath10k/cal-pci-0000:01:00.0.bin")
- case $board in
- sitecom,wlr-8100)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
- ;;
- esac
- ;;
"ath10k/pre-cal-pci-0000:00:00.0.bin")
case $board in
dlink,dir-842-c1|\
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index d3392aa61e7..1a845a4ed71 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -41,13 +41,31 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
;;
+ engenius,ecb1200|\
+ engenius,ecb1750)
+ [ "$PHYNBR" -eq 0 ] && \
+ mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
+ ;;
engenius,epg5000|\
engenius,esr1200|\
engenius,esr1750|\
engenius,esr900)
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" "$PHYNBR" > /sys${DEVPATH}/macaddress
;;
- iodata,wn-ac1600dgr)
+ engenius,ews511ap)
+ [ "$PHYNBR" -eq 0 ] && \
+ macaddr_add $(cat /sys/class/net/eth0/address) 1 > /sys${DEVPATH}/macaddress
+ ;;
+ extreme-networks,ws-ap3805i)
+ [ "$PHYNBR" -eq 0 ] && \
+ mtd_get_mac_ascii cfg1 RADIOADDR0 > /sys${DEVPATH}/macaddress
+ ;;
+ iodata,wn-ac1167dgr|\
+ iodata,wn-ac1600dgr|\
+ iodata,wn-ac1600dgr2|\
+ sitecom,wlr-7100|\
+ sitecom,wlr-8100|\
+ zyxel,nbg6616)
# There is no eeprom data for 5 GHz wlan in "art" partition
# which would allow to patch the macaddress
[ "$PHYNBR" -eq 0 ] && \
@@ -60,7 +78,8 @@ case "$board" in
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
;;
nec,wf1200cr|\
- nec,wg1200cr)
+ nec,wg1200cr|\
+ qihoo,c301)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
;;