summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-04-05 09:42:05 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-04-07 15:51:39 -0400
commit17445b8c443bb1aaf7f85bcf60676d04be1c467c (patch)
tree06c5272a31b83033377e65151e839b190bf42513 /drivers
parentd7d5783c6668b54111cc77005755799e94261497 (diff)
iwlagn: init cmd_queue earlier
We know after loading the ucode whether it will support PAN or not, so we can also initialise the cmd_queue variable much earlier. Signed-off-by: Johannes Berg <johannes.berg@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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index b3b1e84c9311..d700860434a5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1700,6 +1700,11 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
} else
priv->sta_key_max_num = STA_KEY_MAX_NUM;
+ if (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS))
+ priv->cmd_queue = IWL_IPAN_CMD_QUEUE_NUM;
+ else
+ priv->cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
+
if (ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BTSTATS ||
(priv->cfg->bt_params && priv->cfg->bt_params->bt_statistics))
priv->bt_statistics = true;
@@ -2518,12 +2523,6 @@ static int __iwl_up(struct iwl_priv *priv)
iwl_write32(priv, CSR_INT, 0xFFFFFFFF);
- /* must be initialised before iwl_hw_nic_init */
- if (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS))
- priv->cmd_queue = IWL_IPAN_CMD_QUEUE_NUM;
- else
- priv->cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
-
ret = iwlagn_hw_nic_init(priv);
if (ret) {
IWL_ERR(priv, "Unable to init nic\n");