From 5f1f96075340e0cd1f2e4ae6160aed6bec87be14 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 13 Sep 2021 17:47:04 +0200 Subject: [PATCH] gluon-core: introduce device_uses_wlan() helper --- .../gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua index 0eec8a83..4a6ca757 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua @@ -150,6 +150,17 @@ function M.device_supports_mfp(uci) return supports_mfp end +function M.device_uses_wlan(uci) + local ret = false + + uci:foreach('wireless', 'wifi-device', function() + ret = true + return false + end) + + return ret +end + function M.device_uses_11a(uci) local ret = false