[PATCH] hostapd: Fix VHT MCS settings when chainmask is configured.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Greear <greearb@xxxxxxxxxxxxxxx>

The previous patch had some math issues...this appears to
fix it.

Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
---
 src/ap/ieee802_11_vht.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c
index ce7cbcf..7795f5b 100644
--- a/src/ap/ieee802_11_vht.c
+++ b/src/ap/ieee802_11_vht.c
@@ -56,19 +56,27 @@ u8 * hostapd_eid_vht_capabilities(struct hostapd_data *hapd, u8 *eid)
 	 * range.
 	 */
 	if (mode->conf_tx_ant) {
+		wpa_printf(MSG_DEBUG, "configured tx-antenna: 0x%x, vht tx_map before: 0x%x",
+			   mode->conf_tx_ant, cap->vht_supported_mcs_set.tx_map);
 		for (i = 7; i > 0; i--) {
 			if (mode->conf_tx_ant & BIT(i - 1))
 				break;
-			cap->vht_supported_mcs_set.tx_map |= (0x3 << i);
+			cap->vht_supported_mcs_set.tx_map |= (0x3 << ((i - 1) * 2));
 		}
+		wpa_printf(MSG_DEBUG, "configured tx-antenna: 0x%x, vht tx_map after: 0x%x",
+			   mode->conf_tx_ant, cap->vht_supported_mcs_set.tx_map);
 	}
 
 	if (mode->conf_rx_ant) {
+		wpa_printf(MSG_DEBUG, "configured rx-antenna: 0x%x, vht rx_map before: 0x%x",
+			   mode->conf_rx_ant, cap->vht_supported_mcs_set.rx_map);
 		for (i = 7; i > 0; i--) {
 			if (mode->conf_rx_ant & BIT(i - 1))
 				break;
-			cap->vht_supported_mcs_set.rx_map |= (0x3 << i);
+			cap->vht_supported_mcs_set.rx_map |= (0x3 << ((i - 1) * 2));
 		}
+		wpa_printf(MSG_DEBUG, "configured rx-antenna: 0x%x, vht rx_map after: 0x%x",
+			   mode->conf_rx_ant, cap->vht_supported_mcs_set.rx_map);
 	}
 
 	pos += sizeof(*cap);
-- 
2.1.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux