blob: ac7b39b2aea24ce4a271034ca501d8b9e94c88c4 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Sen, Devendrade5cfe92017-01-31 18:51:15 +05302 * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
Kiet Lam1ed83fc2014-02-19 01:15:45 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam1ed83fc2014-02-19 01:15:45 -080021
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028#if !defined( __VOS_DIAG_CORE_EVENT_H )
29#define __VOS_DIAG_CORE_EVENT_H
30
31/**=========================================================================
32
33 \file vos_event.h
34
35 \brief virtual Operating System Services (vOSS) DIAG Events
36
37 Definitions for vOSS Events
38
Jeff Johnson295189b2012-06-20 16:38:30 -070039
40 ========================================================================*/
41
42/* $Header$ */
43
44/*--------------------------------------------------------------------------
45 Include Files
46 ------------------------------------------------------------------------*/
47#include "vos_types.h"
48#include "vos_pack_align.h"
49#include "i_vos_diag_core_event.h"
50
51/*--------------------------------------------------------------------------
52 Preprocessor definitions and constants
53 ------------------------------------------------------------------------*/
54#ifdef __cplusplus
55extern "C" {
56#endif /* __cplusplus */
57
Sushant Kaushik83392fa2015-05-05 17:44:40 +053058#define WAKE_LOCK_NAME_LEN 80
59
60
Jeff Johnson295189b2012-06-20 16:38:30 -070061/*-------------------------------------------------------------------------
62 Event ID: EVENT_WLAN_SECURITY
63 ------------------------------------------------------------------------*/
64typedef struct
65{
66 v_U8_t eventId;
67 v_U8_t authMode;
68 v_U8_t encryptionModeUnicast;
69 v_U8_t encryptionModeMulticast;
70 v_U8_t pmkIDMatch;
71 v_U8_t bssid[6];
72 v_U8_t keyId;
73 v_U8_t status;
74} vos_event_wlan_security_payload_type;
75
76/*-------------------------------------------------------------------------
Abhishek Singh9ecac4a2016-01-06 13:47:33 +053077 Event ID: EVENT_WLAN_STATUS_V2
Jeff Johnson295189b2012-06-20 16:38:30 -070078 ------------------------------------------------------------------------*/
79typedef struct
80{
81 v_U8_t eventId;
Abhishek Singh9ecac4a2016-01-06 13:47:33 +053082 v_U8_t ssid[32];
Jeff Johnson295189b2012-06-20 16:38:30 -070083 v_U8_t bssType;
84 v_U8_t rssi;
85 v_U8_t channel;
86 v_U8_t qosCapability;
87 v_U8_t authType;
88 v_U8_t encryptionType;
89 v_U8_t reason;
90 v_U8_t reasonDisconnect;
91} vos_event_wlan_status_payload_type;
92
93/*-------------------------------------------------------------------------
94 Event ID: EVENT_WLAN_HANDOFF
95 ------------------------------------------------------------------------*/
96typedef struct
97{
98 v_U8_t eventId;
99 v_U8_t currentApBssid[6];
100 v_U8_t currentApRssi;
101 v_U8_t candidateApBssid[6];
102 v_U8_t candidateApRssi;
103} vos_event_wlan_handoff_payload_type;
104
105/*-------------------------------------------------------------------------
106 Event ID: EVENT_WLAN_VCC
107 ------------------------------------------------------------------------*/
108typedef struct
109{
110 v_U8_t eventId;
111 v_U8_t rssi;
112 v_U8_t txPer;
113 v_U8_t rxPer;
114 int linkQuality;
115} vos_event_wlan_vcc_payload_type;
116
117/*-------------------------------------------------------------------------
118 Event ID: EVENT_WLAN_QOS
119 ------------------------------------------------------------------------*/
120typedef struct
121{
122 v_U8_t eventId;
123 v_U8_t reasonCode;
124} vos_event_wlan_qos_payload_type;
125
126/*-------------------------------------------------------------------------
127 Event ID: EVENT_WLAN_PE
128 ------------------------------------------------------------------------*/
129typedef struct
130{
131 char bssid[6];
132 v_U16_t event_type;
133 v_U16_t sme_state;
134 v_U16_t mlm_state;
135 v_U16_t status;
136 v_U16_t reason_code;
137} vos_event_wlan_pe_payload_type;
138
139/*-------------------------------------------------------------------------
140 Event ID: EVENT_WLAN_ADD_BLOCK_ACK_SUCCESS
141 ------------------------------------------------------------------------*/
142typedef struct
143{
144 char ucBaPeerMac[6];
145 v_U8_t ucBaTid;
146 v_U8_t ucBaBufferSize;
147 v_U16_t usBaSSN;
148 v_U8_t fInitiator;
149} vos_event_wlan_add_block_ack_success_payload_type;
150
151/*-------------------------------------------------------------------------
152 Event ID: EVENT_WLAN_ADD_BLOCK_ACK_FAILED
153 ------------------------------------------------------------------------*/
154typedef struct
155{
156 char ucBaPeerMac[6];
157 v_U8_t ucBaTid;
158 v_U8_t ucReasonCode;
159 v_U8_t fInitiator;
160} vos_event_wlan_add_block_ack_failed_payload_type;
161
162/*-------------------------------------------------------------------------
163 Event ID: EVENT_WLAN_DELETE_BLOCK_ACK_SUCCESS
164 ------------------------------------------------------------------------*/
165typedef struct
166{
167 char ucBaPeerMac[6];
168 v_U8_t ucBaTid;
169 v_U8_t ucDeleteReasonCode;
170} vos_event_wlan_add_block_ack_deleted_payload_type;
171
172/*-------------------------------------------------------------------------
173 Event ID: EVENT_WLAN_DELETE_BLOCK_ACK_FAILED
174 ------------------------------------------------------------------------*/
175typedef struct
176{
177 char ucBaPeerMac[6];
178 v_U8_t ucBaTid;
179 v_U8_t ucDeleteReasonCode;
180 v_U8_t ucFailReasonCode;
181} vos_event_wlan_add_block_ack_delete_failed_payload_type;
182
183/*-------------------------------------------------------------------------
184 Event ID: EVENT_WLAN_BSS_PROTECTION
185 ------------------------------------------------------------------------*/
186typedef struct
187{
188 v_U8_t event_type;
189 v_U8_t prot_type;
190} vos_event_wlan_bss_prot_payload_type;
191
192/*-------------------------------------------------------------------------
193 Event ID: EVENT_WLAN_BRINGUP_STATUS
194 ------------------------------------------------------------------------*/
195typedef struct
196{
197 v_U16_t wlanStatus;
198 char driverVersion[10];
199} vos_event_wlan_bringup_status_payload_type;
200
201VOS_PACK_START
202
203/*-------------------------------------------------------------------------
204 Event ID: EVENT_WLAN_POWERSAVE_GENERIC
205 ------------------------------------------------------------------------*/
206typedef VOS_PACK_PRE struct
207{
208 v_U8_t event_subtype;
209 v_U32_t imps_period;
210 v_U8_t full_power_request_reason;
211 v_U8_t pmc_current_state;
212 v_U8_t enable_disable_powersave_mode;
213 v_U8_t winmob_d_power_state;
214 v_U8_t dtim_period;
215 v_U16_t final_listen_intv;
216 v_U16_t bmps_auto_timer_duration;
217 v_U16_t bmps_period;
218} VOS_PACK_POST vos_event_wlan_powersave_payload_type;
219
220VOS_PACK_END
221
222/*-------------------------------------------------------------------------
223 Event ID: EVENT_WLAN_POWERSAVE_WOW
224 ------------------------------------------------------------------------*/
225typedef struct
226{
227 v_U8_t event_subtype;
228 v_U8_t wow_type;
229 v_U8_t wow_magic_pattern[6];
230 v_U8_t wow_del_ptrn_id;
231 v_U8_t wow_wakeup_cause;
232 v_U8_t wow_wakeup_cause_pbm_ptrn_id;
233} vos_event_wlan_powersave_wow_payload_type;
234
235/*-------------------------------------------------------------------------
236 Event ID: EVENT_WLAN_BTC
237 ------------------------------------------------------------------------*/
238typedef struct
239{
240 v_U8_t eventId;
241 v_U8_t btAddr[6];
242 v_U16_t connHandle;
243 v_U8_t connStatus;
244 v_U8_t linkType;
245 v_U8_t scoInterval;
246 v_U8_t scoWindow;
247 v_U8_t retransWindow;
248 v_U8_t mode;
249} vos_event_wlan_btc_type;
250
Sushant Kaushika8073312015-05-04 17:33:52 +0530251/*-------------------------------------------------------------------------
252 Event ID: EVENT_WLAN_EAPOL
253 ------------------------------------------------------------------------*/
254struct vos_event_wlan_eapol
255{
256 uint8_t event_sub_type;
257 uint8_t eapol_packet_type;
258 uint16_t eapol_key_info;
259 uint16_t eapol_rate;
260 uint8_t dest_addr[6];
261 uint8_t src_addr[6];
262};
Sushant Kaushik83392fa2015-05-05 17:44:40 +0530263/*-------------------------------------------------------------------------
264 Event ID: EVENT_WLAN_WAKE_LOCK
265 ------------------------------------------------------------------------*/
266/*
267 * struct vos_event_wlan_wake_lock - Structure holding the wakelock information
268 * @status: Whether the wakelock is taken/released
269 * @reason: Reason for taking this wakelock
270 * @timeout: Timeout value in case of timed wakelocks
271 * @name_len: Length of the name of the wakelock that will follow
272 * @name: Name of the wakelock
273 *
274 * This structure will hold the wakelock informations
275 */
276struct vos_event_wlan_wake_lock
277{
278 uint32_t status;
279 uint32_t reason;
280 uint32_t timeout;
281 uint32_t name_len;
282 char name[WAKE_LOCK_NAME_LEN];
283};
284
Abhishek Singh96568922016-01-05 15:28:12 +0530285/**
286 * struct vos_event_tdls_teardown - tdls teardown diag event
287 * @reason: reason for tear down
288 * @peer_mac: peer mac
289 *
290 * This structure contain tdls teardown diag event info
291 */
292
293struct vos_event_tdls_teardown {
294 uint32_t reason;
295 uint8_t peer_mac[6];
296};
Sushant Kaushik83392fa2015-05-05 17:44:40 +0530297
Abhishek Singh5f544022016-01-05 15:57:19 +0530298/**
299 * struct vos_event_tdls_enable_link - tdls enable link event
300 * @peer_mac: peer mac
301 * @is_off_chan_supported: if off channel supported
302 * @is_off_chan_configured: if off channel configured
303 * @is_off_chan_established: if off channel established
304 *
305 * This structure contain tdls enable link diag event info
306 */
307struct vos_event_tdls_enable_link {
308 uint8_t peer_mac[6];
309 uint8_t is_off_chan_supported;
310 uint8_t is_off_chan_configured;
311 uint8_t is_off_chan_established;
312};
313
Abhishek Singh37471cd2016-01-05 17:09:57 +0530314/**
315 * struct vos_event_suspend - suspend/resume state
316 * @state: suspend/resume state
317 *
318 * This structure contains suspend resume diag event info
319 */
320
321struct vos_event_suspend {
322 uint8_t state;
323};
324
Abhishek Singh937ec542016-01-05 18:03:14 +0530325/**
326 * struct vos_event_offload_req - offload state
327 * @offload_type: offload type
328 * @state: enabled or disabled state
329 *
330 * This structure contains offload diag event info
331 */
332
333struct vos_event_offload_req {
334 uint8_t offload_type;
335 uint8_t state;
336};
337
Abhishek Singh48e043d2016-01-05 18:27:29 +0530338/**
339 * struct vos_event_tdls_scan_rejected - scan
340 * rejected due to tdls
341 * @status: rejected status
342 *
343 * This structure contains scan rejected due to
344 * tdls event info
345 */
346struct vos_event_tdls_scan_rejected {
347 uint8_t status;
348};
349
Abhishek Singh888420b2016-01-06 12:28:03 +0530350/**
351 * struct vos_event_tx_rx_mgmt - for TX RX management frame
352 * @event_id: event ID
353 * @tx_rx: tx or rx
354 * @type: type of frame
355 * @action_sub_type: action frame type
356 * @peer_mac: peer mac
357 *
358 * This structure contains tdls TX RX management frame info
359 */
360struct vos_event_tx_rx_mgmt {
361 uint8_t event_id;
362 uint8_t tx_rx;
363 uint8_t type;
364 uint8_t action_sub_type;
365 uint8_t peer_mac[6];
366};
367
368
Sachin Ahujac08f72a2015-09-22 15:25:47 +0530369/*-------------------------------------------------------------------------
370 Event ID: EVENT_WLAN_LOG_COMPLETE
371 ------------------------------------------------------------------------*/
372/**
373 * struct vos_event_wlan_log_complete - Holds log completion details
374 * @is_fatal: Indicates if the event is fatal or not
375 * @indicator: Source of the bug report - Framework/Host/Firmware
376 * @reason_code: Reason for triggering bug report
377 * @reserved: Reserved field
378 *
379 * This structure holds the log completion related information
380 */
381struct vos_event_wlan_log_complete {
382 uint32_t is_fatal;
383 uint32_t indicator;
384 uint32_t reason_code;
385 uint32_t reserved;
386};
Sushant Kaushika8073312015-05-04 17:33:52 +0530387
Sen, Devendrade5cfe92017-01-31 18:51:15 +0530388/*-------------------------------------------------------------------------
389 Event ID: EVENT_WLAN_SSR_REINIT_SUBSYSTEM
390 ------------------------------------------------------------------------*/
391/**
392 * struct host_event_wlan_css - Holds diag event details
393 * @status: Indicates the status of event
394 *
395 * This structure holds the host diag event related information
396 */
397
398struct host_event_wlan_ssr_reinit {
399 uint32_t status;
400};
401
402/*-------------------------------------------------------------------------
403 Event ID: EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM
404 ------------------------------------------------------------------------*/
405/**
406 * struct host_event_wlan_ssr_shutdown - Holds diag event details
407 * @status: Indicates the status of event
408 *
409 * This structure holds the host diag event related information
410 */
411
412struct host_event_wlan_ssr_shutdown {
413 uint32_t status;
414};
415
416/*-------------------------------------------------------------------------
417 Function declarations and documenation
418 ------------------------------------------------------------------------*/
419/**
420 * enum host_ssr_events - Enum containing ssr subtype
421 * @SSR_SUB_SYSTEM_REINIT: Indicate ssr reinit state
422 * @SSR_SUB_SYSTEM_SHUTDOWN: Indicate ssr shutdown state
423 *
424 */
425enum host_ssr_events {
426 SSR_SUB_SYSTEM_REINIT,
427 SSR_SUB_SYSTEM_SHUTDOWN,
428};
Jeff Johnson295189b2012-06-20 16:38:30 -0700429
430/*-------------------------------------------------------------------------
431 Function declarations and documenation
432 ------------------------------------------------------------------------*/
Sushant Kaushika8073312015-05-04 17:33:52 +0530433enum wifi_connectivity_events {
434 WIFI_EVENT_DRIVER_EAPOL_FRAME_TRANSMIT_REQUESTED,
435 WIFI_EVENT_DRIVER_EAPOL_FRAME_RECEIVED,
436};
Sushant Kaushik83392fa2015-05-05 17:44:40 +0530437
438/*
439 * enum wake_lock_reason - Reason for taking wakelock
440* @WIFI_POWER_EVENT_WAKELOCK_DRIVER_INIT: Driver initialization
441 * @WIFI_POWER_EVENT_WAKELOCK_DRIVER_REINIT: Driver re-initialization
442 * @WIFI_POWER_EVENT_WAKELOCK_SCAN: Scan request/response handling
443 * @WIFI_POWER_EVENT_WAKELOCK_RESUME_WLAN: Driver resume
444 * @WIFI_POWER_EVENT_WAKELOCK_ROC: Remain on channel request/response handling
445 * @WIFI_POWER_EVENT_WAKELOCK_HOLD_RX: Wakelocks taken for receive
446 * @WIFI_POWER_EVENT_WAKELOCK_SAP: SoftAP related wakelocks
447 * This enum has the reason codes why the wakelocks were taken/released
448 */
449enum wake_lock_reason {
450 WIFI_POWER_EVENT_WAKELOCK_DRIVER_INIT,
451 WIFI_POWER_EVENT_WAKELOCK_DRIVER_REINIT,
452 WIFI_POWER_EVENT_WAKELOCK_SCAN,
453 WIFI_POWER_EVENT_WAKELOCK_RESUME_WLAN,
454 WIFI_POWER_EVENT_WAKELOCK_ROC,
455 WIFI_POWER_EVENT_WAKELOCK_HOLD_RX,
456 WIFI_POWER_EVENT_WAKELOCK_SAP,
Kapil Gupta04897452017-03-13 12:50:35 +0530457 WIFI_POWER_EVENT_WAKELOCK_FIND_AP_INDICATION,
Sushant Kaushik83392fa2015-05-05 17:44:40 +0530458};
459
Jeff Johnson295189b2012-06-20 16:38:30 -0700460#ifdef __cplusplus
461}
462#endif /* __cplusplus */
463
464#endif // __VOS_DIAG_CORE_EVENT_H