aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/csr/csr_wifi_msgconv.h
blob: 72da857742a47c0164f3eb703f26e2974408714b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*****************************************************************************

            (c) Cambridge Silicon Radio Limited 2011
            All rights reserved and confidential information of CSR

            Refer to LICENSE.txt included with this source for details
            on the license terms.

*****************************************************************************/

#ifndef CSR_WIFI_MSGCONV_H__
#define CSR_WIFI_MSGCONV_H__

#include "csr_types.h"
#include "csr_prim_defs.h"
#include "csr_sched.h"
#include "csr_unicode.h"

#ifdef __cplusplus
extern "C" {
#endif


void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v);
void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v);
void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v);

void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset);
void CsrUint24DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset);
void CsrUint32DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset);

void CsrUint24Ser(u8 *ptr, CsrSize *len, CsrUint32 v);
void CsrUint24Des(CsrUint32 *v, u8 *buffer, CsrSize *offset);


CsrSize CsrWifiEventSizeof(void *msg);
u8* CsrWifiEventSer(u8 *ptr, CsrSize *len, void *msg);
void* CsrWifiEventDes(u8 *buffer, CsrSize length);

CsrSize CsrWifiEventCsrUint8Sizeof(void *msg);
u8* CsrWifiEventCsrUint8Ser(u8 *ptr, CsrSize *len, void *msg);
void* CsrWifiEventCsrUint8Des(u8 *buffer, CsrSize length);

CsrSize CsrWifiEventCsrUint16Sizeof(void *msg);
u8* CsrWifiEventCsrUint16Ser(u8 *ptr, CsrSize *len, void *msg);
void* CsrWifiEventCsrUint16Des(u8 *buffer, CsrSize length);

CsrSize CsrWifiEventCsrUint32Sizeof(void *msg);
u8* CsrWifiEventCsrUint32Ser(u8 *ptr, CsrSize *len, void *msg);
void* CsrWifiEventCsrUint32Des(u8 *buffer, CsrSize length);

CsrSize CsrWifiEventCsrUint16CsrUint8Sizeof(void *msg);
u8* CsrWifiEventCsrUint16CsrUint8Ser(u8 *ptr, CsrSize *len, void *msg);
void* CsrWifiEventCsrUint16CsrUint8Des(u8 *buffer, CsrSize length);

#ifdef __cplusplus
}
#endif

#endif /* CSR_WIFI_MSGCONV_H__ */