wifi: add controls for noscan flag
authorDaniel Golle <daniel@makrotopia.org>
Wed, 31 Oct 2012 15:58:15 +0000 (15:58 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 31 Oct 2012 15:58:15 +0000 (15:58 +0000)
OpenWrt contains a patch for hostapd which allows to override the channel-bandwidth decission
to always use 40MHz regardless of overlapping networks.
Though it does not conform with IEEE 802.11n-2009, this became the de-facto standard behaviour
of most off-the-shelf wifi routers.

Adding this option to LuCI makes it more accessible to users, which probably not everybody will
agree with to be a good idea. However, I didn't yet come across a single commercial product which
actually complies with 802.11n-2009 in that regard.

Signed-off-by: Daniel Golle <dgolle@allnet.de>
modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua

index f645493a61d17c6cb17df308f33df1b0b33e6b57..6c06b21b4ab8aca1c63777a85650f4746c842f91 100644 (file)
@@ -208,6 +208,12 @@ if hwtype == "mac80211" then
                htmode:value("HT40-", translate("40MHz 2nd channel below"))
                htmode:value("HT40+", translate("40MHz 2nd channel above"))
 
+               noscan = s:taboption("advanced", Flag, "noscan", translate("Force 40MHz mode"),
+                       translate("Always use 40MHz channels even if the secondary channel overlaps. Using this option does not comply with IEEE 802.11n-2009!"))
+               noscan:depends("htmode", "HT40+")
+               noscan:depends("htmode", "HT40-")
+               noscan.default = noscan.disabled
+
                --htcapab = s:taboption("advanced", DynamicList, "ht_capab", translate("HT capabilities"))
                --htcapab:depends("hwmode", "11na")
                --htcapab:depends("hwmode", "11ng")