config_get channel "$device" channel
config_get hwmode "$device" hwmode
config_get wpa_group_rekey "$vif" wpa_group_rekey
- config_get ieee80211d "$vif" ieee80211d
+ config_get ieee80211d "$vif" ieee80211d
+ config_get_bool wds "$vif" wds 0
+ [ "$wds" -gt 0 -a "$driver" = "nl80211" ] && wds="wds_sta=1" || wds=""
case "$hwmode" in
bg) hwmode=g;;
esac
[ -n "$hwmode_11n" ] && {
hwmode="$hwmode_11n"
config_get ht_capab "$device" ht_capab
+ [ -n "$ht_capab" -a -n "${ht_capab%%\[*}" ] && {
+ ht_capab=`echo "[$ht_capab]" | sed -e 's, ,][,g'`
+ }
}
}
cat > /var/run/hostapd-$ifname.conf <<EOF
${ht_capab:+ht_capab=$ht_capab}
${wpa_group_rekey:+wpa_group_rekey=$wpa_group_rekey}
${ieee80211d:+ieee80211d=$ieee80211d}
+$wds
$hostapd_cfg
EOF
case "$driver" in