ramips: fix Wifi MAC address setup for D-Link DIR-853 R1
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 11 Jul 2021 13:19:47 +0000 (15:19 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 11 Jul 2021 22:19:36 +0000 (00:19 +0200)
Commands in 10_fix_wifi_mac were not properly concatenated, so
this was also triggered for the second phy without giving a
MAC address as argument.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

index 4349a3592db532f872086137209dcab9d4407b98..711af4e3afb0362b6dbaa27cb2c9944950e5b50c 100644 (file)
@@ -16,10 +16,10 @@ case "$board" in
                                > /sys${DEVPATH}/macaddress
                ;;
        dlink,dir-853-r1)
-               [ "$PHYNBR" = "0" ] && \
-                       base_mac=$(mtd_get_mac_binary factory 0x4)
-                       base_mac=$(macaddr_add "$base_mac" -1)
+               if [ "$PHYNBR" = "0" ]; then
+                       base_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -1)
                        macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
+               fi
                ;;
        glinet,gl-mt1300)
                [ "$PHYNBR" = "1" ] && \