summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2024-06-14 12:19:15 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2024-08-29 21:05:59 +0200
commit51f96278ed121546fa5788d717fd8a9635a56158 (patch)
treec592177589db518f554446cdc6fe7bb11b30bc86 /target
parent9232fdeb8687c3ff0f4caeb94a3615ea4fdfca00 (diff)
downloadopenwrt-51f96278ed121546fa5788d717fd8a9635a56158.tar.gz
openwrt-51f96278ed121546fa5788d717fd8a9635a56158.tar.bz2
openwrt-51f96278ed121546fa5788d717fd8a9635a56158.zip
ath79: nec,wX1200cr: use nvmem
Userspace handling is deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16245 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ath79/dts/qca9561_nec_wf1200cr.dts7
-rw-r--r--target/linux/ath79/dts/qca9563_nec_wg1200cr.dts7
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom2
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac7
4 files changed, 18 insertions, 5 deletions
diff --git a/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts b/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
index c4671bf57f..4e66f45ebe 100644
--- a/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
+++ b/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
@@ -114,6 +114,10 @@
#address-cells = <1>;
#size-cells = <1>;
+ cal_art_1000: calibration@1000 {
+ reg = <0x1000 0x440>;
+ };
+
precal_art_5000: pre-calibration@5000 {
reg = <0x5000 0x2f20>;
};
@@ -177,5 +181,6 @@
&wmac {
status = "okay";
- qca,no-eeprom;
+ nvmem-cells = <&cal_art_1000>;
+ nvmem-cell-names = "calibration";
};
diff --git a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
index 7f8866bd36..c9e47938d3 100644
--- a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
+++ b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
@@ -129,6 +129,10 @@
#address-cells = <1>;
#size-cells = <1>;
+ cal_art_1000: calibration@1000 {
+ reg = <0x1000 0x440>;
+ };
+
precal_art_5000: pre-calibration@5000 {
reg = <0x5000 0x2f20>;
};
@@ -178,5 +182,6 @@
&wmac {
status = "okay";
- qca,no-eeprom;
+ nvmem-cells = <&cal_art_1000>;
+ nvmem-cell-names = "calibration";
};
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index ddcef7b685..1f20250a2b 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -30,8 +30,6 @@ case "$FIRMWARE" in
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3|\
- nec,wf1200cr|\
- nec,wg1200cr|\
wd,mynet-n600|\
wd,mynet-n750)
caldata_extract "art" 0x1000 0x440
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 2a1f230eb4..15cd2adda3 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
@@ -88,11 +88,16 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
;;
+ qihoo,c301)
+ [ "$PHYNBR" -eq 0 ] && \
+ mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
+ ;;
nec,wf1200cr|\
nec,wg1200cr|\
- qihoo,c301)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
+ [ "$PHYNBR" -eq 1 ] && \
+ mtd_get_mac_ascii devdata wlan24mac > /sys${DEVPATH}/macaddress
;;
phicomm,k2t)
[ "$PHYNBR" -eq 0 ] && \