X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/3cb4900951e131a4bbf293b6ba01c46f321414ea..f6ceb966a6d45934fb5ebf157f4e4f30652ea8ca:/package/mac80211/files/lib/wifi/mac80211.sh?ds=sidebyside diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index a963db81b..b20785cf6 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -103,13 +103,17 @@ mac80211_hostapd_setup_bss() { config_get_bool wds "$vif" wds 0 [ "$wds" -gt 0 ] && append hostapd_cfg "wds_sta=1" "$N" + local macaddr hidden maxassoc wmm config_get macaddr "$vif" macaddr + config_get maxassoc "$vif" maxassoc config_get_bool hidden "$vif" hidden 0 + config_get_bool wmm "$vif" wmm 1 cat >> /var/run/hostapd-$phy.conf </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 @@ -410,7 +416,7 @@ detect_mac80211() { mode_11n="" mode_band="g" - channel="5" + channel="11" ht_cap=0 for cap in $(iw phy "$dev" info | grep 'Capabilities:' | cut -d: -f2); do ht_cap="$(($ht_cap | $cap))" @@ -422,6 +428,7 @@ detect_mac80211() { list=" list ht_capab" [ "$(($ht_cap & 1))" -eq 1 ] && append ht_capab "$list LDPC" "$N" + [ "$(($ht_cap & 16))" -eq 16 ] && append ht_capab "$list GF" "$N" [ "$(($ht_cap & 32))" -eq 32 ] && append ht_capab "$list SHORT-GI-20" "$N" [ "$(($ht_cap & 64))" -eq 64 ] && append ht_capab "$list SHORT-GI-40" "$N" [ "$(($ht_cap & 128))" -eq 128 ] && append ht_capab "$list TX-STBC" "$N"