mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
ath79: tplink,deco-s4-v2: use nvmem for cal
Userspace handling is deprecated. MAC address stuff needs to remain handled in userspace as it's encrypted. Maybe an NVMEM driver can be written in the future... Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
5a24850de1
commit
a76a8d0200
@ -121,6 +121,10 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0x440>;
|
||||||
|
};
|
||||||
|
|
||||||
precal_art_5000: pre-calibration@5000 {
|
precal_art_5000: pre-calibration@5000 {
|
||||||
reg = <0x5000 0x2f20>;
|
reg = <0x5000 0x2f20>;
|
||||||
};
|
};
|
||||||
@ -146,5 +150,6 @@
|
|||||||
&wmac {
|
&wmac {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
qca,no-eeprom;
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
};
|
};
|
||||||
|
@ -58,11 +58,6 @@ case "$FIRMWARE" in
|
|||||||
caldata_extract "art" 0x1000 0x440
|
caldata_extract "art" 0x1000 0x440
|
||||||
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env mac_addr)
|
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env mac_addr)
|
||||||
;;
|
;;
|
||||||
tplink,deco-s4-v2)
|
|
||||||
caldata_extract "art" 0x1000 0x440
|
|
||||||
base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
|
|
||||||
ath9k_patch_mac $(macaddr_add $base_mac 1)
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
caldata_die "board $board is not supported yet"
|
caldata_die "board $board is not supported yet"
|
||||||
;;
|
;;
|
||||||
|
@ -110,7 +110,8 @@ case "$board" in
|
|||||||
base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
|
base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
|
||||||
[ "$PHYNBR" -eq 0 ] && \
|
[ "$PHYNBR" -eq 0 ] && \
|
||||||
macaddr_add $base_mac 2 > /sys${DEVPATH}/macaddress
|
macaddr_add $base_mac 2 > /sys${DEVPATH}/macaddress
|
||||||
|
[ "$PHYNBR" -eq 1 ] && \
|
||||||
|
macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress
|
||||||
;;
|
;;
|
||||||
trendnet,tew-823dru)
|
trendnet,tew-823dru)
|
||||||
# set the 2.4G interface mac address to LAN MAC
|
# set the 2.4G interface mac address to LAN MAC
|
||||||
|
Loading…
Reference in New Issue
Block a user