aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index c196abc6db7a..397577c06c92 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -940,11 +940,7 @@ int iwl_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src)
940 goto err; 940 goto err;
941 941
942 if (src == IWL_PWR_SRC_VAUX) { 942 if (src == IWL_PWR_SRC_VAUX) {
943 u32 val; 943 if (pci_pme_capable(priv->pci_dev, PCI_D3cold))
944 ret = pci_read_config_dword(priv->pci_dev, PCI_CFG_POWER_SOURCE,
945 &val);
946
947 if (val & PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT)
948 iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, 944 iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG,
949 APMG_PS_CTRL_VAL_PWR_SRC_VAUX, 945 APMG_PS_CTRL_VAL_PWR_SRC_VAUX,
950 ~APMG_PS_CTRL_MSK_PWR_SRC); 946 ~APMG_PS_CTRL_MSK_PWR_SRC);
@@ -2678,11 +2674,19 @@ static void iwl_bss_info_changed(struct ieee80211_hw *hw,
2678 2674
2679} 2675}
2680 2676
2681static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) 2677static int iwl_mac_hw_scan(struct ieee80211_hw *hw,
2678 struct cfg80211_scan_request *req)
2682{ 2679{
2683 unsigned long flags; 2680 unsigned long flags;
2684 struct iwl_priv *priv = hw->priv; 2681 struct iwl_priv *priv = hw->priv;
2685 int ret; 2682 int ret;
2683 u8 *ssid = NULL;
2684 size_t ssid_len = 0;
2685
2686 if (req->n_ssids) {
2687 ssid = req->ssids[0].ssid;
2688 ssid_len = req->ssids[0].ssid_len;
2689 }
2686 2690
2687 IWL_DEBUG_MAC80211(priv, "enter\n"); 2691 IWL_DEBUG_MAC80211(priv, "enter\n");
2688 2692
@@ -2718,7 +2722,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len)
2718 2722
2719 if (ssid_len) { 2723 if (ssid_len) {
2720 priv->one_direct_scan = 1; 2724 priv->one_direct_scan = 1;
2721 priv->direct_ssid_len = min_t(u8, ssid_len, IW_ESSID_MAX_SIZE); 2725 priv->direct_ssid_len = ssid_len;
2722 memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); 2726 memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len);
2723 } else { 2727 } else {
2724 priv->one_direct_scan = 0; 2728 priv->one_direct_scan = 0;