diff --git a/iopsys-brcm63xx-mips/base-files/sbin/wifi b/iopsys-brcm63xx-mips/base-files/sbin/wifi
index 339bc4b99e65ff2331ed83af9112b7e61c62be93..d3325db3657e307d0744184fd040289fc0eeb7ed 100755
--- a/iopsys-brcm63xx-mips/base-files/sbin/wifi
+++ b/iopsys-brcm63xx-mips/base-files/sbin/wifi
@@ -1001,7 +1001,10 @@ configure_wifi() {
 		# configure connected repeaters/extenders
 		for network in $(uci show network | grep "is_lan='1'" | grep -v loopback | cut -d'.' -f2); do
 			ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
-			wificontrol --router -v 4 >/dev/console
+			grep -q ssid /tmp/wificontrol.txt && {
+				wificontrol --router -v 4 >/dev/console
+				break # do not continue with the rest of the networks
+			}
 		done
 	fi
 
diff --git a/iopsys-ramips/base-files/sbin/wifi b/iopsys-ramips/base-files/sbin/wifi
index e92a7d415357f181da5c39b51b421a3c116a069a..5924ae36c80957d59b831737548e8bc451cc6e1a 100755
--- a/iopsys-ramips/base-files/sbin/wifi
+++ b/iopsys-ramips/base-files/sbin/wifi
@@ -702,7 +702,10 @@ else
 	killall -9 wificontrol >/dev/null 2>&1
 	for network in $(uci show network | grep "is_lan='1'" | grep -v loopback | cut -d'.' -f2); do
 		ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
-		wificontrol --router -v 4 >/dev/console
+		grep -q ssid /tmp/wificontrol.txt && {
+			wificontrol --router -v 4 >/dev/console
+			break # do not continue with the rest of the networks
+		}
 	done
 fi