en = s:option(Flag, "disabled", translate("enable"))
en.enabled = "0"
en.disabled = "1"
+en.rmempty = false
function en.cfgvalue(self, section)
return Flag.cfgvalue(self, section) or "0"
ch:value(155, 155 .. " (5 GHz)")
ch:value(167, 167 .. " (5 GHz)")
+s:option(Value, "txpower", translate("a_w_txpwr"), "dBm").rmempty = true
+
------------------- MAC80211 Device ------------------
if hwtype == "mac80211" then
------------------- Madwifi Device ------------------
if hwtype == "atheros" then
- mode = s:option(ListValue, "mode", translate("mode"))
+ mode = s:option(ListValue, "hwmode", translate("mode"))
mode:value("", translate("wifi_auto"))
mode:value("11b", "802.11b")
mode:value("11g", "802.11g")
mode:value("11adt", "802.11adt")
mode:value("fh", translate("wifi_fh"))
- s:option(Flag, "diversity", translate("wifi_diversity"))
+ s:option(Flag, "diversity", translate("wifi_diversity")).rmempty = false
if not nsantenna then
s:option(Value, "txantenna", translate("wifi_txantenna")).optional = true
-------------------- MAC80211 Interface ----------------------
if hwtype == "mac80211" then
+ if luci.fs.mtime("/usr/sbin/iw") then
+ mode:value("mesh", "802.11s")
+ end
+
+ mode:value("ahdemo", translate("a_w_ahdemo"))
mode:value("monitor", translate("a_w_monitor"))
bssid:depends({mode="adhoc"})
- s:option(Value, "txpower", translate("a_w_txpwr"), "dBm").rmempty = true
s:option(Value, "frag", translate("wifi_frag")).optional = true
s:option(Value, "rts", translate("wifi_rts")).optional = true
end
wdssep.optional = true
s:option(Flag, "doth", "802.11h").optional = true
- s:option(Value, "txpower", translate("a_w_txpwr"), "dBm").rmempty = true
hidden = s:option(Flag, "hidden", translate("wifi_hidden"))
hidden:depends({mode="ap"})
hidden:depends({mode="adhoc"})
local nos = s:option(Flag, "nosbeacon", translate("wifi_nosbeacon"))
nos:depends({mode="sta"})
nos.optional = true
+
+ local probereq = s:option(Flag, "probereq", translate("wifi_noprobereq"))
+ probereq.optional = true
+ probereq.enabled = "0"
+ probereq.disabled = "1"
end
mode:value("wds", translate("a_w_wds"))
mode:value("monitor", translate("a_w_monitor"))
- s:option(Value, "txpower", translate("a_w_txpwr"), "dBm").rmempty = true
-
hidden = s:option(Flag, "hidden", translate("wifi_hidden"))
hidden:depends({mode="ap"})
hidden:depends({mode="adhoc"})
isolate.optional = true
bssid:depends({mode="wds"})
+ bssid:depends({mode="adhoc"})
end
encr:depends({mode="adhoc"})
encr:depends({mode="ahdemo"})
encr:depends({mode="wds"})
+encr:depends({mode="mesh"})
encr:value("none", "No Encryption")
encr:value("wep", "WEP")