From: bruno randolf <bruno@thinktube.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: ath5k-devel@lists.ath5k.org, mcgrof@gmail.com,
jirislaby@gmail.com, mickflemm@gmail.com,
linux-wireless@vger.kernel.org, linville@tuxdriver.com,
flamingice@sourmilk.net, jbenc@suse.cz
Subject: Re: [PATCH 2/2] mac80211: make rx radiotap header more flexible
Date: Tue, 29 Apr 2008 20:10:21 +0200 [thread overview]
Message-ID: <200804292010.21367.bruno@thinktube.com> (raw)
In-Reply-To: <1209243111.10943.61.camel@johannes.berg>
On Saturday 26 April 2008 22:51:50 Johannes Berg wrote:
> > +static void
> > +ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
> > + struct sk_buff *skb,
> > + struct ieee80211_rx_status *status,
> > + struct ieee80211_rate *rate,
> > + int rtap_len)
> > +{
> > + struct ieee80211_radiotap_header *rthdr;
> > + unsigned char *pos;
> > +
> > + rthdr = (struct ieee80211_radiotap_header *)skb_push(skb, rtap_len);
> > + memset(rthdr, 0, rtap_len);
> > +
> > + /* radiotap header, set always present flags */
> > + rthdr->it_present =
> > + cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) |
> > + (1 << IEEE80211_RADIOTAP_RATE) |
> > + (1 << IEEE80211_RADIOTAP_CHANNEL) |
> > + (1 << IEEE80211_RADIOTAP_ANTENNA) |
> > + (1 << IEEE80211_RADIOTAP_RX_FLAGS));
>
> Is all this alignment-safe now? Not sure it was before but it'd be nice
> if we could fix it up.
>
> Radiotap explicitly allows you to have a longer length than you need so
> maybe we should just make sure to align things?
are you talking about the alignment of the radiotap header itself? no, i just
took care about the alignment requirements of the radiotap fields, relative
to the start of radiotap. but it would be easy to add some additional length
in ieee80211_rx_radiotap_len() and just leave that empty at the end.
i think i don't understand all alignment requirements though...
bruno
next prev parent reply other threads:[~2008-04-29 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 4:25 [PATCH 1/2] mac80211: use hardware flags for signal/noise units Bruno Randolf
2008-04-07 4:25 ` [PATCH 2/2] mac80211: make rx radiotap header more flexible Bruno Randolf
2008-04-26 20:51 ` Johannes Berg
2008-04-29 18:10 ` bruno randolf [this message]
2008-04-30 14:12 ` Johannes Berg
2008-05-07 10:39 ` bruno randolf
2008-04-21 16:41 ` [PATCH 1/2] mac80211: use hardware flags for signal/noise units bruno randolf
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=200804292010.21367.bruno@thinktube.com \
--to=bruno@thinktube.com \
--cc=ath5k-devel@lists.ath5k.org \
--cc=flamingice@sourmilk.net \
--cc=jbenc@suse.cz \
--cc=jirislaby@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@gmail.com \
--cc=mickflemm@gmail.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;
as well as URLs for NNTP newsgroup(s).