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