add fragmentation and rts settings thanks rene closes #1725
[openwrt/openwrt.git] / package / madwifi / files / lib / wifi / madwifi.sh
index 2635699adb4e7141c20f9f3d7741ab3438218bf5..69506dbde5e9c247350ac931da9cea178ff39269 100755 (executable)
@@ -104,6 +104,7 @@ enable_atheros() {
                        esac
                        iwconfig "$ifname" channel 0 >/dev/null 2>/dev/null 
                        ifconfig "$ifname" up
+                       sleep 1
                        iwpriv "$ifname" mode "$agmode"
                        iwpriv "$ifname" pureg "$pureg"
                        iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null 
@@ -183,6 +184,16 @@ enable_atheros() {
                        iwconfig "$ifname" txpower "${txpwr%%.*}"
                fi
 
+               config_get frag "$vif" frag
+               if [ -n "$frag" ]; then
+                       iwconfig "$ifname" frag "${frag%%.*}"
+               fi
+
+               config_get rts "$vif" rts
+               if [ -n "$rts" ]; then
+                       iwconfig "$ifname" rts "${rts%%.*}"
+               fi
+
                ifconfig "$ifname" up
                iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null 
 
@@ -267,6 +278,8 @@ config wifi-iface
        option hidden   0
 #      option txpower  15
 #      option bgscan   enable
+#      option frag     off
+#      option rts      off
        option encryption none
 
 EOF