diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-05-08 21:36:20 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-16 12:46:33 -0400 |
commit | 2615f3759b7b7d47a2fa894bc9f45286bdf122d7 (patch) | |
tree | 2533e28f347651fc8f551e3747110e4d3c40b7b8 /net/wireless/util.c | |
parent | 4472037be86a9d7d1cab37e0c4cb310997a140ae (diff) | |
download | kernel_goldelico_gta04-2615f3759b7b7d47a2fa894bc9f45286bdf122d7.zip kernel_goldelico_gta04-2615f3759b7b7d47a2fa894bc9f45286bdf122d7.tar.gz kernel_goldelico_gta04-2615f3759b7b7d47a2fa894bc9f45286bdf122d7.tar.bz2 |
cfg80211: add warning when calculating MCS rates >= 32
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@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 6cba001..177df03 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -880,7 +880,7 @@ u16 cfg80211_calculate_bitrate(struct rate_info *rate) 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; |