提交 182e2e66 编写于 作者: J Johannes Berg 提交者: John W. Linville

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: NJohannes Berg <johannes@sipsolutions.net>
Acked-by: NReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 41a7be48
...@@ -4965,6 +4965,9 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv, ...@@ -4965,6 +4965,9 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv,
passive_dwell = iwl3945_get_passive_dwell_time(priv, band); passive_dwell = iwl3945_get_passive_dwell_time(priv, band);
for (i = 0, added = 0; i < sband->n_channels; i++) { for (i = 0, added = 0; i < sband->n_channels; i++) {
if (channels[i].flags & IEEE80211_CHAN_DISABLED)
continue;
if (channels[i].hw_value == if (channels[i].hw_value ==
le16_to_cpu(priv->active_rxon.channel)) { le16_to_cpu(priv->active_rxon.channel)) {
if (iwl3945_is_associated(priv)) { if (iwl3945_is_associated(priv)) {
......
...@@ -4794,6 +4794,9 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv, ...@@ -4794,6 +4794,9 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
passive_dwell = iwl4965_get_passive_dwell_time(priv, band); passive_dwell = iwl4965_get_passive_dwell_time(priv, band);
for (i = 0, added = 0; i < sband->n_channels; i++) { for (i = 0, added = 0; i < sband->n_channels; i++) {
if (channels[i].flags & IEEE80211_CHAN_DISABLED)
continue;
if (ieee80211_frequency_to_channel(channels[i].center_freq) == if (ieee80211_frequency_to_channel(channels[i].center_freq) ==
le16_to_cpu(priv->active_rxon.channel)) { le16_to_cpu(priv->active_rxon.channel)) {
if (iwl_is_associated(priv)) { if (iwl_is_associated(priv)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册