Browse Source

ffho-ath9k-blackout-workaround: fix two additional bugs

Karsten Böddeker 6 years ago
parent
commit
72ba236324

+ 4 - 2
ffho/ffho-ath9k-blackout-workaround/luasrc/usr/sbin/ath9k-blackout-workaround

@@ -21,9 +21,11 @@ function devOk (iface)
   if uci:get('wireless', radio, 'hwmode') ~= '11g' then
     return null
   end
+
+  local ifname = uci:get('wireless', iface, 'ifname')
   local wifitype = iwinfo.type(radio)
-  local assoclist = iwinfo[wifitype].assoclist(iface)
-  if assoclist and #assoclist > 0 then
+  local assoclist = iwinfo[wifitype].assoclist(ifname)
+  if next(assoclist) then
     return true
   end
   return false