diff options
author | Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> | 2012-03-13 19:31:34 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-04-12 17:21:17 -0400 |
commit | fedfa87a527e65f94a623ac578ad00eb25b4ce0d (patch) | |
tree | 3f91dfdd7368d2dd4fca68da0e76796ab35f127d /drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |
parent | dd64173e37082dcfffa8982622e2fd49f6c41432 (diff) |
iwlwifi: move iwl_set_rxon_channel to iwl-agn-rxon.c
Moving this as part of iwl-core.c cleanup.
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rxon.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 944ad735593..2fcc50cb29a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -591,6 +591,35 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf) | |||
591 | _iwl_set_rxon_ht(priv, ht_conf, ctx); | 591 | _iwl_set_rxon_ht(priv, ht_conf, ctx); |
592 | } | 592 | } |
593 | 593 | ||
594 | /** | ||
595 | * iwl_set_rxon_channel - Set the band and channel values in staging RXON | ||
596 | * @ch: requested channel as a pointer to struct ieee80211_channel | ||
597 | |||
598 | * NOTE: Does not commit to the hardware; it sets appropriate bit fields | ||
599 | * in the staging RXON flag structure based on the ch->band | ||
600 | */ | ||
601 | void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, | ||
602 | struct iwl_rxon_context *ctx) | ||
603 | { | ||
604 | enum ieee80211_band band = ch->band; | ||
605 | u16 channel = ch->hw_value; | ||
606 | |||
607 | if ((le16_to_cpu(ctx->staging.channel) == channel) && | ||
608 | (priv->band == band)) | ||
609 | return; | ||
610 | |||
611 | ctx->staging.channel = cpu_to_le16(channel); | ||
612 | if (band == IEEE80211_BAND_5GHZ) | ||
613 | ctx->staging.flags &= ~RXON_FLG_BAND_24G_MSK; | ||
614 | else | ||
615 | ctx->staging.flags |= RXON_FLG_BAND_24G_MSK; | ||
616 | |||
617 | priv->band = band; | ||
618 | |||
619 | IWL_DEBUG_INFO(priv, "Staging channel set to %d [%d]\n", channel, band); | ||
620 | |||
621 | } | ||
622 | |||
594 | static void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, | 623 | static void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, |
595 | struct iwl_rxon_context *ctx, int hw_decrypt) | 624 | struct iwl_rxon_context *ctx, int hw_decrypt) |
596 | { | 625 | { |