diff options
author | Assaf Krauss <assaf.krauss@intel.com> | 2008-03-14 13:38:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-25 16:41:50 -0400 |
commit | 316c30d9dddc1bd5b586a6cf9808018746372cc9 (patch) | |
tree | 6b999e48dea5ca7d9143bbb4a1a3ec6e2260a94d /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | 99f7d39bb020a06c98cd42641b6193b761f763ca (diff) |
iwlwifi: Re-ordering probe flow (4965)
This patch re-orders the iwl4965_pci_probe function.
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index b2ea4d4f3f31..3d30cba0ad45 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -1843,14 +1843,26 @@ int iwl4965_alive_notify(struct iwl_priv *priv) | |||
1843 | */ | 1843 | */ |
1844 | int iwl4965_hw_set_hw_setting(struct iwl_priv *priv) | 1844 | int iwl4965_hw_set_hw_setting(struct iwl_priv *priv) |
1845 | { | 1845 | { |
1846 | int ret = 0; | ||
1847 | |||
1848 | if ((iwl4965_param_queues_num > IWL_MAX_NUM_QUEUES) || | ||
1849 | (iwl4965_param_queues_num < IWL_MIN_NUM_QUEUES)) { | ||
1850 | IWL_ERROR("invalid queues_num, should be between %d and %d\n", | ||
1851 | IWL_MIN_NUM_QUEUES, IWL_MAX_NUM_QUEUES); | ||
1852 | ret = -EINVAL; | ||
1853 | goto out; | ||
1854 | } | ||
1855 | |||
1846 | /* Allocate area for Tx byte count tables and Rx queue status */ | 1856 | /* Allocate area for Tx byte count tables and Rx queue status */ |
1847 | priv->hw_setting.shared_virt = | 1857 | priv->hw_setting.shared_virt = |
1848 | pci_alloc_consistent(priv->pci_dev, | 1858 | pci_alloc_consistent(priv->pci_dev, |
1849 | sizeof(struct iwl4965_shared), | 1859 | sizeof(struct iwl4965_shared), |
1850 | &priv->hw_setting.shared_phys); | 1860 | &priv->hw_setting.shared_phys); |
1851 | 1861 | ||
1852 | if (!priv->hw_setting.shared_virt) | 1862 | if (!priv->hw_setting.shared_virt) { |
1853 | return -1; | 1863 | ret = -ENOMEM; |
1864 | goto out; | ||
1865 | } | ||
1854 | 1866 | ||
1855 | memset(priv->hw_setting.shared_virt, 0, sizeof(struct iwl4965_shared)); | 1867 | memset(priv->hw_setting.shared_virt, 0, sizeof(struct iwl4965_shared)); |
1856 | 1868 | ||
@@ -1868,7 +1880,8 @@ int iwl4965_hw_set_hw_setting(struct iwl_priv *priv) | |||
1868 | 1880 | ||
1869 | priv->hw_setting.tx_ant_num = 2; | 1881 | priv->hw_setting.tx_ant_num = 2; |
1870 | 1882 | ||
1871 | return 0; | 1883 | out: |
1884 | return ret; | ||
1872 | } | 1885 | } |
1873 | 1886 | ||
1874 | /** | 1887 | /** |