]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Revert "iwlwifi: Send broadcast probe request only when asked to"
authorReinette Chatre <reinette.chatre@intel.com>
Thu, 25 Feb 2010 18:02:19 +0000 (10:02 -0800)
committerReinette Chatre <reinette.chatre@intel.com>
Wed, 10 Mar 2010 00:16:04 +0000 (16:16 -0800)
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>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-scan.c

index 47b021477967f62dd924b8b9416869b179668cd6..818367b57babfa0d3b00a0b173245e48cb1bf238 100644 (file)
@@ -2653,7 +2653,7 @@ static int iwl_mac_setup_register(struct iwl_priv *priv)
         */
        hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
 
-       hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX + 1;
+       hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX;
        /* we create the 802.11 header and a zero-length SSID element */
        hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2;
 
index dd9ff2ed645a8fe1a3aeefc82fe46aef5ff8f2f1..bd2f7c420563611bbba6437c7fb51b9134417164 100644 (file)
@@ -638,20 +638,9 @@ u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
        if (left < 0)
                return 0;
        *pos++ = WLAN_EID_SSID;
-       if (!priv->is_internal_short_scan &&
-           priv->scan_request->n_ssids) {
-               struct cfg80211_ssid *ssid =
-                       priv->scan_request->ssids;
-
-               /* Broadcast if ssid_len is 0 */
-               *pos++ = ssid->ssid_len;
-               memcpy(pos, ssid->ssid, ssid->ssid_len);
-               pos += ssid->ssid_len;
-               len += 2 + ssid->ssid_len;
-       } else {
-               *pos++ = 0;
-               len += 2;
-       }
+       *pos++ = 0;
+
+       len += 2;
 
        if (WARN_ON(left < ie_len))
                return len;
@@ -780,26 +769,20 @@ static void iwl_bg_request_scan(struct work_struct *data)
        if (priv->is_internal_short_scan) {
                IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n");
        } else if (priv->scan_request->n_ssids) {
+               int i, p = 0;
                IWL_DEBUG_SCAN(priv, "Kicking off active scan\n");
-               /*
-                * The first SSID to scan is stuffed into the probe request
-                * template and the remaining ones are handled through the
-                * direct_scan array.
-                */
-               if (priv->scan_request->n_ssids > 1) {
-                       int i, p = 0;
-                       for (i = 1; i < priv->scan_request->n_ssids; i++) {
-                               if (!priv->scan_request->ssids[i].ssid_len)
-                                       continue;
-                               scan->direct_scan[p].id = WLAN_EID_SSID;
-                               scan->direct_scan[p].len =
-                                       priv->scan_request->ssids[i].ssid_len;
-                               memcpy(scan->direct_scan[p].ssid,
-                                      priv->scan_request->ssids[i].ssid,
-                                      priv->scan_request->ssids[i].ssid_len);
-                               n_probes++;
-                               p++;
-                       }
+               for (i = 0; i < priv->scan_request->n_ssids; i++) {
+                       /* always does wildcard anyway */
+                       if (!priv->scan_request->ssids[i].ssid_len)
+                               continue;
+                       scan->direct_scan[p].id = WLAN_EID_SSID;
+                       scan->direct_scan[p].len =
+                               priv->scan_request->ssids[i].ssid_len;
+                       memcpy(scan->direct_scan[p].ssid,
+                              priv->scan_request->ssids[i].ssid,
+                              priv->scan_request->ssids[i].ssid_len);
+                       n_probes++;
+                       p++;
                }
                is_active = true;
        } else