Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
event.h
Go to the documentation of this file.
1 /*
2  * This file is part of wl1251
3  *
4  * Copyright (c) 1998-2007 Texas Instruments Incorporated
5  * Copyright (C) 2008 Nokia Corporation
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * version 2 as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  *
21  */
22 
23 #ifndef __WL1251_EVENT_H__
24 #define __WL1251_EVENT_H__
25 
26 /*
27  * Mbox events
28  *
29  * The event mechanism is based on a pair of event buffers (buffers A and
30  * B) at fixed locations in the target's memory. The host processes one
31  * buffer while the other buffer continues to collect events. If the host
32  * is not processing events, an interrupt is issued to signal that a buffer
33  * is ready. Once the host is done with processing events from one buffer,
34  * it signals the target (with an ACK interrupt) that the event buffer is
35  * free.
36  */
37 
38 enum {
65 
70 
72 
74 };
75 
83 } __packed;
84 
85 struct event_mailbox {
90 
95 
96  /* Channels scanned by the scheduled scan */
98 
99  /* If bit 0 is set -> target's fatal error */
106 
107  /* Number of FCS errors since last event */
109 
112  u8 padding[19];
113 } __packed;
114 
115 int wl1251_event_unmask(struct wl1251 *wl);
116 void wl1251_event_mbox_config(struct wl1251 *wl);
117 int wl1251_event_handle(struct wl1251 *wl, u8 mbox);
118 int wl1251_event_wait(struct wl1251 *wl, u32 mask, int timeout_ms);
119 
120 #endif