The issue with the code in the reverted 8eca1fb692cc commit (and the previous unmodified implementation as well) was that we checked if a channel of some particular bandwidth (i.e. 5 or formerly 20 MHz) will be within some regulatory rule range -- if it was, we then blindly set IEEE80211_CHAN_NO_* flags according to the maximum bandwidth allowed, not according to the fact if such a channel would be within the regulatory rule range. Example demonstrating behaviour of the reverted patch: At first we checked if Channel 12 (BW set to 5 MHz) is usable in US -- it is. Then we continued setting flags -- because the maximum allowed bandwidth for the band 2402--2472 is 40 MHz, we allowed 20 MHz operation which is completely wrong since "2467 MHz" (Channel 12) + "10 MHz" (1/2 of the BW) is no more within the allowed 2402--2472. Rostislav Lisovy (1): Try explicitly bandwidths 5--160 MHz when checking usable channels. include/net/cfg80211.h | 8 +- net/wireless/reg.c | 202 +++++++++++++++++++++++++++++++------------------ 2 files changed, 137 insertions(+), 73 deletions(-) -- 2.0.0.rc4 -- 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