Skip to content

Commit

Permalink
mac80211: fix ecw2cw brain-damage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Feb 29, 2008
1 parent 3e82a82 commit ac2bf32
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions net/mac80211/ieee80211_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ac2bf32

Please sign in to comment.