Configuring 802.11ac requires setting VHT capability flags. Technically, this is done by providing a list of features to the `vht_capab` variable in `hostapd.conf`. However, there are multiple flags which incorporate numbers whose values might depend on the presence of other flags and further settings.
The beamformer/beamformee setting is one such family of flags.
**The Bug:**
1. When configuring 802.11ac //without// beamforming, VHT flags are being created as expected.
VHT capabilities:
```
vht {
antenna-count 3
center-channel-freq {
freq-1 42
}
channel-set-width 1
max-mpdu 11454
max-mpdu-exp 3
}
```
Resulting VHT flags in hostapd.conf:
`vht_capab=[MAX-MPDU-11454][MAX-A-MPDU-LEN-EXP-3]`
2. When configuring 802.11ac with //multi-user-beamformer// capabilities, VHT flags are rendered incomplete.
VHT capabilities:
```
vht {
antenna-count 3
beamform multi-user-beamformer
center-channel-freq {
freq-1 42
}
channel-set-width 1
max-mpdu 11454
max-mpdu-exp 3
}
```
Resulting VHT flags in hostapd.conf:
`vht_capab=[BF-ANTENNA-3][SOUNDING-DIMENSION-3]`
Expected result:
`vht_capab=[MAX-MPDU-11454][MAX-A-MPDU-LEN-EXP-3][BF-ANTENNA-3][SOUNDING-DIMENSION-3][MU-BEAMFORMER]`
3. When configuring 802.11ac with //multi-user-beamformer// and //single-user-beamformer// capabilities, VHT flags are rendered incomplete and with wrong numbers.
VHT capabilities:
```
vht {
antenna-count 3
beamform multi-user-beamformer
beamform single-user-beamformer
center-channel-freq {
freq-1 42
}
channel-set-width 1
max-mpdu 11454
max-mpdu-exp 3
}
```
Resulting VHT flags in hostapd.conf:
`vht_capab=[BF-ANTENNA-3][SOUNDING-DIMENSION-3]`
Expected result:
`vht_capab=[MAX-MPDU-11454][MAX-A-MPDU-LEN-EXP-3][BF-ANTENNA-2][SOUNDING-DIMENSION-2][MU-BEAMFORMER][SU-BEAMFORMER]`