提交 ac2bf324 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: fix ecw2cw brain-damage

This brain-damaged code just bothers me, fix it.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 3e82a822
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册