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]

 



> > +static inline int ieee80211_stype(struct ieee80211_hdr *hdr, u16 stype)
> > +{
> > +	return (hdr->frame_control & cpu_to_le16(stype)) != 0;
> > +}
> 
> And that even seems implemented wrongly? stype is a 4-bit field, this
> doesn't make much sense to me.

Now, before you get any ideas, this code


-       a4_included = (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
-               (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS);
-       if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA &&
-           fc & IEEE80211_STYPE_QOS_DATA) {

is still correct. You really want to read the frame type bit assignments
in 802.11-2007 :)

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