Changeset 2194


Ignore:
Timestamp:
Sep 27, 2012, 11:21:18 AM (7 years ago)
Author:
matthijs
Message:

ra_wifi: Allow disabling HT40 in bgn and gn modes.

Previously, the code assumed that HT40 mode was available only when
running in n-only mode, so it did not offer enable/disable controls in
other modes. However, HT40 mode is also available for 11n clients in bgn
and gn modes. Since the HT40 mode defaulted to enabled in non-n-only
modes, this meant that HT40 was enabled and could not disabled in bgn
and gn modes.

This commit allows toggling HT40 mode in bgn and gn modes as well. In
addition, it sets HT40 mode to disabled for the other (b and bg) modes,
just in case.

Closes: #1221

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/fon/ra_wifi/files/lib/wifi/rt3052.sh

    r2170 r2194  
    1212        ssid2=`uci get fon.public.essid`
    1313        [ ! -z "$ssid2" ] && ssid2="FON_$ssid2"
    14         # By default, let the driver select 20 or 40 Mhz mode. 40Mhz
    15         # mode is really only available in n-only mode ($mode = 6), so
    16         # we only allow disabling it then.
    17         HT=1
    18         [ "$mode" = "6" -a "$ht" = "20" ] && HT=0
     14
     15        # HT40 mode can be enabled only in bgn (mode = 9), gn (mode = 7)
     16        # or n (mode = 6).
     17        HT=0
     18        [ "$mode" = 6 -o "$mode" = 7 -o "$mode" = 9 ] && [ "$ht" != "20" ] && HT=1
     19
    1920        # In HT40 mode, a second channel is used. If EXTCHA=0, the extra
    2021        # channel is $channel + 4. If EXTCHA=1, the extra channel is
  • trunk/luci/modules/admin-fon/luasrc/model/cbi/fon_wifi/main.lua

    r2170 r2194  
    107107        b:value("6", translate("wifi_mode_n", "n only"))
    108108        r = s:option(ListValue, "ht", translate("wifi_HT", "11N Mode"))
     109        r.default = "40"
    109110        r:value("20", translate("wifi_HT20", "HT20"))
    110111        r:value("40", translate("wifi_HT2040", "HT20/HT40"))
    111         -- HT40 mode is only available in n-only mode.
     112        -- HT40 mode is only available in n modes
    112113        r:depends("bgmode", "6")
     114        r:depends("bgmode", "7")
     115        r:depends("bgmode", "9")
    113116end
    114117
Note: See TracChangeset for help on using the changeset viewer.