diff options
-rw-r--r-- | include/net/mac80211.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 9ff10b33b711..bc5d8184c489 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -601,8 +601,8 @@ static inline void ieee80211_rate_set_vht(struct ieee80211_tx_rate *rate, | |||
601 | u8 mcs, u8 nss) | 601 | u8 mcs, u8 nss) |
602 | { | 602 | { |
603 | WARN_ON(mcs & ~0xF); | 603 | WARN_ON(mcs & ~0xF); |
604 | WARN_ON(nss & ~0x7); | 604 | WARN_ON((nss - 1) & ~0x7); |
605 | rate->idx = (nss << 4) | mcs; | 605 | rate->idx = ((nss - 1) << 4) | mcs; |
606 | } | 606 | } |
607 | 607 | ||
608 | static inline u8 | 608 | static inline u8 |
@@ -614,7 +614,7 @@ ieee80211_rate_get_vht_mcs(const struct ieee80211_tx_rate *rate) | |||
614 | static inline u8 | 614 | static inline u8 |
615 | ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *rate) | 615 | ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *rate) |
616 | { | 616 | { |
617 | return rate->idx >> 4; | 617 | return (rate->idx >> 4) + 1; |
618 | } | 618 | } |
619 | 619 | ||
620 | /** | 620 | /** |