On Tue, Sep 11, 2012 at 4:52 AM, Vladimir Kondratiev <qca_vkondrat@xxxxxxxxxxxxxxxx> wrote: > Remove freq_in_rule_band, that was used to optimize regulatory rules check. > Approach used in the freq_in_rule_band is incorrect for 60GHz band, > where channel spacing is 2.160GHz. > Also, it does not really add any optimization, since real check for frequency fit is > always performed. > > Issue exposed in the following way: 60g band defines 3 channels supported wold-wide: > channels 1..3 or 58320, 60480, 62640 MHz, and channel 4, or 64800 MHz, > in the most of the world, with 2160 MHz spacing. > Corresponded regulatory rule for channels 1..3 would be > (57240 - 63720 @ 2160) > > And, when regulatory applies to the channel 2 (60480), it get disabled since it is > more then 2GHz from either frequency boundary and freq_in_rule_band fails > > Signed-off-by: Vladimir Kondratiev <qca_vkondrat@xxxxxxxxxxxxxxxx> NACK - please check the usage of -ERANGE returned here for its users. It turns out that Country IEs are allowed to be sent by APs whereby specific bands are not specified even though those bands are allowed in that country, and although the device supports them. In such cases without a band check like this if a country IE is issued with say only 2.4 GHz rules we'd end up disabling all 5 GHz and 60 GHz rules. What the check does then is if we get an country IE we ensure that before we disable channels on a band we ensure that the country IE has at least one channel on the band. Otherwise we leave that band alone. With your patch we'd break previous behavior where an AP may send a country IE only for 2.4 GHz and force us to disable all of our 5 GHz channels. We don't want that. Luis -- 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