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 6e588fe71dc2a9550c508e2b5f0e452706905aac..0dd092c6df42e8681df6911c2074495791efe894 100644 (file)
@@ -120,7 +120,9 @@ function wifi_networks()
                                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
 
index b7c44f90738730deca10050286247d9b8a6d6e5d..4fc268e66c364c556866640f1712f79bc16ce49c 100644 (file)
                                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;
 
index 2484fd3c6bb9bfcb3ea9668c656919984b33eb2b..fa0a97b707631276dd8f910fe31cc322a17d3ea1 100644 (file)
@@ -6,7 +6,7 @@
                {
                        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;
 
index 548b22d16711580beeb5d832dc776e36e7805393..07a96b2bf015f5f0131d9bdd4ca9d65455d0c23a 100644 (file)
                                        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)