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: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_.

Harvey

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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