- [ -f /proc/net/wl0 ] || return
- config_get type wl0 type
- [ "$type" = broadcom ] && return
- cat <<EOF
-config wifi-device wl0
+ local i=0
+
+ while [ -f /proc/net/wl$((i++)) ]; do
+ config_get type wl${i} type
+ [ "$type" = broadcom ] && continue
+ cat <<EOF
+config wifi-device wl${i}