Function to count the number of wlans
This commit is contained in:
parent
3ab2687019
commit
689c236ddb
|
@ -39,6 +39,18 @@ WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
|
||||||
# repo for atheros AR9271 wifi driver
|
# repo for atheros AR9271 wifi driver
|
||||||
ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
|
ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
|
||||||
|
|
||||||
|
function count_wlan {
|
||||||
|
# counts the number of wlan devices
|
||||||
|
ctr=0
|
||||||
|
|
||||||
|
for i in $(seq 0 10); do
|
||||||
|
if grep -q "wlan${i}" /proc/net/dev; then
|
||||||
|
ctr=$((ctr + 1))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo $ctr
|
||||||
|
}
|
||||||
|
|
||||||
function setup_wifi {
|
function setup_wifi {
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue