1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * This file is part of wl12xx
5 * Copyright (C) 2012 Texas Instruments. All rights reserved.
8 #ifndef __WL12XX_EVENT_H__
9 #define __WL12XX_EVENT_H__
11 #include "../wlcore/wlcore.h"
14 MEASUREMENT_START_EVENT_ID
= BIT(8),
15 MEASUREMENT_COMPLETE_EVENT_ID
= BIT(9),
16 SCAN_COMPLETE_EVENT_ID
= BIT(10),
17 WFD_DISCOVERY_COMPLETE_EVENT_ID
= BIT(11),
18 AP_DISCOVERY_COMPLETE_EVENT_ID
= BIT(12),
20 PSPOLL_DELIVERY_FAILURE_EVENT_ID
= BIT(14),
21 ROLE_STOP_COMPLETE_EVENT_ID
= BIT(15),
22 RADAR_DETECTED_EVENT_ID
= BIT(16),
23 CHANNEL_SWITCH_COMPLETE_EVENT_ID
= BIT(17),
24 BSS_LOSE_EVENT_ID
= BIT(18),
25 REGAINED_BSS_EVENT_ID
= BIT(19),
26 MAX_TX_RETRY_EVENT_ID
= BIT(20),
27 DUMMY_PACKET_EVENT_ID
= BIT(21),
28 SOFT_GEMINI_SENSE_EVENT_ID
= BIT(22),
29 CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID
= BIT(23),
30 SOFT_GEMINI_AVALANCHE_EVENT_ID
= BIT(24),
31 PLT_RX_CALIBRATION_COMPLETE_EVENT_ID
= BIT(25),
32 INACTIVE_STA_EVENT_ID
= BIT(26),
33 PEER_REMOVE_COMPLETE_EVENT_ID
= BIT(27),
34 PERIODIC_SCAN_COMPLETE_EVENT_ID
= BIT(28),
35 PERIODIC_SCAN_REPORT_EVENT_ID
= BIT(29),
36 BA_SESSION_RX_CONSTRAINT_EVENT_ID
= BIT(30),
37 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID
= BIT(31),
40 struct wl12xx_event_mailbox
{
46 u8 number_of_scan_results
;
48 u8 completed_scan_status
;
51 u8 soft_gemini_sense_info
;
52 u8 soft_gemini_protective_info
;
53 s8 rssi_snr_trigger_metric
[NUM_OF_RSSI_SNR_TRIGGERS
];
54 u8 change_auto_mode_timeout
;
55 u8 scheduled_scan_status
;
57 /* tuned channel (roc) */
60 __le16 hlid_removed_bitmap
;
62 /* bitmap of aged stations (by HLID) */
63 __le16 sta_aging_status
;
65 /* bitmap of stations (by HLID) which exceeded max tx retries */
66 __le16 sta_tx_retry_exceeded
;
68 /* discovery completed results */
70 u8 number_of_preq_results
;
71 u8 number_of_prsp_results
;
74 /* rx ba constraint */
75 u8 role_id
; /* 0xFF means any role. */
79 /* Channel switch results */
81 u8 channel_switch_role_id
;
82 u8 channel_switch_status
;
85 u8 ps_poll_delivery_failure_role_ids
;
92 int wl12xx_wait_for_event(struct wl1271
*wl
, enum wlcore_wait_event event
,
94 int wl12xx_process_mailbox_events(struct wl1271
*wl
);