Commit e0e0a67e authored by John W. Linville's avatar John W. Linville

iwlwifi: do not register bands with no supported channels

Otherwise, b/g-only devices fail in wiphy_register.
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent be892471
...@@ -5136,8 +5136,12 @@ static int iwl3945_init_geos(struct iwl3945_priv *priv) ...@@ -5136,8 +5136,12 @@ static int iwl3945_init_geos(struct iwl3945_priv *priv)
priv->bands[IEEE80211_BAND_2GHZ].n_channels, priv->bands[IEEE80211_BAND_2GHZ].n_channels,
priv->bands[IEEE80211_BAND_5GHZ].n_channels); priv->bands[IEEE80211_BAND_5GHZ].n_channels);
priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->bands[IEEE80211_BAND_2GHZ]; if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->bands[IEEE80211_BAND_5GHZ]; 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); set_bit(STATUS_GEO_CONFIGURED, &priv->status);
......
...@@ -5001,8 +5001,12 @@ int iwl4965_init_geos(struct iwl_priv *priv) ...@@ -5001,8 +5001,12 @@ int iwl4965_init_geos(struct iwl_priv *priv)
priv->bands[IEEE80211_BAND_2GHZ].n_channels, priv->bands[IEEE80211_BAND_2GHZ].n_channels,
priv->bands[IEEE80211_BAND_5GHZ].n_channels); priv->bands[IEEE80211_BAND_5GHZ].n_channels);
priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->bands[IEEE80211_BAND_2GHZ]; if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->bands[IEEE80211_BAND_5GHZ]; 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); set_bit(STATUS_GEO_CONFIGURED, &priv->status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment