diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h | 94 |
1 files changed, 51 insertions, 43 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h index d6cced47d561..737774a01c74 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
7 | * | 7 | * |
8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
9 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of version 2 of the GNU General Public License as | 12 | * it under the terms of version 2 of the GNU General Public License as |
@@ -32,7 +32,7 @@ | |||
32 | * BSD LICENSE | 32 | * BSD LICENSE |
33 | * | 33 | * |
34 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. | 34 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
35 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH | 35 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
36 | * All rights reserved. | 36 | * All rights reserved. |
37 | * | 37 | * |
38 | * Redistribution and use in source and binary forms, with or without | 38 | * Redistribution and use in source and binary forms, with or without |
@@ -274,50 +274,18 @@ struct iwl_scan_offload_profile_cfg { | |||
274 | } __packed; | 274 | } __packed; |
275 | 275 | ||
276 | /** | 276 | /** |
277 | * iwl_scan_offload_schedule - schedule of scan offload | 277 | * iwl_scan_schedule_lmac - schedule of scan offload |
278 | * @delay: delay between iterations, in seconds. | 278 | * @delay: delay between iterations, in seconds. |
279 | * @iterations: num of scan iterations | 279 | * @iterations: num of scan iterations |
280 | * @full_scan_mul: number of partial scans before each full scan | 280 | * @full_scan_mul: number of partial scans before each full scan |
281 | */ | 281 | */ |
282 | struct iwl_scan_offload_schedule { | 282 | struct iwl_scan_schedule_lmac { |
283 | __le16 delay; | 283 | __le16 delay; |
284 | u8 iterations; | 284 | u8 iterations; |
285 | u8 full_scan_mul; | 285 | u8 full_scan_mul; |
286 | } __packed; | 286 | } __packed; /* SCAN_SCHEDULE_API_S */ |
287 | |||
288 | /* | ||
289 | * iwl_scan_offload_flags | ||
290 | * | ||
291 | * IWL_SCAN_OFFLOAD_FLAG_PASS_ALL: pass all results - no filtering. | ||
292 | * IWL_SCAN_OFFLOAD_FLAG_CACHED_CHANNEL: add cached channels to partial scan. | ||
293 | * IWL_SCAN_OFFLOAD_FLAG_EBS_QUICK_MODE: EBS duration is 100mSec - typical | ||
294 | * beacon period. Finding channel activity in this mode is not guaranteed. | ||
295 | * IWL_SCAN_OFFLOAD_FLAG_EBS_ACCURATE_MODE: EBS duration is 200mSec. | ||
296 | * Assuming beacon period is 100ms finding channel activity is guaranteed. | ||
297 | */ | ||
298 | enum iwl_scan_offload_flags { | ||
299 | IWL_SCAN_OFFLOAD_FLAG_PASS_ALL = BIT(0), | ||
300 | IWL_SCAN_OFFLOAD_FLAG_CACHED_CHANNEL = BIT(2), | ||
301 | IWL_SCAN_OFFLOAD_FLAG_EBS_QUICK_MODE = BIT(5), | ||
302 | IWL_SCAN_OFFLOAD_FLAG_EBS_ACCURATE_MODE = BIT(6), | ||
303 | }; | ||
304 | |||
305 | /** | ||
306 | * iwl_scan_offload_req - scan offload request command | ||
307 | * @flags: bitmap - enum iwl_scan_offload_flags. | ||
308 | * @watchdog: maximum scan duration in TU. | ||
309 | * @delay: delay in seconds before first iteration. | ||
310 | * @schedule_line: scan offload schedule, for fast and regular scan. | ||
311 | */ | ||
312 | struct iwl_scan_offload_req { | ||
313 | __le16 flags; | ||
314 | __le16 watchdog; | ||
315 | __le16 delay; | ||
316 | __le16 reserved; | ||
317 | struct iwl_scan_offload_schedule schedule_line[2]; | ||
318 | } __packed; | ||
319 | 287 | ||
320 | enum iwl_scan_offload_compleate_status { | 288 | enum iwl_scan_offload_complete_status { |
321 | IWL_SCAN_OFFLOAD_COMPLETED = 1, | 289 | IWL_SCAN_OFFLOAD_COMPLETED = 1, |
322 | IWL_SCAN_OFFLOAD_ABORTED = 2, | 290 | IWL_SCAN_OFFLOAD_ABORTED = 2, |
323 | }; | 291 | }; |
@@ -326,6 +294,7 @@ enum iwl_scan_ebs_status { | |||
326 | IWL_SCAN_EBS_SUCCESS, | 294 | IWL_SCAN_EBS_SUCCESS, |
327 | IWL_SCAN_EBS_FAILED, | 295 | IWL_SCAN_EBS_FAILED, |
328 | IWL_SCAN_EBS_CHAN_NOT_FOUND, | 296 | IWL_SCAN_EBS_CHAN_NOT_FOUND, |
297 | IWL_SCAN_EBS_INACTIVE, | ||
329 | }; | 298 | }; |
330 | 299 | ||
331 | /** | 300 | /** |
@@ -463,8 +432,19 @@ enum iwl_scan_priority { | |||
463 | IWL_SCAN_PRIORITY_HIGH, | 432 | IWL_SCAN_PRIORITY_HIGH, |
464 | }; | 433 | }; |
465 | 434 | ||
435 | enum iwl_scan_priority_ext { | ||
436 | IWL_SCAN_PRIORITY_EXT_0_LOWEST, | ||
437 | IWL_SCAN_PRIORITY_EXT_1, | ||
438 | IWL_SCAN_PRIORITY_EXT_2, | ||
439 | IWL_SCAN_PRIORITY_EXT_3, | ||
440 | IWL_SCAN_PRIORITY_EXT_4, | ||
441 | IWL_SCAN_PRIORITY_EXT_5, | ||
442 | IWL_SCAN_PRIORITY_EXT_6, | ||
443 | IWL_SCAN_PRIORITY_EXT_7_HIGHEST, | ||
444 | }; | ||
445 | |||
466 | /** | 446 | /** |
467 | * iwl_scan_req_unified_lmac - SCAN_REQUEST_CMD_API_S_VER_1 | 447 | * iwl_scan_req_lmac - SCAN_REQUEST_CMD_API_S_VER_1 |
468 | * @reserved1: for alignment and future use | 448 | * @reserved1: for alignment and future use |
469 | * @channel_num: num of channels to scan | 449 | * @channel_num: num of channels to scan |
470 | * @active-dwell: dwell time for active channels | 450 | * @active-dwell: dwell time for active channels |
@@ -487,7 +467,7 @@ enum iwl_scan_priority { | |||
487 | * @channel_opt: channel optimization options, for full and partial scan | 467 | * @channel_opt: channel optimization options, for full and partial scan |
488 | * @data: channel configuration and probe request packet. | 468 | * @data: channel configuration and probe request packet. |
489 | */ | 469 | */ |
490 | struct iwl_scan_req_unified_lmac { | 470 | struct iwl_scan_req_lmac { |
491 | /* SCAN_REQUEST_FIXED_PART_API_S_VER_7 */ | 471 | /* SCAN_REQUEST_FIXED_PART_API_S_VER_7 */ |
492 | __le32 reserved1; | 472 | __le32 reserved1; |
493 | u8 n_channels; | 473 | u8 n_channels; |
@@ -508,7 +488,7 @@ struct iwl_scan_req_unified_lmac { | |||
508 | /* SCAN_REQ_PERIODIC_PARAMS_API_S */ | 488 | /* SCAN_REQ_PERIODIC_PARAMS_API_S */ |
509 | __le32 iter_num; | 489 | __le32 iter_num; |
510 | __le32 delay; | 490 | __le32 delay; |
511 | struct iwl_scan_offload_schedule schedule[2]; | 491 | struct iwl_scan_schedule_lmac schedule[2]; |
512 | struct iwl_scan_channel_opt channel_opt[2]; | 492 | struct iwl_scan_channel_opt channel_opt[2]; |
513 | u8 data[]; | 493 | u8 data[]; |
514 | } __packed; | 494 | } __packed; |
@@ -582,7 +562,11 @@ struct iwl_mvm_umac_cmd_hdr { | |||
582 | u8 ver; | 562 | u8 ver; |
583 | } __packed; | 563 | } __packed; |
584 | 564 | ||
585 | #define IWL_MVM_MAX_SIMULTANEOUS_SCANS 8 | 565 | /* The maximum of either of these cannot exceed 8, because we use an |
566 | * 8-bit mask (see IWL_MVM_SCAN_MASK in mvm.h). | ||
567 | */ | ||
568 | #define IWL_MVM_MAX_UMAC_SCANS 8 | ||
569 | #define IWL_MVM_MAX_LMAC_SCANS 1 | ||
586 | 570 | ||
587 | enum scan_config_flags { | 571 | enum scan_config_flags { |
588 | SCAN_CONFIG_FLAG_ACTIVATE = BIT(0), | 572 | SCAN_CONFIG_FLAG_ACTIVATE = BIT(0), |
@@ -676,7 +660,8 @@ struct iwl_scan_config { | |||
676 | * iwl_umac_scan_flags | 660 | * iwl_umac_scan_flags |
677 | *@IWL_UMAC_SCAN_FLAG_PREEMPTIVE: scan process triggered by this scan request | 661 | *@IWL_UMAC_SCAN_FLAG_PREEMPTIVE: scan process triggered by this scan request |
678 | * can be preempted by other scan requests with higher priority. | 662 | * can be preempted by other scan requests with higher priority. |
679 | * The low priority scan is aborted. | 663 | * The low priority scan will be resumed when the higher proirity scan is |
664 | * completed. | ||
680 | *@IWL_UMAC_SCAN_FLAG_START_NOTIF: notification will be sent to the driver | 665 | *@IWL_UMAC_SCAN_FLAG_START_NOTIF: notification will be sent to the driver |
681 | * when scan starts. | 666 | * when scan starts. |
682 | */ | 667 | */ |
@@ -865,4 +850,27 @@ struct iwl_scan_offload_profiles_query { | |||
865 | struct iwl_scan_offload_profile_match matches[IWL_SCAN_MAX_PROFILES]; | 850 | struct iwl_scan_offload_profile_match matches[IWL_SCAN_MAX_PROFILES]; |
866 | } __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */ | 851 | } __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */ |
867 | 852 | ||
853 | /** | ||
854 | * struct iwl_umac_scan_iter_complete_notif - notifies end of scanning iteration | ||
855 | * @uid: scan id, &enum iwl_umac_scan_uid_offsets | ||
856 | * @scanned_channels: number of channels scanned and number of valid elements in | ||
857 | * results array | ||
858 | * @status: one of SCAN_COMP_STATUS_* | ||
859 | * @bt_status: BT on/off status | ||
860 | * @last_channel: last channel that was scanned | ||
861 | * @tsf_low: TSF timer (lower half) in usecs | ||
862 | * @tsf_high: TSF timer (higher half) in usecs | ||
863 | * @results: array of scan results, only "scanned_channels" of them are valid | ||
864 | */ | ||
865 | struct iwl_umac_scan_iter_complete_notif { | ||
866 | __le32 uid; | ||
867 | u8 scanned_channels; | ||
868 | u8 status; | ||
869 | u8 bt_status; | ||
870 | u8 last_channel; | ||
871 | __le32 tsf_low; | ||
872 | __le32 tsf_high; | ||
873 | struct iwl_scan_results_notif results[]; | ||
874 | } __packed; /* SCAN_ITER_COMPLETE_NTF_UMAC_API_S_VER_1 */ | ||
875 | |||
868 | #endif | 876 | #endif |