projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4472037
)
cfg80211: add warning when calculating MCS rates >= 32
author
Johannes Berg
<johannes.berg@intel.com>
Tue, 8 May 2012 19:36:20 +0000
(21:36 +0200)
committer
John W. Linville
<linville@tuxdriver.com>
Wed, 16 May 2012 16:46:33 +0000
(12:46 -0400)
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>
net/wireless/util.c
patch
|
blob
|
history
diff --git
a/net/wireless/util.c
b/net/wireless/util.c
index 6cba00173a2f8b2b559a97e1be48a61790a0c679..177df03064cf8b018c3ef0e243dca6a693b1cf4c 100644
(file)
--- 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;