ramips: update WLAN MAC address of Phicomm K2P
The wireless mac address difference of this machine is similar to that of D-Link DIR-853-R1, so use the same practice. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
This commit is contained in:
parent
b3da44b647
commit
285e636b16
2 changed files with 13 additions and 2 deletions
|
@ -96,9 +96,15 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie0 {
|
&pcie0 {
|
||||||
mt76@0,0 {
|
wifi@0,0 {
|
||||||
|
compatible = "mediatek,mt76";
|
||||||
reg = <0x0000 0 0 0 0>;
|
reg = <0x0000 0 0 0 0>;
|
||||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||||
|
|
||||||
|
/* 5 GHz (phy1) does not take the address from calibration data,
|
||||||
|
but setting it manually here works */
|
||||||
|
nvmem-cells = <&macaddr_factory_4>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -150,6 +156,10 @@
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_factory_4: macaddr@4 {
|
||||||
|
reg = <0x4 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
macaddr_factory_e000: macaddr@e000 {
|
macaddr_factory_e000: macaddr@e000 {
|
||||||
reg = <0xe000 0x6>;
|
reg = <0xe000 0x6>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,8 @@ case "$board" in
|
||||||
macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \
|
macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \
|
||||||
> /sys${DEVPATH}/macaddress
|
> /sys${DEVPATH}/macaddress
|
||||||
;;
|
;;
|
||||||
dlink,dir-853-r1)
|
dlink,dir-853-r1|\
|
||||||
|
phicomm,k2p)
|
||||||
if [ "$PHYNBR" = "0" ]; then
|
if [ "$PHYNBR" = "0" ]; then
|
||||||
base_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -1)
|
base_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -1)
|
||||||
macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
|
macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
|
||||||
|
|
Loading…
Reference in a new issue