diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 3 | ||||
-rw-r--r-- | include/linux/ieee80211.h | 2 | ||||
-rw-r--r-- | net/mac80211/ht.c | 25 |
3 files changed, 24 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 6bf6c0f12f35..27bf887f1453 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -2080,8 +2080,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
2080 | IEEE80211_HT_CAP_SGI_20 | | 2080 | IEEE80211_HT_CAP_SGI_20 | |
2081 | IEEE80211_HT_CAP_SGI_40 | | 2081 | IEEE80211_HT_CAP_SGI_40 | |
2082 | IEEE80211_HT_CAP_TX_STBC | | 2082 | IEEE80211_HT_CAP_TX_STBC | |
2083 | IEEE80211_HT_CAP_RX_STBC | | 2083 | IEEE80211_HT_CAP_RX_STBC; |
2084 | IEEE80211_HT_CAP_PSMP_SUPPORT; | ||
2085 | spec->ht.ampdu_factor = 3; | 2084 | spec->ht.ampdu_factor = 3; |
2086 | spec->ht.ampdu_density = 4; | 2085 | spec->ht.ampdu_density = 4; |
2087 | spec->ht.mcs.tx_params = | 2086 | spec->ht.mcs.tx_params = |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index d9724a28c0c2..163c840437d6 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -832,7 +832,7 @@ struct ieee80211_ht_cap { | |||
832 | #define IEEE80211_HT_CAP_DELAY_BA 0x0400 | 832 | #define IEEE80211_HT_CAP_DELAY_BA 0x0400 |
833 | #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 | 833 | #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 |
834 | #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 | 834 | #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 |
835 | #define IEEE80211_HT_CAP_PSMP_SUPPORT 0x2000 | 835 | #define IEEE80211_HT_CAP_RESERVED 0x2000 |
836 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 | 836 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 |
837 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 | 837 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 |
838 | 838 | ||
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 3787455fb696..d7dcee680728 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -34,9 +34,28 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband, | |||
34 | 34 | ||
35 | ht_cap->ht_supported = true; | 35 | ht_cap->ht_supported = true; |
36 | 36 | ||
37 | ht_cap->cap = le16_to_cpu(ht_cap_ie->cap_info) & sband->ht_cap.cap; | 37 | /* |
38 | ht_cap->cap &= ~IEEE80211_HT_CAP_SM_PS; | 38 | * The bits listed in this expression should be |
39 | ht_cap->cap |= sband->ht_cap.cap & IEEE80211_HT_CAP_SM_PS; | 39 | * the same for the peer and us, if the station |
40 | * advertises more then we can't use those thus | ||
41 | * we mask them out. | ||
42 | */ | ||
43 | ht_cap->cap = le16_to_cpu(ht_cap_ie->cap_info) & | ||
44 | (sband->ht_cap.cap | | ||
45 | ~(IEEE80211_HT_CAP_LDPC_CODING | | ||
46 | IEEE80211_HT_CAP_SUP_WIDTH_20_40 | | ||
47 | IEEE80211_HT_CAP_GRN_FLD | | ||
48 | IEEE80211_HT_CAP_SGI_20 | | ||
49 | IEEE80211_HT_CAP_SGI_40 | | ||
50 | IEEE80211_HT_CAP_DSSSCCK40)); | ||
51 | /* | ||
52 | * The STBC bits are asymmetric -- if we don't have | ||
53 | * TX then mask out the peer's RX and vice versa. | ||
54 | */ | ||
55 | if (!(sband->ht_cap.cap & IEEE80211_HT_CAP_TX_STBC)) | ||
56 | ht_cap->cap &= ~IEEE80211_HT_CAP_RX_STBC; | ||
57 | if (!(sband->ht_cap.cap & IEEE80211_HT_CAP_RX_STBC)) | ||
58 | ht_cap->cap &= ~IEEE80211_HT_CAP_TX_STBC; | ||
40 | 59 | ||
41 | ampdu_info = ht_cap_ie->ampdu_params_info; | 60 | ampdu_info = ht_cap_ie->ampdu_params_info; |
42 | ht_cap->ampdu_factor = | 61 | ht_cap->ampdu_factor = |