summaryrefslogtreecommitdiff
path: root/package/hostapd/files/hostapd.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-01-14 10:52:54 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-01-14 10:52:54 +0000
commitb60332deb0175e2e118d3e6f1127ce0f7f92868c (patch)
tree9c3e268f768344347dc5305b6d417e16bf397402 /package/hostapd/files/hostapd.sh
parent531e5e5386e6ad2a9358839b566381ac3f7ea05c (diff)
downloadmtk-20170518-b60332deb0175e2e118d3e6f1127ce0f7f92868c.zip
mtk-20170518-b60332deb0175e2e118d3e6f1127ce0f7f92868c.tar.gz
mtk-20170518-b60332deb0175e2e118d3e6f1127ce0f7f92868c.tar.bz2
hostapd: Create one control interface per virtual bssid
Previously hostapd created one control interface /var/run/hostapd-phyX which only contained the first virtual bssid (for example wlan0). In order to access the other virtual bssids with hostapd_cli add all virtual bssids to /var/run/hostapd-phyX by specifying the ctrl_interface parameter per bssid. Previously the control interface looked like: /var/run/hostapd-phyX/wlan0 Now, the control interface looks like this: /var/run/hostapd-phyX/wlan0 /var/run/hostapd-phyX/wlan1 ... Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 24985
Diffstat (limited to 'package/hostapd/files/hostapd.sh')
-rw-r--r--package/hostapd/files/hostapd.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh
index 7d110db..d80729f 100644
--- a/package/hostapd/files/hostapd.sh
+++ b/package/hostapd/files/hostapd.sh
@@ -9,6 +9,9 @@ hostapd_set_bss_options() {
config_get device "$vif" device
config_get hwmode "$device" hwmode
+ config_get phy "$device" phy
+
+ append "$var" "ctrl_interface=/var/run/hostapd-$phy" "$N"
if [ "$ap_isolate" -gt 0 ]; then
append "$var" "ap_isolate=$ap_isolate" "$N"
@@ -184,7 +187,6 @@ hostapd_setup_vif() {
[ "$channel" = auto ] && channel=
[ -n "$channel" -a -z "$hwmode" ] && wifi_fixup_hwmode "$device"
cat > /var/run/hostapd-$ifname.conf <<EOF
-ctrl_interface=/var/run/hostapd-$ifname
driver=$driver
interface=$ifname
${hwmode:+hw_mode=${hwmode#11}}