From a2adf46b89abbde6d79a5237a4986f0ea12a11e7 Mon Sep 17 00:00:00 2001 From: lakinduakash Date: Sun, 3 Mar 2019 02:05:18 +0530 Subject: [PATCH] Temporary fix for error on creating ap on 5GHz now ap is always created in 2.4GHz --- create_ap => src/create_ap | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) rename create_ap => src/create_ap (99%) diff --git a/create_ap b/src/create_ap similarity index 99% rename from create_ap rename to src/create_ap index 6b3b5ca..20663a7 100755 --- a/create_ap +++ b/src/create_ap @@ -345,12 +345,16 @@ is_5ghz_frequency() { [[ $1 =~ ^(49[0-9]{2})|(5[0-9]{3})$ ]] } +#is_wifi_connected() { +# if [[ $USE_IWCONFIG -eq 0 ]]; then +# iw dev "$1" link 2>&1 | grep -E '^Connected to' > /dev/null 2>&1 && return 0 +# else +# iwconfig "$1" 2>&1 | grep -E 'Access Point: [0-9a-fA-F]{2}:' > /dev/null 2>&1 && #return 0 +# fi +# return 1 +#} + is_wifi_connected() { - if [[ $USE_IWCONFIG -eq 0 ]]; then - iw dev "$1" link 2>&1 | grep -E '^Connected to' > /dev/null 2>&1 && return 0 - else - iwconfig "$1" 2>&1 | grep -E 'Access Point: [0-9a-fA-F]{2}:' > /dev/null 2>&1 && return 0 - fi return 1 } @@ -1230,8 +1234,7 @@ if [[ -n "$LOAD_CONFIG" && $# -eq 0 ]]; then fi # Check if required number of positional args are present -if [[ $# -lt 1 && $FIX_UNMANAGED -eq 0 && -z "$STOP_ID" && - $LIST_RUNNING -eq 0 && -z "$LIST_CLIENTS_ID" ]]; then +if [[ $# -lt 1 && $FIX_UNMANAGED -eq 0 && -z "$STOP_ID" && $LIST_RUNNING -eq 0 && -z "$LIST_CLIENTS_ID" ]]; then usage >&2 exit 1 fi @@ -1539,7 +1542,7 @@ if [[ $NO_VIRT -eq 0 ]]; then fi if [[ $WIFI_IFACE_CHANNEL -ne $CHANNEL ]]; then echo ", fallback to channel ${WIFI_IFACE_CHANNEL}" - CHANNEL=$WIFI_IFACE_CHANNEL + #CHANNEL=$WIFI_IFACE_CHANNEL else echo fi