mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-24 21:20:12 +00:00
Temporary fix for error on creating ap on 5GHz
now ap is always created in 2.4GHz
This commit is contained in:
parent
25bfe94e12
commit
a2adf46b89
@ -345,12 +345,16 @@ is_5ghz_frequency() {
|
|||||||
[[ $1 =~ ^(49[0-9]{2})|(5[0-9]{3})$ ]]
|
[[ $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() {
|
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
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1230,8 +1234,7 @@ if [[ -n "$LOAD_CONFIG" && $# -eq 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if required number of positional args are present
|
# Check if required number of positional args are present
|
||||||
if [[ $# -lt 1 && $FIX_UNMANAGED -eq 0 && -z "$STOP_ID" &&
|
if [[ $# -lt 1 && $FIX_UNMANAGED -eq 0 && -z "$STOP_ID" && $LIST_RUNNING -eq 0 && -z "$LIST_CLIENTS_ID" ]]; then
|
||||||
$LIST_RUNNING -eq 0 && -z "$LIST_CLIENTS_ID" ]]; then
|
|
||||||
usage >&2
|
usage >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -1539,7 +1542,7 @@ if [[ $NO_VIRT -eq 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
if [[ $WIFI_IFACE_CHANNEL -ne $CHANNEL ]]; then
|
if [[ $WIFI_IFACE_CHANNEL -ne $CHANNEL ]]; then
|
||||||
echo ", fallback to channel ${WIFI_IFACE_CHANNEL}"
|
echo ", fallback to channel ${WIFI_IFACE_CHANNEL}"
|
||||||
CHANNEL=$WIFI_IFACE_CHANNEL
|
#CHANNEL=$WIFI_IFACE_CHANNEL
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user