aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
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/iwl4965-base.c
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/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 44cfd027497..9ae3d2981df 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