aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-04-04 04:41:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-08 16:44:43 -0400
commit182e2e66ca56f750845f5314708434c286edd6e4 (patch)
tree4f61bcf21b4a57568564f6a71681fef8a20dafa1
parent41a7be4858b886f83522e62d409263fcdb82653b (diff)
iwlwifi: honour regulatory restrictions in scan code
When doing firmware-assisted scanning, iwlwifi drivers do not honour the regulatory control code that might disable channels that are enabled in the EEPROM, for example when the user is visiting another country and adjusted the regulatory domain accordingly. This patch fixes that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index d4daa04465a3..5e51cfcda39f 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4965,6 +4965,9 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv,
4965 passive_dwell = iwl3945_get_passive_dwell_time(priv, band); 4965 passive_dwell = iwl3945_get_passive_dwell_time(priv, band);
4966 4966
4967 for (i = 0, added = 0; i < sband->n_channels; i++) { 4967 for (i = 0, added = 0; i < sband->n_channels; i++) {
4968 if (channels[i].flags & IEEE80211_CHAN_DISABLED)
4969 continue;
4970
4968 if (channels[i].hw_value == 4971 if (channels[i].hw_value ==
4969 le16_to_cpu(priv->active_rxon.channel)) { 4972 le16_to_cpu(priv->active_rxon.channel)) {
4970 if (iwl3945_is_associated(priv)) { 4973 if (iwl3945_is_associated(priv)) {
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 4517e4ce3a25..b043871d53f1 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -4794,6 +4794,9 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
4794 passive_dwell = iwl4965_get_passive_dwell_time(priv, band); 4794 passive_dwell = iwl4965_get_passive_dwell_time(priv, band);
4795 4795
4796 for (i = 0, added = 0; i < sband->n_channels; i++) { 4796 for (i = 0, added = 0; i < sband->n_channels; i++) {
4797 if (channels[i].flags & IEEE80211_CHAN_DISABLED)
4798 continue;
4799
4797 if (ieee80211_frequency_to_channel(channels[i].center_freq) == 4800 if (ieee80211_frequency_to_channel(channels[i].center_freq) ==
4798 le16_to_cpu(priv->active_rxon.channel)) { 4801 le16_to_cpu(priv->active_rxon.channel)) {
4799 if (iwl_is_associated(priv)) { 4802 if (iwl_is_associated(priv)) {