All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Tomas Winkler <tomasw@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 3/7] mac80211: add utility function to get header length
Date: Mon, 09 Jun 2008 09:24:20 -0700	[thread overview]
Message-ID: <1213028660.5974.9.camel@brick> (raw)
In-Reply-To: <1ba2fa240806090301h2a1a3350x606cfe1d83be066a@mail.gmail.com>

On Mon, 2008-06-09 at 13:01 +0300, Tomas Winkler wrote:
> On Mon, Jun 9, 2008 at 12:16 PM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> >
> >>  /**
> >> + * ieee80211_hdrlen - get header length in bytes from frame control
> >> + * @fc: frame control field in little-endian format
> >> + */
> >> +unsigned int ieee80211_hdrlen(__le16 fc);
> >> +
> >
> >> +EXPORT_SYMBOL(ieee80211_hdrlen);
> >
> > Do we really need to export that?
> 
> so now we have hdrlen(u16) and hdrlen(__le16)  it will be fun.
> 
> So I guess will we converting idioms
> u16 fc = le16_to_cpu(hdr->frame_control);
> int hdr_len = ieee80211_get_hdrlen(fc);
> to
> int hdr_len = ieee80211_hdrlen(hdr->frame_control)
> 
> This is how it used in driver code so it make sense to export this
> function and remove ieee80211_get_hdrlen(fc)

Yes, that was my thinking, I just did it this way to avoid the flag day
change, I'll trickle the changes in and then remove _get_hdrlen.

> 
> Since all fc operations are bitwise 'and' and 'or'
> u16 rx->fc can be dropped in future as well

I was going to convert it to a __le16, but if it is just a copy of the
->frame_control in the header, I'll look at removing it instead.

Cheers,

Harvey


  reply	other threads:[~2008-06-09 16:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06 17:51 [PATCH 3/7] mac80211: add utility function to get header length Harvey Harrison
2008-06-09  9:16 ` Johannes Berg
2008-06-09 10:01   ` Tomas Winkler
2008-06-09 16:24     ` Harvey Harrison [this message]
2008-06-09 17:24       ` Johannes Berg
2008-06-09 17:33         ` Harvey Harrison

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=1213028660.5974.9.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tomasw@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.