Changeset 6358 for luci/trunk/libs/core/luasrc/model/network.lua
- Timestamp:
- 10/30/10 03:33:06 (3 years ago)
- Files:
-
- 1 modified
-
luci/trunk/libs/core/luasrc/model/network.lua (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
luci/trunk/libs/core/luasrc/model/network.lua
r6349 r6358 162 162 163 163 function init(cursor) 164 uci_r = cursor or luci.model.uci.cursor()165 uci_s = cursor:substate()164 uci_r = cursor or uci.cursor() 165 uci_s = uci_r:substate() 166 166 167 167 ifs = { } … … 899 899 options.device = self.sid 900 900 901 local wnet = uci_r:section("wi fidev", "wifi-iface", nil, options)901 local wnet = uci_r:section("wireless", "wifi-iface", nil, options) 902 902 if wnet then 903 return wifinet(wnet )903 return wifinet(wnet, options) 904 904 end 905 905 end … … 922 922 923 923 wifinet = utl.class() 924 function wifinet.__init__(self, net )924 function wifinet.__init__(self, net, data) 925 925 self.sid = net 926 926 … … 941 941 942 942 self.wdev = dev 943 self.iwdata = uci_s:get_all("wireless", self.sid) or { }944 943 self.iwinfo = dev and sys.wifi.getiwinfo(dev) or { } 944 self.iwdata = data or uci_s:get_all("wireless", self.sid) or 945 uci_r:get_all("wireless", self.sid) or { } 945 946 end 946 947 … … 1009 1010 1010 1011 function wifinet.active_bssid(self) 1011 return _stror(self.iwinfo.bssid, self.iw info.bssid) or "00:00:00:00:00:00"1012 return _stror(self.iwinfo.bssid, self.iwdata.bssid) or "00:00:00:00:00:00" 1012 1013 end 1013 1014
