hi Michal, On Tue, Jun 26, 2012 at 3:37 PM, Michal Kazior <michal.kazior@xxxxxxxxx> wrote: > From: Kazior Michal <Michal.Kazior@xxxxxxxxx> > > Split functionality for further reuse. > > Will prevent code duplication when channel context > channel_type merging is introduced. > > Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx> > --- [...] > +static bool > +ieee80211_channel_types_are_compatible(enum nl80211_channel_type chantype1, > + enum nl80211_channel_type chantype2, > + enum nl80211_channel_type *compat) > +{ > + switch (chantype1) { > case NL80211_CHAN_NO_HT: > case NL80211_CHAN_HT20: > /* > * allow any change that doesn't go to no-HT > * (if it already is no-HT no change is needed) > */ > - if (chantype == NL80211_CHAN_NO_HT) > + if (chantype2 == NL80211_CHAN_NO_HT) > break; > - superchan = chantype; > + *compat = chantype2; > break; > case NL80211_CHAN_HT40PLUS: > case NL80211_CHAN_HT40MINUS: > + *compat = chantype1; this should be outside of switch, as it applies to the first cases as well (chantype1=ht20, chantype2=no_ht will return the original *compat value (no_ht) instead of ht20). Eliad. -- 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