iwlwifi: move iwl_set_flags_for_band to iwl-agn-rxon.c
authorMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Tue, 13 Mar 2012 23:45:00 +0000 (16:45 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 12 Apr 2012 21:21:30 +0000 (14:21 -0700)
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>
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/iwlwifi/iwl-agn.h
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h

index 2fcc50cb29af608ffb3cac8e40500ff059b3ad0d..fd091812af53240ba354cc06c4005bc9fceea09b 100644 (file)
@@ -620,6 +620,29 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
 
 }
 
+void iwl_set_flags_for_band(struct iwl_priv *priv,
+                           struct iwl_rxon_context *ctx,
+                           enum ieee80211_band band,
+                           struct ieee80211_vif *vif)
+{
+       if (band == IEEE80211_BAND_5GHZ) {
+               ctx->staging.flags &=
+                   ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK
+                     | RXON_FLG_CCK_MSK);
+               ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
+       } else {
+               /* Copied from iwl_post_associate() */
+               if (vif && vif->bss_conf.use_short_slot)
+                       ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
+               else
+                       ctx->staging.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
+
+               ctx->staging.flags |= RXON_FLG_BAND_24G_MSK;
+               ctx->staging.flags |= RXON_FLG_AUTO_DETECT_MSK;
+               ctx->staging.flags &= ~RXON_FLG_CCK_MSK;
+       }
+}
+
 static void iwl_set_rxon_hwcrypto(struct iwl_priv *priv,
                                  struct iwl_rxon_context *ctx, int hw_decrypt)
 {
index 9eec4e629c389523eb4230eda04dc347831432af..ecc217c7c62528cf99a5a5d6330b9993b950770c 100644 (file)
@@ -130,7 +130,10 @@ void iwlagn_config_ht40(struct ieee80211_conf *conf,
 void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
 void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
                         struct iwl_rxon_context *ctx);
-
+void iwl_set_flags_for_band(struct iwl_priv *priv,
+                           struct iwl_rxon_context *ctx,
+                           enum ieee80211_band band,
+                           struct ieee80211_vif *vif);
 /* uCode */
 int iwl_send_bt_env(struct iwl_priv *priv, u8 action, u8 type);
 void iwl_send_prio_tbl(struct iwl_priv *priv);
index f65f9897e71ece6fe02312c797820a44fa673b7b..fdca7abd31c4d6f2e1153c8233259323ec0b6e26 100644 (file)
 
 const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
 
-void iwl_set_flags_for_band(struct iwl_priv *priv,
-                           struct iwl_rxon_context *ctx,
-                           enum ieee80211_band band,
-                           struct ieee80211_vif *vif)
-{
-       if (band == IEEE80211_BAND_5GHZ) {
-               ctx->staging.flags &=
-                   ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK
-                     | RXON_FLG_CCK_MSK);
-               ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
-       } else {
-               /* Copied from iwl_post_associate() */
-               if (vif && vif->bss_conf.use_short_slot)
-                       ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
-               else
-                       ctx->staging.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
-
-               ctx->staging.flags |= RXON_FLG_BAND_24G_MSK;
-               ctx->staging.flags |= RXON_FLG_AUTO_DETECT_MSK;
-               ctx->staging.flags &= ~RXON_FLG_CCK_MSK;
-       }
-}
-
 /*
  * initialize rxon structure with default values from eeprom
  */
index b3cbeb23b243ef0545c0704c0b52175dece6f32e..a2b131a16198f7e192348dc36583b982a10c0f47 100644 (file)
@@ -78,10 +78,6 @@ struct iwl_cmd;
  *   L i b                 *
  ***************************/
 
-void iwl_set_flags_for_band(struct iwl_priv *priv,
-                           struct iwl_rxon_context *ctx,
-                           enum ieee80211_band band,
-                           struct ieee80211_vif *vif);
 void iwl_connection_init_rx_config(struct iwl_priv *priv,
                                   struct iwl_rxon_context *ctx);
 void iwl_set_rate(struct iwl_priv *priv);