From: Johannes Berg <johannes.berg@xxxxxxxxx> cfg80211_calculate_bitrate() doesn't work for MCS rates 32 or higher, and it has always returned 0 in that case. Warn if it ever really happens. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- net/wireless/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/wireless/util.c 2012-05-08 21:33:50.000000000 +0200 +++ b/net/wireless/util.c 2012-05-08 21:33:54.000000000 +0200 @@ -879,7 +879,7 @@ u16 cfg80211_calculate_bitrate(struct ra return rate->legacy; /* the formula below does only work for MCS values smaller than 32 */ - if (rate->mcs >= 32) + if (WARN_ON_ONCE(rate->mcs >= 32)) return 0; modulation = rate->mcs & 7; -- 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