OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e82a82
)
mac80211: fix ecw2cw brain-damage
author
Johannes Berg
<johannes@sipsolutions.net>
Wed, 13 Feb 2008 23:30:35 +0000
(
00:30
+0100)
committer
John W. Linville
<linville@tuxdriver.com>
Fri, 29 Feb 2008 20:37:10 +0000
(15:37 -0500)
This brain-damaged code just bothers me, fix it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_sta.c
patch
|
blob
|
history
diff --git
a/net/mac80211/ieee80211_sta.c
b/net/mac80211/ieee80211_sta.c
index
11f2ee6
..
a465e38
100644
(file)
--- a/
net/mac80211/ieee80211_sta.c
+++ b/
net/mac80211/ieee80211_sta.c
@@
-227,12
+227,7
@@
static void ieee802_11_parse_elems(u8 *start, size_t len,
static int ecw2cw(int ecw)
{
- int cw = 1;
- while (ecw > 0) {
- cw <<= 1;
- ecw--;
- }
- return cw - 1;
+ return (1 << ecw) - 1;
}
static void ieee80211_sta_wmm_params(struct net_device *dev,