diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-07-08 18:36:17 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-07-08 18:36:17 +0000 |
commit | b94a8c0025bb2d5983ba2ad1d61137f271120e80 (patch) | |
tree | 97561d65f3a6588d8d3d784ea73e7067bc68d509 /package/hostapd/files/hostapd.sh | |
parent | fcaea9057411b11859bea798ba38f9d3d1365b94 (diff) | |
download | upstream-b94a8c0025bb2d5983ba2ad1d61137f271120e80.tar.gz upstream-b94a8c0025bb2d5983ba2ad1d61137f271120e80.tar.bz2 upstream-b94a8c0025bb2d5983ba2ad1d61137f271120e80.zip |
hostapd: add preliminary wps script support (push-button only, does not handle multi-bss yet)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22100 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hostapd/files/hostapd.sh')
-rw-r--r-- | package/hostapd/files/hostapd.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh index fdb047be6a..c4e91689da 100644 --- a/package/hostapd/files/hostapd.sh +++ b/package/hostapd/files/hostapd.sh @@ -1,7 +1,7 @@ hostapd_set_bss_options() { local var="$1" local vif="$2" - local enc wpa_group_rekey + local enc wpa_group_rekey wps_possible config_get enc "$vif" encryption config_get wpa_group_rekey "$vif" wpa_group_rekey @@ -60,6 +60,7 @@ hostapd_set_bss_options() { else append "$var" "wpa_passphrase=$psk" "$N" fi + wps_possible=1 ;; *wpa*) # required fields? formats? @@ -116,6 +117,14 @@ hostapd_set_bss_options() { config_get bridge "$vif" bridge config_get ieee80211d "$vif" ieee80211d + config_get_bool wps_pbc "$vif" wps_pushbutton 0 + [ -n "$wps_possible" -a "$wps_pbc" -gt 0 ] && { + append "$var" "eap_server=1" "$N" + append "$var" "wps_state=2" "$N" + append "$var" "ap_setup_locked=1" "$N" + append "$var" "config_methods=push_button" "$N" + } + append "$var" "ssid=$ssid" "$N" [ -n "$bridge" ] && append "$var" "bridge=$bridge" "$N" [ -n "$ieee80211d" ] && append "$var" "ieee80211d=$ieee80211d" "$N" |