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 c0fb528..bcffe7c 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)