]> git.ipfire.org Git - people/ms/network.git/commitdiff
hostapd: Write VHT capabilities to configuration
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Sep 2018 14:59:53 +0000 (15:59 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Sep 2018 14:59:53 +0000 (15:59 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.hostapd
src/functions/functions.wireless

index 433d172272d0799bfc7641283d9e23072b29f78c..c6608e2459037ca688a3d91ebfe63b0de42fc167 100644 (file)
@@ -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}"
 
index bf09a50935351766daf3c7310cf9b65b637f8308..ba4cd472043b413696c93cf1bec010bd73a2ee5c 100644 (file)
@@ -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}"
+}