Root/package/hostapd/patches/420-stbc_fix_backport.patch

1From: Helmut Schaa <helmut.schaa@googlemail.com>
2Date: Sat, 28 Aug 2010 09:25:44 +0000 (+0300)
3Subject: hostapd: enable STBC only for STBC capable STAs
4X-Git-Url: http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=36af1c7d31bdc5ba4dacacbf32d3c7585665ae2b
5
6hostapd: enable STBC only for STBC capable STAs
7
8hostapd simply used its own STBC configuration in the STA's HT caps. This
9resulted in TX STBC being used for STAs not supporting RX STBC, which in
10turn resulted in the STA not receiving anything.
11
12Fix this by handling the STBC flags in the same way mac80211 does. Mask
13out RX STBC if we don't support TX STBC and vice versa.
14
15Tested only with the nl80211 driver and a STBC incapable STA.
16
17Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
18---
19
20--- a/src/ap/ieee802_11_ht.c
21+++ b/src/ap/ieee802_11_ht.c
22@@ -256,7 +256,15 @@ void hostapd_get_ht_capab(struct hostapd
23     cap &= hapd->iconf->ht_capab;
24     cap |= (hapd->iconf->ht_capab & HT_CAP_INFO_SMPS_DISABLED);
25 
26- /* FIXME: Rx STBC needs to be handled specially */
27- cap |= (hapd->iconf->ht_capab & HT_CAP_INFO_RX_STBC_MASK);
28+ /*
29+ * STBC needs to be handled specially
30+ * if we don't support RX STBC, mask out TX STBC in the STA's HT caps
31+ * if we don't support TX STBC, mask out RX STBC in the STA's HT caps
32+ */
33+ if (!(hapd->iconf->ht_capab & HT_CAP_INFO_RX_STBC_MASK))
34+ cap &= ~HT_CAP_INFO_TX_STBC;
35+ if (!(hapd->iconf->ht_capab & HT_CAP_INFO_TX_STBC))
36+ cap &= ~HT_CAP_INFO_RX_STBC_MASK;
37+
38     neg_ht_cap->ht_capabilities_info = host_to_le16(cap);
39 }
40

Archive Download this file



interactive