---[[
-LuCI - Network model
-
-Copyright 2009-2015 Jo-Philipp Wich <jow@openwrt.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
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-]]--
+-- Copyright 2009-2015 Jo-Philipp Wich <jow@openwrt.org>
+-- Licensed to the public under the Apache License 2.0.
local type, next, pairs, ipairs, loadfile, table
= type, next, pairs, ipairs, loadfile, table
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"
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)