aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/files/lib/wifi
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-10-23 23:39:54 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-10-23 23:39:54 +0000
commitf0a8a11ddfa2d58d9907b07bd537f6ba9e266c71 (patch)
treeac36be085b9943adcec164d07c4a8f88868d34cd /package/mac80211/files/lib/wifi
parent580f1fe5825d817e97ba7aaab5e6d5a432a3f48c (diff)
downloadmaster-187ad058-f0a8a11ddfa2d58d9907b07bd537f6ba9e266c71.tar.gz
master-187ad058-f0a8a11ddfa2d58d9907b07bd537f6ba9e266c71.tar.bz2
master-187ad058-f0a8a11ddfa2d58d9907b07bd537f6ba9e266c71.zip
hostapd/mac80211: implement support for AP+STA
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23602 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/files/lib/wifi')
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index a00cdee1be..67884238fd 100644
--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -222,6 +222,7 @@ enable_mac80211() {
local macidx=0
local apidx=0
fixed=""
+ local hostapd_ctrl=""
[ -n "$country" ] && iw reg set "$country"
[ "$channel" = "auto" -o "$channel" = "0" ] || {
@@ -344,6 +345,7 @@ enable_mac80211() {
config_get mode "$vif" mode
config_get ifname "$vif" ifname
[ "$mode" = "ap" ] || continue
+ hostapd_ctrl="${hostapd_ctrl:-/var/run/hostapd-$phy/$ifname}"
mac80211_start_vif "$vif" "$ifname"
done
}
@@ -364,7 +366,7 @@ enable_mac80211() {
;;
sta)
if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
- wpa_supplicant_setup_vif "$vif" nl80211 || {
+ wpa_supplicant_setup_vif "$vif" nl80211 "${hostapd_ctrl:+-H $hostapd_ctrl}" || {
echo "enable_mac80211($device): Failed to set up wpa_supplicant for interface $ifname" >&2
# make sure this wifi interface won't accidentally stay open without encryption
ifconfig "$ifname" down