Skip to content
This repository was archived by the owner on Sep 30, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions create_ap
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ usage() {
echo "Options:"
echo " -h, --help Show this help"
echo " --version Print version number"
echo " -c <channel> Channel number (default: 1)"
echo " -c <channel> Channel number (default: 1 or 36; use 0 or acs_survey for Automatic Channel Selection)"
echo " -w <WPA version> Use 1 for WPA, use 2 for WPA2, use 1+2 for both (default: 1+2)"
echo " -n Disable Internet sharing (if you use this, don't pass"
echo " the <interface-with-internet> argument)"
Expand Down Expand Up @@ -318,7 +318,9 @@ can_transmit_to_channel() {
IFACE=$1
CHANNEL_NUM=$2

if [[ $USE_IWCONFIG -eq 0 ]]; then
if [[ CHANNEL_NUM -eq 0 ]]; then
return 0
elif [[ $USE_IWCONFIG -eq 0 ]]; then
if [[ $FREQ_BAND == 2.4 ]]; then
CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep " 24[0-9][0-9] MHz \[${CHANNEL_NUM}\]")
else
Expand Down Expand Up @@ -1337,6 +1339,8 @@ if [[ $CHANNEL == default ]]; then
else
CHANNEL=36
fi
elif [[ $CHANNEL == acs_survey ]]; then
CHANNEL=0
fi

if [[ $FREQ_BAND != 5 && $CHANNEL -gt 14 ]]; then
Expand Down