[openwrt/openwrt] ath79: wd,mynet-nxxx: use nvmem
LEDE Commits
lede-commits at lists.infradead.org
Sat Sep 27 15:41:57 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6f18b30b02253ff637a8aca360f64d5d226461e7
commit 6f18b30b02253ff637a8aca360f64d5d226461e7
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat Feb 17 20:53:04 2024 -0800
ath79: wd,mynet-nxxx: use nvmem
Userspace handling is deprecated.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16285
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/ath79/dts/ar9344_wd_mynet-nxxx.dtsi | 20 ++++++++++++++++++--
.../etc/hotplug.d/firmware/10-ath9k-eeprom | 10 ----------
.../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 7 +++++++
3 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/target/linux/ath79/dts/ar9344_wd_mynet-nxxx.dtsi b/target/linux/ath79/dts/ar9344_wd_mynet-nxxx.dtsi
index ebcf249b5d..9241a80eda 100644
--- a/target/linux/ath79/dts/ar9344_wd_mynet-nxxx.dtsi
+++ b/target/linux/ath79/dts/ar9344_wd_mynet-nxxx.dtsi
@@ -62,6 +62,20 @@
label = "art";
reg = <0xff0000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: calibration at 1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ cal_art_5000: calibration at 5000 {
+ reg = <0x5000 0x440>;
+ };
+ };
};
};
};
@@ -77,12 +91,14 @@
wifi at 0,0 {
compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>;
- qca,no-eeprom;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
};
};
&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 49398a2cd6..0a98a8ef8c 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
@@ -24,11 +24,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_text "mac" 0x4)
;;
- wd,mynet-n600|\
- wd,mynet-n750)
- caldata_extract "art" 0x1000 0x440
- ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
- ;;
engenius,ecb1200|\
engenius,ecb1750)
caldata_extract "art" 0x1000 0x440
@@ -80,11 +75,6 @@ case "$FIRMWARE" in
ubnt,rocket-m)
caldata_extract "art" 0x1000 0x1000
;;
- wd,mynet-n600|\
- wd,mynet-n750)
- caldata_extract "art" 0x5000 0x440
- ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
- ;;
wd,mynet-wifi-rangeextender)
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(nvram get wl0_hwaddr)
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 e667e11792..c4ae1c46b9 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
@@ -120,6 +120,13 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress
;;
+ wd,mynet-n600|\
+ wd,mynet-n750)
+ [ "$PHYNBR" -eq 0 ] && \
+ mtd_get_mac_ascii devdata wlan24mac > /sys${DEVPATH}/macaddress
+ [ "$PHYNBR" -eq 1 ] && \
+ mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
+ ;;
zyxel,nwa1123-ac)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
More information about the lede-commits
mailing list