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/iwl3945-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/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 8 |
1 files changed, 6 insertions, 2 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 | ||