Root/drivers/staging/csr/csr_wifi_lib.h

1/*****************************************************************************
2
3            (c) Cambridge Silicon Radio Limited 2011
4            All rights reserved and confidential information of CSR
5
6            Refer to LICENSE.txt included with this source for details
7            on the license terms.
8
9*****************************************************************************/
10#ifndef CSR_WIFI_LIB_H__
11#define CSR_WIFI_LIB_H__
12
13#include "csr_wifi_fsm_event.h"
14
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/*----------------------------------------------------------------------------*
21 * CsrWifiFsmEventInit
22 *
23 * DESCRIPTION
24 * Macro to initialise the members of a CsrWifiFsmEvent.
25 *----------------------------------------------------------------------------*/
26#define CsrWifiFsmEventInit(evt, p_primtype, p_msgtype, p_dst, p_src) \
27    (evt)->primtype = p_primtype; \
28    (evt)->type = p_msgtype; \
29    (evt)->destination = p_dst; \
30    (evt)->source = p_src
31
32
33/*----------------------------------------------------------------------------*
34 * CsrWifiEvent_struct
35 *
36 * DESCRIPTION
37 * Generic message creator.
38 * Allocates and fills in a message with the signature CsrWifiEvent
39 *
40 *----------------------------------------------------------------------------*/
41CsrWifiFsmEvent* CsrWifiEvent_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src);
42
43typedef struct
44{
45    CsrWifiFsmEvent common;
46    u8 value;
47} CsrWifiEventCsrUint8;
48
49/*----------------------------------------------------------------------------*
50 * CsrWifiEventCsrUint8_struct
51 *
52 * DESCRIPTION
53 * Generic message creator.
54 * Allocates and fills in a message with the signature CsrWifiEventCsrUint8
55 *
56 *----------------------------------------------------------------------------*/
57CsrWifiEventCsrUint8* CsrWifiEventCsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u8 value);
58
59typedef struct
60{
61    CsrWifiFsmEvent common;
62    u16 value;
63} CsrWifiEventCsrUint16;
64
65/*----------------------------------------------------------------------------*
66 * CsrWifiEventCsrUint16_struct
67 *
68 * DESCRIPTION
69 * Generic message creator.
70 * Allocates and fills in a message with the signature CsrWifiEventCsrUint16
71 *
72 *----------------------------------------------------------------------------*/
73CsrWifiEventCsrUint16* CsrWifiEventCsrUint16_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value);
74
75typedef struct
76{
77    CsrWifiFsmEvent common;
78    u32 value;
79} CsrWifiEventCsrUint32;
80
81/*----------------------------------------------------------------------------*
82 * CsrWifiEventCsrUint32_struct
83 *
84 * DESCRIPTION
85 * Generic message creator.
86 * Allocates and fills in a message with the signature CsrWifiEventCsrUint32
87 *
88 *----------------------------------------------------------------------------*/
89CsrWifiEventCsrUint32* CsrWifiEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u32 value);
90
91typedef struct
92{
93    CsrWifiFsmEvent common;
94    u16 value16;
95    u8 value8;
96} CsrWifiEventCsrUint16CsrUint8;
97
98/*----------------------------------------------------------------------------*
99 * CsrWifiEventCsrUint16CsrUint8_struct
100 *
101 * DESCRIPTION
102 * Generic message creator.
103 * Allocates and fills in a message with the signature CsrWifiEventCsrUint16CsrUint8
104 *
105 *----------------------------------------------------------------------------*/
106CsrWifiEventCsrUint16CsrUint8* CsrWifiEventCsrUint16CsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value16, u8 value8);
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif /* CSR_WIFI_LIB_H__ */
113

Archive Download this file



interactive