From 0e1c630c8d5f4c1f831fb5c32203561e98cc3083 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 19 Sep 2018 14:02:09 +0100 Subject: [PATCH] hostapd: Always enable all HT caps Signed-off-by: Arne Fitzenreiter Signed-off-by: Michael Tremer --- src/functions/functions.hostapd | 6 ++++++ src/functions/functions.wireless | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/functions/functions.hostapd b/src/functions/functions.hostapd index 86458289..433d1722 100644 --- a/src/functions/functions.hostapd +++ b/src/functions/functions.hostapd @@ -99,6 +99,9 @@ hostapd_config_write() { assert isset key fi + # Get HT caps + local ht_caps="$(wireless_get_ht_caps "${device}")" + # Create configuration directory. local config_dir=$(dirname ${file}) mkdir -p ${HOSTAPD_CONTROL_INTERFACE_DIR} ${config_dir} 2>/dev/null @@ -151,6 +154,9 @@ hostapd_config_write() { # WMM print "wmm_enabled=${wmm}" + # Enable HT caps + print "ht_capab=${ht_caps}" + print ) >> ${file} diff --git a/src/functions/functions.wireless b/src/functions/functions.wireless index 7697c5d8..bf09a509 100644 --- a/src/functions/functions.wireless +++ b/src/functions/functions.wireless @@ -445,3 +445,16 @@ wireless_monitor() { return ${EXIT_OK} } + +wireless_get_ht_caps() { + local device="${1}" + assert isset device + + local phy="$(device_get_phy "${device}")" + if ! isset phy; then + log ERROR "Could not determine PHY for ${device}" + return ${EXIT_ERROR} + fi + + network-phy-list-ht-caps "${phy}" +} -- 2.47.2