From 8c501c30deaaf309e5f8e976263a1b113443831b Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Sun, 7 Jul 2013 11:23:23 +0300 Subject: Fix wireless scripts. Closes #18. Signed-off-by: Roman Yeryomin --- package/hostapd-rtk/files/hostapd.sh | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/hostapd-rtk/files/hostapd.sh b/package/hostapd-rtk/files/hostapd.sh index 6fd95a9e3..45ce0af07 100644 --- a/package/hostapd-rtk/files/hostapd.sh +++ b/package/hostapd-rtk/files/hostapd.sh @@ -26,7 +26,7 @@ hostapd_set_bss_options() { config_get max_num_sta "$device" max_num_sta [ -n $max_num_sta ] && max_num_sta="31" append "$var" "max_num_sta=$max_num_sta" "$N" - + append "$var" "ctrl_interface=/var/run/hostapd-$phy" "$N" append "$var" "wmm_enabled=1" "$N" @@ -290,6 +290,34 @@ hostapd_setup_vif() { hostapd_set_log_options hostapd_cfg "$device" hostapd_set_bss_options hostapd_cfg "$vif" + if [ "$driver" = "realtek" ]; then + config_get htmode "$device" htmode + case "$htmode" in + *HT40-*) + append hostapd_cfg "use40M=1" "$N" + append hostapd_cfg "shortGI40M=1" "$N" + append hostapd_cfg "2ndchoffset=1" "$N" + ;; + *HT40+*) + append hostapd_cfg "use40M=1" "$N" + append hostapd_cfg "shortGI40M=1" "$N" + append hostapd_cfg "2ndchoffset=2" "$N" + ;; + *) + append hostapd_cfg "use40M=0" "$N" + append hostapd_cfg "shortGI40M=0" "$N" + append hostapd_cfg "2ndchoffset=0" "$N" + ;; + esac + + # for 40MHz only mode + #TODO: enable after realtek merge with hostapd? + #append hostapd_cfg "coexist=0" "$N" + + # enable Space-Time Block Coding for better throughput + append hostapd_cfg "stbc=1" "$N" + fi + case "$hwmode" in *bg|*gdt|*gst|*fh) hwmode=g;; *adt|*ast) hwmode=a;; -- cgit v1.2.3