Search Linux Wireless

Re: [PATCH 1/7] mac80211: add helpers for frame control testing

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

 



On Mon, 2008-06-09 at 09:31 -0700, Harvey Harrison wrote:
> On Mon, 2008-06-09 at 09:41 +0200, Johannes Berg wrote:
> > > +static inline int ieee80211_data_has_qos(__le16 fc)
> > > +{
> > > +	/*
> > > +	 * mask with QOS_DATA rather than IEEE80211_FCTL_STYPE as we just need
> > > +	 * to check the one bit
> > > +	 */
> > > +	return (fc &
> > > +	       cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_STYPE_QOS_DATA)) ==
> > > +	       cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA);
> > > +}
> > 
> > Shouldn't that rather be _is_qos_data?
> > 
> 
> I don't think so....I was trying to keep it so _is_ meant an exact comparison and
> _has_ was checking the presence of particular bits.
> 
> As this helper only checks for the one bit being set, I chose _has_.

Hmm. As far as I can tell, it checks that the frame is a QoS controlled
data frame. Hence, it explicitly checks that it _is_ a data frame and
_has_ the QoS bit, but in 802.11 lingo I think that means it _is_ a
"data+qos" frame.

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