Merge branch 'linux-4.4' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into...
[deliverable/linux.git] / drivers / net / wireless / ti / wl18xx / event.h
1 /*
2 * This file is part of wl18xx
3 *
4 * Copyright (C) 2012 Texas Instruments. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 *
20 */
21
22 #ifndef __WL18XX_EVENT_H__
23 #define __WL18XX_EVENT_H__
24
25 #include "../wlcore/wlcore.h"
26
27 enum {
28 SCAN_COMPLETE_EVENT_ID = BIT(8),
29 RADAR_DETECTED_EVENT_ID = BIT(9),
30 CHANNEL_SWITCH_COMPLETE_EVENT_ID = BIT(10),
31 BSS_LOSS_EVENT_ID = BIT(11),
32 MAX_TX_FAILURE_EVENT_ID = BIT(12),
33 DUMMY_PACKET_EVENT_ID = BIT(13),
34 INACTIVE_STA_EVENT_ID = BIT(14),
35 PEER_REMOVE_COMPLETE_EVENT_ID = BIT(15),
36 PERIODIC_SCAN_COMPLETE_EVENT_ID = BIT(16),
37 BA_SESSION_RX_CONSTRAINT_EVENT_ID = BIT(17),
38 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID = BIT(18),
39 DFS_CHANNELS_CONFIG_COMPLETE_EVENT = BIT(19),
40 PERIODIC_SCAN_REPORT_EVENT_ID = BIT(20),
41 SMART_CONFIG_SYNC_EVENT_ID = BIT(22),
42 SMART_CONFIG_DECODE_EVENT_ID = BIT(23),
43 TIME_SYNC_EVENT_ID = BIT(24),
44 };
45
46 enum wl18xx_radar_types {
47 RADAR_TYPE_NONE,
48 RADAR_TYPE_REGULAR,
49 RADAR_TYPE_CHIRP
50 };
51
52 struct wl18xx_event_mailbox {
53 __le32 events_vector;
54
55 u8 number_of_scan_results;
56 u8 number_of_sched_scan_results;
57
58 __le16 channel_switch_role_id_bitmap;
59
60 s8 rssi_snr_trigger_metric[NUM_OF_RSSI_SNR_TRIGGERS];
61
62 /* bitmap of removed links */
63 __le32 hlid_removed_bitmap;
64
65 /* rx ba constraint */
66 __le16 rx_ba_role_id_bitmap; /* 0xfff means any role. */
67 __le16 rx_ba_allowed_bitmap;
68
69 /* bitmap of roc completed (by role id) */
70 __le16 roc_completed_bitmap;
71
72 /* bitmap of stations (by role id) with bss loss */
73 __le16 bss_loss_bitmap;
74
75 /* bitmap of stations (by HLID) which exceeded max tx retries */
76 __le32 tx_retry_exceeded_bitmap;
77
78 /* bitmap of inactive stations (by HLID) */
79 __le32 inactive_sta_bitmap;
80
81 /* rx BA win size indicated by RX_BA_WIN_SIZE_CHANGE_EVENT_ID */
82 u8 rx_ba_role_id;
83 u8 rx_ba_link_id;
84 u8 rx_ba_win_size;
85 u8 padding;
86
87 /* smart config */
88 u8 sc_ssid_len;
89 u8 sc_pwd_len;
90 u8 sc_token_len;
91 u8 padding1;
92 u8 sc_ssid[32];
93 u8 sc_pwd[64];
94 u8 sc_token[32];
95
96 /* smart config sync channel */
97 u8 sc_sync_channel;
98 u8 sc_sync_band;
99
100 /* time sync msb*/
101 u16 time_sync_tsf_msb;
102 /* radar detect */
103 u8 radar_channel;
104 u8 radar_type;
105
106 /* time sync lsb*/
107 u16 time_sync_tsf_lsb;
108
109 } __packed;
110
111 int wl18xx_wait_for_event(struct wl1271 *wl, enum wlcore_wait_event event,
112 bool *timeout);
113 int wl18xx_process_mailbox_events(struct wl1271 *wl);
114
115 #endif
This page took 0.034371 seconds and 5 git commands to generate.