aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2010-02-25 13:02:19 -0500
committerReinette Chatre <reinette.chatre@intel.com>2010-03-09 19:16:04 -0500
commit1382c71c764540880d35485b033a44ce104d8e2e (patch)
tree6d8502a77b6305d7c2a05c21593e336b35a86aa7 /drivers/net
parent1d79e53c56afe0826a311c3bc1653ad938166c22 (diff)
Revert "iwlwifi: Send broadcast probe request only when asked to"
This reverts commit 21b2d8bd2f0d4e0f21ade147fd193c8b9c1fd2b9. As explained by Johannes: When we build a probe request frame in the buffer with the SSID, we could arrive over the limit of 200 bytes. When we build it in the buffer without the SSID (wildcard) we don't arrive over 200 bytes, but the ucode still allows direct probe in addition because it has an internal buffer that is larger when it inserts the SSID... Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c49
2 files changed, 17 insertions, 34 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 47b021477967..818367b57bab 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2653,7 +2653,7 @@ static int iwl_mac_setup_register(struct iwl_priv *priv)
2653 */ 2653 */
2654 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; 2654 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
2655 2655
2656 hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX + 1; 2656 hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX;
2657 /* we create the 802.11 header and a zero-length SSID element */ 2657 /* we create the 802.11 header and a zero-length SSID element */
2658 hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2; 2658 hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2;
2659 2659
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index dd9ff2ed645a..bd2f7c420563 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -638,20 +638,9 @@ u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
638 if (left < 0) 638 if (left < 0)
639 return 0; 639 return 0;
640 *pos++ = WLAN_EID_SSID; 640 *pos++ = WLAN_EID_SSID;
641 if (!priv->is_internal_short_scan && 641 *pos++ = 0;
642 priv->scan_request->n_ssids) { 642
643 struct cfg80211_ssid *ssid = 643 len += 2;
644 priv->scan_request->ssids;
645
646 /* Broadcast if ssid_len is 0 */
647 *pos++ = ssid->ssid_len;
648 memcpy(pos, ssid->ssid, ssid->ssid_len);
649 pos += ssid->ssid_len;
650 len += 2 + ssid->ssid_len;
651 } else {
652 *pos++ = 0;
653 len += 2;
654 }
655 644
656 if (WARN_ON(left < ie_len)) 645 if (WARN_ON(left < ie_len))
657 return len; 646 return len;
@@ -780,26 +769,20 @@ static void iwl_bg_request_scan(struct work_struct *data)
780 if (priv->is_internal_short_scan) { 769 if (priv->is_internal_short_scan) {
781 IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n"); 770 IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n");
782 } else if (priv->scan_request->n_ssids) { 771 } else if (priv->scan_request->n_ssids) {
772 int i, p = 0;
783 IWL_DEBUG_SCAN(priv, "Kicking off active scan\n"); 773 IWL_DEBUG_SCAN(priv, "Kicking off active scan\n");
784 /* 774 for (i = 0; i < priv->scan_request->n_ssids; i++) {
785 * The first SSID to scan is stuffed into the probe request 775 /* always does wildcard anyway */
786 * template and the remaining ones are handled through the 776 if (!priv->scan_request->ssids[i].ssid_len)
787 * direct_scan array. 777 continue;
788 */ 778 scan->direct_scan[p].id = WLAN_EID_SSID;
789 if (priv->scan_request->n_ssids > 1) { 779 scan->direct_scan[p].len =
790 int i, p = 0; 780 priv->scan_request->ssids[i].ssid_len;
791 for (i = 1; i < priv->scan_request->n_ssids; i++) { 781 memcpy(scan->direct_scan[p].ssid,
792 if (!priv->scan_request->ssids[i].ssid_len) 782 priv->scan_request->ssids[i].ssid,
793 continue; 783 priv->scan_request->ssids[i].ssid_len);
794 scan->direct_scan[p].id = WLAN_EID_SSID; 784 n_probes++;
795 scan->direct_scan[p].len = 785 p++;
796 priv->scan_request->ssids[i].ssid_len;
797 memcpy(scan->direct_scan[p].ssid,
798 priv->scan_request->ssids[i].ssid,
799 priv->scan_request->ssids[i].ssid_len);
800 n_probes++;
801 p++;
802 }
803 } 786 }
804 is_active = true; 787 is_active = true;
805 } else 788 } else