From 97fbc72db8eef672777ff656c7f5489e5338c447 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Mon, 9 Nov 2009 16:03:22 -0500 Subject: [PATCH] --- yaml --- r: 171731 b: refs/heads/master c: e5d6eb8305a4c116fc94ce28b8136c538c92442f h: refs/heads/master i: 171729: eeb3bc00f4a6b09fda3bdfdd76c949588c813b24 171727: b94c2913eb686f6341bb452c002fc2b5c29f920e v: v3 --- [refs] | 2 +- trunk/net/mac80211/rx.c | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index da39ab3b1874..ecd20294f0e5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b34e620faa843d746400e324580e9a9efd457e4d +refs/heads/master: e5d6eb8305a4c116fc94ce28b8136c538c92442f diff --git a/trunk/net/mac80211/rx.c b/trunk/net/mac80211/rx.c index 76478362a538..006cf89df70b 100644 --- a/trunk/net/mac80211/rx.c +++ b/trunk/net/mac80211/rx.c @@ -2441,9 +2441,21 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) goto drop; if (status->flag & RX_FLAG_HT) { - /* rate_idx is MCS index */ - if (WARN_ON(status->rate_idx < 0 || - status->rate_idx >= 76)) + /* + * rate_idx is MCS index, which can be [0-76] as documented on: + * + * http://wireless.kernel.org/en/developers/Documentation/ieee80211/802.11n + * + * Anything else would be some sort of driver or hardware error. + * The driver should catch hardware errors. + */ + if (WARN((status->rate_idx < 0 || + status->rate_idx > 76), + "Rate marked as an HT rate but passed " + "status->rate_idx is not " + "an MCS index [0-76]: %d (0x%02x)\n", + status->rate_idx, + status->rate_idx)) goto drop; /* HT rates are not in the table - use the highest legacy rate * for now since other parts of mac80211 may not yet be fully