Search Linux Wireless

Re: [PATCH 3/7] mac80211: add utility function to get header length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2008-06-09 at 13:01 +0300, Tomas Winkler wrote:
> On Mon, Jun 9, 2008 at 12:16 PM, Johannes Berg
> <johannes@xxxxxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux