- count = count + 1
- if s['.name'] == sid then
- self.id = "%s.network%d" %{ parent_dev, count }
-
- local wtype = iwi.type(dev)
- if dev and wtype then
- self.winfo = iwi[wtype]
- self.wdev = dev
+ if s.device then
+ count[s.device] = count[s.device]
+ and count[s.device] + 1 or 1
+ if s['.name'] == sid then
+ self.id = "%s.network%d" %{ parent_dev, count[s.device] }
+
+ local wtype = iwi.type(dev)
+ if dev and wtype then
+ self.winfo = iwi[wtype]
+ self.wdev = dev
+ end