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>
This commit is contained in:
Johannes Berg 2008-02-14 00:30:35 +01:00 committed by John W. Linville
parent 3e82a822c7
commit ac2bf3242e
1 changed files with 1 additions and 6 deletions

View File

@ -227,12 +227,7 @@ static void ieee802_11_parse_elems(u8 *start, size_t len,
static int ecw2cw(int ecw) static int ecw2cw(int ecw)
{ {
int cw = 1; return (1 << ecw) - 1;
while (ecw > 0) {
cw <<= 1;
ecw--;
}
return cw - 1;
} }
static void ieee80211_sta_wmm_params(struct net_device *dev, static void ieee80211_sta_wmm_params(struct net_device *dev,