aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wl18xx
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-11-28 04:42:47 -0500
committerLuciano Coelho <coelho@ti.com>2012-12-11 05:37:23 -0500
commit0b70078c38fd1c8d69cf52b93e8c3bdd719a2394 (patch)
tree2d6f22e7b2b5d68fd081cd62e8d87a6b37e08101 /drivers/net/wireless/ti/wl18xx
parentc80daad625b382fcd72ad68a5c0a26933263aa85 (diff)
wlcore: support scan reports during periodic scan
FW API changed and now PERIODIC_SCAN_REPORT_EVENT is sent in case results were found at the end of each sched scan cycle. Previous FW was missing that and broke sched scan. This API change is available from 18xx FW 8.5.0.0.27 [Arik - move changes to 18xx specific files, align FW structures to latest for scan command] Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx')
-rw-r--r--drivers/net/wireless/ti/wl18xx/event.c8
-rw-r--r--drivers/net/wireless/ti/wl18xx/event.h1
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c1
-rw-r--r--drivers/net/wireless/ti/wl18xx/scan.c4
-rw-r--r--drivers/net/wireless/ti/wl18xx/scan.h18
5 files changed, 29 insertions, 3 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/event.c b/drivers/net/wireless/ti/wl18xx/event.c
index 02ef5aa9da6b..c9199d7804c6 100644
--- a/drivers/net/wireless/ti/wl18xx/event.c
+++ b/drivers/net/wireless/ti/wl18xx/event.c
@@ -61,6 +61,14 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl)
61 wl18xx_scan_completed(wl, wl->scan_wlvif); 61 wl18xx_scan_completed(wl, wl->scan_wlvif);
62 } 62 }
63 63
64 if (vector & PERIODIC_SCAN_REPORT_EVENT_ID) {
65 wl1271_debug(DEBUG_EVENT,
66 "PERIODIC_SCAN_REPORT_EVENT (results %d)",
67 mbox->number_of_sched_scan_results);
68
69 wlcore_scan_sched_scan_results(wl);
70 }
71
64 if (vector & PERIODIC_SCAN_COMPLETE_EVENT_ID) 72 if (vector & PERIODIC_SCAN_COMPLETE_EVENT_ID)
65 wlcore_event_sched_scan_completed(wl, 1); 73 wlcore_event_sched_scan_completed(wl, 1);
66 74
diff --git a/drivers/net/wireless/ti/wl18xx/event.h b/drivers/net/wireless/ti/wl18xx/event.h
index b55fd31e471a..398f3d2c0a6c 100644
--- a/drivers/net/wireless/ti/wl18xx/event.h
+++ b/drivers/net/wireless/ti/wl18xx/event.h
@@ -37,6 +37,7 @@ enum {
37 BA_SESSION_RX_CONSTRAINT_EVENT_ID = BIT(17), 37 BA_SESSION_RX_CONSTRAINT_EVENT_ID = BIT(17),
38 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID = BIT(18), 38 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID = BIT(18),
39 DFS_CHANNELS_CONFIG_COMPLETE_EVENT = BIT(19), 39 DFS_CHANNELS_CONFIG_COMPLETE_EVENT = BIT(19),
40 PERIODIC_SCAN_REPORT_EVENT_ID = BIT(20),
40}; 41};
41 42
42struct wl18xx_event_mailbox { 43struct wl18xx_event_mailbox {
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index 0ff9bc7b1f33..ec331e9e0b74 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -890,6 +890,7 @@ static int wl18xx_boot(struct wl1271 *wl)
890 SCAN_COMPLETE_EVENT_ID | 890 SCAN_COMPLETE_EVENT_ID |
891 RSSI_SNR_TRIGGER_0_EVENT_ID | 891 RSSI_SNR_TRIGGER_0_EVENT_ID |
892 PERIODIC_SCAN_COMPLETE_EVENT_ID | 892 PERIODIC_SCAN_COMPLETE_EVENT_ID |
893 PERIODIC_SCAN_REPORT_EVENT_ID |
893 DUMMY_PACKET_EVENT_ID | 894 DUMMY_PACKET_EVENT_ID |
894 PEER_REMOVE_COMPLETE_EVENT_ID | 895 PEER_REMOVE_COMPLETE_EVENT_ID |
895 BA_SESSION_RX_CONSTRAINT_EVENT_ID | 896 BA_SESSION_RX_CONSTRAINT_EVENT_ID |
diff --git a/drivers/net/wireless/ti/wl18xx/scan.c b/drivers/net/wireless/ti/wl18xx/scan.c
index 1df88d5336f3..09d944505ac0 100644
--- a/drivers/net/wireless/ti/wl18xx/scan.c
+++ b/drivers/net/wireless/ti/wl18xx/scan.c
@@ -227,6 +227,10 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl,
227 227
228 cmd->tag = WL1271_SCAN_DEFAULT_TAG; 228 cmd->tag = WL1271_SCAN_DEFAULT_TAG;
229 229
230 /* create a PERIODIC_SCAN_REPORT_EVENT whenever we've got a match */
231 cmd->report_threshold = 1;
232 cmd->terminate_on_report = 0;
233
230 if (cmd->active[0]) { 234 if (cmd->active[0]) {
231 u8 band = IEEE80211_BAND_2GHZ; 235 u8 band = IEEE80211_BAND_2GHZ;
232 ret = wl12xx_cmd_build_probe_req(wl, wlvif, 236 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
diff --git a/drivers/net/wireless/ti/wl18xx/scan.h b/drivers/net/wireless/ti/wl18xx/scan.h
index 5eb8c7fc1567..eadee42689d1 100644
--- a/drivers/net/wireless/ti/wl18xx/scan.h
+++ b/drivers/net/wireless/ti/wl18xx/scan.h
@@ -78,8 +78,7 @@ struct wl18xx_cmd_scan_params {
78 __le16 long_cycles_sec; 78 __le16 long_cycles_sec;
79 u8 short_cycles_count; 79 u8 short_cycles_count;
80 u8 total_cycles; /* 0 - infinite */ 80 u8 total_cycles; /* 0 - infinite */
81 u8 rate; 81 u8 padding[2];
82 u8 padding[1];
83 82
84 union { 83 union {
85 struct { 84 struct {
@@ -93,7 +92,20 @@ struct wl18xx_cmd_scan_params {
93 u8 ssid[IEEE80211_MAX_SSID_LEN]; 92 u8 ssid[IEEE80211_MAX_SSID_LEN];
94 u8 ssid_len; /* For SCAN_SSID_FILTER_SPECIFIC */ 93 u8 ssid_len; /* For SCAN_SSID_FILTER_SPECIFIC */
95 u8 tag; 94 u8 tag;
96 u8 padding1[2]; 95 u8 rate;
96
97 /* send SCAN_REPORT_EVENT in periodic scans after each cycle
98 * if number of results >= report_threshold. Must be 0 for
99 * non periodic scans
100 */
101 u8 report_threshold;
102
103 /* Should periodic scan stop after a report event was created.
104 * Must be 0 for non periodic scans.
105 */
106 u8 terminate_on_report;
107
108 u8 padding1[3];
97} __packed; 109} __packed;
98 110
99struct wl18xx_cmd_scan_stop { 111struct wl18xx_cmd_scan_stop {