summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/scan.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-08-14 14:17:10 +0400
committerLuciano Coelho <coelho@ti.com>2011-08-22 13:35:25 +0400
commita4e02f330a69a305c4f7bc98d56e72aa0d4b6032 (patch)
treeb3650bf252bb240dd7f15f83560bc41a842a4fb5 /drivers/net/wireless/wl12xx/scan.c
parent04e8079c69d6fa1aa023b0b6f58f818f965c10bb (diff)
downloadlinux-a4e02f330a69a305c4f7bc98d56e72aa0d4b6032.tar.xz
wl12xx: update scan cmd api
Update the scan command to use the new fw api (fw 6/7.3.0.0.75). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/scan.c')
-rw-r--r--drivers/net/wireless/wl12xx/scan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index 78a9b23a41b8..54a4e75a37fe 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -156,6 +156,11 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
if (passive || wl->scan.req->n_ssids == 0)
scan_options |= WL1271_SCAN_OPT_PASSIVE;
+ if (WARN_ON(wl->role_id == WL12XX_INVALID_ROLE_ID)) {
+ ret = -EINVAL;
+ goto out;
+ }
+ cmd->params.role_id = wl->role_id;
cmd->params.scan_options = cpu_to_le16(scan_options);
cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req,
@@ -167,7 +172,6 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
}
cmd->params.tx_rate = cpu_to_le32(basic_rate);
-
cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs;
cmd->params.tx_rate = cpu_to_le32(basic_rate);
cmd->params.tid_trigger = 0;
@@ -183,6 +187,8 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len);
}
+ memcpy(cmd->addr, wl->mac_addr, ETH_ALEN);
+
ret = wl1271_cmd_build_probe_req(wl, wl->scan.ssid, wl->scan.ssid_len,
wl->scan.req->ie, wl->scan.req->ie_len,
band);