summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-mini/luasrc/model/cbi/mini
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-07-25 21:39:10 +0000
committerSteven Barth <steven@midlink.org>2008-07-25 21:39:10 +0000
commitce6051440267f90ad0241aed7b729007d837165d (patch)
tree59ad6e212dfcd6c31c8e513989758d10aed150ed /modules/admin-mini/luasrc/model/cbi/mini
parente73752cae95905eec118e7ca8e6aee2b6e70a9f7 (diff)
modules/admin-mini: Fixed WLAN client mode
Diffstat (limited to 'modules/admin-mini/luasrc/model/cbi/mini')
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/wifi.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua b/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua
index f612e9d537..4e17964753 100644
--- a/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua
+++ b/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua
@@ -58,15 +58,20 @@ function mode.write(self, section, value)
if value == "sta" then
-- ToDo: Move this away
if not luci.model.uci.get("network", "wan") then
- luci.model.uci.set("network", "wan", "interface")
luci.model.uci.set("network", "wan", "proto", "none")
+ luci.model.uci.set("network", "wan", "ifname", " ")
end
- luci.model.uci.set("network", "wan", "type", "bridge")
+ luci.model.uci.set("network", "wan", "_ifname", luci.model.uci.get("network", "wan", "ifname") or " ")
+ luci.model.uci.set("network", "wan", "ifname", " ")
luci.model.uci.save("network")
+ luci.model.uci.unload("network")
self.map:set(section, "network", "wan")
else
+ if luci.model.uci.get("network", "wan", "_ifname") then
+ luci.model.uci.set("network", "wan", "ifname", luci.model.uci.get("network", "wan", "_ifname"))
+ end
self.map:set(section, "network", "lan")
end