ramips: use hotplug script for EAP615-Wall MACs
authorStijn Tintel <stijn@linux-ipv6.be>
Tue, 17 May 2022 14:57:07 +0000 (17:57 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Fri, 3 Jun 2022 10:45:38 +0000 (13:45 +0300)
Using nvmem-cells to set the MAC address for a DBDC device results in
both PHY devices using the same MAC address. This in turn will result in
multiple BSSes using the same BSSID, which can cause various problems.

Use the hotplug script for the EAP615-Wall instead to avoid this.

Fixes: a1b8a4d7b3ff ("ramips: support TP-Link EAP615-Wall")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-By: Andrew Powers-Holmes <aholmes@omnom.net>
target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

index a0c3912d8e510c9f2a96f2f96184cdccb86bc275..0be4af39e8e2623a3bb74ead94f0719bc18d80ab 100644 (file)
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&radio 0x0>;
-               nvmem-cells = <&macaddr_info_8>;
-               nvmem-cell-names = "mac-address";
        };
 };
 
index a35e9dcc28dd62019220dc8a32f4fc92cee89207..5b12416872b1c3a3ad0d2823f006c6c6af48c95d 100644 (file)
@@ -90,6 +90,10 @@ case "$board" in
                hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
                [ "$PHYNBR" = "1" ] &&  macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress
                ;;
+       tplink,eap615-wall-v1)
+               hw_mac_addr="$(mtd_get_mac_binary product-info 0x8)"
+               macaddr_add "$hw_mac_addr" "$PHYNBR" > "/sys${DEVPATH}/macaddress"
+               ;;
        yuncore,ax820)
                [ "$PHYNBR" = "1" ] && \
                        macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress