staging: brcm80211: fix build with BCMDBG unset.
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / brcm80211 / brcmsmac / wlc_event.h
blob8151ba500681a2bd64914ec11f7fecb30d4182d9
1 /*
2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef _WLC_EVENT_H_
18 #define _WLC_EVENT_H_
20 typedef struct wlc_eventq wlc_eventq_t;
22 typedef void (*wlc_eventq_cb_t) (void *arg);
24 extern wlc_eventq_t *wlc_eventq_attach(struct wlc_pub *pub,
25 struct wlc_info *wlc,
26 void *wl, wlc_eventq_cb_t cb);
27 extern int wlc_eventq_detach(wlc_eventq_t *eq);
28 extern int wlc_eventq_down(wlc_eventq_t *eq);
29 extern void wlc_event_free(wlc_eventq_t *eq, wlc_event_t *e);
30 extern bool wlc_eventq_avail(wlc_eventq_t *eq);
31 extern wlc_event_t *wlc_eventq_deq(wlc_eventq_t *eq);
32 extern void wlc_eventq_enq(wlc_eventq_t *eq, wlc_event_t *e);
33 extern wlc_event_t *wlc_event_alloc(wlc_eventq_t *eq);
35 extern int wlc_eventq_register_ind(wlc_eventq_t *eq, void *bitvect);
36 extern int wlc_eventq_query_ind(wlc_eventq_t *eq, void *bitvect);
37 extern int wlc_eventq_test_ind(wlc_eventq_t *eq, int et);
38 extern int wlc_eventq_set_ind(wlc_eventq_t *eq, uint et, bool on);
39 extern void wlc_eventq_flush(wlc_eventq_t *eq);
40 extern void wlc_assign_event_msg(struct wlc_info *wlc, wl_event_msg_t *msg,
41 const wlc_event_t *e, u8 *data,
42 u32 len);
44 #ifdef MSGTRACE
45 extern void wlc_event_sendup_trace(struct wlc_info *wlc, hndrte_dev_t *bus,
46 u8 *hdr, u16 hdrlen, u8 *buf,
47 u16 buflen);
48 #endif
50 #endif /* _WLC_EVENT_H_ */