* [PATCH 0/2] wl12xx: some improvements in scheduled scan support
@ 2011-08-23 15:34 Luciano Coelho
2011-08-23 15:34 ` [PATCH 1/2] wl12xx: add support for multiple SSIDs in sched_scan Luciano Coelho
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luciano Coelho @ 2011-08-23 15:34 UTC (permalink / raw)
To: coelho; +Cc: linux-wireless
Hi,
Here are a couple of patches to improve support for scheduled scan in wl12xx.
With these patches we add support for more than one SSID in scheduled scans.
Cheers,
Luca.
Luciano Coelho (2):
wl12xx: add support for multiple SSIDs in sched_scan
wl12xx: use SCAN_SSID_TYPE_PUBLIC when using the wildcard in
sched_scan
drivers/net/wireless/wl12xx/main.c | 2 +-
drivers/net/wireless/wl12xx/scan.c | 66 ++++++++++++++++++++++++++++++++----
2 files changed, 60 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] wl12xx: add support for multiple SSIDs in sched_scan
2011-08-23 15:34 [PATCH 0/2] wl12xx: some improvements in scheduled scan support Luciano Coelho
@ 2011-08-23 15:34 ` Luciano Coelho
2011-08-23 15:34 ` [PATCH 2/2] wl12xx: use SCAN_SSID_TYPE_PUBLIC when using the wildcard " Luciano Coelho
2011-08-25 7:25 ` [PATCH 0/2] wl12xx: some improvements in scheduled scan support Luciano Coelho
2 siblings, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2011-08-23 15:34 UTC (permalink / raw)
To: coelho; +Cc: linux-wireless
The wl12xx firmwares support multiple SSIDs in a single sched_scan
run. This patch implements support for it.
We use three different types os sched_scan: FILTER_ANY (ie. not
filtering, only wildcard SSID in the probe_reqs); FILTER_LIST (ie. send out
probe_reqs with the specified SSIDs and only report if they are
found); and FILTER_DISABLED (ie. send out probe_reqs with the
specified SSIDs, but report anything found).
Since we still don't have proper filter support in nl80211/cfg80211
yet, we cannot use filters when the wildcard SSID is used. Thus, we
will not filter anything if the wildcard SSID is specified.
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
drivers/net/wireless/wl12xx/main.c | 2 +-
drivers/net/wireless/wl12xx/scan.c | 63 ++++++++++++++++++++++++++++++++----
2 files changed, 57 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index ac09d77..e944de1 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -4475,7 +4475,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP);
wl->hw->wiphy->max_scan_ssids = 1;
- wl->hw->wiphy->max_sched_scan_ssids = 1;
+ wl->hw->wiphy->max_sched_scan_ssids = 8;
/*
* Maximum length of elements in scanning probe request templates
* should be the maximum length possible for a template, without
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index 7229eaa..af9d53c 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -473,6 +473,48 @@ wl1271_scan_sched_scan_channels(struct wl1271 *wl,
cfg->passive[2] || cfg->active[2];
}
+/* Returns 0 if no wildcard is used, 1 if wildcard is used or a
+ * negative value on error */
+static int
+wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl,
+ struct cfg80211_sched_scan_request *req)
+{
+ struct wl1271_cmd_sched_scan_ssid_list *cmd = NULL;
+ struct cfg80211_ssid *ssid = req->ssids;
+ int ret, wildcard = 0;
+
+ wl1271_debug(DEBUG_CMD, "cmd sched scan ssid list");
+
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
+ if (!cmd)
+ return -ENOMEM;
+
+ while ((cmd->n_ssids < req->n_ssids) && ssid) {
+ if (ssid->ssid_len == 0)
+ wildcard = 1;
+ cmd->ssids[cmd->n_ssids].type = SCAN_SSID_TYPE_HIDDEN;
+ cmd->ssids[cmd->n_ssids].len = ssid->ssid_len;
+ memcpy(cmd->ssids[cmd->n_ssids].ssid, ssid->ssid,
+ ssid->ssid_len);
+ ssid++;
+ cmd->n_ssids++;
+ }
+
+ wl1271_dump(DEBUG_SCAN, "SSID_LIST: ", cmd, sizeof(*cmd));
+
+ ret = wl1271_cmd_send(wl, CMD_CONNECTION_SCAN_SSID_CFG, cmd,
+ sizeof(*cmd), 0);
+ if (ret < 0) {
+ wl1271_error("cmd sched scan ssid list failed");
+ goto out;
+ }
+
+ ret = wildcard;
+out:
+ kfree(cmd);
+ return ret;
+}
+
int wl1271_scan_sched_scan_config(struct wl1271 *wl,
struct cfg80211_sched_scan_request *req,
struct ieee80211_sched_scan_ies *ies)
@@ -504,14 +546,21 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
for (i = 0; i < SCAN_MAX_CYCLE_INTERVALS; i++)
cfg->intervals[i] = cpu_to_le32(req->interval);
- if (!force_passive && req->ssids[0].ssid_len && req->ssids[0].ssid) {
- cfg->filter_type = SCAN_SSID_FILTER_SPECIFIC;
- cfg->ssid_len = req->ssids[0].ssid_len;
- memcpy(cfg->ssid, req->ssids[0].ssid,
- req->ssids[0].ssid_len);
- } else {
+ cfg->ssid_len = 0;
+ if (req->n_ssids == 0) {
+ wl1271_debug(DEBUG_SCAN, "using SCAN_SSID_FILTER_ANY");
cfg->filter_type = SCAN_SSID_FILTER_ANY;
- cfg->ssid_len = 0;
+ } else {
+ ret = wl12xx_scan_sched_scan_ssid_list(wl, req);
+ if (ret < 0)
+ goto out;
+ if (ret) {
+ wl1271_debug(DEBUG_SCAN, "using SCAN_SSID_FILTER_DISABLED");
+ cfg->filter_type = SCAN_SSID_FILTER_DISABLED;
+ } else {
+ wl1271_debug(DEBUG_SCAN, "using SCAN_SSID_FILTER_LIST");
+ cfg->filter_type = SCAN_SSID_FILTER_LIST;
+ }
}
if (!wl1271_scan_sched_scan_channels(wl, req, cfg)) {
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] wl12xx: use SCAN_SSID_TYPE_PUBLIC when using the wildcard in sched_scan
2011-08-23 15:34 [PATCH 0/2] wl12xx: some improvements in scheduled scan support Luciano Coelho
2011-08-23 15:34 ` [PATCH 1/2] wl12xx: add support for multiple SSIDs in sched_scan Luciano Coelho
@ 2011-08-23 15:34 ` Luciano Coelho
2011-08-25 7:25 ` [PATCH 0/2] wl12xx: some improvements in scheduled scan support Luciano Coelho
2 siblings, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2011-08-23 15:34 UTC (permalink / raw)
To: coelho; +Cc: linux-wireless
When we are scanning for the wildcard SSID in a scheduled scan, we
should use SCAN_SSID_TYPE_PUBLIC so that we don't filter out the scan
results.
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
drivers/net/wireless/wl12xx/scan.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index af9d53c..af4ad23 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -490,9 +490,12 @@ wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl,
return -ENOMEM;
while ((cmd->n_ssids < req->n_ssids) && ssid) {
- if (ssid->ssid_len == 0)
+ if (ssid->ssid_len == 0) {
wildcard = 1;
- cmd->ssids[cmd->n_ssids].type = SCAN_SSID_TYPE_HIDDEN;
+ cmd->ssids[cmd->n_ssids].type = SCAN_SSID_TYPE_PUBLIC;
+ } else {
+ cmd->ssids[cmd->n_ssids].type = SCAN_SSID_TYPE_HIDDEN;
+ }
cmd->ssids[cmd->n_ssids].len = ssid->ssid_len;
memcpy(cmd->ssids[cmd->n_ssids].ssid, ssid->ssid,
ssid->ssid_len);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] wl12xx: some improvements in scheduled scan support
2011-08-23 15:34 [PATCH 0/2] wl12xx: some improvements in scheduled scan support Luciano Coelho
2011-08-23 15:34 ` [PATCH 1/2] wl12xx: add support for multiple SSIDs in sched_scan Luciano Coelho
2011-08-23 15:34 ` [PATCH 2/2] wl12xx: use SCAN_SSID_TYPE_PUBLIC when using the wildcard " Luciano Coelho
@ 2011-08-25 7:25 ` Luciano Coelho
2 siblings, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2011-08-25 7:25 UTC (permalink / raw)
To: linux-wireless
On Tue, 2011-08-23 at 18:34 +0300, Luciano Coelho wrote:
> Hi,
>
> Here are a couple of patches to improve support for scheduled scan in wl12xx.
> With these patches we add support for more than one SSID in scheduled scans.
>
> Cheers,
> Luca.
>
> Luciano Coelho (2):
> wl12xx: add support for multiple SSIDs in sched_scan
> wl12xx: use SCAN_SSID_TYPE_PUBLIC when using the wildcard in
> sched_scan
>
> drivers/net/wireless/wl12xx/main.c | 2 +-
> drivers/net/wireless/wl12xx/scan.c | 66 ++++++++++++++++++++++++++++++++----
> 2 files changed, 60 insertions(+), 8 deletions(-)
Applied this series.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-25 7:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-23 15:34 [PATCH 0/2] wl12xx: some improvements in scheduled scan support Luciano Coelho
2011-08-23 15:34 ` [PATCH 1/2] wl12xx: add support for multiple SSIDs in sched_scan Luciano Coelho
2011-08-23 15:34 ` [PATCH 2/2] wl12xx: use SCAN_SSID_TYPE_PUBLIC when using the wildcard " Luciano Coelho
2011-08-25 7:25 ` [PATCH 0/2] wl12xx: some improvements in scheduled scan support Luciano Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox