added p2p twt and idle timeout, remove random spaces
This commit is contained in:
parent
cc0643f446
commit
f5ab6861f8
55
lnxrouter
55
lnxrouter
|
@ -101,15 +101,16 @@ Options:
|
||||||
(defaults to /etc/hostapd/hostapd.accept)
|
(defaults to /etc/hostapd/hostapd.accept)
|
||||||
--hostapd-debug <level> 1 or 2. Passes -d or -dd to hostapd
|
--hostapd-debug <level> 1 or 2. Passes -d or -dd to hostapd
|
||||||
--isolate-clients Disable wifi communication between clients
|
--isolate-clients Disable wifi communication between clients
|
||||||
|
--idle-timeout <time> Idle timeout (in seconds) to disconnect a client device
|
||||||
--no-haveged Do not run haveged automatically when needed
|
--no-haveged Do not run haveged automatically when needed
|
||||||
--hs20 Enable Hotspot 2.0
|
--hs20 (ß) Enable Hotspot 2.0
|
||||||
|
|
||||||
WiFi 4 (802.11n) configs:
|
WiFi 4 (802.11n) configs:
|
||||||
--wifi4 Enable IEEE 802.11n (HT)
|
--wifi4 Enable IEEE 802.11n (HT)
|
||||||
--req-ht Require station HT (High Throughput) mode
|
--req-ht Require station HT (High Throughput) mode
|
||||||
--ht-capab <HT caps> HT capabilities (default: [HT40+])
|
--ht-capab <HT caps> HT capabilities (default: [HT40+])
|
||||||
|
|
||||||
WiFi 5 (802.11ac) configs:
|
WiFi 5 (802.11ac) configs:
|
||||||
--wifi5 Enable IEEE 802.11ac (VHT)
|
--wifi5 Enable IEEE 802.11ac (VHT)
|
||||||
--req-vht Require station VHT (Very High Thoughtput) mode
|
--req-vht Require station VHT (Very High Thoughtput) mode
|
||||||
--vht-capab <VHT caps> VHT capabilities
|
--vht-capab <VHT caps> VHT capabilities
|
||||||
|
@ -124,8 +125,8 @@ Options:
|
||||||
--vht-seg1-ch <channel> Channel index of VHT center frequency for secondary
|
--vht-seg1-ch <channel> Channel index of VHT center frequency for secondary
|
||||||
(second 80MHz) segment. Use with '--vht-ch-width 3'
|
(second 80MHz) segment. Use with '--vht-ch-width 3'
|
||||||
|
|
||||||
WiFi 6 (802.11ax) configs:
|
WiFi 6 (802.11ax) configs:
|
||||||
--wifi6 Enable IEEE 802.11ax (HE)
|
--wifi6 (ß) Enable IEEE 802.11ax (HE)
|
||||||
--req-he Require station HE (High Efficiency) mode
|
--req-he Require station HE (High Efficiency) mode
|
||||||
|
|
||||||
--he-ch-width <index> Index of HE channel width:
|
--he-ch-width <index> Index of HE channel width:
|
||||||
|
@ -137,9 +138,13 @@ Options:
|
||||||
segment. Use with '--he-ch-width'
|
segment. Use with '--he-ch-width'
|
||||||
--he-seg1-ch <channel> Channel index of HE center frequency for secondary
|
--he-seg1-ch <channel> Channel index of HE center frequency for secondary
|
||||||
(second 80MHz) segment. Use with '--he-ch-width 3'
|
(second 80MHz) segment. Use with '--he-ch-width 3'
|
||||||
--he-su-bfe Enable HE Single User Beamformee support
|
--he-su-bfe (beta) Enable HE Single User Beamformee support
|
||||||
--he-su-bfr Enable HE Single User Beamformer support
|
--he-su-bfr (beta) Enable HE Single User Beamformer support
|
||||||
--he-mu-bfr Enable HE Multi User Beamformer support
|
--he-mu-bfr (beta) Enable HE Multi User Beamformer support
|
||||||
|
--enable-twt (beta) (ß) Enable Peer to Peer Target Wake Time support
|
||||||
|
|
||||||
|
(ß): Requires hostapd built with specific build flags enabled
|
||||||
|
|
||||||
|
|
||||||
Instance managing:
|
Instance managing:
|
||||||
--daemon Run in background
|
--daemon Run in background
|
||||||
|
@ -212,6 +217,7 @@ define_global_variables(){
|
||||||
WPA_VERSION=2
|
WPA_VERSION=2
|
||||||
MAC_FILTER=0
|
MAC_FILTER=0
|
||||||
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
|
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
|
||||||
|
IDLETIMEOUT=300
|
||||||
IEEE80211N=0
|
IEEE80211N=0
|
||||||
REQUIREHT=0
|
REQUIREHT=0
|
||||||
IEEE80211AC=0
|
IEEE80211AC=0
|
||||||
|
@ -229,6 +235,7 @@ define_global_variables(){
|
||||||
HESUBFE=0
|
HESUBFE=0
|
||||||
HESUBFR=0
|
HESUBFR=0
|
||||||
HEMUBFR=0
|
HEMUBFR=0
|
||||||
|
HEP2PTWT=0
|
||||||
DRIVER=nl80211
|
DRIVER=nl80211
|
||||||
NO_VIRT=0 # not use virtual interface
|
NO_VIRT=0 # not use virtual interface
|
||||||
COUNTRY=
|
COUNTRY=
|
||||||
|
@ -297,8 +304,6 @@ parse_user_options(){
|
||||||
SHARE_METHOD=redsocks
|
SHARE_METHOD=redsocks
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
-g)
|
-g)
|
||||||
shift
|
shift
|
||||||
GATEWAY4="$1"
|
GATEWAY4="$1"
|
||||||
|
@ -327,7 +332,6 @@ parse_user_options(){
|
||||||
shift
|
shift
|
||||||
MAC_USE_RANDOM=1
|
MAC_USE_RANDOM=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--dns)
|
--dns)
|
||||||
shift
|
shift
|
||||||
DNS="$1"
|
DNS="$1"
|
||||||
|
@ -377,12 +381,10 @@ parse_user_options(){
|
||||||
shift
|
shift
|
||||||
DNS_NOCACHE=1
|
DNS_NOCACHE=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--isolate-clients)
|
--isolate-clients)
|
||||||
shift
|
shift
|
||||||
ISOLATE_CLIENTS=1
|
ISOLATE_CLIENTS=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--ap)
|
--ap)
|
||||||
shift
|
shift
|
||||||
WIFI_IFACE="$1"
|
WIFI_IFACE="$1"
|
||||||
|
@ -399,8 +401,6 @@ parse_user_options(){
|
||||||
shift
|
shift
|
||||||
QR=1
|
QR=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
--hidden)
|
--hidden)
|
||||||
shift
|
shift
|
||||||
HIDDEN=1
|
HIDDEN=1
|
||||||
|
@ -414,7 +414,6 @@ parse_user_options(){
|
||||||
MAC_FILTER_ACCEPT="$1"
|
MAC_FILTER_ACCEPT="$1"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-c)
|
-c)
|
||||||
shift
|
shift
|
||||||
CHANNEL="$1"
|
CHANNEL="$1"
|
||||||
|
@ -430,7 +429,11 @@ parse_user_options(){
|
||||||
[[ "$WPA_VERSION" == "2+1" ]] && WPA_VERSION=1+2
|
[[ "$WPA_VERSION" == "2+1" ]] && WPA_VERSION=1+2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--idle-timeout)
|
||||||
|
shift
|
||||||
|
IDLETIMEOUT="$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--wifi4|--ieee80211n)
|
--wifi4|--ieee80211n)
|
||||||
shift
|
shift
|
||||||
IEEE80211N=1
|
IEEE80211N=1
|
||||||
|
@ -498,17 +501,18 @@ parse_user_options(){
|
||||||
--he-su-bfe)
|
--he-su-bfe)
|
||||||
shift
|
shift
|
||||||
HESUBFE=1
|
HESUBFE=1
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
--he-su-bfr)
|
--he-su-bfr)
|
||||||
shift
|
shift
|
||||||
HESUBFR=1
|
HESUBFR=1
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
--he-mu-bfr)
|
--he-mu-bfr)
|
||||||
shift
|
shift
|
||||||
HEMUBFR=1
|
HEMUBFR=1
|
||||||
|
;;
|
||||||
|
--enable-twt)
|
||||||
shift
|
shift
|
||||||
|
HEP2PTWT=1
|
||||||
;;
|
;;
|
||||||
--driver)
|
--driver)
|
||||||
shift
|
shift
|
||||||
|
@ -524,7 +528,6 @@ parse_user_options(){
|
||||||
VIRT_NAME="$1"
|
VIRT_NAME="$1"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--country)
|
--country)
|
||||||
shift
|
shift
|
||||||
COUNTRY="$1"
|
COUNTRY="$1"
|
||||||
|
@ -555,7 +558,6 @@ parse_user_options(){
|
||||||
shift
|
shift
|
||||||
USE_PSK=1
|
USE_PSK=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--daemon)
|
--daemon)
|
||||||
shift
|
shift
|
||||||
DAEMONIZE=1
|
DAEMONIZE=1
|
||||||
|
@ -578,7 +580,6 @@ parse_user_options(){
|
||||||
shift
|
shift
|
||||||
KEEP_CONFDIR=1
|
KEEP_CONFDIR=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Invalid parameter: $1" 1>&2
|
echo "Invalid parameter: $1" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -799,7 +800,7 @@ show_interface_pci_info() { # pci id / model / virtual
|
||||||
[[ -n "$driver" ]] && echo "System-already-loaded driver: $driver"
|
[[ -n "$driver" ]] && echo "System-already-loaded driver: $driver"
|
||||||
[[ -n "$device_fullname" ]] && echo "$device_fullname"
|
[[ -n "$device_fullname" ]] && echo "$device_fullname"
|
||||||
echo ""
|
echo ""
|
||||||
# TODO usb
|
# TODO Fix pci and usb devices
|
||||||
}
|
}
|
||||||
|
|
||||||
alloc_new_vface_name() { # only for wifi
|
alloc_new_vface_name() { # only for wifi
|
||||||
|
@ -2019,6 +2020,10 @@ write_hostapd_conf() {
|
||||||
echo "ieee80211ac=1" >> "$CONFDIR/hostapd.conf"
|
echo "ieee80211ac=1" >> "$CONFDIR/hostapd.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $IDLETIMEOUT -ne 300 ]]; then
|
||||||
|
echo "ap_max_inactivity=${IDLETIMEOUT}" >> "$CONFDIR/hostapd.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $REQUIREVHT -eq 1 ]]; then
|
if [[ $REQUIREVHT -eq 1 ]]; then
|
||||||
echo "require_vht=1" >> "$CONFDIR/hostapd.conf"
|
echo "require_vht=1" >> "$CONFDIR/hostapd.conf"
|
||||||
fi
|
fi
|
||||||
|
@ -2043,6 +2048,10 @@ write_hostapd_conf() {
|
||||||
echo "he_mu_beamformer=1" >> "$CONFDIR/hostapd.conf"
|
echo "he_mu_beamformer=1" >> "$CONFDIR/hostapd.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $HEP2PTWT -eq 1 ]]; then
|
||||||
|
echo "peer_to_peer_twt=1" >> "$CONFDIR/hostapd.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "$VHT_CAPAB" ]]; then
|
if [[ -n "$VHT_CAPAB" ]]; then
|
||||||
echo "vht_capab=${VHT_CAPAB}" >> "$CONFDIR/hostapd.conf"
|
echo "vht_capab=${VHT_CAPAB}" >> "$CONFDIR/hostapd.conf"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue