]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
wl1271: Fix scan parameter handling for 5GHz
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Mon, 24 May 2010 08:18:20 +0000 (11:18 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jun 2010 20:13:37 +0000 (16:13 -0400)
The 5GHz bands were scanned without the proper IE's in place, preventing
proper 5GHz scanning. This patches fixes the problem by storing a pointer
to the scan request (with the IE's) for all iterations of scan.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1271.h
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_cmd.h
drivers/net/wireless/wl12xx/wl1271_event.c
drivers/net/wireless/wl12xx/wl1271_main.c

index 4984f46626d262eaa5c6f0f0904b10471feb62c2..1b52ce6a84d71b10af1fb9bd919d1cf324329f5d 100644 (file)
@@ -299,6 +299,7 @@ struct wl1271_rx_mem_pool_addr {
 };
 
 struct wl1271_scan {
+       struct cfg80211_scan_request *req;
        u8 state;
        u8 ssid[IW_ESSID_MAX_SIZE+1];
        size_t ssid_len;
index dcad42ccc9d44b7030e92d1d11292532c05e7e29..530678e45a138ffb28c5669395dc49c76047b6ff 100644 (file)
@@ -568,7 +568,7 @@ out:
 }
 
 int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len,
-                   const u8 *ie, size_t ie_len, u8 active_scan,
+                   struct cfg80211_scan_request *req, u8 active_scan,
                    u8 high_prio, u8 band, u8 probe_requests)
 {
 
@@ -649,7 +649,7 @@ int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len,
        }
 
        ret = wl1271_cmd_build_probe_req(wl, ssid, ssid_len,
-                                        ie, ie_len, ieee_band);
+                                        req->ie, req->ie_len, ieee_band);
        if (ret < 0) {
                wl1271_error("PROBE request template failed");
                goto out;
@@ -685,7 +685,9 @@ int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len,
                                memcpy(wl->scan.ssid, ssid, ssid_len);
                        } else
                                wl->scan.ssid_len = 0;
-               }
+                       wl->scan.req = req;
+               } else
+                       wl->scan.req = NULL;
        }
 
        ret = wl1271_cmd_send(wl, CMD_SCAN, params, sizeof(*params), 0);
index 4ff966f6354b39a295f3f0c702c68792c6649be9..68001dffe7164d4b6259a5815d3956596d4f53e4 100644 (file)
@@ -42,7 +42,7 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode, bool send);
 int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer,
                           size_t len);
 int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len,
-                   const u8 *ie, size_t ie_len, u8 active_scan,
+                   struct cfg80211_scan_request *req, u8 active_scan,
                    u8 high_prio, u8 band, u8 probe_requests);
 int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
                            void *buf, size_t buf_len, int index, u32 rates);
index cf37aa6eb13725cd1f0ef2cb1dd5d70bd1ed69f2..ca52cdec7a8f42365fe8366dfe130be551c95b17 100644 (file)
@@ -43,11 +43,11 @@ static int wl1271_event_scan_complete(struct wl1271 *wl,
                        clear_bit(WL1271_FLAG_SCANNING, &wl->flags);
                        /* FIXME: ie missing! */
                        wl1271_cmd_scan(wl, wl->scan.ssid, wl->scan.ssid_len,
-                                               NULL, 0,
-                                               wl->scan.active,
-                                               wl->scan.high_prio,
-                                               WL1271_SCAN_BAND_5_GHZ,
-                                               wl->scan.probe_requests);
+                                       wl->scan.req,
+                                       wl->scan.active,
+                                       wl->scan.high_prio,
+                                       WL1271_SCAN_BAND_5_GHZ,
+                                       wl->scan.probe_requests);
                } else {
                        mutex_unlock(&wl->mutex);
                        ieee80211_scan_completed(wl->hw, false);
index 7bf655d55152ca6a999eb46c062f9a7cb3f0f7b5..7a14da506d781c0f5b3373454c021533df5b6c36 100644 (file)
@@ -1634,13 +1634,11 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
                goto out;
 
        if (wl1271_11a_enabled())
-               ret = wl1271_cmd_scan(hw->priv, ssid, len,
-                                     req->ie, req->ie_len, 1, 0,
-                                     WL1271_SCAN_BAND_DUAL, 3);
+               ret = wl1271_cmd_scan(hw->priv, ssid, len, req,
+                                     1, 0, WL1271_SCAN_BAND_DUAL, 3);
        else
-               ret = wl1271_cmd_scan(hw->priv, ssid, len,
-                                     req->ie, req->ie_len, 1, 0,
-                                     WL1271_SCAN_BAND_2_4_GHZ, 3);
+               ret = wl1271_cmd_scan(hw->priv, ssid, len, req,
+                                     1, 0, WL1271_SCAN_BAND_2_4_GHZ, 3);
 
        wl1271_ps_elp_sleep(wl);