On Tue, Dec 28, 2010 at 9:53 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > On Tue, 2010-12-28 at 10:51 +0100, Johannes Berg wrote: > >> > ieee80211_dsss_chan_to_freq - atmel, airo, wl3501_cs, orinoco, rndis_wlan >> > ieee80211_freq_to_dsss_chan - atmel, airo, orinoco, zd1201 >> > >> > Anyhow i guess it would make sense to have a common channel to frequency >> > mapping function for mac80211 and other wireless drivers? The problem is now >> > we have to use enum ieee80211_band which is defined cfg80211.h... > > Interestingly, I just noticed that the above ones also have different > semantics -- they try to round to the nearest channel rather than > returning an error if the center frequency isn't exact. I suspect I introduced these functions while refactoring orinoco (well before the cfg80211 conversion). If I recall correctly, there was no specific reason for the round to nearest behaviour - it just seemed more appropriate than rounding down the frequencies. So if it helps, I don't see why we shouldn't modify the behaviour of the ieee80211 functions where necessary. Dave. -- 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