[rdkb][common][config][Fix MBSS issue in hostapd-init.sh]
[Description]
The files /tmp/phyX-wifiX are created for each Wi-Fi interface, which causes the function radio_index_to_phy() to parse the wrong phy index.
Solution: Create only one file /tmp/phyX-wifiX per radio instead of one file per Wi-Fi interface.
[Release-log]
N/A
Change-Id: I383f4f54fb72102f4e97fe8870207314584cdfdf
diff --git a/recipes-wifi/hostapd/files/hostapd-init.sh b/recipes-wifi/hostapd/files/hostapd-init.sh
index e3f6197..13e7fc9 100644
--- a/recipes-wifi/hostapd/files/hostapd-init.sh
+++ b/recipes-wifi/hostapd/files/hostapd-init.sh
@@ -68,7 +68,9 @@
touch /nvram/hostapd-acl$ifidx
touch /nvram/hostapd$ifidx.psk
touch /nvram/hostapd-deny$ifidx
- touch /tmp/$dev-wifi$ifidx
+ if [ $phyidx = $ifidx ]; then
+ touch /tmp/$dev-wifi$ifidx
+ fi
hostapd_cli -i global raw ADD bss_config=$dev:/nvram/hostapd"$ifidx".conf
fi
done