Search Linux Wireless

Re: [PATCH 2/7] mac80211: replace ieee80211_get_morefrag with ieee80211_has_morefrags

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

 



On Mon, 2008-06-09 at 09:29 -0700, Harvey Harrison wrote:
> On Mon, 2008-06-09 at 09:38 +0200, Johannes Berg wrote:
> > > -	if (ieee80211_get_morefrag(hdr))
> > > +	if (ieee80211_has_morefrags(hdr->frame_control))
> > 
> > looks fine to me, though I wonder if we should have
> > 
> > ieee80211_has_morefrags(struct 80211hdr)
> > and
> > __ieee80211_has_morefrags(__le16 fc)
> > 
> > or something with variants of the functions that do the ->frame_control?
> 
> I considered that, but thought it was a small benefit for doubling the
> number of helpers.
> 
> I chose the __le16 variant as there is some driver code that checks these
> values in driver-specific structures, so I just left it up to the caller
> to dereference whatever structure the frame control is held in.
> 
> But if both sets are wanted, I would suggest:
> 
> ieee80211_fc_has_morefrags(__le16 fc);
> 
> ieee80211_has_morefrags(struct ieee80211 *hdr)
> {
> 	return ieee80211_fc_has_morefrags(hdr->frame_control);
> }
> 
> Do you think I should add the struct helper(s)?

It looks like you'd be using them in many places, so don't you think it
would be helpful? I don't really care too much.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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