diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-08-31 16:16:32 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-08-31 16:16:32 +0000 |
commit | 80340ebdad2685ad2fae2990a2dc089a2cbd3449 (patch) | |
tree | e2c561c93edcd58afdc334b5020dcfa2675b35d2 | |
parent | 403d40afbe4a3b69782ee79e96850cd670db3441 (diff) | |
download | upstream-80340ebdad2685ad2fae2990a2dc089a2cbd3449.tar.gz upstream-80340ebdad2685ad2fae2990a2dc089a2cbd3449.tar.bz2 upstream-80340ebdad2685ad2fae2990a2dc089a2cbd3449.zip |
hostapd: backport a fix to check for STA STBC capabilities before setting them (fixes #7464)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22854 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/hostapd/patches/420-stbc_fix_backport.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/package/hostapd/patches/420-stbc_fix_backport.patch b/package/hostapd/patches/420-stbc_fix_backport.patch new file mode 100644 index 0000000000..e448a01fbe --- /dev/null +++ b/package/hostapd/patches/420-stbc_fix_backport.patch @@ -0,0 +1,41 @@ +From: Helmut Schaa <helmut.schaa@googlemail.com> +Date: Sat, 28 Aug 2010 09:25:44 +0000 (+0300) +Subject: hostapd: enable STBC only for STBC capable STAs +X-Git-Url: http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=36af1c7d31bdc5ba4dacacbf32d3c7585665ae2b + +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> +--- + +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); + } |