aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>2012-03-13 19:31:34 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-04-12 17:21:17 -0400
commitfedfa87a527e65f94a623ac578ad00eb25b4ce0d (patch)
tree3f91dfdd7368d2dd4fca68da0e76796ab35f127d
parentdd64173e37082dcfffa8982622e2fd49f6c41432 (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>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c29
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c29
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
4 files changed, 31 insertions, 31 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 */
601void 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
594static void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, 623static 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{
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index d7b1bd8d6bd..9eec4e629c3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -128,6 +128,8 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
128void iwlagn_config_ht40(struct ieee80211_conf *conf, 128void iwlagn_config_ht40(struct ieee80211_conf *conf,
129 struct iwl_rxon_context *ctx); 129 struct iwl_rxon_context *ctx);
130void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf); 130void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
131void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
132 struct iwl_rxon_context *ctx);
131 133
132/* uCode */ 134/* uCode */
133int iwl_send_bt_env(struct iwl_priv *priv, u8 action, u8 type); 135int iwl_send_bt_env(struct iwl_priv *priv, u8 action, u8 type);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index ab5db2e7141..f65f9897e71 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -43,35 +43,6 @@
43 43
44const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; 44const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
45 45
46/**
47 * iwl_set_rxon_channel - Set the band and channel values in staging RXON
48 * @ch: requested channel as a pointer to struct ieee80211_channel
49
50 * NOTE: Does not commit to the hardware; it sets appropriate bit fields
51 * in the staging RXON flag structure based on the ch->band
52 */
53void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
54 struct iwl_rxon_context *ctx)
55{
56 enum ieee80211_band band = ch->band;
57 u16 channel = ch->hw_value;
58
59 if ((le16_to_cpu(ctx->staging.channel) == channel) &&
60 (priv->band == band))
61 return;
62
63 ctx->staging.channel = cpu_to_le16(channel);
64 if (band == IEEE80211_BAND_5GHZ)
65 ctx->staging.flags &= ~RXON_FLG_BAND_24G_MSK;
66 else
67 ctx->staging.flags |= RXON_FLG_BAND_24G_MSK;
68
69 priv->band = band;
70
71 IWL_DEBUG_INFO(priv, "Staging channel set to %d [%d]\n", channel, band);
72
73}
74
75void iwl_set_flags_for_band(struct iwl_priv *priv, 46void iwl_set_flags_for_band(struct iwl_priv *priv,
76 struct iwl_rxon_context *ctx, 47 struct iwl_rxon_context *ctx,
77 enum ieee80211_band band, 48 enum ieee80211_band band,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index e793b1606a9..b3cbeb23b24 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -78,8 +78,6 @@ struct iwl_cmd;
78 * L i b * 78 * L i b *
79 ***************************/ 79 ***************************/
80 80
81void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
82 struct iwl_rxon_context *ctx);
83void iwl_set_flags_for_band(struct iwl_priv *priv, 81void iwl_set_flags_for_band(struct iwl_priv *priv,
84 struct iwl_rxon_context *ctx, 82 struct iwl_rxon_context *ctx,
85 enum ieee80211_band band, 83 enum ieee80211_band band,