When editing an AP wireless network in LuCI, if one or more STA networks are also...
[project/luci.git] / modules / luci-mod-admin-full / luasrc / model / cbi / admin_network / wifi.lua
index f61fda3..9a2bd5d 100644 (file)
@@ -1,16 +1,5 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth <steven@midlink.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-$Id$
-]]--
+-- Copyright 2008 Steven Barth <steven@midlink.org>
+-- Licensed to the public under the Apache License 2.0.
 
 local wa = require "luci.tools.webadmin"
 local nw = require "luci.model.network"
@@ -28,6 +17,7 @@ m = Map("wireless", "",
 
 m:chain("network")
 m:chain("firewall")
+m.redirect = luci.dispatcher.build_url("admin/network/wireless")
 
 local ifsection
 
@@ -153,7 +143,7 @@ local found_sta = nil
 local _, net
 if wnet:mode() ~= "sta" then
        for _, net in ipairs(wdev:get_wifinets()) do
-               if net:mode() == "sta" then
+               if net:mode() == "sta" and net:get("disabled") ~= "1" then
                        if not found_sta then
                                found_sta = {}
                                found_sta.channel = net:channel()