libs/iwinfo: don't treat every iface as dummy wireless, do some heuristics on the...
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 15 Oct 2009 16:20:29 +0000 (16:20 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 15 Oct 2009 16:20:29 +0000 (16:20 +0000)
libs/iwinfo/src/dummy.lua

index 45bf047fa5d0cd2fea3cb56437106eb70d40cc72..75fb4baf2efa6a6a3bcef626cc07e2714fbf1d1e 100644 (file)
@@ -1,7 +1,9 @@
 module "iwinfo"
 
-function type()
-       return "dummy"
+function type(x)
+       if x:match("^wlan%d") or x:match("^wl%d") or x:match("^ath%d") then
+               return "dummy"
+       end
 end
 
 dummy = {}