aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-08-28 09:25:44 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-05 14:34:33 (GMT)
commit1598c38aa04a0eee7a6acffc512b16ff73ddad06 (patch)
tree4d4490893229ddf3e13244ec08368d9eaa609dfe
parentdf1a5d1df9bd83dbc5feaeca14c0e4f848377335 (diff)
downloadhostap-07-1598c38aa04a0eee7a6acffc512b16ff73ddad06.zip
hostap-07-1598c38aa04a0eee7a6acffc512b16ff73ddad06.tar.gz
hostap-07-1598c38aa04a0eee7a6acffc512b16ff73ddad06.tar.bz2
hostapd: enable STBC only for STBC capable STAs
hostapd simply used its own STBC configuration in the STA's HT caps. This resulted in TX STBC being used for STAs not supporting RX STBC, which in turn resulted in the STA not receiving anything. Fix this by handling the STBC flags in the same way mac80211 does. Mask out RX STBC if we don't support TX STBC and vice versa. Tested only with the nl80211 driver and a STBC incapable STA. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> (cherry picked from commit 36af1c7d31bdc5ba4dacacbf32d3c7585665ae2b)
-rw-r--r--src/ap/ieee802_11_ht.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 1b39a6a..b193ee0 100644
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -256,7 +256,15 @@ void hostapd_get_ht_capab(struct hostapd_data *hapd,
cap &= hapd->iconf->ht_capab;
cap |= (hapd->iconf->ht_capab & HT_CAP_INFO_SMPS_DISABLED);
- /* FIXME: Rx STBC needs to be handled specially */
- cap |= (hapd->iconf->ht_capab & HT_CAP_INFO_RX_STBC_MASK);
+ /*
+ * STBC needs to be handled specially
+ * if we don't support RX STBC, mask out TX STBC in the STA's HT caps
+ * if we don't support TX STBC, mask out RX STBC in the STA's HT caps
+ */
+ if (!(hapd->iconf->ht_capab & HT_CAP_INFO_RX_STBC_MASK))
+ cap &= ~HT_CAP_INFO_TX_STBC;
+ if (!(hapd->iconf->ht_capab & HT_CAP_INFO_TX_STBC))
+ cap &= ~HT_CAP_INFO_RX_STBC_MASK;
+
neg_ht_cap->ht_capabilities_info = host_to_le16(cap);
}