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_EVENT_H__
9 #define __WL18XX_EVENT_H__
11 #include "../wlcore/wlcore.h"
14 SCAN_COMPLETE_EVENT_ID
= BIT(8),
15 RADAR_DETECTED_EVENT_ID
= BIT(9),
16 CHANNEL_SWITCH_COMPLETE_EVENT_ID
= BIT(10),
17 BSS_LOSS_EVENT_ID
= BIT(11),
18 MAX_TX_FAILURE_EVENT_ID
= BIT(12),
19 DUMMY_PACKET_EVENT_ID
= BIT(13),
20 INACTIVE_STA_EVENT_ID
= BIT(14),
21 PEER_REMOVE_COMPLETE_EVENT_ID
= BIT(15),
22 PERIODIC_SCAN_COMPLETE_EVENT_ID
= BIT(16),
23 BA_SESSION_RX_CONSTRAINT_EVENT_ID
= BIT(17),
24 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID
= BIT(18),
25 DFS_CHANNELS_CONFIG_COMPLETE_EVENT
= BIT(19),
26 PERIODIC_SCAN_REPORT_EVENT_ID
= BIT(20),
27 RX_BA_WIN_SIZE_CHANGE_EVENT_ID
= BIT(21),
28 SMART_CONFIG_SYNC_EVENT_ID
= BIT(22),
29 SMART_CONFIG_DECODE_EVENT_ID
= BIT(23),
30 TIME_SYNC_EVENT_ID
= BIT(24),
31 FW_LOGGER_INDICATION
= BIT(25),
34 enum wl18xx_radar_types
{
40 struct wl18xx_event_mailbox
{
43 u8 number_of_scan_results
;
44 u8 number_of_sched_scan_results
;
46 __le16 channel_switch_role_id_bitmap
;
48 s8 rssi_snr_trigger_metric
[NUM_OF_RSSI_SNR_TRIGGERS
];
50 /* bitmap of removed links */
51 __le32 hlid_removed_bitmap
;
53 /* rx ba constraint */
54 __le16 rx_ba_role_id_bitmap
; /* 0xfff means any role. */
55 __le16 rx_ba_allowed_bitmap
;
57 /* bitmap of roc completed (by role id) */
58 __le16 roc_completed_bitmap
;
60 /* bitmap of stations (by role id) with bss loss */
61 __le16 bss_loss_bitmap
;
63 /* bitmap of stations (by HLID) which exceeded max tx retries */
64 __le16 tx_retry_exceeded_bitmap
;
66 /* time sync high msb*/
67 __le16 time_sync_tsf_high_msb
;
69 /* bitmap of inactive stations (by HLID) */
70 __le16 inactive_sta_bitmap
;
72 /* time sync high lsb*/
73 __le16 time_sync_tsf_high_lsb
;
75 /* rx BA win size indicated by RX_BA_WIN_SIZE_CHANGE_EVENT_ID */
90 /* smart config sync channel */
94 /* time sync low msb*/
95 __le16 time_sync_tsf_low_msb
;
101 /* time sync low lsb*/
102 __le16 time_sync_tsf_low_lsb
;
106 int wl18xx_wait_for_event(struct wl1271
*wl
, enum wlcore_wait_event event
,
108 int wl18xx_process_mailbox_events(struct wl1271
*wl
);