Skip to content

Commit

Permalink
ath79: qihoo,c301: use nvmem
Browse files Browse the repository at this point in the history
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <[email protected]>
Link: openwrt/openwrt#16244
Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
neheb authored and hauke committed Aug 30, 2024
1 parent bf77443 commit c6f04f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
8 changes: 7 additions & 1 deletion target/linux/ath79/dts/ar9344_qihoo_c301.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
};
Expand Down Expand Up @@ -220,7 +224,9 @@

&wmac {
status = "okay";
qca,no-eeprom;

nvmem-cells = <&cal_radiocfg_1000>;
nvmem-cell-names = "calibration";
};

&eth1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] && \
Expand Down

0 comments on commit c6f04f7

Please sign in to comment.