From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix ecw2cw brain-damage
Date: Thu, 14 Feb 2008 00:30:35 +0100 [thread overview]
Message-ID: <1202945435.8931.102.camel@johannes.berg> (raw)
This brain-damaged code just bothers me, fix it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/ieee80211_sta.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--- everything.orig/net/mac80211/ieee80211_sta.c 2008-02-14 00:23:04.447865289 +0100
+++ everything/net/mac80211/ieee80211_sta.c 2008-02-14 00:24:11.977817546 +0100
@@ -227,12 +227,7 @@ static void ieee802_11_parse_elems(u8 *s
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,
reply other threads:[~2008-02-14 14:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202945435.8931.102.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox