Commit 316c30d9 authored by Assaf Krauss's avatar Assaf Krauss Committed by John W. Linville

iwlwifi: Re-ordering probe flow (4965)

This patch re-orders the iwl4965_pci_probe function.
Signed-off-by: default avatarAssaf Krauss <assaf.krauss@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 99f7d39b
...@@ -1843,14 +1843,26 @@ int iwl4965_alive_notify(struct iwl_priv *priv) ...@@ -1843,14 +1843,26 @@ int iwl4965_alive_notify(struct iwl_priv *priv)
*/ */
int iwl4965_hw_set_hw_setting(struct iwl_priv *priv) int iwl4965_hw_set_hw_setting(struct iwl_priv *priv)
{ {
int ret = 0;
if ((iwl4965_param_queues_num > IWL_MAX_NUM_QUEUES) ||
(iwl4965_param_queues_num < IWL_MIN_NUM_QUEUES)) {
IWL_ERROR("invalid queues_num, should be between %d and %d\n",
IWL_MIN_NUM_QUEUES, IWL_MAX_NUM_QUEUES);
ret = -EINVAL;
goto out;
}
/* Allocate area for Tx byte count tables and Rx queue status */ /* Allocate area for Tx byte count tables and Rx queue status */
priv->hw_setting.shared_virt = priv->hw_setting.shared_virt =
pci_alloc_consistent(priv->pci_dev, pci_alloc_consistent(priv->pci_dev,
sizeof(struct iwl4965_shared), sizeof(struct iwl4965_shared),
&priv->hw_setting.shared_phys); &priv->hw_setting.shared_phys);
if (!priv->hw_setting.shared_virt) if (!priv->hw_setting.shared_virt) {
return -1; ret = -ENOMEM;
goto out;
}
memset(priv->hw_setting.shared_virt, 0, sizeof(struct iwl4965_shared)); memset(priv->hw_setting.shared_virt, 0, sizeof(struct iwl4965_shared));
...@@ -1868,7 +1880,8 @@ int iwl4965_hw_set_hw_setting(struct iwl_priv *priv) ...@@ -1868,7 +1880,8 @@ int iwl4965_hw_set_hw_setting(struct iwl_priv *priv)
priv->hw_setting.tx_ant_num = 2; priv->hw_setting.tx_ant_num = 2;
return 0; out:
return ret;
} }
/** /**
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment