diff options
author | John W. Linville <linville@tuxdriver.com> | 2008-03-25 15:58:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-27 15:51:21 -0400 |
commit | e0e0a67e44ce13e34f553b6ab6377560fa9813f1 (patch) | |
tree | 7981d2a91c0f1ed5208288cd728a2a670e4ceb45 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | be892471c42f70e47541e42b8dba7ff91cebd026 (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.c | 8 |
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 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) priv->bands[IEEE80211_BAND_2GHZ].n_channels, priv->bands[IEEE80211_BAND_5GHZ].n_channels); - priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->bands[IEEE80211_BAND_2GHZ]; - priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->bands[IEEE80211_BAND_5GHZ]; + if (priv->bands[IEEE80211_BAND_2GHZ].n_channels) + priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = + &priv->bands[IEEE80211_BAND_2GHZ]; + if (priv->bands[IEEE80211_BAND_5GHZ].n_channels) + priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = + &priv->bands[IEEE80211_BAND_5GHZ]; set_bit(STATUS_GEO_CONFIGURED, &priv->status); |