From: Michael Tremer Date: Wed, 19 Sep 2018 14:59:53 +0000 (+0100) Subject: hostapd: Write VHT capabilities to configuration X-Git-Tag: 010~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1526e219739376292b35471ab6e7441ae3112a89;p=network.git hostapd: Write VHT capabilities to configuration Signed-off-by: Michael Tremer --- 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}" +}