aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-02-10 15:25:55 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:45:49 -0500
commit2a5193119269062608582418deba7af82844159a (patch)
tree1f2fe8cffbeb7530dce7fa708310f6fb29ab0dd8 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent849b7967818995a32c3017542e33eb3155944368 (diff)
cfg80211/nl80211: scanning (and mac80211 update to use it)
This patch adds basic scan capability to cfg80211/nl80211 and changes mac80211 to use it. The BSS list that cfg80211 maintains is made driver-accessible with a private area in each BSS struct, but mac80211 doesn't yet use it. That's another large project. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c12
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
2681static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) 2681static 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;