On Fri, 2008-05-16 at 14:57 -0700, Harvey Harrison wrote: > On Fri, 2008-05-16 at 23:12 +0200, Johannes Berg wrote: > > > > > +static inline int ieee80211_fctl_has_a4(struct ieee80211_hdr *hdr) > > > > > > > > That seems fine too. > > > > > > > > > +static inline int ieee80211_ftype(struct ieee80211_hdr *hdr, u16 ftype) > > > > > > > > That, I think, is misnamed, it should be ieee80211_is_ftype() > > > > > > Well, I didn't expect this to be used directly that much, hence the > > > following three helpers...ftype_mgmt/ctl/data > > > > Right. Still, I think it should be named with _is_ in there. > > Yes, I agree with you, that's what I meant to write. Actually, maybe it should be "has" and not "is" since it's being passed a frame that can *have* a given frame type, and is a frame of a given type. Dunno. > 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? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part