qualcommax: mr7350: switch to ascii-eq-delim-env
Using the pending ascii-eq-delim-env4 driver is a better way to read mac addresses since no
extra config is required
The change is like eacc4d8c9b
, except for using smem for devinfo
thanks to @musashino205 for pointing out the simplification that removes
the extra partition
Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: https://github.com/openwrt/openwrt/pull/18186
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
cf04dbcf4a
commit
c5e86c3195
2 changed files with 30 additions and 5 deletions
|
@ -175,6 +175,26 @@
|
||||||
|
|
||||||
partitions {
|
partitions {
|
||||||
compatible = "qcom,smem-part";
|
compatible = "qcom,smem-part";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition-0-devinfo {
|
||||||
|
label = "devinfo";
|
||||||
|
read-only;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "ascii-eq-delim-env";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
hw_mac_addr: hw_mac_addr {
|
||||||
|
compatible = "mac-base";
|
||||||
|
#nvmem-cell-cells = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -368,30 +388,40 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&qca8075_0>;
|
phy-handle = <&qca8075_0>;
|
||||||
label = "lan1";
|
label = "lan1";
|
||||||
|
nvmem-cells = <&hw_mac_addr 1>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dp2 {
|
&dp2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&qca8075_1>;
|
phy-handle = <&qca8075_1>;
|
||||||
label = "lan2";
|
label = "lan2";
|
||||||
|
nvmem-cells = <&hw_mac_addr 1>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dp3 {
|
&dp3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&qca8075_2>;
|
phy-handle = <&qca8075_2>;
|
||||||
label = "lan3";
|
label = "lan3";
|
||||||
|
nvmem-cells = <&hw_mac_addr 1>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dp4 {
|
&dp4 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&qca8075_3>;
|
phy-handle = <&qca8075_3>;
|
||||||
label = "lan4";
|
label = "lan4";
|
||||||
|
nvmem-cells = <&hw_mac_addr 1>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dp5 {
|
&dp5 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&qca8075_4>;
|
phy-handle = <&qca8075_4>;
|
||||||
label = "wan";
|
label = "wan";
|
||||||
|
nvmem-cells = <&hw_mac_addr 0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
&wifi {
|
&wifi {
|
||||||
|
|
|
@ -46,11 +46,6 @@ ipq60xx_setup_macs()
|
||||||
local label_mac=""
|
local label_mac=""
|
||||||
|
|
||||||
case $board in
|
case $board in
|
||||||
linksys,mr7350)
|
|
||||||
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
||||||
lan_mac=$label_mac
|
|
||||||
wan_mac=$label_mac
|
|
||||||
;;
|
|
||||||
qihoo,360v6)
|
qihoo,360v6)
|
||||||
lan_mac=$(mtd_get_mac_ascii factory lanMac)
|
lan_mac=$(mtd_get_mac_ascii factory lanMac)
|
||||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
|
|
Loading…
Reference in a new issue