Skip to content

Commit

Permalink
wpa_supplicant: fix regressions introduced by the ibss-rsn changes
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31087 3c298f89-4303-0410-b956-a3cf2f4a3e73
  • Loading branch information
nbd committed Mar 27, 2012
1 parent 4e6d1dd commit 6f5aac5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions package/hostapd/files/wpa_supplicant.sh
Expand Up @@ -3,7 +3,7 @@ wpa_supplicant_setup_vif() {
local driver="$2"
local key="$key"
local options="$3"
local freq
local freq=""
[ -n "$4" ] && freq="frequency=$4"

# wpa_supplicant should use wext for mac80211 cards
Expand All @@ -25,14 +25,15 @@ wpa_supplicant_setup_vif() {
config_set "$vif" bridge "$bridge"
}

local mode ifname wds
local mode ifname wds modestr=""
config_get mode "$vif" mode
config_get ifname "$vif" ifname
config_get_bool wds "$vif" wds 0
[ -z "$bridge" ] || [ "$mode" = ap ] || [ "$mode" = sta -a $wds -eq 1 ] || {
echo "wpa_supplicant_setup_vif($ifname): Refusing to bridge $mode mode interface"
return 1
}
[ "$mode" = "adhoc" ] && modestr="mode=1"

case "$enc" in
*none*)
Expand Down Expand Up @@ -126,7 +127,7 @@ wpa_supplicant_setup_vif() {
cat > /var/run/wpa_supplicant-$ifname.conf <<EOF
ctrl_interface=/var/run/wpa_supplicant-$ifname
network={
$mode
$modestr
scan_ssid=1
ssid="$ssid"
$bssid
Expand Down

0 comments on commit 6f5aac5

Please sign in to comment.