]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
iwlegacy: simplify init geos
authorStanislaw Gruszka <sgruszka@redhat.com>
Thu, 28 Apr 2011 09:51:26 +0000 (11:51 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 29 Apr 2011 19:36:14 +0000 (15:36 -0400)
Don't need to use conditional as ch->band is already assigned to
IEEE80211_BAND_5GHZ or IEEE80211_BAND_2GHZ

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/iwl-core.c

index 2b08efb3b6586ec1a0869495272f943fae6ab277..82201aca8e9945e46733546215b5f36d5a821524 100644 (file)
@@ -211,10 +211,7 @@ int iwl_legacy_init_geos(struct iwl_priv *priv)
                if (!iwl_legacy_is_channel_valid(ch))
                        continue;
 
-               if (iwl_legacy_is_channel_a_band(ch))
-                       sband =  &priv->bands[IEEE80211_BAND_5GHZ];
-               else
-                       sband =  &priv->bands[IEEE80211_BAND_2GHZ];
+               sband = &priv->bands[ch->band];
 
                geo_ch = &sband->channels[sband->n_channels++];