summaryrefslogtreecommitdiffstats
path: root/package/hostapd-rtk
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2013-07-07 11:23:23 +0300
committerRoman Yeryomin <roman@advem.lv>2013-07-07 11:23:23 +0300
commit8c501c30deaaf309e5f8e976263a1b113443831b (patch)
tree7377c9cdb1ac83a5b7d4ee298582f1634ab16b69 /package/hostapd-rtk
parent984e5eb211a858be19f57d0186203b20758d846f (diff)
Fix wireless scripts. Closes #18.
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'package/hostapd-rtk')
-rw-r--r--package/hostapd-rtk/files/hostapd.sh30
1 files changed, 29 insertions, 1 deletions
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;;