libs/sys: fix getiwinfo() for "radioX.networkY" notation if the target network is...
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 14 Aug 2012 12:45:12 +0000 (12:45 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 14 Aug 2012 12:45:12 +0000 (12:45 +0000)
libs/sys/luasrc/sys.lua

index c0fb5286eb1fe29439eac7d48ad9da073db168c6..bcffe7c4e8de5768cb79ec2794ee06531705f65e 100644 (file)
@@ -836,6 +836,7 @@ function wifi.getiwinfo(ifname)
                local u = uci.cursor_state()
                local d, n = ifname:match("^(%w+)%.network(%d+)")
                if d and n then
+                       ifname = d
                        n = tonumber(n)
                        u:foreach("wireless", "wifi-iface",
                                function(s)