1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * This file is part of wl18xx
5 * Copyright (C) 2012 Texas Instruments. All rights reserved.
8 #ifndef __WL18XX_SCAN_H__
9 #define __WL18XX_SCAN_H__
11 #include "../wlcore/wlcore.h"
12 #include "../wlcore/cmd.h"
13 #include "../wlcore/scan.h"
15 struct tracking_ch_params
{
16 struct conn_scan_ch_params channel
;
24 /* probe request rate */
27 WL18XX_SCAN_RATE_1
= 0,
28 WL18XX_SCAN_RATE_5_5
= 1,
29 WL18XX_SCAN_RATE_6
= 2,
32 #define WL18XX_MAX_CHANNELS_5GHZ 32
34 struct wl18xx_cmd_scan_params
{
35 struct wl1271_cmd_header header
;
40 s8 rssi_threshold
; /* for filtering (in dBm) */
41 s8 snr_threshold
; /* for filtering (in dB) */
43 u8 bss_type
; /* for filtering */
44 u8 ssid_from_list
; /* use ssid from configured ssid list */
45 u8 filter
; /* forward only results with matching ssids */
48 * add broadcast ssid in addition to the configured ssids.
49 * the driver should add dummy entry for it (?).
55 u8 n_probe_reqs
; /* Number of probes requests per channel */
56 u8 terminate_after
; /* early terminate scan operation */
58 u8 passive
[SCAN_MAX_BANDS
]; /* number of passive scan channels */
59 u8 active
[SCAN_MAX_BANDS
]; /* number of active scan channels */
60 u8 dfs
; /* number of dfs channels in 5ghz */
61 u8 passive_active
; /* number of passive before active channels 2.4ghz */
63 __le16 short_cycles_msec
;
64 __le16 long_cycles_msec
;
65 u8 short_cycles_count
;
66 u8 total_cycles
; /* 0 - infinite */
71 struct conn_scan_ch_params channels_2
[MAX_CHANNELS_2GHZ
];
72 struct conn_scan_ch_params channels_5
[WL18XX_MAX_CHANNELS_5GHZ
];
73 struct conn_scan_ch_params channels_4
[MAX_CHANNELS_4GHZ
];
75 struct tracking_ch_params channels_tracking
[WL1271_SCAN_MAX_CHANNELS
];
78 u8 ssid
[IEEE80211_MAX_SSID_LEN
];
79 u8 ssid_len
; /* For SCAN_SSID_FILTER_SPECIFIC */
83 /* send SCAN_REPORT_EVENT in periodic scans after each cycle
84 * if number of results >= report_threshold. Must be 0 for
89 /* Should periodic scan stop after a report event was created.
90 * Must be 0 for non periodic scans.
92 u8 terminate_on_report
;
97 struct wl18xx_cmd_scan_stop
{
98 struct wl1271_cmd_header header
;
105 int wl18xx_scan_start(struct wl1271
*wl
, struct wl12xx_vif
*wlvif
,
106 struct cfg80211_scan_request
*req
);
107 int wl18xx_scan_stop(struct wl1271
*wl
, struct wl12xx_vif
*wlvif
);
108 void wl18xx_scan_completed(struct wl1271
*wl
, struct wl12xx_vif
*wlvif
);
109 int wl18xx_sched_scan_start(struct wl1271
*wl
, struct wl12xx_vif
*wlvif
,
110 struct cfg80211_sched_scan_request
*req
,
111 struct ieee80211_scan_ies
*ies
);
112 void wl18xx_scan_sched_scan_stop(struct wl1271
*wl
, struct wl12xx_vif
*wlvif
);