Fix: Status for disabled wireless networks may display the SSID, BSSID and Mode of...
authorGeorgi Valkov <gvalkov@abv.bg>
Fri, 17 Jul 2015 22:22:47 +0000 (01:22 +0300)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 27 Jul 2015 09:37:09 +0000 (11:37 +0200)
modules/luci-base/luasrc/model/network.lua

index b6e390e8183e9f1ce5f1b560bfb7c03fabaa99a5..20e1032760c4d8d5eaf831b634a401c457159ae8 100644 (file)
@@ -1421,7 +1421,7 @@ function wifinet.is_up(self)
 end
 
 function wifinet.active_mode(self)
-       local m = _stror(self.iwinfo.mode, self.iwdata.mode) or "ap"
+       local m = _stror(self.iwdata.mode, self.iwinfo.mode) or "ap"
 
        if     m == "ap"      then m = "Master"
        elseif m == "sta"     then m = "Client"
@@ -1438,11 +1438,11 @@ function wifinet.active_mode_i18n(self)
 end
 
 function wifinet.active_ssid(self)
-       return _stror(self.iwinfo.ssid, self.iwdata.ssid)
+       return _stror(self.iwdata.ssid, self.iwinfo.ssid)
 end
 
 function wifinet.active_bssid(self)
-       return _stror(self.iwinfo.bssid, self.iwdata.bssid) or "00:00:00:00:00:00"
+       return _stror(self.iwdata.bssid, self.iwinfo.bssid) or "00:00:00:00:00:00"
 end
 
 function wifinet.active_encryption(self)