diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-02-28 19:02:05 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-02-28 19:02:05 +0000 |
commit | 13cfa888555ebffe694bb80d7a4a5b7dd124fb0a (patch) | |
tree | e4b4eb9e85c8eb74d0704c3cad62d4ff2713313e /package | |
parent | 1c8fbfbaa6cc060f47483a5ab9c858bd75ca52a7 (diff) | |
download | mtk-20170518-13cfa888555ebffe694bb80d7a4a5b7dd124fb0a.zip mtk-20170518-13cfa888555ebffe694bb80d7a4a5b7dd124fb0a.tar.gz mtk-20170518-13cfa888555ebffe694bb80d7a4a5b7dd124fb0a.tar.bz2 |
mac80211: fix client mode
SVN-Revision: 19915
Diffstat (limited to 'package')
-rw-r--r-- | package/mac80211/files/lib/wifi/mac80211.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index f127b28..87f7d29 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -329,20 +329,20 @@ enable_mac80211() { start_hostapd=1 done - [ -n "$start_hostapd" ] || return 0 + [ -n "$start_hostapd" ] && { + hostapd -P /var/run/wifi-$phy.pid -B /var/run/hostapd-$phy.conf || { + echo "Failed to start hostapd for $phy" + return + } + sleep 2 - hostapd -P /var/run/wifi-$phy.pid -B /var/run/hostapd-$phy.conf || { - echo "Failed to start hostapd for $phy" - return + for vif in $vifs; do + config_get mode "$vif" mode + config_get ifname "$vif" ifname + [ "$mode" = "ap" ] || continue + mac80211_start_vif "$vif" "$ifname" + done } - sleep 2 - - for vif in $vifs; do - config_get mode "$vif" mode - config_get ifname "$vif" ifname - [ "$mode" = "ap" ] || continue - mac80211_start_vif "$vif" "$ifname" - done for vif in $vifs; do config_get mode "$vif" mode |