From: Stanislaw Gruszka Date: Thu, 28 Apr 2011 09:51:26 +0000 (+0200) Subject: iwlegacy: simplify init geos X-Git-Tag: upstream/snapshot3+hdmi~9986^2~16^2~221 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e41de85f8e3419257df62dd6fe6bdd95a1fdcab;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git iwlegacy: simplify init geos 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index 2b08efb..82201ac 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c @@ -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++];