mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 11:30:09 +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})$ ]]
|
||||
}
|
||||
|
||||
#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
|
Loading…
Reference in New Issue
Block a user