diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-02-13 18:30:35 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:10 -0500 |
commit | ac2bf3242e1a329543be50b5c9df4f0119ee188c (patch) | |
tree | c1be7bd7ea7aa665fab71e5b6a9315064f0cfc0d /net/mac80211/ieee80211_sta.c | |
parent | 3e82a822c7c8ea5477062ec8885d7b90696fe73f (diff) |
mac80211: fix ecw2cw brain-damage
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>
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 11f2ee6b2269..a465e38c7252 100644 --- 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, | |||
227 | 227 | ||
228 | static int ecw2cw(int ecw) | 228 | static int ecw2cw(int ecw) |
229 | { | 229 | { |
230 | int cw = 1; | 230 | return (1 << ecw) - 1; |
231 | while (ecw > 0) { | ||
232 | cw <<= 1; | ||
233 | ecw--; | ||
234 | } | ||
235 | return cw - 1; | ||
236 | } | 231 | } |
237 | 232 | ||
238 | static void ieee80211_sta_wmm_params(struct net_device *dev, | 233 | static void ieee80211_sta_wmm_params(struct net_device *dev, |