On Mon, Nov 9, 2009 at 10:37 AM, Bob Beers <bob.beers@xxxxxxxxx> wrote: > On Mon, Nov 9, 2009 at 1:24 PM, Luis R. Rodriguez > <lrodriguez@xxxxxxxxxxx> wrote: >> This will help debug an issue when the driver is passing up >> a bogus HT rate value. The rate must map to a valid MCS index >> which can be any of the values 0 - 76. >> >> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx> >> --- >> net/mac80211/rx.c | 18 +++++++++++++++--- >> 1 files changed, 15 insertions(+), 3 deletions(-) >> >> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c >> index 28316b2..5b26d34 100644 >> --- a/net/mac80211/rx.c >> +++ b/net/mac80211/rx.c >> @@ -2425,9 +2425,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), > > If 76 is valid value as indicated in comment above: 0-76, > shouldn't this be > > + status->rate_idx > 76), > > ?? Indeed, good catch. I'll fix it in a v2 patch. Luis -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html