From: Johannes Berg <johannes@sipsolutions.net>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: John Linville <linville@tuxdriver.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] mac80211: simplify code in util.c
Date: Mon, 21 Apr 2008 10:19:09 +0200 [thread overview]
Message-ID: <1208765949.26186.28.camel@johannes.berg> (raw)
In-Reply-To: <1208745396.7941.14.camel@brick> (sfid-20080421_033628_732417_67302C89)
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
On Sun, 2008-04-20 at 19:36 -0700, Harvey Harrison wrote:
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS))
> - hdrlen = 30; /* Addr4 */
> + hdrlen += ETH_ALEN; /* Addr4 */
> /*
> * The QoS Control field is two bytes and its presence is
> - * indicated by the IEEE80211_STYPE_QOS_DATA bit. Add 2 to
> - * hdrlen if that bit is set.
> - * This works by masking out the bit and shifting it to
> - * bit position 1 so the result has the value 0 or 2.
> + * indicated by the IEEE80211_STYPE_QOS_DATA bit.
> */
> - hdrlen += (fc & IEEE80211_STYPE_QOS_DATA)
> - >> (ilog2(IEEE80211_STYPE_QOS_DATA)-1);
> + if (fc & IEEE80211_STYPE_QOS_DATA)
> + hdrlen += 2;
Have you checked the generated code? Last time I checked it was better
with what we had there.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2008-04-21 8:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 2:36 [PATCH] mac80211: simplify code in util.c Harvey Harrison
2008-04-21 5:24 ` Zhu Yi
2008-04-21 5:50 ` Harvey Harrison
2008-04-21 8:19 ` Johannes Berg [this message]
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=1208765949.26186.28.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=harvey.harrison@gmail.com \
--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