mediatek: assign 5ghz mac with nvmem for cmcc rax3000m
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "cmcc,rax3000m", "cmcc,rax3000me","mediatek,mt7981";
|
||||
compatible = "cmcc,rax3000m", "cmcc,rax3000me", "mediatek,mt7981";
|
||||
|
||||
fragment@0 {
|
||||
target = <&chosen>;
|
||||
@@ -63,6 +63,12 @@
|
||||
reg = <0x0 0x1000>;
|
||||
};
|
||||
|
||||
macaddr_factory_a: macaddr@a {
|
||||
compatible = "mac-base";
|
||||
reg = <0xa 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
macaddr_factory_24: macaddr@24 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x24 0x6>;
|
||||
@@ -110,6 +116,12 @@
|
||||
__overlay__ {
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
|
||||
band@1 {
|
||||
reg = <1>;
|
||||
nvmem-cells = <&macaddr_factory_a 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "cmcc,rax3000m", "cmcc,rax3000me","mediatek,mt7981";
|
||||
compatible = "cmcc,rax3000m", "cmcc,rax3000me", "mediatek,mt7981";
|
||||
|
||||
fragment@0 {
|
||||
target = <&chosen>;
|
||||
@@ -100,6 +100,12 @@
|
||||
reg = <0x0 0x1000>;
|
||||
};
|
||||
|
||||
macaddr_factory_a: macaddr@a {
|
||||
compatible = "mac-base";
|
||||
reg = <0xa 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
macaddr_factory_24: macaddr@24 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x24 0x6>;
|
||||
@@ -141,6 +147,12 @@
|
||||
__overlay__ {
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
|
||||
band@1 {
|
||||
reg = <1>;
|
||||
nvmem-cells = <&macaddr_factory_a 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -60,11 +60,6 @@ case "$board" in
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "2" ] && macaddr_add $addr 4 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
cmcc,rax3000m|\
|
||||
cmcc,rax3000me)
|
||||
addr=$(cat /sys/class/net/eth0/address)
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $addr -1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
comfast,cf-e393ax)
|
||||
addr=$(mtd_get_mac_binary "Factory" 0x8000)
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
|
||||
|
||||
Reference in New Issue
Block a user