Search Linux Wireless

Re: [RFC-PATCH] mac80211: add helpers for frame control tests

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

 



> > > Ahhh, I see what you are getting at now, how about ieee80211_stype_mask?
> > > 
> > > That makes the & a little clearer and has better semantic meaning.
> > > 
> > > The other option is still to call it stype_mask, but change it to
> > > return a __le16....so tests against != 0 still work and really
> > > is just a wrapper around the byteswap of the constant and the &.
> > 
> > Hmm. I'm not sure, how is all this really used? It seems you want
> > 
> > ieee80211_has_qos_stype(hdr)
> > and
> > 
> > ieee80211_has_stype(hdr, stype)
> > 
> > instead, no?
> 
> Just the latter I think.  But I'll do a few patches to see how it looks
> first.  If there end up being a few common ones (like qos) a few
> short-hand versions might be appropriate, I'll see how it goes.

Yeah but I was thinking of ieee80211_stype_is() or whatever you want to
call it (I think I actually like it that way around better than
is_stype/ftype) to check the exact match of the four bits, i.e. 
	fc & stypemask == argument

and the QoS one check that the bit is set.

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