aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11_ht.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2011-06-23 17:18:21 (GMT)
committerJouni Malinen <j@w1.fi>2011-06-23 17:18:21 (GMT)
commitd4744189b7647a0ac3312fab8d1a3abce51cb80d (patch)
tree7d920492e13a377705dea2d8fde8b700d91f23e7 /src/ap/ieee802_11_ht.c
parent62b98282ba53184abeb90eaf5633ed583bd206aa (diff)
downloadhostap-d4744189b7647a0ac3312fab8d1a3abce51cb80d.zip
hostap-d4744189b7647a0ac3312fab8d1a3abce51cb80d.tar.gz
hostap-d4744189b7647a0ac3312fab8d1a3abce51cb80d.tar.bz2
hostapd: Don't mask out non-symmetric STA HT caps
Previously hostapd just masked the STAs HT caps with its own. However, some HT caps are not symmetric and as such need to be handled different. hostapd shouldn't overwrite the STAs SMPS mode as otherwise the driver cannot know it has to use RTS/CTS to wake the receiver from dynamic SMPS for MCS rates > 7. hostapd shouldn't mask the RX and TX STBC caps with it's own. They are already handled in a special case below. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Diffstat (limited to 'src/ap/ieee802_11_ht.c')
-rw-r--r--src/ap/ieee802_11_ht.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 3dce5cb..6c3696f 100644
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -250,8 +250,14 @@ void hostapd_get_ht_capab(struct hostapd_data *hapd,
return;
os_memcpy(neg_ht_cap, ht_cap, sizeof(*neg_ht_cap));
cap = le_to_host16(neg_ht_cap->ht_capabilities_info);
- cap &= hapd->iconf->ht_capab;
- cap |= (hapd->iconf->ht_capab & HT_CAP_INFO_SMPS_DISABLED);
+
+ /*
+ * Mask out HT features we don't support, but don't overwrite
+ * non-symmetric features like STBC and SMPS. Just because
+ * we're not in dynamic SMPS mode the STA might still be.
+ */
+ cap &= (hapd->iconf->ht_capab | HT_CAP_INFO_RX_STBC_MASK |
+ HT_CAP_INFO_TX_STBC | HT_CAP_INFO_SMPS_MASK);
/*
* STBC needs to be handled specially