summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2024-06-14 12:26:01 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2024-08-30 14:54:02 +0200
commitc6f04f718ec89561f2261f2388857baa126eaa50 (patch)
tree6116adf96ff156449c18776c2d39c3c0ea40ba8a /target
parentbf77443915715d4b4b2a3c95d0731b270d56378b (diff)
downloadopenwrt-c6f04f718ec89561f2261f2388857baa126eaa50.tar.gz
openwrt-c6f04f718ec89561f2261f2388857baa126eaa50.tar.bz2
openwrt-c6f04f718ec89561f2261f2388857baa126eaa50.zip
ath79: qihoo,c301: use nvmem
Userspace handling is deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16244 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ath79/dts/ar9344_qihoo_c301.dts8
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom4
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac5
3 files changed, 8 insertions, 9 deletions
diff --git a/target/linux/ath79/dts/ar9344_qihoo_c301.dts b/target/linux/ath79/dts/ar9344_qihoo_c301.dts
index 1d9c6ca9a4..0e9104dbb9 100644
--- a/target/linux/ath79/dts/ar9344_qihoo_c301.dts
+++ b/target/linux/ath79/dts/ar9344_qihoo_c301.dts
@@ -166,6 +166,10 @@
#address-cells = <1>;
#size-cells = <1>;
+ cal_radiocfg_1000: calibration@1000 {
+ reg = <0x1000 0x440>;
+ };
+
cal_radiocfg_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
@@ -220,7 +224,9 @@
&wmac {
status = "okay";
- qca,no-eeprom;
+
+ nvmem-cells = <&cal_radiocfg_1000>;
+ nvmem-cell-names = "calibration";
};
&eth1 {
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 8cbb0e10bd..6341c56a8b 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
@@ -61,10 +61,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env mac_addr)
;;
- qihoo,c301)
- caldata_extract "radiocfg" 0x1000 0x440
- ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
- ;;
tplink,deco-s4-v2)
caldata_extract "art" 0x1000 0x440
base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
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 0a49c0b5aa..6676e4d509 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
@@ -78,12 +78,9 @@ 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 ] && \