From 1526e219739376292b35471ab6e7441ae3112a89 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 19 Sep 2018 15:59:53 +0100 Subject: [PATCH] hostapd: Write VHT capabilities to configuration Signed-off-by: Michael Tremer --- src/functions/functions.hostapd | 8 ++++++++ src/functions/functions.wireless | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/functions/functions.hostapd b/src/functions/functions.hostapd index 433d1722..c6608e24 100644 --- a/src/functions/functions.hostapd +++ b/src/functions/functions.hostapd @@ -99,6 +99,9 @@ hostapd_config_write() { assert isset key fi + # Get VHT caps + local vht_caps="$(wireless_get_vht_caps "${device}")" + # Get HT caps local ht_caps="$(wireless_get_ht_caps "${device}")" @@ -154,6 +157,11 @@ hostapd_config_write() { # WMM print "wmm_enabled=${wmm}" + # Enable VHT caps + if isset vht_caps; then + print "vht_capab=${vht_caps}" + fi + # Enable HT caps print "ht_capab=${ht_caps}" diff --git a/src/functions/functions.wireless b/src/functions/functions.wireless index bf09a509..ba4cd472 100644 --- a/src/functions/functions.wireless +++ b/src/functions/functions.wireless @@ -458,3 +458,16 @@ wireless_get_ht_caps() { network-phy-list-ht-caps "${phy}" } + +wireless_get_vht_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-vht-caps "${phy}" +} -- 2.47.2