Search Linux Wireless

Re: [PATCH 07/13] o11s: support for mesh interfaces in mac80211 data path

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

 



On Thu, 2008-02-07 at 01:53 +0100, Johannes Berg wrote:
> > +	if (rx->sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) {
> > +		if ((rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) {
> > +			if (!((rx->fc & IEEE80211_FCTL_FROMDS) &&
> > +					(rx->fc & IEEE80211_FCTL_TODS)))
> 
> It'd be shorter to write
> 
> 	if (rx->fc ^ (IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS))
> 
> but I'm not sure that's easier to understand ;)

Would that work? For data frames rx->fc is 0xYY08 (with YY being the
flags, including fromDS/toDS), so they would always evaluate to true in
that if, regardless of the flags.

-- 
Luis Carlos Cobo Rus       GnuPG ID: 44019B60
cozybit Inc.


-
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