diff options
author | Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> | 2012-03-07 09:52:36 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-08 13:59:55 -0500 |
commit | 9bdfbfadc4f0b3a756b54e7ec7cfaf92c22ce258 (patch) | |
tree | 23babafe20fa658448f5b91116f689c42f8aef13 /drivers/net/wireless/iwlwifi | |
parent | 92d743ae105314a865b3fca9128da11525d22203 (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.c | 45 |
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 83018ec11bc..397342402d1 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, /* TODO: remove fw from shared data later */ priv->shrd->fw = fw; + /************************ + * 2. Setup HW constants + ************************/ + iwl_set_hw_params(priv); + + ucode_flags = fw->ucode_capa.flags; + +#ifndef CONFIG_IWLWIFI_P2P + ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN; +#endif + if (!(hw_params(priv).sku & EEPROM_SKU_CAP_IPAN_ENABLE)) + ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN; + + /* + * if not PAN, then don't support P2P -- might be a uCode + * packaging bug or due to the eeprom check above + */ + if (!(ucode_flags & IWL_UCODE_TLV_FLAGS_PAN)) + ucode_flags &= ~IWL_UCODE_TLV_FLAGS_P2P; + + + /***************************** + * Configure transport layer + *****************************/ /* * Populate the state variables that the transport layer needs * to know about. @@ -1286,27 +1310,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, priv->hw->wiphy->n_addresses++; } - /************************ - * 5. Setup HW constants - ************************/ - iwl_set_hw_params(priv); - - ucode_flags = fw->ucode_capa.flags; - -#ifndef CONFIG_IWLWIFI_P2P - ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN; -#endif - if (!(hw_params(priv).sku & EEPROM_SKU_CAP_IPAN_ENABLE)) - ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN; - - /* - * if not PAN, then don't support P2P -- might be a uCode - * packaging bug or due to the eeprom check above - */ - if (!(ucode_flags & IWL_UCODE_TLV_FLAGS_PAN)) - ucode_flags &= ~IWL_UCODE_TLV_FLAGS_P2P; - - /******************* * 6. Setup priv *******************/ |