aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>2012-03-07 12:52:36 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-08 13:59:55 -0500
commit9bdfbfadc4f0b3a756b54e7ec7cfaf92c22ce258 (patch)
tree23babafe20fa658448f5b91116f689c42f8aef13 /drivers/net/wireless/iwlwifi
parent92d743ae105314a865b3fca9128da11525d22203 (diff)
iwlwifi: move setting up fw parameters
Gather parameters required to configure the transport layer before invoking the transport configuration API. Change-Id: I5b39da284af6d9b5432a08911b4e1173a4d7207d Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c45
1 files changed, 24 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 83018ec11bc7..397342402d1e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1206,6 +1206,30 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1206 /* TODO: remove fw from shared data later */ 1206 /* TODO: remove fw from shared data later */
1207 priv->shrd->fw = fw; 1207 priv->shrd->fw = fw;
1208 1208
1209 /************************
1210 * 2. Setup HW constants
1211 ************************/
1212 iwl_set_hw_params(priv);
1213
1214 ucode_flags = fw->ucode_capa.flags;
1215
1216#ifndef CONFIG_IWLWIFI_P2P
1217 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1218#endif
1219 if (!(hw_params(priv).sku & EEPROM_SKU_CAP_IPAN_ENABLE))
1220 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1221
1222 /*
1223 * if not PAN, then don't support P2P -- might be a uCode
1224 * packaging bug or due to the eeprom check above
1225 */
1226 if (!(ucode_flags & IWL_UCODE_TLV_FLAGS_PAN))
1227 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
1228
1229
1230 /*****************************
1231 * Configure transport layer
1232 *****************************/
1209 /* 1233 /*
1210 * Populate the state variables that the transport layer needs 1234 * Populate the state variables that the transport layer needs
1211 * to know about. 1235 * to know about.
@@ -1286,27 +1310,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1286 priv->hw->wiphy->n_addresses++; 1310 priv->hw->wiphy->n_addresses++;
1287 } 1311 }
1288 1312
1289 /************************
1290 * 5. Setup HW constants
1291 ************************/
1292 iwl_set_hw_params(priv);
1293
1294 ucode_flags = fw->ucode_capa.flags;
1295
1296#ifndef CONFIG_IWLWIFI_P2P
1297 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1298#endif
1299 if (!(hw_params(priv).sku & EEPROM_SKU_CAP_IPAN_ENABLE))
1300 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1301
1302 /*
1303 * if not PAN, then don't support P2P -- might be a uCode
1304 * packaging bug or due to the eeprom check above
1305 */
1306 if (!(ucode_flags & IWL_UCODE_TLV_FLAGS_PAN))
1307 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
1308
1309
1310 /******************* 1313 /*******************
1311 * 6. Setup priv 1314 * 6. Setup priv
1312 *******************/ 1315 *******************/