diff options
author | David S. Miller <davem@davemloft.net> | 2013-08-04 04:36:46 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-04 04:36:46 (GMT) |
commit | 0e76a3a587fc7abda2badf249053b427baad255e (patch) | |
tree | 646a1da67dc25654552028225ca4b7a0a8043cc9 /drivers/staging/csr/csr_msgconv.h | |
parent | fba3679d34511c42bf452e89dda457a1219eb43a (diff) | |
parent | 72a67a94bcba71a5fddd6b3596a20604d2b5dcd6 (diff) | |
download | linux-fsl-qoriq-0e76a3a587fc7abda2badf249053b427baad255e.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge net into net-next to setup some infrastructure Eric
Dumazet needs for usbnet changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/staging/csr/csr_msgconv.h')
-rw-r--r-- | drivers/staging/csr/csr_msgconv.h | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/drivers/staging/csr/csr_msgconv.h b/drivers/staging/csr/csr_msgconv.h deleted file mode 100644 index 7e4dd38..0000000 --- a/drivers/staging/csr/csr_msgconv.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef CSR_MSGCONV_H__ -#define CSR_MSGCONV_H__ - -/***************************************************************************** - - (c) Cambridge Silicon Radio Limited 2010 - All rights reserved and confidential information of CSR - - Refer to LICENSE.txt included with this source for details - on the license terms. - -*****************************************************************************/ - -#include <linux/types.h> -#include "csr_prim_defs.h" -#include "csr_sched.h" - -typedef size_t (CsrMsgSizeofFunc)(void *msg); -typedef u8 *(CsrMsgSerializeFunc)(u8 *buffer, size_t *length, void *msg); -typedef void (CsrMsgFreeFunc)(void *msg); -typedef void *(CsrMsgDeserializeFunc)(u8 *buffer, size_t length); - -/* Converter entry for one message type */ -typedef struct CsrMsgConvMsgEntry -{ - u16 msgType; - CsrMsgSizeofFunc *sizeofFunc; - CsrMsgSerializeFunc *serFunc; - CsrMsgDeserializeFunc *deserFunc; - CsrMsgFreeFunc *freeFunc; -} CsrMsgConvMsgEntry; - -/* Optional lookup function */ -typedef CsrMsgConvMsgEntry *(CsrMsgCustomLookupFunc)(CsrMsgConvMsgEntry *ce, u16 msgType); - -/* All converter entries for one specific primitive */ -typedef struct CsrMsgConvPrimEntry -{ - u16 primType; - const CsrMsgConvMsgEntry *conv; - CsrMsgCustomLookupFunc *lookupFunc; - struct CsrMsgConvPrimEntry *next; -} CsrMsgConvPrimEntry; - -typedef struct -{ - CsrMsgConvPrimEntry *profile_converters; - void *(*deserialize_data)(u16 primType, size_t length, u8 * data); - u8 (*free_message)(u16 primType, u8 *data); - size_t (*sizeof_message)(u16 primType, void *msg); - u8 *(*serialize_message)(u16 primType, void *msg, - size_t * length, - u8 * buffer); -} CsrMsgConvEntry; - -size_t CsrMsgConvSizeof(u16 primType, void *msg); -u8 *CsrMsgConvSerialize(u8 *buffer, size_t maxBufferOffset, size_t *offset, u16 primType, void *msg); -void CsrMsgConvCustomLookupRegister(u16 primType, CsrMsgCustomLookupFunc *lookupFunc); -void CsrMsgConvInsert(u16 primType, const CsrMsgConvMsgEntry *ce); -CsrMsgConvPrimEntry *CsrMsgConvFind(u16 primType); -CsrMsgConvMsgEntry *CsrMsgConvFindEntry(u16 primType, u16 msgType); -CsrMsgConvMsgEntry *CsrMsgConvFindEntryByMsg(u16 primType, const void *msg); -CsrMsgConvEntry *CsrMsgConvInit(void); - -/* Prototypes for primitive type serializers */ -void CsrUint8Ser(u8 *buffer, size_t *offset, u8 value); -void CsrUint16Ser(u8 *buffer, size_t *offset, u16 value); -void CsrUint32Ser(u8 *buffer, size_t *offset, u32 value); -void CsrMemCpySer(u8 *buffer, size_t *offset, const void *value, size_t length); -void CsrCharStringSer(u8 *buffer, size_t *offset, const char *value); - -void CsrUint8Des(u8 *value, u8 *buffer, size_t *offset); -void CsrUint16Des(u16 *value, u8 *buffer, size_t *offset); -void CsrUint32Des(u32 *value, u8 *buffer, size_t *offset); -void CsrMemCpyDes(void *value, u8 *buffer, size_t *offset, size_t length); -void CsrCharStringDes(char **value, u8 *buffer, size_t *offset); - -#endif |