summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-08-19 23:24:24 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-08-19 23:24:24 +0000
commitcca896a02bda07d823898bcfab667859c60dcd07 (patch)
treedd20f71c7fd1b478b3247d9a1748ed4fd39f125e /modules/admin-full
parentbda237d0fdb070a6703e529d801adbf40205f47d (diff)
modules/admin-full: only show antenna selection if diversity is off, use radio buttons for antenna selection
Diffstat (limited to 'modules/admin-full')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua32
1 files changed, 28 insertions, 4 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
index bbf2232c2..f6027594f 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
@@ -105,8 +105,20 @@ if hwtype == "atheros" then
s:taboption("advanced", Flag, "diversity", translate("wifi_diversity")).rmempty = false
if not nsantenna then
- s:taboption("advanced", Value, "txantenna", translate("wifi_txantenna"))
- s:taboption("advanced", Value, "rxantenna", translate("wifi_rxantenna"))
+ ant1 = s:taboption("advanced", ListValue, "txantenna", translate("wifi_txantenna"))
+ ant1.widget = "radio"
+ ant1:depends("diversity", "")
+ ant1:value("0", translate("wifi_auto"))
+ ant1:value("1", translate("wifi_ant1", "Antenna 1"))
+ ant1:value("2", translate("wifi_ant2", "Antenna 2"))
+
+ ant2 = s:taboption("advanced", ListValue, "rxantenna", translate("wifi_rxantenna"))
+ ant2.widget = "radio"
+ ant2:depends("diversity", "")
+ ant2:value("0", translate("wifi_auto"))
+ ant2:value("1", translate("wifi_ant1", "Antenna 1"))
+ ant2:value("2", translate("wifi_ant2", "Antenna 2"))
+
else -- NanoFoo
local ant = s:taboption("advanced", ListValue, "antenna", translate("wifi_txantenna"))
ant:value("auto")
@@ -114,6 +126,7 @@ if hwtype == "atheros" then
ant:value("horizontal")
ant:value("external")
end
+
s:taboption("advanced", Value, "distance", translate("wifi_distance"),
translate("wifi_distance_desc"))
s:taboption("advanced", Value, "regdomain", translate("wifi_regdomain"))
@@ -145,8 +158,19 @@ if hwtype == "broadcom" then
ml:depends({macfilter="allow"})
ml:depends({macfilter="deny"})
- s:taboption("advanced", Value, "txantenna", translate("wifi_txantenna"))
- s:taboption("advanced", Value, "rxantenna", translate("wifi_rxantenna"))
+ ant1 = s:taboption("advanced", ListValue, "txantenna", translate("wifi_txantenna"))
+ ant1.widget = "radio"
+ ant1:depends("diversity", "")
+ ant1:value("3", translate("wifi_auto"))
+ ant1:value("0", translate("wifi_ant1", "Antenna 1"))
+ ant1:value("1", translate("wifi_ant2", "Antenna 2"))
+
+ ant2 = s:taboption("advanced", ListValue, "rxantenna", translate("wifi_rxantenna"))
+ ant2.widget = "radio"
+ ant2:depends("diversity", "")
+ ant2:value("3", translate("wifi_auto"))
+ ant2:value("0", translate("wifi_ant1", "Antenna 1"))
+ ant2:value("1", translate("wifi_ant2", "Antenna 2"))
s:taboption("advanced", Flag, "frameburst", translate("wifi_bursting"))