On Fri, 2010-09-17 at 18:31 +0530, Mohammed Shafi Shajakhan wrote: > +static inline int center_freq_to_channel(struct ath_wiphy *aphy) > +{ > + struct ieee80211_channel *chan = aphy->hw->conf.channel ; > + > + if (chan->center_freq == 2484) { > + return 14; > + } > + > + if (chan->center_freq < 2484) { > + return (chan->center_freq -2407) / 5; > + } > + > + return (chan->center_freq - 5000) / 5; This function already exists elsewhere in the kernel. johannes -- 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