diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 8 |
9 files changed, 30 insertions, 46 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 8aed9ead3a75..5bdfe9dcd070 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -196,7 +196,6 @@ static struct iwl_lib_ops iwl1000_lib = { | |||
196 | .init = iwl_apm_init, | 196 | .init = iwl_apm_init, |
197 | .stop = iwl_apm_stop, | 197 | .stop = iwl_apm_stop, |
198 | .config = iwl1000_nic_config, | 198 | .config = iwl1000_nic_config, |
199 | .set_pwr_src = iwl_set_pwr_src, | ||
200 | }, | 199 | }, |
201 | .eeprom_ops = { | 200 | .eeprom_ops = { |
202 | .regulatory_bands = { | 201 | .regulatory_bands = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index ba3ab04c1fba..824c9428efaa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -816,9 +816,12 @@ static u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate) | |||
816 | return sta_id; | 816 | return sta_id; |
817 | } | 817 | } |
818 | 818 | ||
819 | static int iwl3945_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src) | 819 | static void iwl3945_set_pwr_vmain(struct iwl_priv *priv) |
820 | { | 820 | { |
821 | if (src == IWL_PWR_SRC_VAUX) { | 821 | /* |
822 | * (for documentation purposes) | ||
823 | * to set power to V_AUX, do | ||
824 | |||
822 | if (pci_pme_capable(priv->pci_dev, PCI_D3cold)) { | 825 | if (pci_pme_capable(priv->pci_dev, PCI_D3cold)) { |
823 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, | 826 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, |
824 | APMG_PS_CTRL_VAL_PWR_SRC_VAUX, | 827 | APMG_PS_CTRL_VAL_PWR_SRC_VAUX, |
@@ -828,16 +831,14 @@ static int iwl3945_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src) | |||
828 | CSR_GPIO_IN_VAL_VAUX_PWR_SRC, | 831 | CSR_GPIO_IN_VAL_VAUX_PWR_SRC, |
829 | CSR_GPIO_IN_BIT_AUX_POWER, 5000); | 832 | CSR_GPIO_IN_BIT_AUX_POWER, 5000); |
830 | } | 833 | } |
831 | } else { | 834 | */ |
832 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, | ||
833 | APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, | ||
834 | ~APMG_PS_CTRL_MSK_PWR_SRC); | ||
835 | 835 | ||
836 | iwl_poll_bit(priv, CSR_GPIO_IN, CSR_GPIO_IN_VAL_VMAIN_PWR_SRC, | 836 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, |
837 | CSR_GPIO_IN_BIT_AUX_POWER, 5000); /* uS */ | 837 | APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, |
838 | } | 838 | ~APMG_PS_CTRL_MSK_PWR_SRC); |
839 | 839 | ||
840 | return 0; | 840 | iwl_poll_bit(priv, CSR_GPIO_IN, CSR_GPIO_IN_VAL_VMAIN_PWR_SRC, |
841 | CSR_GPIO_IN_BIT_AUX_POWER, 5000); /* uS */ | ||
841 | } | 842 | } |
842 | 843 | ||
843 | static int iwl3945_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | 844 | static int iwl3945_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) |
@@ -1031,9 +1032,7 @@ int iwl3945_hw_nic_init(struct iwl_priv *priv) | |||
1031 | priv->cfg->ops->lib->apm_ops.init(priv); | 1032 | priv->cfg->ops->lib->apm_ops.init(priv); |
1032 | spin_unlock_irqrestore(&priv->lock, flags); | 1033 | spin_unlock_irqrestore(&priv->lock, flags); |
1033 | 1034 | ||
1034 | rc = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); | 1035 | iwl3945_set_pwr_vmain(priv); |
1035 | if (rc) | ||
1036 | return rc; | ||
1037 | 1036 | ||
1038 | priv->cfg->ops->lib->apm_ops.config(priv); | 1037 | priv->cfg->ops->lib->apm_ops.config(priv); |
1039 | 1038 | ||
@@ -2707,7 +2706,6 @@ static struct iwl_lib_ops iwl3945_lib = { | |||
2707 | .init = iwl3945_apm_init, | 2706 | .init = iwl3945_apm_init, |
2708 | .stop = iwl_apm_stop, | 2707 | .stop = iwl_apm_stop, |
2709 | .config = iwl3945_nic_config, | 2708 | .config = iwl3945_nic_config, |
2710 | .set_pwr_src = iwl3945_set_pwr_src, | ||
2711 | }, | 2709 | }, |
2712 | .eeprom_ops = { | 2710 | .eeprom_ops = { |
2713 | .regulatory_bands = { | 2711 | .regulatory_bands = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index c192856bb644..cda4a319ed97 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2268,7 +2268,6 @@ static struct iwl_lib_ops iwl4965_lib = { | |||
2268 | .init = iwl_apm_init, | 2268 | .init = iwl_apm_init, |
2269 | .stop = iwl_apm_stop, | 2269 | .stop = iwl_apm_stop, |
2270 | .config = iwl4965_nic_config, | 2270 | .config = iwl4965_nic_config, |
2271 | .set_pwr_src = iwl_set_pwr_src, | ||
2272 | }, | 2271 | }, |
2273 | .eeprom_ops = { | 2272 | .eeprom_ops = { |
2274 | .regulatory_bands = { | 2273 | .regulatory_bands = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 084271e5e468..c90a16cdfaff 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -370,7 +370,6 @@ static struct iwl_lib_ops iwl5000_lib = { | |||
370 | .init = iwl_apm_init, | 370 | .init = iwl_apm_init, |
371 | .stop = iwl_apm_stop, | 371 | .stop = iwl_apm_stop, |
372 | .config = iwl5000_nic_config, | 372 | .config = iwl5000_nic_config, |
373 | .set_pwr_src = iwl_set_pwr_src, | ||
374 | }, | 373 | }, |
375 | .eeprom_ops = { | 374 | .eeprom_ops = { |
376 | .regulatory_bands = { | 375 | .regulatory_bands = { |
@@ -440,7 +439,6 @@ static struct iwl_lib_ops iwl5150_lib = { | |||
440 | .init = iwl_apm_init, | 439 | .init = iwl_apm_init, |
441 | .stop = iwl_apm_stop, | 440 | .stop = iwl_apm_stop, |
442 | .config = iwl5000_nic_config, | 441 | .config = iwl5000_nic_config, |
443 | .set_pwr_src = iwl_set_pwr_src, | ||
444 | }, | 442 | }, |
445 | .eeprom_ops = { | 443 | .eeprom_ops = { |
446 | .regulatory_bands = { | 444 | .regulatory_bands = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 84f181443f02..02103a7ae1df 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -310,7 +310,6 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
310 | .init = iwl_apm_init, | 310 | .init = iwl_apm_init, |
311 | .stop = iwl_apm_stop, | 311 | .stop = iwl_apm_stop, |
312 | .config = iwl6000_nic_config, | 312 | .config = iwl6000_nic_config, |
313 | .set_pwr_src = iwl_set_pwr_src, | ||
314 | }, | 313 | }, |
315 | .eeprom_ops = { | 314 | .eeprom_ops = { |
316 | .regulatory_bands = { | 315 | .regulatory_bands = { |
@@ -383,7 +382,6 @@ static struct iwl_lib_ops iwl6000g2b_lib = { | |||
383 | .init = iwl_apm_init, | 382 | .init = iwl_apm_init, |
384 | .stop = iwl_apm_stop, | 383 | .stop = iwl_apm_stop, |
385 | .config = iwl6000_nic_config, | 384 | .config = iwl6000_nic_config, |
386 | .set_pwr_src = iwl_set_pwr_src, | ||
387 | }, | 385 | }, |
388 | .eeprom_ops = { | 386 | .eeprom_ops = { |
389 | .regulatory_bands = { | 387 | .regulatory_bands = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index ff5f2fc4d6d9..0ad0d44893ab 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -685,6 +685,23 @@ int iwlagn_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
685 | return 0; | 685 | return 0; |
686 | } | 686 | } |
687 | 687 | ||
688 | static void iwlagn_set_pwr_vmain(struct iwl_priv *priv) | ||
689 | { | ||
690 | /* | ||
691 | * (for documentation purposes) | ||
692 | * to set power to V_AUX, do: | ||
693 | |||
694 | if (pci_pme_capable(priv->pci_dev, PCI_D3cold)) | ||
695 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, | ||
696 | APMG_PS_CTRL_VAL_PWR_SRC_VAUX, | ||
697 | ~APMG_PS_CTRL_MSK_PWR_SRC); | ||
698 | */ | ||
699 | |||
700 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, | ||
701 | APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, | ||
702 | ~APMG_PS_CTRL_MSK_PWR_SRC); | ||
703 | } | ||
704 | |||
688 | int iwlagn_hw_nic_init(struct iwl_priv *priv) | 705 | int iwlagn_hw_nic_init(struct iwl_priv *priv) |
689 | { | 706 | { |
690 | unsigned long flags; | 707 | unsigned long flags; |
@@ -700,7 +717,7 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv) | |||
700 | 717 | ||
701 | spin_unlock_irqrestore(&priv->lock, flags); | 718 | spin_unlock_irqrestore(&priv->lock, flags); |
702 | 719 | ||
703 | ret = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); | 720 | iwlagn_set_pwr_vmain(priv); |
704 | 721 | ||
705 | priv->cfg->ops->lib->apm_ops.config(priv); | 722 | priv->cfg->ops->lib->apm_ops.config(priv); |
706 | 723 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 8233c6410411..75472a3d87de 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -935,22 +935,6 @@ static void iwl_rx_card_state_notif(struct iwl_priv *priv, | |||
935 | wake_up_interruptible(&priv->wait_command_queue); | 935 | wake_up_interruptible(&priv->wait_command_queue); |
936 | } | 936 | } |
937 | 937 | ||
938 | int iwl_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src) | ||
939 | { | ||
940 | if (src == IWL_PWR_SRC_VAUX) { | ||
941 | if (pci_pme_capable(priv->pci_dev, PCI_D3cold)) | ||
942 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, | ||
943 | APMG_PS_CTRL_VAL_PWR_SRC_VAUX, | ||
944 | ~APMG_PS_CTRL_MSK_PWR_SRC); | ||
945 | } else { | ||
946 | iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, | ||
947 | APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, | ||
948 | ~APMG_PS_CTRL_MSK_PWR_SRC); | ||
949 | } | ||
950 | |||
951 | return 0; | ||
952 | } | ||
953 | |||
954 | static void iwl_bg_tx_flush(struct work_struct *work) | 938 | static void iwl_bg_tx_flush(struct work_struct *work) |
955 | { | 939 | { |
956 | struct iwl_priv *priv = | 940 | struct iwl_priv *priv = |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index f3c3d8531505..ae77279d3d98 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -119,7 +119,6 @@ struct iwl_apm_ops { | |||
119 | int (*init)(struct iwl_priv *priv); | 119 | int (*init)(struct iwl_priv *priv); |
120 | void (*stop)(struct iwl_priv *priv); | 120 | void (*stop)(struct iwl_priv *priv); |
121 | void (*config)(struct iwl_priv *priv); | 121 | void (*config)(struct iwl_priv *priv); |
122 | int (*set_pwr_src)(struct iwl_priv *priv, enum iwl_pwr_src src); | ||
123 | }; | 122 | }; |
124 | 123 | ||
125 | struct iwl_debugfs_ops { | 124 | struct iwl_debugfs_ops { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 2b04714c3a9c..2c57dbd2de19 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -282,13 +282,6 @@ struct iwl_channel_info { | |||
282 | */ | 282 | */ |
283 | #define IWL_IPAN_MCAST_QUEUE 8 | 283 | #define IWL_IPAN_MCAST_QUEUE 8 |
284 | 284 | ||
285 | /* Power management (not Tx power) structures */ | ||
286 | |||
287 | enum iwl_pwr_src { | ||
288 | IWL_PWR_SRC_VMAIN, | ||
289 | IWL_PWR_SRC_VAUX, | ||
290 | }; | ||
291 | |||
292 | #define IEEE80211_DATA_LEN 2304 | 285 | #define IEEE80211_DATA_LEN 2304 |
293 | #define IEEE80211_4ADDR_LEN 30 | 286 | #define IEEE80211_4ADDR_LEN 30 |
294 | #define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) | 287 | #define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) |
@@ -732,7 +725,6 @@ struct iwl_hw_params { | |||
732 | * | 725 | * |
733 | ****************************************************************************/ | 726 | ****************************************************************************/ |
734 | extern void iwl_update_chain_flags(struct iwl_priv *priv); | 727 | extern void iwl_update_chain_flags(struct iwl_priv *priv); |
735 | extern int iwl_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src); | ||
736 | extern const u8 iwl_bcast_addr[ETH_ALEN]; | 728 | extern const u8 iwl_bcast_addr[ETH_ALEN]; |
737 | extern int iwl_rxq_stop(struct iwl_priv *priv); | 729 | extern int iwl_rxq_stop(struct iwl_priv *priv); |
738 | extern void iwl_txq_ctx_stop(struct iwl_priv *priv); | 730 | extern void iwl_txq_ctx_stop(struct iwl_priv *priv); |