diff options
author | Kolekar, Abhijeet <abhijeet.kolekar@intel.com> | 2008-12-18 21:37:39 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:20 -0500 |
commit | 854682ed2892836d7cff77931a79183c1fc59fef (patch) | |
tree | 7df17d185c22aeb22f0fbac9671624c83543f6ba /drivers | |
parent | 01ec616d8ccbfac41c87dafc0fc0aa4abe13b8f8 (diff) |
iwl3945: add set_pwr_src
The patch adds 3945 iwl_lib_ops->set_pwr_src to the driver
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 2d6daa88e8c8..5a8b75d94d7d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -919,7 +919,7 @@ u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate, u8 flags) | |||
919 | return sta_id; | 919 | return sta_id; |
920 | } | 920 | } |
921 | 921 | ||
922 | static int iwl3945_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max) | 922 | static int iwl3945_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src) |
923 | { | 923 | { |
924 | int rc; | 924 | int rc; |
925 | unsigned long flags; | 925 | unsigned long flags; |
@@ -931,7 +931,7 @@ static int iwl3945_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max) | |||
931 | return rc; | 931 | return rc; |
932 | } | 932 | } |
933 | 933 | ||
934 | if (!pwr_max) { | 934 | if (src == IWL_PWR_SRC_VAUX) { |
935 | u32 val; | 935 | u32 val; |
936 | 936 | ||
937 | rc = pci_read_config_dword(priv->pci_dev, | 937 | rc = pci_read_config_dword(priv->pci_dev, |
@@ -1195,7 +1195,10 @@ int iwl3945_hw_nic_init(struct iwl_priv *priv) | |||
1195 | return rc; | 1195 | return rc; |
1196 | IWL_DEBUG_INFO("HW Revision ID = 0x%X\n", rev_id); | 1196 | IWL_DEBUG_INFO("HW Revision ID = 0x%X\n", rev_id); |
1197 | 1197 | ||
1198 | iwl3945_nic_set_pwr_src(priv, 1); | 1198 | rc = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); |
1199 | if(rc) | ||
1200 | return rc; | ||
1201 | |||
1199 | priv->cfg->ops->lib->apm_ops.config(priv); | 1202 | priv->cfg->ops->lib->apm_ops.config(priv); |
1200 | 1203 | ||
1201 | /* Allocate the RX queue, or reset if it is already allocated */ | 1204 | /* Allocate the RX queue, or reset if it is already allocated */ |
@@ -2694,6 +2697,7 @@ static struct iwl_lib_ops iwl3945_lib = { | |||
2694 | .reset = iwl3945_apm_reset, | 2697 | .reset = iwl3945_apm_reset, |
2695 | .stop = iwl3945_apm_stop, | 2698 | .stop = iwl3945_apm_stop, |
2696 | .config = iwl3945_nic_config, | 2699 | .config = iwl3945_nic_config, |
2700 | .set_pwr_src = iwl3945_set_pwr_src, | ||
2697 | }, | 2701 | }, |
2698 | }; | 2702 | }; |
2699 | 2703 | ||