X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/8d510f3c87ec5b56a8c887959c0350efdb0995d1..5e10b16d95550d4656d8b594f3cbb6a3892db688:/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 13d6584b0..2ca63bb5c 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -13,6 +13,8 @@ mac80211_hostapd_setup_base() { config_get country "$device" country config_get hwmode "$device" hwmode config_get channel "$device" channel + config_get beacon_int "$device" beacon_int + config_get basic_rate_list "$device" basic_rate config_get_bool noscan "$device" noscan [ -n "$channel" -a -z "$hwmode" ] && wifi_fixup_hwmode "$device" [ "$channel" = auto ] && channel= @@ -34,6 +36,11 @@ mac80211_hostapd_setup_base() { } } + local country_ie=0 + [ -n "$country" ] && country_ie=1 + config_get_bool country_ie "$device" country_ie "$country_ie" + [ "$country_ie" -gt 0 ] && append base_cfg "ieee80211d=1" "$N" + config_get macfilter "$vif" macfilter case "$macfilter" in allow) @@ -51,6 +58,16 @@ mac80211_hostapd_setup_base() { echo "$mac" >> $macfile done } + + local br brval brstr + [ -n "$basic_rate_list" ] && { + for br in $basic_rate_list; do + brval="$(($br / 100))" + [ -n "$brstr" ] && brstr="$brstr " + brstr="$brstr$brval" + done + } + cat >> "$cfgfile" <