diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index c196abc6db7a..539960da7e13 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2678,11 +2678,19 @@ static void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2678 | 2678 | ||
2679 | } | 2679 | } |
2680 | 2680 | ||
2681 | static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) | 2681 | static int iwl_mac_hw_scan(struct ieee80211_hw *hw, |
2682 | struct cfg80211_scan_request *req) | ||
2682 | { | 2683 | { |
2683 | unsigned long flags; | 2684 | unsigned long flags; |
2684 | struct iwl_priv *priv = hw->priv; | 2685 | struct iwl_priv *priv = hw->priv; |
2685 | int ret; | 2686 | int ret; |
2687 | u8 *ssid = NULL; | ||
2688 | size_t ssid_len = 0; | ||
2689 | |||
2690 | if (req->n_ssids) { | ||
2691 | ssid = req->ssids[0].ssid; | ||
2692 | ssid_len = req->ssids[0].ssid_len; | ||
2693 | } | ||
2686 | 2694 | ||
2687 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 2695 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2688 | 2696 | ||
@@ -2718,7 +2726,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) | |||
2718 | 2726 | ||
2719 | if (ssid_len) { | 2727 | if (ssid_len) { |
2720 | priv->one_direct_scan = 1; | 2728 | priv->one_direct_scan = 1; |
2721 | priv->direct_ssid_len = min_t(u8, ssid_len, IW_ESSID_MAX_SIZE); | 2729 | priv->direct_ssid_len = ssid_len; |
2722 | memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); | 2730 | memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); |
2723 | } else { | 2731 | } else { |
2724 | priv->one_direct_scan = 0; | 2732 | priv->one_direct_scan = 0; |