1
2
3
4
5
6
7
8 #ifndef __WL12XX_SCAN_H__
9 #define __WL12XX_SCAN_H__
10
11 #include "../wlcore/wlcore.h"
12 #include "../wlcore/cmd.h"
13 #include "../wlcore/scan.h"
14
15 #define WL12XX_MAX_CHANNELS_5GHZ 23
16
17 struct basic_scan_params {
18
19 __le16 scan_options;
20 u8 role_id;
21
22 u8 n_ch;
23
24
25 u8 n_probe_reqs;
26 u8 tid_trigger;
27 u8 ssid_len;
28 u8 use_ssid_list;
29
30
31 __le32 tx_rate;
32
33 u8 ssid[IEEE80211_MAX_SSID_LEN];
34
35 u8 band;
36
37 u8 scan_tag;
38 u8 padding2[2];
39 } __packed;
40
41 struct basic_scan_channel_params {
42
43 __le32 min_duration;
44 __le32 max_duration;
45 __le32 bssid_lsb;
46 __le16 bssid_msb;
47 u8 early_termination;
48 u8 tx_power_att;
49 u8 channel;
50
51 u8 dfs_candidate;
52 u8 activity_detected;
53 u8 pad;
54 } __packed;
55
56 struct wl1271_cmd_scan {
57 struct wl1271_cmd_header header;
58
59 struct basic_scan_params params;
60 struct basic_scan_channel_params channels[WL1271_SCAN_MAX_CHANNELS];
61
62
63 u8 addr[ETH_ALEN];
64 u8 padding[2];
65 } __packed;
66
67 struct wl1271_cmd_sched_scan_config {
68 struct wl1271_cmd_header header;
69
70 __le32 intervals[SCAN_MAX_CYCLE_INTERVALS];
71
72 s8 rssi_threshold;
73 s8 snr_threshold;
74
75 u8 cycles;
76 u8 report_after;
77 u8 terminate;
78
79 u8 tag;
80 u8 bss_type;
81 u8 filter_type;
82
83 u8 ssid_len;
84 u8 ssid[IEEE80211_MAX_SSID_LEN];
85
86 u8 n_probe_reqs;
87
88 u8 passive[SCAN_MAX_BANDS];
89 u8 active[SCAN_MAX_BANDS];
90
91 u8 dfs;
92
93 u8 n_pactive_ch;
94
95 u8 role_id;
96 u8 padding[1];
97 struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ];
98 struct conn_scan_ch_params channels_5[WL12XX_MAX_CHANNELS_5GHZ];
99 struct conn_scan_ch_params channels_4[MAX_CHANNELS_4GHZ];
100 } __packed;
101
102 struct wl1271_cmd_sched_scan_start {
103 struct wl1271_cmd_header header;
104
105 u8 tag;
106 u8 role_id;
107 u8 padding[2];
108 } __packed;
109
110 struct wl1271_cmd_sched_scan_stop {
111 struct wl1271_cmd_header header;
112
113 u8 tag;
114 u8 role_id;
115 u8 padding[2];
116 } __packed;
117
118 int wl12xx_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif,
119 struct cfg80211_scan_request *req);
120 int wl12xx_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif);
121 void wl12xx_scan_completed(struct wl1271 *wl, struct wl12xx_vif *wlvif);
122 int wl12xx_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif,
123 struct cfg80211_sched_scan_request *req,
124 struct ieee80211_scan_ies *ies);
125 void wl12xx_scan_sched_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif);
126 #endif