Fix: A disabled wireless network may be shown as enabled, when multiple networks...
authorGeorgi Valkov <gvalkov@abv.bg>
Fri, 17 Jul 2015 23:28:54 +0000 (02:28 +0300)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 27 Jul 2015 09:37:09 +0000 (11:37 +0200)
modules/luci-base/luasrc/tools/status.lua
modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm
modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm
modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm

index 6e588fe..0dd092c 100644 (file)
@@ -120,7 +120,9 @@ function wifi_networks()
                                assoclist  = net:assoclist(),
                                country    = net:country(),
                                txpower    = net:txpower(),
                                assoclist  = net:assoclist(),
                                country    = net:country(),
                                txpower    = net:txpower(),
-                               txpoweroff = net:txpower_offset()
+                               txpoweroff = net:txpower_offset(),
+                               disabled   = (dev:get("disabled") == "1" or
+                                            net:get("disabled") == "1")
                        }
                end
 
                        }
                end
 
index b7c44f9..4fc268e 100644 (file)
                                for( var i = 0; i < st.length; i++ )
                                {
                                        var iw = st[i];
                                for( var i = 0; i < st.length; i++ )
                                {
                                        var iw = st[i];
-                                       var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && iw.mode != 'Unknown');
+                                       var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && iw.mode != 'Unknown' && !iw.disabled);
                                        var p = iw.quality;
                                        var q = is_assoc ? p : -1;
 
                                        var p = iw.quality;
                                        var q = is_assoc ? p : -1;
 
index 2484fd3..fa0a97b 100644 (file)
@@ -6,7 +6,7 @@
                {
                        if (iw && (iw = iw[0]))
                        {
                {
                        if (iw && (iw = iw[0]))
                        {
-                               var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel);
+                               var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && !iw.disabled);
                                var p = iw.quality;
                                var q = is_assoc ? p : -1;
 
                                var p = iw.quality;
                                var q = is_assoc ? p : -1;
 
index 548b22d..07a96b2 100644 (file)
                                        for (var nidx = 0; nidx < dev.networks.length; nidx++)
                                        {
                                                var net = dev.networks[nidx];
                                        for (var nidx = 0; nidx < dev.networks.length; nidx++)
                                        {
                                                var net = dev.networks[nidx];
-                                               var is_assoc = (net.bssid != '00:00:00:00:00:00' && net.channel);
+                                               var is_assoc = (net.bssid != '00:00:00:00:00:00' && net.channel && !net.disabled);
 
                                                var icon;
                                                if (!is_assoc)
 
                                                var icon;
                                                if (!is_assoc)