aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2008-03-25 15:58:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-27 15:51:21 -0400
commite0e0a67e44ce13e34f553b6ab6377560fa9813f1 (patch)
tree7981d2a91c0f1ed5208288cd728a2a670e4ceb45 /drivers/net/wireless/iwlwifi
parentbe892471c42f70e47541e42b8dba7ff91cebd026 (diff)
iwlwifi: do not register bands with no supported channels
Otherwise, b/g-only devices fail in wiphy_register. Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 093b863ef904..4ba959153cb1 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -5136,8 +5136,12 @@ static int iwl3945_init_geos(struct iwl3945_priv *priv)
5136 priv->bands[IEEE80211_BAND_2GHZ].n_channels, 5136 priv->bands[IEEE80211_BAND_2GHZ].n_channels,
5137 priv->bands[IEEE80211_BAND_5GHZ].n_channels); 5137 priv->bands[IEEE80211_BAND_5GHZ].n_channels);
5138 5138
5139 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->bands[IEEE80211_BAND_2GHZ]; 5139 if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
5140 priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->bands[IEEE80211_BAND_5GHZ]; 5140 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
5141 &priv->bands[IEEE80211_BAND_2GHZ];
5142 if (priv->bands[IEEE80211_BAND_5GHZ].n_channels)
5143 priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
5144 &priv->bands[IEEE80211_BAND_5GHZ];
5141 5145
5142 set_bit(STATUS_GEO_CONFIGURED, &priv->status); 5146 set_bit(STATUS_GEO_CONFIGURED, &priv->status);
5143 5147
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 44cfd0274976..9ae3d2981df5 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -5001,8 +5001,12 @@ int iwl4965_init_geos(struct iwl_priv *priv)
5001 priv->bands[IEEE80211_BAND_2GHZ].n_channels, 5001 priv->bands[IEEE80211_BAND_2GHZ].n_channels,
5002 priv->bands[IEEE80211_BAND_5GHZ].n_channels); 5002 priv->bands[IEEE80211_BAND_5GHZ].n_channels);
5003 5003
5004 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->bands[IEEE80211_BAND_2GHZ]; 5004 if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
5005 priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->bands[IEEE80211_BAND_5GHZ]; 5005 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
5006 &priv->bands[IEEE80211_BAND_2GHZ];
5007 if (priv->bands[IEEE80211_BAND_5GHZ].n_channels)
5008 priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
5009 &priv->bands[IEEE80211_BAND_5GHZ];
5006 5010
5007 set_bit(STATUS_GEO_CONFIGURED, &priv->status); 5011 set_bit(STATUS_GEO_CONFIGURED, &priv->status);
5008 5012