Commit d4fda8db authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

staging: csr: remove CsrSize typedef

Use size_t instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5379b13d
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "csr_formatted_io.h" #include "csr_formatted_io.h"
#include "csr_util.h" #include "csr_util.h"
s32 CsrSnprintf(char *dest, CsrSize n, const char *fmt, ...) s32 CsrSnprintf(char *dest, size_t n, const char *fmt, ...)
{ {
s32 r; s32 r;
va_list args; va_list args;
......
...@@ -16,7 +16,7 @@ extern "C" { ...@@ -16,7 +16,7 @@ extern "C" {
#include "csr_types.h" #include "csr_types.h"
s32 CsrSnprintf(char *dest, CsrSize n, const char *fmt, ...); s32 CsrSnprintf(char *dest, size_t n, const char *fmt, ...);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -161,7 +161,7 @@ EXPORT_SYMBOL_GPL(CsrThreadSleep); ...@@ -161,7 +161,7 @@ EXPORT_SYMBOL_GPL(CsrThreadSleep);
* Allocated memory is zero initialised. * Allocated memory is zero initialised.
* *
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
void *CsrMemCalloc(CsrSize numberOfElements, CsrSize elementSize) void *CsrMemCalloc(size_t numberOfElements, size_t elementSize)
{ {
void *buf; void *buf;
size_t size; size_t size;
...@@ -189,7 +189,7 @@ void *CsrMemCalloc(CsrSize numberOfElements, CsrSize elementSize) ...@@ -189,7 +189,7 @@ void *CsrMemCalloc(CsrSize numberOfElements, CsrSize elementSize)
* Allocated memory is not initialised. * Allocated memory is not initialised.
* *
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
void *CsrMemAlloc(CsrSize size) void *CsrMemAlloc(size_t size)
{ {
return kmalloc(size, GFP_KERNEL); return kmalloc(size, GFP_KERNEL);
} }
...@@ -224,7 +224,7 @@ EXPORT_SYMBOL_GPL(CsrMemFree); ...@@ -224,7 +224,7 @@ EXPORT_SYMBOL_GPL(CsrMemFree);
* Allocated memory is not initialised. * Allocated memory is not initialised.
* *
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
void *CsrMemAllocDma(CsrSize size) void *CsrMemAllocDma(size_t size)
{ {
return kmalloc(size, GFP_KERNEL | GFP_DMA); return kmalloc(size, GFP_KERNEL | GFP_DMA);
} }
......
...@@ -256,11 +256,11 @@ void CsrThreadSleep(u16 sleepTimeInMs); ...@@ -256,11 +256,11 @@ void CsrThreadSleep(u16 sleepTimeInMs);
* *
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
#ifdef CSR_MEM_DEBUG #ifdef CSR_MEM_DEBUG
void *CsrMemAllocDebug(CsrSize size, void *CsrMemAllocDebug(size_t size,
const char *file, u32 line); const char *file, u32 line);
#define CsrMemAlloc(sz) CsrMemAllocDebug((sz), __FILE__, __LINE__) #define CsrMemAlloc(sz) CsrMemAllocDebug((sz), __FILE__, __LINE__)
#else #else
void *CsrMemAlloc(CsrSize size); void *CsrMemAlloc(size_t size);
#endif #endif
/*----------------------------------------------------------------------------* /*----------------------------------------------------------------------------*
...@@ -277,11 +277,11 @@ void *CsrMemAlloc(CsrSize size); ...@@ -277,11 +277,11 @@ void *CsrMemAlloc(CsrSize size);
* *
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
#ifdef CSR_MEM_DEBUG #ifdef CSR_MEM_DEBUG
void *CsrMemCallocDebug(CsrSize numberOfElements, CsrSize elementSize, void *CsrMemCallocDebug(size_t numberOfElements, size_t elementSize,
const char *file, u32 line); const char *file, u32 line);
#define CsrMemCalloc(cnt, sz) CsrMemAllocDebug((cnt), (sz), __FILE__, __LINE__) #define CsrMemCalloc(cnt, sz) CsrMemAllocDebug((cnt), (sz), __FILE__, __LINE__)
#else #else
void *CsrMemCalloc(CsrSize numberOfElements, CsrSize elementSize); void *CsrMemCalloc(size_t numberOfElements, size_t elementSize);
#endif #endif
/*----------------------------------------------------------------------------* /*----------------------------------------------------------------------------*
...@@ -310,11 +310,11 @@ void CsrMemFree(void *pointer); ...@@ -310,11 +310,11 @@ void CsrMemFree(void *pointer);
* *
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
#ifdef CSR_MEM_DEBUG #ifdef CSR_MEM_DEBUG
void *CsrMemAllocDmaDebug(CsrSize size, void *CsrMemAllocDmaDebug(size_t size,
const char *file, u32 line); const char *file, u32 line);
#define CsrMemAllocDma(sz) CsrMemAllocDmaDebug((sz), __FILE__, __LINE__) #define CsrMemAllocDma(sz) CsrMemAllocDmaDebug((sz), __FILE__, __LINE__)
#else #else
void *CsrMemAllocDma(CsrSize size); void *CsrMemAllocDma(size_t size);
#endif #endif
......
...@@ -34,7 +34,7 @@ void CsrLogTextRegister(CsrLogTextTaskId taskId, const char *taskName, u16 subOr ...@@ -34,7 +34,7 @@ void CsrLogTextRegister(CsrLogTextTaskId taskId, const char *taskName, u16 subOr
system as a whole. */ system as a whole. */
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_CRITICAL_DISABLE) #if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_CRITICAL_DISABLE)
void CsrLogTextCritical(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...); void CsrLogTextCritical(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...);
void CsrLogTextBufferCritical(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const char *formatString, ...); void CsrLogTextBufferCritical(CsrLogTextTaskId taskId, u16 subOrigin, size_t bufferLength, const void *buffer, const char *formatString, ...);
#define CSR_LOG_TEXT_CRITICAL(taskId_subOrigin_formatString_varargs) CsrLogTextCritical taskId_subOrigin_formatString_varargs #define CSR_LOG_TEXT_CRITICAL(taskId_subOrigin_formatString_varargs) CsrLogTextCritical taskId_subOrigin_formatString_varargs
#define CSR_LOG_TEXT_CONDITIONAL_CRITICAL(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_CRITICAL(logtextargs);}} #define CSR_LOG_TEXT_CONDITIONAL_CRITICAL(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_CRITICAL(logtextargs);}}
#define CSR_LOG_TEXT_BUFFER_CRITICAL(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferCritical taskId_subOrigin_length_buffer_formatString_varargs #define CSR_LOG_TEXT_BUFFER_CRITICAL(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferCritical taskId_subOrigin_length_buffer_formatString_varargs
...@@ -50,7 +50,7 @@ void CsrLogTextBufferCritical(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bu ...@@ -50,7 +50,7 @@ void CsrLogTextBufferCritical(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bu
causing lack of functionality but not loss of system integrity/stability. */ causing lack of functionality but not loss of system integrity/stability. */
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_ERROR_DISABLE) #if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_ERROR_DISABLE)
void CsrLogTextError(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...); void CsrLogTextError(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...);
void CsrLogTextBufferError(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const char *formatString, ...); void CsrLogTextBufferError(CsrLogTextTaskId taskId, u16 subOrigin, size_t bufferLength, const void *buffer, const char *formatString, ...);
#define CSR_LOG_TEXT_ERROR(taskId_subOrigin_formatString_varargs) CsrLogTextError taskId_subOrigin_formatString_varargs #define CSR_LOG_TEXT_ERROR(taskId_subOrigin_formatString_varargs) CsrLogTextError taskId_subOrigin_formatString_varargs
#define CSR_LOG_TEXT_CONDITIONAL_ERROR(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_ERROR(logtextargs);}} #define CSR_LOG_TEXT_CONDITIONAL_ERROR(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_ERROR(logtextargs);}}
#define CSR_LOG_TEXT_BUFFER_ERROR(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferError taskId_subOrigin_length_buffer_formatString_varargs #define CSR_LOG_TEXT_BUFFER_ERROR(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferError taskId_subOrigin_length_buffer_formatString_varargs
...@@ -67,7 +67,7 @@ void CsrLogTextBufferError(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize buffe ...@@ -67,7 +67,7 @@ void CsrLogTextBufferError(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize buffe
lead to malfunction of the component. */ lead to malfunction of the component. */
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_WARNING_DISABLE) #if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_WARNING_DISABLE)
void CsrLogTextWarning(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...); void CsrLogTextWarning(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...);
void CsrLogTextBufferWarning(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const char *formatString, ...); void CsrLogTextBufferWarning(CsrLogTextTaskId taskId, u16 subOrigin, size_t bufferLength, const void *buffer, const char *formatString, ...);
#define CSR_LOG_TEXT_WARNING(taskId_subOrigin_formatString_varargs) CsrLogTextWarning taskId_subOrigin_formatString_varargs #define CSR_LOG_TEXT_WARNING(taskId_subOrigin_formatString_varargs) CsrLogTextWarning taskId_subOrigin_formatString_varargs
#define CSR_LOG_TEXT_CONDITIONAL_WARNING(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_WARNING(logtextargs);}} #define CSR_LOG_TEXT_CONDITIONAL_WARNING(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_WARNING(logtextargs);}}
#define CSR_LOG_TEXT_BUFFER_WARNING(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferWarning taskId_subOrigin_length_buffer_formatString_varargs #define CSR_LOG_TEXT_BUFFER_WARNING(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferWarning taskId_subOrigin_length_buffer_formatString_varargs
...@@ -83,7 +83,7 @@ void CsrLogTextBufferWarning(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize buf ...@@ -83,7 +83,7 @@ void CsrLogTextBufferWarning(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize buf
the more severe conditions are encountered. */ the more severe conditions are encountered. */
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_INFO_DISABLE) #if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_INFO_DISABLE)
void CsrLogTextInfo(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...); void CsrLogTextInfo(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...);
void CsrLogTextBufferInfo(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const char *formatString, ...); void CsrLogTextBufferInfo(CsrLogTextTaskId taskId, u16 subOrigin, size_t bufferLength, const void *buffer, const char *formatString, ...);
#define CSR_LOG_TEXT_INFO(taskId_subOrigin_formatString_varargs) CsrLogTextInfo taskId_subOrigin_formatString_varargs #define CSR_LOG_TEXT_INFO(taskId_subOrigin_formatString_varargs) CsrLogTextInfo taskId_subOrigin_formatString_varargs
#define CSR_LOG_TEXT_CONDITIONAL_INFO(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_INFO(logtextargs);}} #define CSR_LOG_TEXT_CONDITIONAL_INFO(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_INFO(logtextargs);}}
#define CSR_LOG_TEXT_BUFFER_INFO(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferInfo taskId_subOrigin_length_buffer_formatString_varargs #define CSR_LOG_TEXT_BUFFER_INFO(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferInfo taskId_subOrigin_length_buffer_formatString_varargs
...@@ -98,7 +98,7 @@ void CsrLogTextBufferInfo(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize buffer ...@@ -98,7 +98,7 @@ void CsrLogTextBufferInfo(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize buffer
/* DEBUG: Similar to INFO, but dedicated to events that occur more frequently. */ /* DEBUG: Similar to INFO, but dedicated to events that occur more frequently. */
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_DEBUG_DISABLE) #if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_DEBUG_DISABLE)
void CsrLogTextDebug(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...); void CsrLogTextDebug(CsrLogTextTaskId taskId, u16 subOrigin, const char *formatString, ...);
void CsrLogTextBufferDebug(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const char *formatString, ...); void CsrLogTextBufferDebug(CsrLogTextTaskId taskId, u16 subOrigin, size_t bufferLength, const void *buffer, const char *formatString, ...);
#define CSR_LOG_TEXT_DEBUG(taskId_subOrigin_formatString_varargs) CsrLogTextDebug taskId_subOrigin_formatString_varargs #define CSR_LOG_TEXT_DEBUG(taskId_subOrigin_formatString_varargs) CsrLogTextDebug taskId_subOrigin_formatString_varargs
#define CSR_LOG_TEXT_CONDITIONAL_DEBUG(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_DEBUG(logtextargs);}} #define CSR_LOG_TEXT_CONDITIONAL_DEBUG(condition, logtextargs) {if (condition) {CSR_LOG_TEXT_DEBUG(logtextargs);}}
#define CSR_LOG_TEXT_BUFFER_DEBUG(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferDebug taskId_subOrigin_length_buffer_formatString_varargs #define CSR_LOG_TEXT_BUFFER_DEBUG(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferDebug taskId_subOrigin_length_buffer_formatString_varargs
......
...@@ -72,7 +72,7 @@ static const CsrMsgConvMsgEntry *find_msg_converter(CsrMsgConvPrimEntry *ptr, u1 ...@@ -72,7 +72,7 @@ static const CsrMsgConvMsgEntry *find_msg_converter(CsrMsgConvPrimEntry *ptr, u1
} }
static void *deserialize_data(u16 primType, static void *deserialize_data(u16 primType,
CsrSize length, size_t length,
u8 *data) u8 *data)
{ {
CsrMsgConvPrimEntry *ptr; CsrMsgConvPrimEntry *ptr;
...@@ -84,7 +84,7 @@ static void *deserialize_data(u16 primType, ...@@ -84,7 +84,7 @@ static void *deserialize_data(u16 primType,
{ {
const CsrMsgConvMsgEntry *cv; const CsrMsgConvMsgEntry *cv;
u16 msgId = 0; u16 msgId = 0;
CsrSize offset = 0; size_t offset = 0;
CsrUint16Des(&msgId, data, &offset); CsrUint16Des(&msgId, data, &offset);
cv = find_msg_converter(ptr, msgId); cv = find_msg_converter(ptr, msgId);
...@@ -105,10 +105,10 @@ static void *deserialize_data(u16 primType, ...@@ -105,10 +105,10 @@ static void *deserialize_data(u16 primType,
return ret; return ret;
} }
static CsrSize sizeof_message(u16 primType, void *msg) static size_t sizeof_message(u16 primType, void *msg)
{ {
CsrMsgConvPrimEntry *ptr = CsrMsgConvFind(primType); CsrMsgConvPrimEntry *ptr = CsrMsgConvFind(primType);
CsrSize ret; size_t ret;
if (ptr) if (ptr)
{ {
...@@ -166,7 +166,7 @@ static u8 free_message(u16 primType, u8 *data) ...@@ -166,7 +166,7 @@ static u8 free_message(u16 primType, u8 *data)
static u8 *serialize_message(u16 primType, static u8 *serialize_message(u16 primType,
void *msg, void *msg,
CsrSize *length, size_t *length,
u8 *buffer) u8 *buffer)
{ {
CsrMsgConvPrimEntry *ptr; CsrMsgConvPrimEntry *ptr;
...@@ -198,16 +198,16 @@ static u8 *serialize_message(u16 primType, ...@@ -198,16 +198,16 @@ static u8 *serialize_message(u16 primType,
return ret; return ret;
} }
CsrSize CsrMsgConvSizeof(u16 primType, void *msg) size_t CsrMsgConvSizeof(u16 primType, void *msg)
{ {
return sizeof_message(primType, msg); return sizeof_message(primType, msg);
} }
u8 *CsrMsgConvSerialize(u8 *buffer, CsrSize maxBufferOffset, CsrSize *offset, u16 primType, void *msg) u8 *CsrMsgConvSerialize(u8 *buffer, size_t maxBufferOffset, size_t *offset, u16 primType, void *msg)
{ {
if (converter) if (converter)
{ {
CsrSize serializedLength; size_t serializedLength;
u8 *bufSerialized; u8 *bufSerialized;
u8 *bufOffset = &buffer[*offset]; u8 *bufOffset = &buffer[*offset];
bufSerialized = converter->serialize_message(primType, msg, &serializedLength, bufOffset); bufSerialized = converter->serialize_message(primType, msg, &serializedLength, bufOffset);
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
extern "C" { extern "C" {
#endif #endif
typedef CsrSize (CsrMsgSizeofFunc)(void *msg); typedef size_t (CsrMsgSizeofFunc)(void *msg);
typedef u8 *(CsrMsgSerializeFunc)(u8 *buffer, CsrSize *length, void *msg); typedef u8 *(CsrMsgSerializeFunc)(u8 *buffer, size_t *length, void *msg);
typedef void (CsrMsgFreeFunc)(void *msg); typedef void (CsrMsgFreeFunc)(void *msg);
typedef void *(CsrMsgDeserializeFunc)(u8 *buffer, CsrSize length); typedef void *(CsrMsgDeserializeFunc)(u8 *buffer, size_t length);
/* Converter entry for one message type */ /* Converter entry for one message type */
typedef struct CsrMsgConvMsgEntry typedef struct CsrMsgConvMsgEntry
...@@ -50,16 +50,16 @@ typedef struct CsrMsgConvPrimEntry ...@@ -50,16 +50,16 @@ typedef struct CsrMsgConvPrimEntry
typedef struct typedef struct
{ {
CsrMsgConvPrimEntry *profile_converters; CsrMsgConvPrimEntry *profile_converters;
void *(*deserialize_data)(u16 primType, CsrSize length, u8 * data); void *(*deserialize_data)(u16 primType, size_t length, u8 * data);
u8 (*free_message)(u16 primType, u8 *data); u8 (*free_message)(u16 primType, u8 *data);
CsrSize (*sizeof_message)(u16 primType, void *msg); size_t (*sizeof_message)(u16 primType, void *msg);
u8 *(*serialize_message)(u16 primType, void *msg, u8 *(*serialize_message)(u16 primType, void *msg,
CsrSize * length, size_t * length,
u8 * buffer); u8 * buffer);
} CsrMsgConvEntry; } CsrMsgConvEntry;
CsrSize CsrMsgConvSizeof(u16 primType, void *msg); size_t CsrMsgConvSizeof(u16 primType, void *msg);
u8 *CsrMsgConvSerialize(u8 *buffer, CsrSize maxBufferOffset, CsrSize *offset, 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 CsrMsgConvCustomLookupRegister(u16 primType, CsrMsgCustomLookupFunc *lookupFunc);
void CsrMsgConvInsert(u16 primType, const CsrMsgConvMsgEntry *ce); void CsrMsgConvInsert(u16 primType, const CsrMsgConvMsgEntry *ce);
CsrMsgConvPrimEntry *CsrMsgConvFind(u16 primType); CsrMsgConvPrimEntry *CsrMsgConvFind(u16 primType);
...@@ -78,65 +78,65 @@ u32 CsrUtf8StringSerLen(const u8 *str); ...@@ -78,65 +78,65 @@ u32 CsrUtf8StringSerLen(const u8 *str);
u32 CsrUtf16StringSerLen(const u16 *str); u32 CsrUtf16StringSerLen(const u16 *str);
/* Prototypes for primitive type serializers */ /* Prototypes for primitive type serializers */
void CsrUint8Ser(u8 *buffer, CsrSize *offset, u8 value); void CsrUint8Ser(u8 *buffer, size_t *offset, u8 value);
void CsrUint16Ser(u8 *buffer, CsrSize *offset, u16 value); void CsrUint16Ser(u8 *buffer, size_t *offset, u16 value);
void CsrUint32Ser(u8 *buffer, CsrSize *offset, u32 value); void CsrUint32Ser(u8 *buffer, size_t *offset, u32 value);
void CsrMemCpySer(u8 *buffer, CsrSize *offset, const void *value, CsrSize length); void CsrMemCpySer(u8 *buffer, size_t *offset, const void *value, size_t length);
void CsrCharStringSer(u8 *buffer, CsrSize *offset, const char *value); void CsrCharStringSer(u8 *buffer, size_t *offset, const char *value);
void CsrUtf8StringSer(u8 *buffer, CsrSize *offset, const u8 *value); void CsrUtf8StringSer(u8 *buffer, size_t *offset, const u8 *value);
void CsrUtf16StringSer(u8 *buffer, CsrSize *offset, const u16 *value); void CsrUtf16StringSer(u8 *buffer, size_t *offset, const u16 *value);
void CsrVoidPtrSer(u8 *buffer, CsrSize *offset, void *ptr); void CsrVoidPtrSer(u8 *buffer, size_t *offset, void *ptr);
void CsrSizeSer(u8 *buffer, CsrSize *offset, CsrSize value); void CsrSizeSer(u8 *buffer, size_t *offset, size_t value);
void CsrUint8Des(u8 *value, u8 *buffer, CsrSize *offset); void CsrUint8Des(u8 *value, u8 *buffer, size_t *offset);
void CsrUint16Des(u16 *value, u8 *buffer, CsrSize *offset); void CsrUint16Des(u16 *value, u8 *buffer, size_t *offset);
void CsrUint32Des(u32 *value, u8 *buffer, CsrSize *offset); void CsrUint32Des(u32 *value, u8 *buffer, size_t *offset);
void CsrMemCpyDes(void *value, u8 *buffer, CsrSize *offset, CsrSize length); void CsrMemCpyDes(void *value, u8 *buffer, size_t *offset, size_t length);
void CsrCharStringDes(char **value, u8 *buffer, CsrSize *offset); void CsrCharStringDes(char **value, u8 *buffer, size_t *offset);
void CsrUtf8StringDes(u8 **value, u8 *buffer, CsrSize *offset); void CsrUtf8StringDes(u8 **value, u8 *buffer, size_t *offset);
void CsrUtf16StringDes(u16 **value, u8 *buffer, CsrSize *offset); void CsrUtf16StringDes(u16 **value, u8 *buffer, size_t *offset);
void CsrVoidPtrDes(void **value, u8 *buffer, CsrSize *offset); void CsrVoidPtrDes(void **value, u8 *buffer, size_t *offset);
void CsrSizeDes(CsrSize *value, u8 *buffer, CsrSize *offset); void CsrSizeDes(size_t *value, u8 *buffer, size_t *offset);
CsrSize CsrEventSizeof(void *msg); size_t CsrEventSizeof(void *msg);
u8 *CsrEventSer(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventSer(u8 *ptr, size_t *len, void *msg);
void *CsrEventDes(u8 *buffer, CsrSize length); void *CsrEventDes(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint8Sizeof(void *msg); size_t CsrEventCsrUint8Sizeof(void *msg);
u8 *CsrEventCsrUint8Ser(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint8Ser(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint8Des(u8 *buffer, CsrSize length); void *CsrEventCsrUint8Des(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint16Sizeof(void *msg); size_t CsrEventCsrUint16Sizeof(void *msg);
u8 *CsrEventCsrUint16Ser(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint16Ser(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint16Des(u8 *buffer, CsrSize length); void *CsrEventCsrUint16Des(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint32Sizeof(void *msg); size_t CsrEventCsrUint32Sizeof(void *msg);
u8 *CsrEventCsrUint32Ser(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint32Ser(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint32Des(u8 *buffer, CsrSize length); void *CsrEventCsrUint32Des(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint16CsrUint8Sizeof(void *msg); size_t CsrEventCsrUint16CsrUint8Sizeof(void *msg);
u8 *CsrEventCsrUint16CsrUint8Ser(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint16CsrUint8Ser(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint16CsrUint8Des(u8 *buffer, CsrSize length); void *CsrEventCsrUint16CsrUint8Des(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint16CsrUint16Sizeof(void *msg); size_t CsrEventCsrUint16CsrUint16Sizeof(void *msg);
u8 *CsrEventCsrUint16CsrUint16Ser(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint16CsrUint16Ser(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint16CsrUint16Des(u8 *buffer, CsrSize length); void *CsrEventCsrUint16CsrUint16Des(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint16CsrUint32Sizeof(void *msg); size_t CsrEventCsrUint16CsrUint32Sizeof(void *msg);
u8 *CsrEventCsrUint16CsrUint32Ser(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint16CsrUint32Ser(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint16CsrUint32Des(u8 *buffer, CsrSize length); void *CsrEventCsrUint16CsrUint32Des(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint16CsrCharStringSizeof(void *msg); size_t CsrEventCsrUint16CsrCharStringSizeof(void *msg);
u8 *CsrEventCsrUint16CsrCharStringSer(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint16CsrCharStringSer(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint16CsrCharStringDes(u8 *buffer, CsrSize length); void *CsrEventCsrUint16CsrCharStringDes(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint32CsrUint16Sizeof(void *msg); size_t CsrEventCsrUint32CsrUint16Sizeof(void *msg);
u8 *CsrEventCsrUint32CsrUint16Ser(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint32CsrUint16Ser(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint32CsrUint16Des(u8 *buffer, CsrSize length); void *CsrEventCsrUint32CsrUint16Des(u8 *buffer, size_t length);
CsrSize CsrEventCsrUint32CsrCharStringSizeof(void *msg); size_t CsrEventCsrUint32CsrCharStringSizeof(void *msg);
u8 *CsrEventCsrUint32CsrCharStringSer(u8 *ptr, CsrSize *len, void *msg); u8 *CsrEventCsrUint32CsrCharStringSer(u8 *ptr, size_t *len, void *msg);
void *CsrEventCsrUint32CsrCharStringDes(u8 *buffer, CsrSize length); void *CsrEventCsrUint32CsrCharStringDes(u8 *buffer, size_t length);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "csr_panic.h" #include "csr_panic.h"
#include "csr_pmem.h" #include "csr_pmem.h"
void *CsrPmemAlloc(CsrSize size) void *CsrPmemAlloc(size_t size)
{ {
void *ret; void *ret;
......
...@@ -38,11 +38,11 @@ extern "C" { ...@@ -38,11 +38,11 @@ extern "C" {
*****************************************************************************/ *****************************************************************************/
#ifdef CSR_PMEM_DEBUG #ifdef CSR_PMEM_DEBUG
void *CsrPmemAllocDebug(CsrSize size, void *CsrPmemAllocDebug(size_t size,
const char *file, u32 line); const char *file, u32 line);
#define CsrPmemAlloc(sz) CsrPmemAllocDebug((sz), __FILE__, __LINE__) #define CsrPmemAlloc(sz) CsrPmemAllocDebug((sz), __FILE__, __LINE__)
#else #else
void *CsrPmemAlloc(CsrSize size); void *CsrPmemAlloc(size_t size);
#endif #endif
...@@ -108,7 +108,7 @@ typedef u8 CsrPmemDebugAllocType; ...@@ -108,7 +108,7 @@ typedef u8 CsrPmemDebugAllocType;
#define CSR_PMEM_DEBUG_TYPE_MEM_CALLOC 3 #define CSR_PMEM_DEBUG_TYPE_MEM_CALLOC 3
#define CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA 4 #define CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA 4
typedef void (CsrPmemDebugOnAlloc)(void *ptr, void *userptr, CsrSize size, CsrPmemDebugAllocType type, const char* file, u32 line); typedef void (CsrPmemDebugOnAlloc)(void *ptr, void *userptr, size_t size, CsrPmemDebugAllocType type, const char* file, u32 line);
typedef void (CsrPmemDebugOnFree)(void *ptr, void *userptr, CsrPmemDebugAllocType type, const char* file, u32 line); typedef void (CsrPmemDebugOnFree)(void *ptr, void *userptr, CsrPmemDebugAllocType type, const char* file, u32 line);
/*----------------------------------------------------------------------------* /*----------------------------------------------------------------------------*
...@@ -127,7 +127,7 @@ typedef void (CsrPmemDebugOnFree)(void *ptr, void *userptr, CsrPmemDebugAllocTyp ...@@ -127,7 +127,7 @@ typedef void (CsrPmemDebugOnFree)(void *ptr, void *userptr, CsrPmemDebugAllocTyp
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
void CsrPmemDebugInstallHooks(u8 headSize, u8 endSize, CsrPmemDebugOnAlloc *onAllocCallback, CsrPmemDebugOnFree *onFreeCallback); void CsrPmemDebugInstallHooks(u8 headSize, u8 endSize, CsrPmemDebugOnAlloc *onAllocCallback, CsrPmemDebugOnFree *onFreeCallback);
void *CsrPmemDebugAlloc(CsrSize size, CsrPmemDebugAllocType type, const char* file, u32 line); void *CsrPmemDebugAlloc(size_t size, CsrPmemDebugAllocType type, const char* file, u32 line);
#define CsrPmemAlloc(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__) #define CsrPmemAlloc(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)
void CsrPmemDebugFree(void *ptr, CsrPmemDebugAllocType type, const char* file, u32 line); void CsrPmemDebugFree(void *ptr, CsrPmemDebugAllocType type, const char* file, u32 line);
......
...@@ -27,7 +27,6 @@ extern "C" { ...@@ -27,7 +27,6 @@ extern "C" {
#define TRUE (1) #define TRUE (1)
/* Basic types */ /* Basic types */
typedef size_t CsrSize; /* Return type of sizeof (ISO/IEC 9899:1990 7.1.6) */
typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointers (ISO/IEC 9899:1990 7.1.6) */ typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointers (ISO/IEC 9899:1990 7.1.6) */
typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */ typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */ typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
......
...@@ -39,7 +39,7 @@ u16 *CsrUtf16String2XML(u16 *str); ...@@ -39,7 +39,7 @@ u16 *CsrUtf16String2XML(u16 *str);
u16 *CsrXML2Utf16String(u16 *str); u16 *CsrXML2Utf16String(u16 *str);
s32 CsrUtf8StrCmp(const u8 *string1, const u8 *string2); s32 CsrUtf8StrCmp(const u8 *string1, const u8 *string2);
s32 CsrUtf8StrNCmp(const u8 *string1, const u8 *string2, CsrSize count); s32 CsrUtf8StrNCmp(const u8 *string1, const u8 *string2, size_t count);
u32 CsrUtf8StringLengthInBytes(const u8 *string); u32 CsrUtf8StringLengthInBytes(const u8 *string);
/******************************************************************************* /*******************************************************************************
...@@ -66,7 +66,7 @@ u32 CsrUtf8StringLengthInBytes(const u8 *string); ...@@ -66,7 +66,7 @@ u32 CsrUtf8StringLengthInBytes(const u8 *string);
Returns target Returns target
*******************************************************************************/ *******************************************************************************/
u8 *CsrUtf8StrTruncate(u8 *target, CsrSize count); u8 *CsrUtf8StrTruncate(u8 *target, size_t count);
/******************************************************************************* /*******************************************************************************
...@@ -116,7 +116,7 @@ u8 *CsrUtf8StrCpy(u8 *target, const u8 *source); ...@@ -116,7 +116,7 @@ u8 *CsrUtf8StrCpy(u8 *target, const u8 *source);
Returns target Returns target
*******************************************************************************/ *******************************************************************************/
u8 *CsrUtf8StrNCpy(u8 *target, const u8 *source, CsrSize count); u8 *CsrUtf8StrNCpy(u8 *target, const u8 *source, size_t count);
/******************************************************************************* /*******************************************************************************
...@@ -143,7 +143,7 @@ u8 *CsrUtf8StrNCpy(u8 *target, const u8 *source, CsrSize count); ...@@ -143,7 +143,7 @@ u8 *CsrUtf8StrNCpy(u8 *target, const u8 *source, CsrSize count);
Returns target Returns target
*******************************************************************************/ *******************************************************************************/
u8 *CsrUtf8StrNCpyZero(u8 *target, const u8 *source, CsrSize count); u8 *CsrUtf8StrNCpyZero(u8 *target, const u8 *source, size_t count);
/******************************************************************************* /*******************************************************************************
...@@ -174,8 +174,8 @@ u8 *CsrUtf8StringConcatenateTexts(const u8 *inputText1, const u8 *inputText2, co ...@@ -174,8 +174,8 @@ u8 *CsrUtf8StringConcatenateTexts(const u8 *inputText1, const u8 *inputText2, co
*/ */
typedef u8 CsrUcs2String; typedef u8 CsrUcs2String;
CsrSize CsrUcs2ByteStrLen(const CsrUcs2String *ucs2String); size_t CsrUcs2ByteStrLen(const CsrUcs2String *ucs2String);
CsrSize CsrConverterUcs2ByteStrLen(const CsrUcs2String *str); size_t CsrConverterUcs2ByteStrLen(const CsrUcs2String *str);
u8 *CsrUcs2ByteString2Utf8(const CsrUcs2String *ucs2String); u8 *CsrUcs2ByteString2Utf8(const CsrUcs2String *ucs2String);
CsrUcs2String *CsrUtf82Ucs2ByteString(const u8 *utf8String); CsrUcs2String *CsrUtf82Ucs2ByteString(const u8 *utf8String);
......
...@@ -564,8 +564,8 @@ static u8 isLegalUtf8(const u8 *codeUnit, u32 length) ...@@ -564,8 +564,8 @@ static u8 isLegalUtf8(const u8 *codeUnit, u32 length)
*********************************************************************************/ *********************************************************************************/
u16 *CsrUtf82Utf16String(const u8 *utf8String) u16 *CsrUtf82Utf16String(const u8 *utf8String)
{ {
CsrSize i, length = 0; size_t i, length = 0;
CsrSize sourceLength; size_t sourceLength;
u16 *dest = NULL; u16 *dest = NULL;
u16 *destStart = NULL; u16 *destStart = NULL;
s8 extraBytes2Read; s8 extraBytes2Read;
...@@ -1021,14 +1021,14 @@ s32 CsrUtf8StrCmp(const u8 *string1, const u8 *string2) ...@@ -1021,14 +1021,14 @@ s32 CsrUtf8StrCmp(const u8 *string1, const u8 *string2)
return CsrStrCmp((const char *) string1, (const char *) string2); return CsrStrCmp((const char *) string1, (const char *) string2);
} }
s32 CsrUtf8StrNCmp(const u8 *string1, const u8 *string2, CsrSize count) s32 CsrUtf8StrNCmp(const u8 *string1, const u8 *string2, size_t count)
{ {
return CsrStrNCmp((const char *) string1, (const char *) string2, count); return CsrStrNCmp((const char *) string1, (const char *) string2, count);
} }
u32 CsrUtf8StringLengthInBytes(const u8 *string) u32 CsrUtf8StringLengthInBytes(const u8 *string)
{ {
CsrSize length = 0; size_t length = 0;
if (string) if (string)
{ {
length = CsrStrLen((const char *) string); length = CsrStrLen((const char *) string);
...@@ -1041,9 +1041,9 @@ u8 *CsrUtf8StrCpy(u8 *target, const u8 *source) ...@@ -1041,9 +1041,9 @@ u8 *CsrUtf8StrCpy(u8 *target, const u8 *source)
return (u8 *) CsrStrCpy((char *) target, (const char *) source); return (u8 *) CsrStrCpy((char *) target, (const char *) source);
} }
u8 *CsrUtf8StrTruncate(u8 *target, CsrSize count) u8 *CsrUtf8StrTruncate(u8 *target, size_t count)
{ {
CsrSize lastByte = count - 1; size_t lastByte = count - 1;
target[count] = '\0'; target[count] = '\0';
...@@ -1070,12 +1070,12 @@ u8 *CsrUtf8StrTruncate(u8 *target, CsrSize count) ...@@ -1070,12 +1070,12 @@ u8 *CsrUtf8StrTruncate(u8 *target, CsrSize count)
return target; return target;
} }
u8 *CsrUtf8StrNCpy(u8 *target, const u8 *source, CsrSize count) u8 *CsrUtf8StrNCpy(u8 *target, const u8 *source, size_t count)
{ {
return (u8 *) CsrStrNCpy((char *) target, (const char *) source, count); return (u8 *) CsrStrNCpy((char *) target, (const char *) source, count);
} }
u8 *CsrUtf8StrNCpyZero(u8 *target, const u8 *source, CsrSize count) u8 *CsrUtf8StrNCpyZero(u8 *target, const u8 *source, size_t count)
{ {
CsrStrNCpy((char *) target, (const char *) source, count); CsrStrNCpy((char *) target, (const char *) source, count);
if (target[count - 1] != '\0') if (target[count - 1] != '\0')
......
...@@ -222,31 +222,31 @@ void CsrUInt32ToHex(u32 number, char *str) ...@@ -222,31 +222,31 @@ void CsrUInt32ToHex(u32 number, char *str)
/* String */ /* String */
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#ifndef CSR_USE_STDC_LIB #ifndef CSR_USE_STDC_LIB
void *CsrMemCpy(void *dest, const void *src, CsrSize count) void *CsrMemCpy(void *dest, const void *src, size_t count)
{ {
return memcpy(dest, src, count); return memcpy(dest, src, count);
} }
EXPORT_SYMBOL_GPL(CsrMemCpy); EXPORT_SYMBOL_GPL(CsrMemCpy);
void *CsrMemSet(void *dest, u8 c, CsrSize count) void *CsrMemSet(void *dest, u8 c, size_t count)
{ {
return memset(dest, c, count); return memset(dest, c, count);
} }
EXPORT_SYMBOL_GPL(CsrMemSet); EXPORT_SYMBOL_GPL(CsrMemSet);
void *CsrMemMove(void *dest, const void *src, CsrSize count) void *CsrMemMove(void *dest, const void *src, size_t count)
{ {
return memmove(dest, src, count); return memmove(dest, src, count);
} }
EXPORT_SYMBOL_GPL(CsrMemMove); EXPORT_SYMBOL_GPL(CsrMemMove);
s32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count) s32 CsrMemCmp(const void *buf1, const void *buf2, size_t count)
{ {
return memcmp(buf1, buf2, count); return memcmp(buf1, buf2, count);
} }
EXPORT_SYMBOL_GPL(CsrMemCmp); EXPORT_SYMBOL_GPL(CsrMemCmp);
void *CsrMemDup(const void *buf1, CsrSize count) void *CsrMemDup(const void *buf1, size_t count)
{ {
void *buf2 = NULL; void *buf2 = NULL;
...@@ -266,7 +266,7 @@ char *CsrStrCpy(char *dest, const char *src) ...@@ -266,7 +266,7 @@ char *CsrStrCpy(char *dest, const char *src)
return strcpy(dest, src); return strcpy(dest, src);
} }
char *CsrStrNCpy(char *dest, const char *src, CsrSize count) char *CsrStrNCpy(char *dest, const char *src, size_t count)
{ {
return strncpy(dest, src, count); return strncpy(dest, src, count);
} }
...@@ -276,7 +276,7 @@ char *CsrStrCat(char *dest, const char *src) ...@@ -276,7 +276,7 @@ char *CsrStrCat(char *dest, const char *src)
return strcat(dest, src); return strcat(dest, src);
} }
char *CsrStrNCat(char *dest, const char *src, CsrSize count) char *CsrStrNCat(char *dest, const char *src, size_t count)
{ {
return strncat(dest, src, count); return strncat(dest, src, count);
} }
...@@ -286,7 +286,7 @@ char *CsrStrStr(const char *string1, const char *string2) ...@@ -286,7 +286,7 @@ char *CsrStrStr(const char *string1, const char *string2)
return strstr(string1, string2); return strstr(string1, string2);
} }
CsrSize CsrStrLen(const char *string) size_t CsrStrLen(const char *string)
{ {
return strlen(string); return strlen(string);
} }
...@@ -297,7 +297,7 @@ s32 CsrStrCmp(const char *string1, const char *string2) ...@@ -297,7 +297,7 @@ s32 CsrStrCmp(const char *string1, const char *string2)
return strcmp(string1, string2); return strcmp(string1, string2);
} }
s32 CsrStrNCmp(const char *string1, const char *string2, CsrSize count) s32 CsrStrNCmp(const char *string1, const char *string2, size_t count)
{ {
return strncmp(string1, string2, count); return strncmp(string1, string2, count);
} }
...@@ -308,7 +308,7 @@ char *CsrStrChr(const char *string, char c) ...@@ -308,7 +308,7 @@ char *CsrStrChr(const char *string, char c)
} }
#endif #endif
s32 CsrVsnprintf(char *string, CsrSize count, const char *format, va_list args) s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args)
{ {
return vsnprintf(string, count, format, args); return vsnprintf(string, count, format, args);
} }
...@@ -316,7 +316,7 @@ EXPORT_SYMBOL_GPL(CsrVsnprintf); ...@@ -316,7 +316,7 @@ EXPORT_SYMBOL_GPL(CsrVsnprintf);
char *CsrStrNCpyZero(char *dest, char *CsrStrNCpyZero(char *dest,
const char *src, const char *src,
CsrSize count) size_t count)
{ {
CsrStrNCpy(dest, src, count - 1); CsrStrNCpy(dest, src, count - 1);
dest[count - 1] = '\0'; dest[count - 1] = '\0';
...@@ -364,7 +364,7 @@ char *CsrStrDup(const char *string) ...@@ -364,7 +364,7 @@ char *CsrStrDup(const char *string)
int CsrStrNICmp(const char *string1, int CsrStrNICmp(const char *string1,
const char *string2, const char *string2,
CsrSize count) size_t count)
{ {
u32 index; u32 index;
int returnValue = 0; int returnValue = 0;
......
...@@ -52,30 +52,30 @@ void CsrUInt32ToHex(u32 number, char *str); ...@@ -52,30 +52,30 @@ void CsrUInt32ToHex(u32 number, char *str);
#define CsrMemSet memset #define CsrMemSet memset
#define CsrStrLen strlen #define CsrStrLen strlen
#else /* !CSR_USE_STDC_LIB */ #else /* !CSR_USE_STDC_LIB */
void *CsrMemCpy(void *dest, const void *src, CsrSize count); void *CsrMemCpy(void *dest, const void *src, size_t count);
void *CsrMemMove(void *dest, const void *src, CsrSize count); void *CsrMemMove(void *dest, const void *src, size_t count);
char *CsrStrCpy(char *dest, const char *src); char *CsrStrCpy(char *dest, const char *src);
char *CsrStrNCpy(char *dest, const char *src, CsrSize count); char *CsrStrNCpy(char *dest, const char *src, size_t count);
char *CsrStrCat(char *dest, const char *src); char *CsrStrCat(char *dest, const char *src);
char *CsrStrNCat(char *dest, const char *src, CsrSize count); char *CsrStrNCat(char *dest, const char *src, size_t count);
s32 CsrMemCmp(const void *buf1, const void *buf2, CsrSize count); s32 CsrMemCmp(const void *buf1, const void *buf2, size_t count);
s32 CsrStrCmp(const char *string1, const char *string2); s32 CsrStrCmp(const char *string1, const char *string2);
s32 CsrStrNCmp(const char *string1, const char *string2, CsrSize count); s32 CsrStrNCmp(const char *string1, const char *string2, size_t count);
char *CsrStrChr(const char *string, char c); char *CsrStrChr(const char *string, char c);
char *CsrStrStr(const char *string1, const char *string2); char *CsrStrStr(const char *string1, const char *string2);
void *CsrMemSet(void *dest, u8 c, CsrSize count); void *CsrMemSet(void *dest, u8 c, size_t count);
CsrSize CsrStrLen(const char *string); size_t CsrStrLen(const char *string);
#endif /* !CSR_USE_STDC_LIB */ #endif /* !CSR_USE_STDC_LIB */
s32 CsrVsnprintf(char *string, CsrSize count, const char *format, va_list args); s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args);
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* Non-standard utility functions */ /* Non-standard utility functions */
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
void *CsrMemDup(const void *buf1, CsrSize count); void *CsrMemDup(const void *buf1, size_t count);
int CsrStrNICmp(const char *string1, const char *string2, CsrSize count); int CsrStrNICmp(const char *string1, const char *string2, size_t count);
char *CsrStrDup(const char *string); char *CsrStrDup(const char *string);
u32 CsrStrToInt(const char *string); u32 CsrStrToInt(const char *string);
char *CsrStrNCpyZero(char *dest, const char *src, CsrSize count); char *CsrStrNCpyZero(char *dest, const char *src, size_t count);
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* Filename */ /* Filename */
...@@ -86,7 +86,7 @@ const char *CsrGetBaseName(const char *file); ...@@ -86,7 +86,7 @@ const char *CsrGetBaseName(const char *file);
/* Misc */ /* Misc */
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
u8 CsrIsSpace(u8 c); u8 CsrIsSpace(u8 c);
#define CsrOffsetOf(st, m) ((CsrSize) & ((st *) 0)->m) #define CsrOffsetOf(st, m) ((size_t) & ((st *) 0)->m)
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -21,37 +21,37 @@ extern "C" { ...@@ -21,37 +21,37 @@ extern "C" {
#endif #endif
void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v); void CsrUint16SerBigEndian(u8 *ptr, size_t *len, u16 v);
void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, u32 v); void CsrUint24SerBigEndian(u8 *ptr, size_t *len, u32 v);
void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, u32 v); void CsrUint32SerBigEndian(u8 *ptr, size_t *len, u32 v);
void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset); void CsrUint16DesBigEndian(u16 *v, u8 *buffer, size_t *offset);
void CsrUint24DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset); void CsrUint24DesBigEndian(u32 *v, u8 *buffer, size_t *offset);
void CsrUint32DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset); void CsrUint32DesBigEndian(u32 *v, u8 *buffer, size_t *offset);
void CsrUint24Ser(u8 *ptr, CsrSize *len, u32 v); void CsrUint24Ser(u8 *ptr, size_t *len, u32 v);
void CsrUint24Des(u32 *v, u8 *buffer, CsrSize *offset); void CsrUint24Des(u32 *v, u8 *buffer, size_t *offset);
CsrSize CsrWifiEventSizeof(void *msg); size_t CsrWifiEventSizeof(void *msg);
u8* CsrWifiEventSer(u8 *ptr, CsrSize *len, void *msg); u8* CsrWifiEventSer(u8 *ptr, size_t *len, void *msg);
void* CsrWifiEventDes(u8 *buffer, CsrSize length); void* CsrWifiEventDes(u8 *buffer, size_t length);
CsrSize CsrWifiEventCsrUint8Sizeof(void *msg); size_t CsrWifiEventCsrUint8Sizeof(void *msg);
u8* CsrWifiEventCsrUint8Ser(u8 *ptr, CsrSize *len, void *msg); u8* CsrWifiEventCsrUint8Ser(u8 *ptr, size_t *len, void *msg);
void* CsrWifiEventCsrUint8Des(u8 *buffer, CsrSize length); void* CsrWifiEventCsrUint8Des(u8 *buffer, size_t length);
CsrSize CsrWifiEventCsrUint16Sizeof(void *msg); size_t CsrWifiEventCsrUint16Sizeof(void *msg);
u8* CsrWifiEventCsrUint16Ser(u8 *ptr, CsrSize *len, void *msg); u8* CsrWifiEventCsrUint16Ser(u8 *ptr, size_t *len, void *msg);
void* CsrWifiEventCsrUint16Des(u8 *buffer, CsrSize length); void* CsrWifiEventCsrUint16Des(u8 *buffer, size_t length);
CsrSize CsrWifiEventCsrUint32Sizeof(void *msg); size_t CsrWifiEventCsrUint32Sizeof(void *msg);
u8* CsrWifiEventCsrUint32Ser(u8 *ptr, CsrSize *len, void *msg); u8* CsrWifiEventCsrUint32Ser(u8 *ptr, size_t *len, void *msg);
void* CsrWifiEventCsrUint32Des(u8 *buffer, CsrSize length); void* CsrWifiEventCsrUint32Des(u8 *buffer, size_t length);
CsrSize CsrWifiEventCsrUint16CsrUint8Sizeof(void *msg); size_t CsrWifiEventCsrUint16CsrUint8Sizeof(void *msg);
u8* CsrWifiEventCsrUint16CsrUint8Ser(u8 *ptr, CsrSize *len, void *msg); u8* CsrWifiEventCsrUint16CsrUint8Ser(u8 *ptr, size_t *len, void *msg);
void* CsrWifiEventCsrUint16CsrUint8Des(u8 *buffer, CsrSize length); void* CsrWifiEventCsrUint16CsrUint8Des(u8 *buffer, size_t length);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -32,19 +32,19 @@ extern "C" { ...@@ -32,19 +32,19 @@ extern "C" {
extern void CsrWifiNmeApPfree(void *ptr); extern void CsrWifiNmeApPfree(void *ptr);
extern u8* CsrWifiNmeApConfigSetReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApConfigSetReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApConfigSetReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApConfigSetReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApConfigSetReqSizeof(void *msg); extern size_t CsrWifiNmeApConfigSetReqSizeof(void *msg);
extern void CsrWifiNmeApConfigSetReqSerFree(void *msg); extern void CsrWifiNmeApConfigSetReqSerFree(void *msg);
extern u8* CsrWifiNmeApWpsRegisterReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApWpsRegisterReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApWpsRegisterReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApWpsRegisterReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApWpsRegisterReqSizeof(void *msg); extern size_t CsrWifiNmeApWpsRegisterReqSizeof(void *msg);
#define CsrWifiNmeApWpsRegisterReqSerFree CsrWifiNmeApPfree #define CsrWifiNmeApWpsRegisterReqSerFree CsrWifiNmeApPfree
extern u8* CsrWifiNmeApStartReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApStartReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApStartReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApStartReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApStartReqSizeof(void *msg); extern size_t CsrWifiNmeApStartReqSizeof(void *msg);
extern void CsrWifiNmeApStartReqSerFree(void *msg); extern void CsrWifiNmeApStartReqSerFree(void *msg);
#define CsrWifiNmeApStopReqSer CsrWifiEventCsrUint16Ser #define CsrWifiNmeApStopReqSer CsrWifiEventCsrUint16Ser
...@@ -52,14 +52,14 @@ extern void CsrWifiNmeApStartReqSerFree(void *msg); ...@@ -52,14 +52,14 @@ extern void CsrWifiNmeApStartReqSerFree(void *msg);
#define CsrWifiNmeApStopReqSizeof CsrWifiEventCsrUint16Sizeof #define CsrWifiNmeApStopReqSizeof CsrWifiEventCsrUint16Sizeof
#define CsrWifiNmeApStopReqSerFree CsrWifiNmeApPfree #define CsrWifiNmeApStopReqSerFree CsrWifiNmeApPfree
extern u8* CsrWifiNmeApWmmParamUpdateReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApWmmParamUpdateReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApWmmParamUpdateReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApWmmParamUpdateReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApWmmParamUpdateReqSizeof(void *msg); extern size_t CsrWifiNmeApWmmParamUpdateReqSizeof(void *msg);
#define CsrWifiNmeApWmmParamUpdateReqSerFree CsrWifiNmeApPfree #define CsrWifiNmeApWmmParamUpdateReqSerFree CsrWifiNmeApPfree
extern u8* CsrWifiNmeApStaRemoveReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApStaRemoveReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApStaRemoveReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApStaRemoveReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApStaRemoveReqSizeof(void *msg); extern size_t CsrWifiNmeApStaRemoveReqSizeof(void *msg);
#define CsrWifiNmeApStaRemoveReqSerFree CsrWifiNmeApPfree #define CsrWifiNmeApStaRemoveReqSerFree CsrWifiNmeApPfree
#define CsrWifiNmeApConfigSetCfmSer CsrWifiEventCsrUint16Ser #define CsrWifiNmeApConfigSetCfmSer CsrWifiEventCsrUint16Ser
...@@ -67,24 +67,24 @@ extern CsrSize CsrWifiNmeApStaRemoveReqSizeof(void *msg); ...@@ -67,24 +67,24 @@ extern CsrSize CsrWifiNmeApStaRemoveReqSizeof(void *msg);
#define CsrWifiNmeApConfigSetCfmSizeof CsrWifiEventCsrUint16Sizeof #define CsrWifiNmeApConfigSetCfmSizeof CsrWifiEventCsrUint16Sizeof
#define CsrWifiNmeApConfigSetCfmSerFree CsrWifiNmeApPfree #define CsrWifiNmeApConfigSetCfmSerFree CsrWifiNmeApPfree
extern u8* CsrWifiNmeApWpsRegisterCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApWpsRegisterCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApWpsRegisterCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApWpsRegisterCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApWpsRegisterCfmSizeof(void *msg); extern size_t CsrWifiNmeApWpsRegisterCfmSizeof(void *msg);
#define CsrWifiNmeApWpsRegisterCfmSerFree CsrWifiNmeApPfree #define CsrWifiNmeApWpsRegisterCfmSerFree CsrWifiNmeApPfree
extern u8* CsrWifiNmeApStartCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApStartCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApStartCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApStartCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApStartCfmSizeof(void *msg); extern size_t CsrWifiNmeApStartCfmSizeof(void *msg);
#define CsrWifiNmeApStartCfmSerFree CsrWifiNmeApPfree #define CsrWifiNmeApStartCfmSerFree CsrWifiNmeApPfree
extern u8* CsrWifiNmeApStopCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApStopCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApStopCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApStopCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApStopCfmSizeof(void *msg); extern size_t CsrWifiNmeApStopCfmSizeof(void *msg);
#define CsrWifiNmeApStopCfmSerFree CsrWifiNmeApPfree #define CsrWifiNmeApStopCfmSerFree CsrWifiNmeApPfree
extern u8* CsrWifiNmeApStopIndSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApStopIndSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApStopIndDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApStopIndDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApStopIndSizeof(void *msg); extern size_t CsrWifiNmeApStopIndSizeof(void *msg);
#define CsrWifiNmeApStopIndSerFree CsrWifiNmeApPfree #define CsrWifiNmeApStopIndSerFree CsrWifiNmeApPfree
#define CsrWifiNmeApWmmParamUpdateCfmSer CsrWifiEventCsrUint16Ser #define CsrWifiNmeApWmmParamUpdateCfmSer CsrWifiEventCsrUint16Ser
...@@ -92,9 +92,9 @@ extern CsrSize CsrWifiNmeApStopIndSizeof(void *msg); ...@@ -92,9 +92,9 @@ extern CsrSize CsrWifiNmeApStopIndSizeof(void *msg);
#define CsrWifiNmeApWmmParamUpdateCfmSizeof CsrWifiEventCsrUint16Sizeof #define CsrWifiNmeApWmmParamUpdateCfmSizeof CsrWifiEventCsrUint16Sizeof
#define CsrWifiNmeApWmmParamUpdateCfmSerFree CsrWifiNmeApPfree #define CsrWifiNmeApWmmParamUpdateCfmSerFree CsrWifiNmeApPfree
extern u8* CsrWifiNmeApStationIndSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeApStationIndSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeApStationIndDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeApStationIndDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeApStationIndSizeof(void *msg); extern size_t CsrWifiNmeApStationIndSizeof(void *msg);
#define CsrWifiNmeApStationIndSerFree CsrWifiNmeApPfree #define CsrWifiNmeApStationIndSerFree CsrWifiNmeApPfree
......
...@@ -29,14 +29,14 @@ extern "C" { ...@@ -29,14 +29,14 @@ extern "C" {
extern void CsrWifiNmePfree(void *ptr); extern void CsrWifiNmePfree(void *ptr);
extern u8* CsrWifiNmeProfileSetReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeProfileSetReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeProfileSetReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeProfileSetReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeProfileSetReqSizeof(void *msg); extern size_t CsrWifiNmeProfileSetReqSizeof(void *msg);
extern void CsrWifiNmeProfileSetReqSerFree(void *msg); extern void CsrWifiNmeProfileSetReqSerFree(void *msg);
extern u8* CsrWifiNmeProfileDeleteReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeProfileDeleteReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeProfileDeleteReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeProfileDeleteReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeProfileDeleteReqSizeof(void *msg); extern size_t CsrWifiNmeProfileDeleteReqSizeof(void *msg);
#define CsrWifiNmeProfileDeleteReqSerFree CsrWifiNmePfree #define CsrWifiNmeProfileDeleteReqSerFree CsrWifiNmePfree
#define CsrWifiNmeProfileDeleteAllReqSer CsrWifiEventSer #define CsrWifiNmeProfileDeleteAllReqSer CsrWifiEventSer
...@@ -44,19 +44,19 @@ extern CsrSize CsrWifiNmeProfileDeleteReqSizeof(void *msg); ...@@ -44,19 +44,19 @@ extern CsrSize CsrWifiNmeProfileDeleteReqSizeof(void *msg);
#define CsrWifiNmeProfileDeleteAllReqSizeof CsrWifiEventSizeof #define CsrWifiNmeProfileDeleteAllReqSizeof CsrWifiEventSizeof
#define CsrWifiNmeProfileDeleteAllReqSerFree CsrWifiNmePfree #define CsrWifiNmeProfileDeleteAllReqSerFree CsrWifiNmePfree
extern u8* CsrWifiNmeProfileOrderSetReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeProfileOrderSetReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeProfileOrderSetReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeProfileOrderSetReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeProfileOrderSetReqSizeof(void *msg); extern size_t CsrWifiNmeProfileOrderSetReqSizeof(void *msg);
extern void CsrWifiNmeProfileOrderSetReqSerFree(void *msg); extern void CsrWifiNmeProfileOrderSetReqSerFree(void *msg);
extern u8* CsrWifiNmeProfileConnectReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeProfileConnectReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeProfileConnectReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeProfileConnectReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeProfileConnectReqSizeof(void *msg); extern size_t CsrWifiNmeProfileConnectReqSizeof(void *msg);
#define CsrWifiNmeProfileConnectReqSerFree CsrWifiNmePfree #define CsrWifiNmeProfileConnectReqSerFree CsrWifiNmePfree
extern u8* CsrWifiNmeWpsReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeWpsReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeWpsReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeWpsReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeWpsReqSizeof(void *msg); extern size_t CsrWifiNmeWpsReqSizeof(void *msg);
#define CsrWifiNmeWpsReqSerFree CsrWifiNmePfree #define CsrWifiNmeWpsReqSerFree CsrWifiNmePfree
#define CsrWifiNmeWpsCancelReqSer CsrWifiEventCsrUint16Ser #define CsrWifiNmeWpsCancelReqSer CsrWifiEventCsrUint16Ser
...@@ -69,24 +69,24 @@ extern CsrSize CsrWifiNmeWpsReqSizeof(void *msg); ...@@ -69,24 +69,24 @@ extern CsrSize CsrWifiNmeWpsReqSizeof(void *msg);
#define CsrWifiNmeConnectionStatusGetReqSizeof CsrWifiEventCsrUint16Sizeof #define CsrWifiNmeConnectionStatusGetReqSizeof CsrWifiEventCsrUint16Sizeof
#define CsrWifiNmeConnectionStatusGetReqSerFree CsrWifiNmePfree #define CsrWifiNmeConnectionStatusGetReqSerFree CsrWifiNmePfree
extern u8* CsrWifiNmeSimImsiGetResSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeSimImsiGetResSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeSimImsiGetResDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeSimImsiGetResDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeSimImsiGetResSizeof(void *msg); extern size_t CsrWifiNmeSimImsiGetResSizeof(void *msg);
extern void CsrWifiNmeSimImsiGetResSerFree(void *msg); extern void CsrWifiNmeSimImsiGetResSerFree(void *msg);
extern u8* CsrWifiNmeSimGsmAuthResSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeSimGsmAuthResSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeSimGsmAuthResDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeSimGsmAuthResDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeSimGsmAuthResSizeof(void *msg); extern size_t CsrWifiNmeSimGsmAuthResSizeof(void *msg);
extern void CsrWifiNmeSimGsmAuthResSerFree(void *msg); extern void CsrWifiNmeSimGsmAuthResSerFree(void *msg);
extern u8* CsrWifiNmeSimUmtsAuthResSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeSimUmtsAuthResSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeSimUmtsAuthResDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeSimUmtsAuthResDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeSimUmtsAuthResSizeof(void *msg); extern size_t CsrWifiNmeSimUmtsAuthResSizeof(void *msg);
extern void CsrWifiNmeSimUmtsAuthResSerFree(void *msg); extern void CsrWifiNmeSimUmtsAuthResSerFree(void *msg);
extern u8* CsrWifiNmeWpsConfigSetReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeWpsConfigSetReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeWpsConfigSetReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeWpsConfigSetReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeWpsConfigSetReqSizeof(void *msg); extern size_t CsrWifiNmeWpsConfigSetReqSizeof(void *msg);
extern void CsrWifiNmeWpsConfigSetReqSerFree(void *msg); extern void CsrWifiNmeWpsConfigSetReqSerFree(void *msg);
#define CsrWifiNmeEventMaskSetReqSer CsrWifiEventCsrUint32Ser #define CsrWifiNmeEventMaskSetReqSer CsrWifiEventCsrUint32Ser
...@@ -109,39 +109,39 @@ extern void CsrWifiNmeWpsConfigSetReqSerFree(void *msg); ...@@ -109,39 +109,39 @@ extern void CsrWifiNmeWpsConfigSetReqSerFree(void *msg);
#define CsrWifiNmeProfileDeleteAllCfmSizeof CsrWifiEventCsrUint16Sizeof #define CsrWifiNmeProfileDeleteAllCfmSizeof CsrWifiEventCsrUint16Sizeof
#define CsrWifiNmeProfileDeleteAllCfmSerFree CsrWifiNmePfree #define CsrWifiNmeProfileDeleteAllCfmSerFree CsrWifiNmePfree
extern u8* CsrWifiNmeProfileOrderSetCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeProfileOrderSetCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeProfileOrderSetCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeProfileOrderSetCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeProfileOrderSetCfmSizeof(void *msg); extern size_t CsrWifiNmeProfileOrderSetCfmSizeof(void *msg);
#define CsrWifiNmeProfileOrderSetCfmSerFree CsrWifiNmePfree #define CsrWifiNmeProfileOrderSetCfmSerFree CsrWifiNmePfree
extern u8* CsrWifiNmeProfileConnectCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeProfileConnectCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeProfileConnectCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeProfileConnectCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeProfileConnectCfmSizeof(void *msg); extern size_t CsrWifiNmeProfileConnectCfmSizeof(void *msg);
extern void CsrWifiNmeProfileConnectCfmSerFree(void *msg); extern void CsrWifiNmeProfileConnectCfmSerFree(void *msg);
extern u8* CsrWifiNmeWpsCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeWpsCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeWpsCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeWpsCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeWpsCfmSizeof(void *msg); extern size_t CsrWifiNmeWpsCfmSizeof(void *msg);
extern void CsrWifiNmeWpsCfmSerFree(void *msg); extern void CsrWifiNmeWpsCfmSerFree(void *msg);
extern u8* CsrWifiNmeWpsCancelCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeWpsCancelCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeWpsCancelCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeWpsCancelCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeWpsCancelCfmSizeof(void *msg); extern size_t CsrWifiNmeWpsCancelCfmSizeof(void *msg);
#define CsrWifiNmeWpsCancelCfmSerFree CsrWifiNmePfree #define CsrWifiNmeWpsCancelCfmSerFree CsrWifiNmePfree
extern u8* CsrWifiNmeConnectionStatusGetCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeConnectionStatusGetCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeConnectionStatusGetCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeConnectionStatusGetCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeConnectionStatusGetCfmSizeof(void *msg); extern size_t CsrWifiNmeConnectionStatusGetCfmSizeof(void *msg);
#define CsrWifiNmeConnectionStatusGetCfmSerFree CsrWifiNmePfree #define CsrWifiNmeConnectionStatusGetCfmSerFree CsrWifiNmePfree
extern u8* CsrWifiNmeProfileUpdateIndSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeProfileUpdateIndSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeProfileUpdateIndDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeProfileUpdateIndDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeProfileUpdateIndSizeof(void *msg); extern size_t CsrWifiNmeProfileUpdateIndSizeof(void *msg);
extern void CsrWifiNmeProfileUpdateIndSerFree(void *msg); extern void CsrWifiNmeProfileUpdateIndSerFree(void *msg);
extern u8* CsrWifiNmeProfileDisconnectIndSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeProfileDisconnectIndSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeProfileDisconnectIndDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeProfileDisconnectIndDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeProfileDisconnectIndSizeof(void *msg); extern size_t CsrWifiNmeProfileDisconnectIndSizeof(void *msg);
extern void CsrWifiNmeProfileDisconnectIndSerFree(void *msg); extern void CsrWifiNmeProfileDisconnectIndSerFree(void *msg);
#define CsrWifiNmeSimImsiGetIndSer CsrWifiEventSer #define CsrWifiNmeSimImsiGetIndSer CsrWifiEventSer
...@@ -149,14 +149,14 @@ extern void CsrWifiNmeProfileDisconnectIndSerFree(void *msg); ...@@ -149,14 +149,14 @@ extern void CsrWifiNmeProfileDisconnectIndSerFree(void *msg);
#define CsrWifiNmeSimImsiGetIndSizeof CsrWifiEventSizeof #define CsrWifiNmeSimImsiGetIndSizeof CsrWifiEventSizeof
#define CsrWifiNmeSimImsiGetIndSerFree CsrWifiNmePfree #define CsrWifiNmeSimImsiGetIndSerFree CsrWifiNmePfree
extern u8* CsrWifiNmeSimGsmAuthIndSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeSimGsmAuthIndSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeSimGsmAuthIndDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeSimGsmAuthIndDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeSimGsmAuthIndSizeof(void *msg); extern size_t CsrWifiNmeSimGsmAuthIndSizeof(void *msg);
extern void CsrWifiNmeSimGsmAuthIndSerFree(void *msg); extern void CsrWifiNmeSimGsmAuthIndSerFree(void *msg);
extern u8* CsrWifiNmeSimUmtsAuthIndSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiNmeSimUmtsAuthIndSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiNmeSimUmtsAuthIndDes(u8 *buffer, CsrSize len); extern void* CsrWifiNmeSimUmtsAuthIndDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiNmeSimUmtsAuthIndSizeof(void *msg); extern size_t CsrWifiNmeSimUmtsAuthIndSizeof(void *msg);
#define CsrWifiNmeSimUmtsAuthIndSerFree CsrWifiNmePfree #define CsrWifiNmeSimUmtsAuthIndSerFree CsrWifiNmePfree
#define CsrWifiNmeWpsConfigSetCfmSer CsrWifiEventCsrUint16Ser #define CsrWifiNmeWpsConfigSetCfmSer CsrWifiEventCsrUint16Ser
......
...@@ -24,9 +24,9 @@ void CsrWifiRouterPfree(void *ptr) ...@@ -24,9 +24,9 @@ void CsrWifiRouterPfree(void *ptr)
} }
CsrSize CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg) size_t CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg)
{ {
CsrSize bufferSize = 2; size_t bufferSize = 2;
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 12) */ /* Calculate the Size of the Serialised Data. Could be more efficient (Try 12) */
bufferSize += 2; /* u16 primitive->interfaceTag */ bufferSize += 2; /* u16 primitive->interfaceTag */
...@@ -37,7 +37,7 @@ CsrSize CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg) ...@@ -37,7 +37,7 @@ CsrSize CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg)
} }
u8* CsrWifiRouterMaPacketSubscribeReqSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiRouterMaPacketSubscribeReqSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiRouterMaPacketSubscribeReq *primitive = (CsrWifiRouterMaPacketSubscribeReq *)msg; CsrWifiRouterMaPacketSubscribeReq *primitive = (CsrWifiRouterMaPacketSubscribeReq *)msg;
*len = 0; *len = 0;
...@@ -50,10 +50,10 @@ u8* CsrWifiRouterMaPacketSubscribeReqSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -50,10 +50,10 @@ u8* CsrWifiRouterMaPacketSubscribeReqSer(u8 *ptr, CsrSize *len, void *msg)
} }
void* CsrWifiRouterMaPacketSubscribeReqDes(u8 *buffer, CsrSize length) void* CsrWifiRouterMaPacketSubscribeReqDes(u8 *buffer, size_t length)
{ {
CsrWifiRouterMaPacketSubscribeReq *primitive = (CsrWifiRouterMaPacketSubscribeReq *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketSubscribeReq)); CsrWifiRouterMaPacketSubscribeReq *primitive = (CsrWifiRouterMaPacketSubscribeReq *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketSubscribeReq));
CsrSize offset; size_t offset;
offset = 0; offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
...@@ -66,10 +66,10 @@ void* CsrWifiRouterMaPacketSubscribeReqDes(u8 *buffer, CsrSize length) ...@@ -66,10 +66,10 @@ void* CsrWifiRouterMaPacketSubscribeReqDes(u8 *buffer, CsrSize length)
} }
CsrSize CsrWifiRouterMaPacketReqSizeof(void *msg) size_t CsrWifiRouterMaPacketReqSizeof(void *msg)
{ {
CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *) msg; CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *) msg;
CsrSize bufferSize = 2; size_t bufferSize = 2;
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 20) */ /* Calculate the Size of the Serialised Data. Could be more efficient (Try 20) */
bufferSize += 2; /* u16 primitive->interfaceTag */ bufferSize += 2; /* u16 primitive->interfaceTag */
...@@ -84,7 +84,7 @@ CsrSize CsrWifiRouterMaPacketReqSizeof(void *msg) ...@@ -84,7 +84,7 @@ CsrSize CsrWifiRouterMaPacketReqSizeof(void *msg)
} }
u8* CsrWifiRouterMaPacketReqSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiRouterMaPacketReqSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *)msg; CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *)msg;
*len = 0; *len = 0;
...@@ -104,10 +104,10 @@ u8* CsrWifiRouterMaPacketReqSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -104,10 +104,10 @@ u8* CsrWifiRouterMaPacketReqSer(u8 *ptr, CsrSize *len, void *msg)
} }
void* CsrWifiRouterMaPacketReqDes(u8 *buffer, CsrSize length) void* CsrWifiRouterMaPacketReqDes(u8 *buffer, size_t length)
{ {
CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketReq)); CsrWifiRouterMaPacketReq *primitive = (CsrWifiRouterMaPacketReq *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketReq));
CsrSize offset; size_t offset;
offset = 0; offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
...@@ -141,9 +141,9 @@ void CsrWifiRouterMaPacketReqSerFree(void *voidPrimitivePointer) ...@@ -141,9 +141,9 @@ void CsrWifiRouterMaPacketReqSerFree(void *voidPrimitivePointer)
} }
CsrSize CsrWifiRouterMaPacketResSizeof(void *msg) size_t CsrWifiRouterMaPacketResSizeof(void *msg)
{ {
CsrSize bufferSize = 2; size_t bufferSize = 2;
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */ /* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */
bufferSize += 2; /* u16 primitive->interfaceTag */ bufferSize += 2; /* u16 primitive->interfaceTag */
...@@ -153,7 +153,7 @@ CsrSize CsrWifiRouterMaPacketResSizeof(void *msg) ...@@ -153,7 +153,7 @@ CsrSize CsrWifiRouterMaPacketResSizeof(void *msg)
} }
u8* CsrWifiRouterMaPacketResSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiRouterMaPacketResSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiRouterMaPacketRes *primitive = (CsrWifiRouterMaPacketRes *)msg; CsrWifiRouterMaPacketRes *primitive = (CsrWifiRouterMaPacketRes *)msg;
*len = 0; *len = 0;
...@@ -165,10 +165,10 @@ u8* CsrWifiRouterMaPacketResSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -165,10 +165,10 @@ u8* CsrWifiRouterMaPacketResSer(u8 *ptr, CsrSize *len, void *msg)
} }
void* CsrWifiRouterMaPacketResDes(u8 *buffer, CsrSize length) void* CsrWifiRouterMaPacketResDes(u8 *buffer, size_t length)
{ {
CsrWifiRouterMaPacketRes *primitive = (CsrWifiRouterMaPacketRes *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketRes)); CsrWifiRouterMaPacketRes *primitive = (CsrWifiRouterMaPacketRes *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketRes));
CsrSize offset; size_t offset;
offset = 0; offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
...@@ -180,9 +180,9 @@ void* CsrWifiRouterMaPacketResDes(u8 *buffer, CsrSize length) ...@@ -180,9 +180,9 @@ void* CsrWifiRouterMaPacketResDes(u8 *buffer, CsrSize length)
} }
CsrSize CsrWifiRouterMaPacketCancelReqSizeof(void *msg) size_t CsrWifiRouterMaPacketCancelReqSizeof(void *msg)
{ {
CsrSize bufferSize = 2; size_t bufferSize = 2;
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 17) */ /* Calculate the Size of the Serialised Data. Could be more efficient (Try 17) */
bufferSize += 2; /* u16 primitive->interfaceTag */ bufferSize += 2; /* u16 primitive->interfaceTag */
...@@ -193,7 +193,7 @@ CsrSize CsrWifiRouterMaPacketCancelReqSizeof(void *msg) ...@@ -193,7 +193,7 @@ CsrSize CsrWifiRouterMaPacketCancelReqSizeof(void *msg)
} }
u8* CsrWifiRouterMaPacketCancelReqSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiRouterMaPacketCancelReqSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiRouterMaPacketCancelReq *primitive = (CsrWifiRouterMaPacketCancelReq *)msg; CsrWifiRouterMaPacketCancelReq *primitive = (CsrWifiRouterMaPacketCancelReq *)msg;
*len = 0; *len = 0;
...@@ -206,10 +206,10 @@ u8* CsrWifiRouterMaPacketCancelReqSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -206,10 +206,10 @@ u8* CsrWifiRouterMaPacketCancelReqSer(u8 *ptr, CsrSize *len, void *msg)
} }
void* CsrWifiRouterMaPacketCancelReqDes(u8 *buffer, CsrSize length) void* CsrWifiRouterMaPacketCancelReqDes(u8 *buffer, size_t length)
{ {
CsrWifiRouterMaPacketCancelReq *primitive = (CsrWifiRouterMaPacketCancelReq *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketCancelReq)); CsrWifiRouterMaPacketCancelReq *primitive = (CsrWifiRouterMaPacketCancelReq *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketCancelReq));
CsrSize offset; size_t offset;
offset = 0; offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
...@@ -222,9 +222,9 @@ void* CsrWifiRouterMaPacketCancelReqDes(u8 *buffer, CsrSize length) ...@@ -222,9 +222,9 @@ void* CsrWifiRouterMaPacketCancelReqDes(u8 *buffer, CsrSize length)
} }
CsrSize CsrWifiRouterMaPacketSubscribeCfmSizeof(void *msg) size_t CsrWifiRouterMaPacketSubscribeCfmSizeof(void *msg)
{ {
CsrSize bufferSize = 2; size_t bufferSize = 2;
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */ /* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
bufferSize += 2; /* u16 primitive->interfaceTag */ bufferSize += 2; /* u16 primitive->interfaceTag */
...@@ -235,7 +235,7 @@ CsrSize CsrWifiRouterMaPacketSubscribeCfmSizeof(void *msg) ...@@ -235,7 +235,7 @@ CsrSize CsrWifiRouterMaPacketSubscribeCfmSizeof(void *msg)
} }
u8* CsrWifiRouterMaPacketSubscribeCfmSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiRouterMaPacketSubscribeCfmSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiRouterMaPacketSubscribeCfm *primitive = (CsrWifiRouterMaPacketSubscribeCfm *)msg; CsrWifiRouterMaPacketSubscribeCfm *primitive = (CsrWifiRouterMaPacketSubscribeCfm *)msg;
*len = 0; *len = 0;
...@@ -248,10 +248,10 @@ u8* CsrWifiRouterMaPacketSubscribeCfmSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -248,10 +248,10 @@ u8* CsrWifiRouterMaPacketSubscribeCfmSer(u8 *ptr, CsrSize *len, void *msg)
} }
void* CsrWifiRouterMaPacketSubscribeCfmDes(u8 *buffer, CsrSize length) void* CsrWifiRouterMaPacketSubscribeCfmDes(u8 *buffer, size_t length)
{ {
CsrWifiRouterMaPacketSubscribeCfm *primitive = (CsrWifiRouterMaPacketSubscribeCfm *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketSubscribeCfm)); CsrWifiRouterMaPacketSubscribeCfm *primitive = (CsrWifiRouterMaPacketSubscribeCfm *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketSubscribeCfm));
CsrSize offset; size_t offset;
offset = 0; offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
...@@ -264,9 +264,9 @@ void* CsrWifiRouterMaPacketSubscribeCfmDes(u8 *buffer, CsrSize length) ...@@ -264,9 +264,9 @@ void* CsrWifiRouterMaPacketSubscribeCfmDes(u8 *buffer, CsrSize length)
} }
CsrSize CsrWifiRouterMaPacketUnsubscribeCfmSizeof(void *msg) size_t CsrWifiRouterMaPacketUnsubscribeCfmSizeof(void *msg)
{ {
CsrSize bufferSize = 2; size_t bufferSize = 2;
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 7) */ /* Calculate the Size of the Serialised Data. Could be more efficient (Try 7) */
bufferSize += 2; /* u16 primitive->interfaceTag */ bufferSize += 2; /* u16 primitive->interfaceTag */
...@@ -275,7 +275,7 @@ CsrSize CsrWifiRouterMaPacketUnsubscribeCfmSizeof(void *msg) ...@@ -275,7 +275,7 @@ CsrSize CsrWifiRouterMaPacketUnsubscribeCfmSizeof(void *msg)
} }
u8* CsrWifiRouterMaPacketUnsubscribeCfmSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiRouterMaPacketUnsubscribeCfmSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiRouterMaPacketUnsubscribeCfm *primitive = (CsrWifiRouterMaPacketUnsubscribeCfm *)msg; CsrWifiRouterMaPacketUnsubscribeCfm *primitive = (CsrWifiRouterMaPacketUnsubscribeCfm *)msg;
*len = 0; *len = 0;
...@@ -286,10 +286,10 @@ u8* CsrWifiRouterMaPacketUnsubscribeCfmSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -286,10 +286,10 @@ u8* CsrWifiRouterMaPacketUnsubscribeCfmSer(u8 *ptr, CsrSize *len, void *msg)
} }
void* CsrWifiRouterMaPacketUnsubscribeCfmDes(u8 *buffer, CsrSize length) void* CsrWifiRouterMaPacketUnsubscribeCfmDes(u8 *buffer, size_t length)
{ {
CsrWifiRouterMaPacketUnsubscribeCfm *primitive = (CsrWifiRouterMaPacketUnsubscribeCfm *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketUnsubscribeCfm)); CsrWifiRouterMaPacketUnsubscribeCfm *primitive = (CsrWifiRouterMaPacketUnsubscribeCfm *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketUnsubscribeCfm));
CsrSize offset; size_t offset;
offset = 0; offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
...@@ -300,9 +300,9 @@ void* CsrWifiRouterMaPacketUnsubscribeCfmDes(u8 *buffer, CsrSize length) ...@@ -300,9 +300,9 @@ void* CsrWifiRouterMaPacketUnsubscribeCfmDes(u8 *buffer, CsrSize length)
} }
CsrSize CsrWifiRouterMaPacketCfmSizeof(void *msg) size_t CsrWifiRouterMaPacketCfmSizeof(void *msg)
{ {
CsrSize bufferSize = 2; size_t bufferSize = 2;
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */ /* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
bufferSize += 2; /* u16 primitive->interfaceTag */ bufferSize += 2; /* u16 primitive->interfaceTag */
...@@ -313,7 +313,7 @@ CsrSize CsrWifiRouterMaPacketCfmSizeof(void *msg) ...@@ -313,7 +313,7 @@ CsrSize CsrWifiRouterMaPacketCfmSizeof(void *msg)
} }
u8* CsrWifiRouterMaPacketCfmSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiRouterMaPacketCfmSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiRouterMaPacketCfm *primitive = (CsrWifiRouterMaPacketCfm *)msg; CsrWifiRouterMaPacketCfm *primitive = (CsrWifiRouterMaPacketCfm *)msg;
*len = 0; *len = 0;
...@@ -326,10 +326,10 @@ u8* CsrWifiRouterMaPacketCfmSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -326,10 +326,10 @@ u8* CsrWifiRouterMaPacketCfmSer(u8 *ptr, CsrSize *len, void *msg)
} }
void* CsrWifiRouterMaPacketCfmDes(u8 *buffer, CsrSize length) void* CsrWifiRouterMaPacketCfmDes(u8 *buffer, size_t length)
{ {
CsrWifiRouterMaPacketCfm *primitive = (CsrWifiRouterMaPacketCfm *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketCfm)); CsrWifiRouterMaPacketCfm *primitive = (CsrWifiRouterMaPacketCfm *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketCfm));
CsrSize offset; size_t offset;
offset = 0; offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
...@@ -342,10 +342,10 @@ void* CsrWifiRouterMaPacketCfmDes(u8 *buffer, CsrSize length) ...@@ -342,10 +342,10 @@ void* CsrWifiRouterMaPacketCfmDes(u8 *buffer, CsrSize length)
} }
CsrSize CsrWifiRouterMaPacketIndSizeof(void *msg) size_t CsrWifiRouterMaPacketIndSizeof(void *msg)
{ {
CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *) msg; CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *) msg;
CsrSize bufferSize = 2; size_t bufferSize = 2;
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 21) */ /* Calculate the Size of the Serialised Data. Could be more efficient (Try 21) */
bufferSize += 2; /* u16 primitive->interfaceTag */ bufferSize += 2; /* u16 primitive->interfaceTag */
...@@ -361,7 +361,7 @@ CsrSize CsrWifiRouterMaPacketIndSizeof(void *msg) ...@@ -361,7 +361,7 @@ CsrSize CsrWifiRouterMaPacketIndSizeof(void *msg)
} }
u8* CsrWifiRouterMaPacketIndSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiRouterMaPacketIndSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *)msg; CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *)msg;
*len = 0; *len = 0;
...@@ -382,10 +382,10 @@ u8* CsrWifiRouterMaPacketIndSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -382,10 +382,10 @@ u8* CsrWifiRouterMaPacketIndSer(u8 *ptr, CsrSize *len, void *msg)
} }
void* CsrWifiRouterMaPacketIndDes(u8 *buffer, CsrSize length) void* CsrWifiRouterMaPacketIndDes(u8 *buffer, size_t length)
{ {
CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketInd)); CsrWifiRouterMaPacketInd *primitive = (CsrWifiRouterMaPacketInd *) CsrPmemAlloc(sizeof(CsrWifiRouterMaPacketInd));
CsrSize offset; size_t offset;
offset = 0; offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
......
...@@ -25,9 +25,9 @@ extern "C" { ...@@ -25,9 +25,9 @@ extern "C" {
extern void CsrWifiRouterPfree(void *ptr); extern void CsrWifiRouterPfree(void *ptr);
extern u8* CsrWifiRouterMaPacketSubscribeReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiRouterMaPacketSubscribeReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiRouterMaPacketSubscribeReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiRouterMaPacketSubscribeReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg); extern size_t CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg);
#define CsrWifiRouterMaPacketSubscribeReqSerFree CsrWifiRouterPfree #define CsrWifiRouterMaPacketSubscribeReqSerFree CsrWifiRouterPfree
#define CsrWifiRouterMaPacketUnsubscribeReqSer CsrWifiEventCsrUint16CsrUint8Ser #define CsrWifiRouterMaPacketUnsubscribeReqSer CsrWifiEventCsrUint16CsrUint8Ser
...@@ -35,39 +35,39 @@ extern CsrSize CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg); ...@@ -35,39 +35,39 @@ extern CsrSize CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg);
#define CsrWifiRouterMaPacketUnsubscribeReqSizeof CsrWifiEventCsrUint16CsrUint8Sizeof #define CsrWifiRouterMaPacketUnsubscribeReqSizeof CsrWifiEventCsrUint16CsrUint8Sizeof
#define CsrWifiRouterMaPacketUnsubscribeReqSerFree CsrWifiRouterPfree #define CsrWifiRouterMaPacketUnsubscribeReqSerFree CsrWifiRouterPfree
extern u8* CsrWifiRouterMaPacketReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiRouterMaPacketReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiRouterMaPacketReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiRouterMaPacketReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiRouterMaPacketReqSizeof(void *msg); extern size_t CsrWifiRouterMaPacketReqSizeof(void *msg);
extern void CsrWifiRouterMaPacketReqSerFree(void *msg); extern void CsrWifiRouterMaPacketReqSerFree(void *msg);
extern u8* CsrWifiRouterMaPacketResSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiRouterMaPacketResSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiRouterMaPacketResDes(u8 *buffer, CsrSize len); extern void* CsrWifiRouterMaPacketResDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiRouterMaPacketResSizeof(void *msg); extern size_t CsrWifiRouterMaPacketResSizeof(void *msg);
#define CsrWifiRouterMaPacketResSerFree CsrWifiRouterPfree #define CsrWifiRouterMaPacketResSerFree CsrWifiRouterPfree
extern u8* CsrWifiRouterMaPacketCancelReqSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiRouterMaPacketCancelReqSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiRouterMaPacketCancelReqDes(u8 *buffer, CsrSize len); extern void* CsrWifiRouterMaPacketCancelReqDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiRouterMaPacketCancelReqSizeof(void *msg); extern size_t CsrWifiRouterMaPacketCancelReqSizeof(void *msg);
#define CsrWifiRouterMaPacketCancelReqSerFree CsrWifiRouterPfree #define CsrWifiRouterMaPacketCancelReqSerFree CsrWifiRouterPfree
extern u8* CsrWifiRouterMaPacketSubscribeCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiRouterMaPacketSubscribeCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiRouterMaPacketSubscribeCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiRouterMaPacketSubscribeCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiRouterMaPacketSubscribeCfmSizeof(void *msg); extern size_t CsrWifiRouterMaPacketSubscribeCfmSizeof(void *msg);
#define CsrWifiRouterMaPacketSubscribeCfmSerFree CsrWifiRouterPfree #define CsrWifiRouterMaPacketSubscribeCfmSerFree CsrWifiRouterPfree
extern u8* CsrWifiRouterMaPacketUnsubscribeCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiRouterMaPacketUnsubscribeCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiRouterMaPacketUnsubscribeCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiRouterMaPacketUnsubscribeCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiRouterMaPacketUnsubscribeCfmSizeof(void *msg); extern size_t CsrWifiRouterMaPacketUnsubscribeCfmSizeof(void *msg);
#define CsrWifiRouterMaPacketUnsubscribeCfmSerFree CsrWifiRouterPfree #define CsrWifiRouterMaPacketUnsubscribeCfmSerFree CsrWifiRouterPfree
extern u8* CsrWifiRouterMaPacketCfmSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiRouterMaPacketCfmSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiRouterMaPacketCfmDes(u8 *buffer, CsrSize len); extern void* CsrWifiRouterMaPacketCfmDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiRouterMaPacketCfmSizeof(void *msg); extern size_t CsrWifiRouterMaPacketCfmSizeof(void *msg);
#define CsrWifiRouterMaPacketCfmSerFree CsrWifiRouterPfree #define CsrWifiRouterMaPacketCfmSerFree CsrWifiRouterPfree
extern u8* CsrWifiRouterMaPacketIndSer(u8 *ptr, CsrSize *len, void *msg); extern u8* CsrWifiRouterMaPacketIndSer(u8 *ptr, size_t *len, void *msg);
extern void* CsrWifiRouterMaPacketIndDes(u8 *buffer, CsrSize len); extern void* CsrWifiRouterMaPacketIndDes(u8 *buffer, size_t len);
extern CsrSize CsrWifiRouterMaPacketIndSizeof(void *msg); extern size_t CsrWifiRouterMaPacketIndSizeof(void *msg);
extern void CsrWifiRouterMaPacketIndSerFree(void *msg); extern void CsrWifiRouterMaPacketIndSerFree(void *msg);
......
...@@ -61,14 +61,14 @@ void CsrWifiRouterTransportDeinit(unifi_priv_t *priv) ...@@ -61,14 +61,14 @@ void CsrWifiRouterTransportDeinit(unifi_priv_t *priv)
} }
} }
void CsrWifiRouterTransportRecv(unifi_priv_t *priv, u8* buffer, CsrSize bufferLength) void CsrWifiRouterTransportRecv(unifi_priv_t *priv, u8* buffer, size_t bufferLength)
{ {
CsrMsgConvMsgEntry* msgEntry; CsrMsgConvMsgEntry* msgEntry;
u16 primType; u16 primType;
CsrSchedQid src; CsrSchedQid src;
CsrSchedQid dest; CsrSchedQid dest;
u16 msgType; u16 msgType;
CsrSize offset = 0; size_t offset = 0;
CsrWifiFsmEvent* msg; CsrWifiFsmEvent* msg;
/* Decode the prim and message type */ /* Decode the prim and message type */
...@@ -163,9 +163,9 @@ static void CsrWifiRouterTransportSerialiseAndSend(u16 primType, void* msg) ...@@ -163,9 +163,9 @@ static void CsrWifiRouterTransportSerialiseAndSend(u16 primType, void* msg)
{ {
CsrWifiFsmEvent* evt = (CsrWifiFsmEvent*)msg; CsrWifiFsmEvent* evt = (CsrWifiFsmEvent*)msg;
CsrMsgConvMsgEntry* msgEntry; CsrMsgConvMsgEntry* msgEntry;
CsrSize msgSize; size_t msgSize;
CsrSize encodeBufferLen = 0; size_t encodeBufferLen = 0;
CsrSize offset = 0; size_t offset = 0;
u8* encodeBuffer; u8* encodeBuffer;
unifi_trace(drvpriv, UDBG4, "CsrWifiRouterTransportSerialiseAndSend: primType=0x%.4X, msgType=0x%.4X\n", unifi_trace(drvpriv, UDBG4, "CsrWifiRouterTransportSerialiseAndSend: primType=0x%.4X, msgType=0x%.4X\n",
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "csr_wifi_msgconv.h" #include "csr_wifi_msgconv.h"
#include "csr_wifi_lib.h" #include "csr_wifi_lib.h"
void CsrUint24Des(u32 *v, u8 *buffer, CsrSize *offset) void CsrUint24Des(u32 *v, u8 *buffer, size_t *offset)
{ {
u32 val; u32 val;
...@@ -30,7 +30,7 @@ void CsrUint24Des(u32 *v, u8 *buffer, CsrSize *offset) ...@@ -30,7 +30,7 @@ void CsrUint24Des(u32 *v, u8 *buffer, CsrSize *offset)
/* Big endian :e.g WSC, TCLAS */ /* Big endian :e.g WSC, TCLAS */
void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset) void CsrUint16DesBigEndian(u16 *v, u8 *buffer, size_t *offset)
{ {
u16 val; u16 val;
...@@ -41,7 +41,7 @@ void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset) ...@@ -41,7 +41,7 @@ void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset)
} }
void CsrUint24DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset) void CsrUint24DesBigEndian(u32 *v, u8 *buffer, size_t *offset)
{ {
u32 val; u32 val;
...@@ -54,7 +54,7 @@ void CsrUint24DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset) ...@@ -54,7 +54,7 @@ void CsrUint24DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset)
} }
void CsrUint32DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset) void CsrUint32DesBigEndian(u32 *v, u8 *buffer, size_t *offset)
{ {
u32 val; u32 val;
...@@ -68,7 +68,7 @@ void CsrUint32DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset) ...@@ -68,7 +68,7 @@ void CsrUint32DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset)
} }
void CsrUint24Ser(u8 *ptr, CsrSize *len, u32 v) void CsrUint24Ser(u8 *ptr, size_t *len, u32 v)
{ {
ptr[(*len) + 2] = (u8)((v & 0x00ff0000) >> 16); ptr[(*len) + 2] = (u8)((v & 0x00ff0000) >> 16);
ptr[(*len) + 1] = (u8)((v & 0x0000ff00) >> 8); ptr[(*len) + 1] = (u8)((v & 0x0000ff00) >> 8);
...@@ -79,7 +79,7 @@ void CsrUint24Ser(u8 *ptr, CsrSize *len, u32 v) ...@@ -79,7 +79,7 @@ void CsrUint24Ser(u8 *ptr, CsrSize *len, u32 v)
/* Big endian :e.g WSC, TCLAS */ /* Big endian :e.g WSC, TCLAS */
void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v) void CsrUint16SerBigEndian(u8 *ptr, size_t *len, u16 v)
{ {
ptr[(*len)] = (u8)((v & 0xff00) >> 8); ptr[(*len)] = (u8)((v & 0xff00) >> 8);
ptr[(*len) + 1] = (u8)((v & 0x00ff)); ptr[(*len) + 1] = (u8)((v & 0x00ff));
...@@ -88,7 +88,7 @@ void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v) ...@@ -88,7 +88,7 @@ void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v)
} }
void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, u32 v) void CsrUint32SerBigEndian(u8 *ptr, size_t *len, u32 v)
{ {
ptr[(*len)] = (u8)((v & 0xff000000) >> 24); ptr[(*len)] = (u8)((v & 0xff000000) >> 24);
ptr[(*len) + 1] = (u8)((v & 0x00ff0000) >> 16); ptr[(*len) + 1] = (u8)((v & 0x00ff0000) >> 16);
...@@ -99,7 +99,7 @@ void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, u32 v) ...@@ -99,7 +99,7 @@ void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, u32 v)
} }
void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, u32 v) void CsrUint24SerBigEndian(u8 *ptr, size_t *len, u32 v)
{ {
ptr[(*len)] = (u8)((v & 0x00ff0000) >> 16); ptr[(*len)] = (u8)((v & 0x00ff0000) >> 16);
ptr[(*len) + 1] = (u8)((v & 0x0000ff00) >> 8); ptr[(*len) + 1] = (u8)((v & 0x0000ff00) >> 8);
...@@ -109,13 +109,13 @@ void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, u32 v) ...@@ -109,13 +109,13 @@ void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, u32 v)
} }
CsrSize CsrWifiEventSizeof(void *msg) size_t CsrWifiEventSizeof(void *msg)
{ {
return 2; return 2;
} }
EXPORT_SYMBOL_GPL(CsrWifiEventSizeof); EXPORT_SYMBOL_GPL(CsrWifiEventSizeof);
u8* CsrWifiEventSer(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiEventSer(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiFsmEvent *primitive = (CsrWifiFsmEvent *)msg; CsrWifiFsmEvent *primitive = (CsrWifiFsmEvent *)msg;
*len = 0; *len = 0;
...@@ -124,23 +124,23 @@ u8* CsrWifiEventSer(u8 *ptr, CsrSize *len, void *msg) ...@@ -124,23 +124,23 @@ u8* CsrWifiEventSer(u8 *ptr, CsrSize *len, void *msg)
} }
EXPORT_SYMBOL_GPL(CsrWifiEventSer); EXPORT_SYMBOL_GPL(CsrWifiEventSer);
void* CsrWifiEventDes(u8 *buffer, CsrSize length) void* CsrWifiEventDes(u8 *buffer, size_t length)
{ {
CsrWifiFsmEvent *primitive = (CsrWifiFsmEvent *) CsrPmemAlloc(sizeof(CsrWifiFsmEvent)); CsrWifiFsmEvent *primitive = (CsrWifiFsmEvent *) CsrPmemAlloc(sizeof(CsrWifiFsmEvent));
CsrSize offset = 0; size_t offset = 0;
CsrUint16Des(&primitive->type, buffer, &offset); CsrUint16Des(&primitive->type, buffer, &offset);
return primitive; return primitive;
} }
EXPORT_SYMBOL_GPL(CsrWifiEventDes); EXPORT_SYMBOL_GPL(CsrWifiEventDes);
CsrSize CsrWifiEventCsrUint8Sizeof(void *msg) size_t CsrWifiEventCsrUint8Sizeof(void *msg)
{ {
return 3; return 3;
} }
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint8Sizeof); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint8Sizeof);
u8* CsrWifiEventCsrUint8Ser(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiEventCsrUint8Ser(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiEventCsrUint8 *primitive = (CsrWifiEventCsrUint8 *)msg; CsrWifiEventCsrUint8 *primitive = (CsrWifiEventCsrUint8 *)msg;
*len = 0; *len = 0;
...@@ -151,11 +151,11 @@ u8* CsrWifiEventCsrUint8Ser(u8 *ptr, CsrSize *len, void *msg) ...@@ -151,11 +151,11 @@ u8* CsrWifiEventCsrUint8Ser(u8 *ptr, CsrSize *len, void *msg)
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint8Ser); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint8Ser);
void* CsrWifiEventCsrUint8Des(u8 *buffer, CsrSize length) void* CsrWifiEventCsrUint8Des(u8 *buffer, size_t length)
{ {
CsrWifiEventCsrUint8 *primitive = (CsrWifiEventCsrUint8 *) CsrPmemAlloc(sizeof(CsrWifiEventCsrUint8)); CsrWifiEventCsrUint8 *primitive = (CsrWifiEventCsrUint8 *) CsrPmemAlloc(sizeof(CsrWifiEventCsrUint8));
CsrSize offset = 0; size_t offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
CsrUint8Des(&primitive->value, buffer, &offset); CsrUint8Des(&primitive->value, buffer, &offset);
...@@ -164,14 +164,14 @@ void* CsrWifiEventCsrUint8Des(u8 *buffer, CsrSize length) ...@@ -164,14 +164,14 @@ void* CsrWifiEventCsrUint8Des(u8 *buffer, CsrSize length)
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint8Des); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint8Des);
CsrSize CsrWifiEventCsrUint16Sizeof(void *msg) size_t CsrWifiEventCsrUint16Sizeof(void *msg)
{ {
return 4; return 4;
} }
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16Sizeof); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16Sizeof);
u8* CsrWifiEventCsrUint16Ser(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiEventCsrUint16Ser(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiEventCsrUint16 *primitive = (CsrWifiEventCsrUint16 *)msg; CsrWifiEventCsrUint16 *primitive = (CsrWifiEventCsrUint16 *)msg;
*len = 0; *len = 0;
...@@ -181,11 +181,11 @@ u8* CsrWifiEventCsrUint16Ser(u8 *ptr, CsrSize *len, void *msg) ...@@ -181,11 +181,11 @@ u8* CsrWifiEventCsrUint16Ser(u8 *ptr, CsrSize *len, void *msg)
} }
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16Ser); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16Ser);
void* CsrWifiEventCsrUint16Des(u8 *buffer, CsrSize length) void* CsrWifiEventCsrUint16Des(u8 *buffer, size_t length)
{ {
CsrWifiEventCsrUint16 *primitive = (CsrWifiEventCsrUint16 *) CsrPmemAlloc(sizeof(CsrWifiEventCsrUint16)); CsrWifiEventCsrUint16 *primitive = (CsrWifiEventCsrUint16 *) CsrPmemAlloc(sizeof(CsrWifiEventCsrUint16));
CsrSize offset = 0; size_t offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
CsrUint16Des(&primitive->value, buffer, &offset); CsrUint16Des(&primitive->value, buffer, &offset);
...@@ -194,13 +194,13 @@ void* CsrWifiEventCsrUint16Des(u8 *buffer, CsrSize length) ...@@ -194,13 +194,13 @@ void* CsrWifiEventCsrUint16Des(u8 *buffer, CsrSize length)
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16Des); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16Des);
CsrSize CsrWifiEventCsrUint32Sizeof(void *msg) size_t CsrWifiEventCsrUint32Sizeof(void *msg)
{ {
return 6; return 6;
} }
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint32Sizeof); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint32Sizeof);
u8* CsrWifiEventCsrUint32Ser(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiEventCsrUint32Ser(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiEventCsrUint32 *primitive = (CsrWifiEventCsrUint32 *)msg; CsrWifiEventCsrUint32 *primitive = (CsrWifiEventCsrUint32 *)msg;
*len = 0; *len = 0;
...@@ -211,11 +211,11 @@ u8* CsrWifiEventCsrUint32Ser(u8 *ptr, CsrSize *len, void *msg) ...@@ -211,11 +211,11 @@ u8* CsrWifiEventCsrUint32Ser(u8 *ptr, CsrSize *len, void *msg)
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint32Ser); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint32Ser);
void* CsrWifiEventCsrUint32Des(u8 *buffer, CsrSize length) void* CsrWifiEventCsrUint32Des(u8 *buffer, size_t length)
{ {
CsrWifiEventCsrUint32 *primitive = (CsrWifiEventCsrUint32 *) CsrPmemAlloc(sizeof(CsrWifiEventCsrUint32)); CsrWifiEventCsrUint32 *primitive = (CsrWifiEventCsrUint32 *) CsrPmemAlloc(sizeof(CsrWifiEventCsrUint32));
CsrSize offset = 0; size_t offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
CsrUint32Des(&primitive->value, buffer, &offset); CsrUint32Des(&primitive->value, buffer, &offset);
...@@ -223,13 +223,13 @@ void* CsrWifiEventCsrUint32Des(u8 *buffer, CsrSize length) ...@@ -223,13 +223,13 @@ void* CsrWifiEventCsrUint32Des(u8 *buffer, CsrSize length)
} }
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint32Des); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint32Des);
CsrSize CsrWifiEventCsrUint16CsrUint8Sizeof(void *msg) size_t CsrWifiEventCsrUint16CsrUint8Sizeof(void *msg)
{ {
return 5; return 5;
} }
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16CsrUint8Sizeof); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16CsrUint8Sizeof);
u8* CsrWifiEventCsrUint16CsrUint8Ser(u8 *ptr, CsrSize *len, void *msg) u8* CsrWifiEventCsrUint16CsrUint8Ser(u8 *ptr, size_t *len, void *msg)
{ {
CsrWifiEventCsrUint16CsrUint8 *primitive = (CsrWifiEventCsrUint16CsrUint8 *)msg; CsrWifiEventCsrUint16CsrUint8 *primitive = (CsrWifiEventCsrUint16CsrUint8 *)msg;
*len = 0; *len = 0;
...@@ -241,11 +241,11 @@ u8* CsrWifiEventCsrUint16CsrUint8Ser(u8 *ptr, CsrSize *len, void *msg) ...@@ -241,11 +241,11 @@ u8* CsrWifiEventCsrUint16CsrUint8Ser(u8 *ptr, CsrSize *len, void *msg)
EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16CsrUint8Ser); EXPORT_SYMBOL_GPL(CsrWifiEventCsrUint16CsrUint8Ser);
void* CsrWifiEventCsrUint16CsrUint8Des(u8 *buffer, CsrSize length) void* CsrWifiEventCsrUint16CsrUint8Des(u8 *buffer, size_t length)
{ {
CsrWifiEventCsrUint16CsrUint8 *primitive = (CsrWifiEventCsrUint16CsrUint8 *) CsrPmemAlloc(sizeof(CsrWifiEventCsrUint16CsrUint8)); CsrWifiEventCsrUint16CsrUint8 *primitive = (CsrWifiEventCsrUint16CsrUint8 *) CsrPmemAlloc(sizeof(CsrWifiEventCsrUint16CsrUint8));
CsrSize offset = 0; size_t offset = 0;
CsrUint16Des(&primitive->common.type, buffer, &offset); CsrUint16Des(&primitive->common.type, buffer, &offset);
CsrUint16Des(&primitive->value16, buffer, &offset); CsrUint16Des(&primitive->value16, buffer, &offset);
CsrUint8Des(&primitive->value8, buffer, &offset); CsrUint8Des(&primitive->value8, buffer, &offset);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment