You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
staging: csr: remove CsrUint16 typedef
Use the in-kernel u16 type 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -138,7 +138,7 @@ CsrResult CsrMutexUnlock(CsrMutexHandle *mutexHandle)
|
||||
* void
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
void CsrThreadSleep(CsrUint16 sleepTimeInMs)
|
||||
void CsrThreadSleep(u16 sleepTimeInMs)
|
||||
{
|
||||
unsigned long t;
|
||||
|
||||
|
||||
@@ -27,13 +27,13 @@ extern "C" {
|
||||
#define CSR_FE_RESULT_NO_MORE_THREADS ((CsrResult) 0x0006)
|
||||
|
||||
/* Thread priorities */
|
||||
#define CSR_THREAD_PRIORITY_HIGHEST ((CsrUint16) 0)
|
||||
#define CSR_THREAD_PRIORITY_HIGH ((CsrUint16) 1)
|
||||
#define CSR_THREAD_PRIORITY_NORMAL ((CsrUint16) 2)
|
||||
#define CSR_THREAD_PRIORITY_LOW ((CsrUint16) 3)
|
||||
#define CSR_THREAD_PRIORITY_LOWEST ((CsrUint16) 4)
|
||||
#define CSR_THREAD_PRIORITY_HIGHEST ((u16) 0)
|
||||
#define CSR_THREAD_PRIORITY_HIGH ((u16) 1)
|
||||
#define CSR_THREAD_PRIORITY_NORMAL ((u16) 2)
|
||||
#define CSR_THREAD_PRIORITY_LOW ((u16) 3)
|
||||
#define CSR_THREAD_PRIORITY_LOWEST ((u16) 4)
|
||||
|
||||
#define CSR_EVENT_WAIT_INFINITE ((CsrUint16) 0xFFFF)
|
||||
#define CSR_EVENT_WAIT_INFINITE ((u16) 0xFFFF)
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
* NAME
|
||||
@@ -66,7 +66,7 @@ CsrResult CsrEventCreate(CsrEventHandle *eventHandle);
|
||||
* CSR_FE_RESULT_INVALID_POINTER in case the eventBits pointer is invalid
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrResult CsrEventWait(CsrEventHandle *eventHandle, CsrUint16 timeoutInMs, CsrUint32 *eventBits);
|
||||
CsrResult CsrEventWait(CsrEventHandle *eventHandle, u16 timeoutInMs, CsrUint32 *eventBits);
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
* NAME
|
||||
@@ -195,7 +195,7 @@ void CsrGlobalMutexUnlock(void);
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrResult CsrThreadCreate(void (*threadFunction)(void *pointer), void *pointer,
|
||||
CsrUint32 stackSize, CsrUint16 priority,
|
||||
CsrUint32 stackSize, u16 priority,
|
||||
const CsrCharString *threadName, CsrThreadHandle *threadHandle);
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
@@ -240,7 +240,7 @@ CsrResult CsrThreadEqual(CsrThreadHandle *threadHandle1, CsrThreadHandle *thread
|
||||
* void
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
void CsrThreadSleep(CsrUint16 sleepTimeInMs);
|
||||
void CsrThreadSleep(u16 sleepTimeInMs);
|
||||
|
||||
#ifndef CSR_PMEM_DEBUG_ENABLE
|
||||
/*----------------------------------------------------------------------------*
|
||||
|
||||
@@ -30,7 +30,7 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEvent
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEvent *CsrEvent_struct(CsrUint16 primtype, CsrUint16 msgtype);
|
||||
CsrEvent *CsrEvent_struct(u16 primtype, u16 msgtype);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -46,12 +46,12 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint8
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint8 *CsrEventCsrUint8_struct(CsrUint16 primtype, CsrUint16 msgtype, u8 value);
|
||||
CsrEventCsrUint8 *CsrEventCsrUint8_struct(u16 primtype, u16 msgtype, u8 value);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CsrPrim type;
|
||||
CsrUint16 value;
|
||||
u16 value;
|
||||
} CsrEventCsrUint16;
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
@@ -62,12 +62,12 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint16
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint16 *CsrEventCsrUint16_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value);
|
||||
CsrEventCsrUint16 *CsrEventCsrUint16_struct(u16 primtype, u16 msgtype, u16 value);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CsrPrim type;
|
||||
CsrUint16 value1;
|
||||
u16 value1;
|
||||
u8 value2;
|
||||
} CsrEventCsrUint16CsrUint8;
|
||||
|
||||
@@ -79,13 +79,13 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint16CsrUint8
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint16CsrUint8 *CsrEventCsrUint16CsrUint8_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value1, u8 value2);
|
||||
CsrEventCsrUint16CsrUint8 *CsrEventCsrUint16CsrUint8_struct(u16 primtype, u16 msgtype, u16 value1, u8 value2);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CsrPrim type;
|
||||
CsrUint16 value1;
|
||||
CsrUint16 value2;
|
||||
u16 value1;
|
||||
u16 value2;
|
||||
} CsrEventCsrUint16CsrUint16;
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
@@ -96,12 +96,12 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint16CsrUint16
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint16CsrUint16 *CsrEventCsrUint16CsrUint16_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value1, CsrUint16 value2);
|
||||
CsrEventCsrUint16CsrUint16 *CsrEventCsrUint16CsrUint16_struct(u16 primtype, u16 msgtype, u16 value1, u16 value2);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CsrPrim type;
|
||||
CsrUint16 value1;
|
||||
u16 value1;
|
||||
CsrUint32 value2;
|
||||
} CsrEventCsrUint16CsrUint32;
|
||||
|
||||
@@ -113,12 +113,12 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint16
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint16CsrUint32 *CsrEventCsrUint16CsrUint32_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value1, CsrUint32 value2);
|
||||
CsrEventCsrUint16CsrUint32 *CsrEventCsrUint16CsrUint32_struct(u16 primtype, u16 msgtype, u16 value1, CsrUint32 value2);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CsrPrim type;
|
||||
CsrUint16 value1;
|
||||
u16 value1;
|
||||
CsrCharString *value2;
|
||||
} CsrEventCsrUint16CsrCharString;
|
||||
|
||||
@@ -130,7 +130,7 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint16CsrCharString
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint16CsrCharString *CsrEventCsrUint16CsrCharString_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value1, CsrCharString *value2);
|
||||
CsrEventCsrUint16CsrCharString *CsrEventCsrUint16CsrCharString_struct(u16 primtype, u16 msgtype, u16 value1, CsrCharString *value2);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -146,13 +146,13 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint32
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint32 *CsrEventCsrUint32_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint32 value);
|
||||
CsrEventCsrUint32 *CsrEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrUint32 value);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CsrPrim type;
|
||||
CsrUint32 value1;
|
||||
CsrUint16 value2;
|
||||
u16 value2;
|
||||
} CsrEventCsrUint32CsrUint16;
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
@@ -163,7 +163,7 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint32CsrUint16
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint32CsrUint16 *CsrEventCsrUint32CsrUint16_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint32 value1, CsrUint32 value2);
|
||||
CsrEventCsrUint32CsrUint16 *CsrEventCsrUint32CsrUint16_struct(u16 primtype, u16 msgtype, CsrUint32 value1, CsrUint32 value2);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -180,7 +180,7 @@ typedef struct
|
||||
* Allocates and fills in a message with the signature CsrEventCsrUint32CsrCharString
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrEventCsrUint32CsrCharString *CsrEventCsrUint32CsrCharString_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint32 value1, CsrCharString *value2);
|
||||
CsrEventCsrUint32CsrCharString *CsrEventCsrUint32CsrCharString_struct(u16 primtype, u16 msgtype, CsrUint32 value1, CsrCharString *value2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ CsrBool CsrLogTaskIsFiltered(CsrSchedQid taskId, CsrLogLevelTask level);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CsrUint16 primitiveType;
|
||||
u16 primitiveType;
|
||||
const CsrCharString *primitiveName;
|
||||
CsrMsgConvMsgEntry *messageConv; /* Private - do not use */
|
||||
} CsrLogPrimitiveInformation;
|
||||
@@ -112,7 +112,7 @@ typedef struct
|
||||
/* Tech logging */
|
||||
/*---------------------------------*/
|
||||
typedef u8 bitmask8_t;
|
||||
typedef CsrUint16 bitmask16_t;
|
||||
typedef u16 bitmask16_t;
|
||||
typedef CsrUint32 bitmask32_t;
|
||||
|
||||
#ifdef CSR_LOG_ENABLE
|
||||
@@ -175,7 +175,7 @@ void CsrLogSchedStart(u8 thread_id);
|
||||
void CsrLogSchedStop(u8 thread_id);
|
||||
|
||||
void CsrLogInitTask(u8 thread_id, CsrSchedQid tskid, const CsrCharString *tskName);
|
||||
void CsrLogDeinitTask(CsrUint16 task_id);
|
||||
void CsrLogDeinitTask(u16 task_id);
|
||||
|
||||
void CsrLogActivate(CsrSchedQid tskid);
|
||||
void CsrLogDeactivate(CsrSchedQid tskid);
|
||||
@@ -188,14 +188,14 @@ void CsrLogMessagePut(CsrUint32 line,
|
||||
CsrSchedQid src_task_id,
|
||||
CsrSchedQid dst_taskid,
|
||||
CsrSchedMsgId msg_id,
|
||||
CsrUint16 prim_type,
|
||||
u16 prim_type,
|
||||
const void *msg);
|
||||
|
||||
void CsrLogMessageGet(CsrSchedQid src_task_id,
|
||||
CsrSchedQid dst_taskid,
|
||||
CsrBool get_res,
|
||||
CsrSchedMsgId msg_id,
|
||||
CsrUint16 prim_type,
|
||||
u16 prim_type,
|
||||
const void *msg);
|
||||
|
||||
void CsrLogTimedEventIn(CsrUint32 line,
|
||||
@@ -203,7 +203,7 @@ void CsrLogTimedEventIn(CsrUint32 line,
|
||||
CsrSchedQid task_id,
|
||||
CsrSchedTid tid,
|
||||
CsrTime requested_delay,
|
||||
CsrUint16 fniarg,
|
||||
u16 fniarg,
|
||||
const void *fnvarg);
|
||||
|
||||
void CsrLogTimedEventFire(CsrSchedQid task_id,
|
||||
@@ -227,18 +227,18 @@ void CsrLogBgintSet(CsrSchedBgint irq);
|
||||
void CsrLogBgintServiceStart(CsrSchedBgint irq);
|
||||
void CsrLogBgintServiceDone(CsrSchedBgint irq);
|
||||
|
||||
void CsrLogExceptionStateEvent(CsrUint16 prim_type,
|
||||
void CsrLogExceptionStateEvent(u16 prim_type,
|
||||
CsrPrim msg_type,
|
||||
CsrUint16 state,
|
||||
u16 state,
|
||||
CsrUint32 line,
|
||||
const CsrCharString *file);
|
||||
void CsrLogExceptionGeneral(CsrUint16 prim_type,
|
||||
CsrUint16 state,
|
||||
void CsrLogExceptionGeneral(u16 prim_type,
|
||||
u16 state,
|
||||
const CsrCharString *text,
|
||||
CsrUint32 line,
|
||||
const CsrCharString *file);
|
||||
void CsrLogExceptionWarning(CsrUint16 prim_type,
|
||||
CsrUint16 state,
|
||||
void CsrLogExceptionWarning(u16 prim_type,
|
||||
u16 state,
|
||||
const CsrCharString *text,
|
||||
CsrUint32 line,
|
||||
const CsrCharString *file);
|
||||
|
||||
@@ -57,7 +57,7 @@ typedef CsrUint32 CsrLogLevelText;
|
||||
#define CSR_LOG_LEVEL_TEXT_ALL ((CsrLogLevelText) 0xFFFF)
|
||||
|
||||
/* The log text interface is used by both scheduler tasks and components outside the scheduler context.
|
||||
* Therefore a CsrLogTextTaskId is introduced. It is effectively considered as two CsrUint16's. The lower
|
||||
* Therefore a CsrLogTextTaskId is introduced. It is effectively considered as two u16's. The lower
|
||||
* 16 bits corresponds one2one with the scheduler queueId's (CsrSchedQid) and as such these bits can not be used
|
||||
* by components outside scheduler tasks. The upper 16 bits are allocated for use of components outside the
|
||||
* scheduler like drivers etc. Components in this range is defined independently by each technology. To avoid
|
||||
@@ -78,7 +78,7 @@ void CsrLogLevelTextSetTask(CsrLogTextTaskId taskId, CsrLogLevelText warningLeve
|
||||
/* Set the text logging level for a given tasks subOrigin */
|
||||
/* This function can be used as a complement to CsrLogLevelTextSetAll() and CsrLogLevelTextSetTask() to add more _or_ less log from a given
|
||||
* subOrigin within a task than what is set generally with CsrLogLevelTextSetAll() _or_ CsrLogLevelTextSetTask(). */
|
||||
void CsrLogLevelTextSetTaskSubOrigin(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrLogLevelText warningLevelMask);
|
||||
void CsrLogLevelTextSetTaskSubOrigin(CsrLogTextTaskId taskId, u16 subOrigin, CsrLogLevelText warningLevelMask);
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@ extern "C" {
|
||||
|
||||
typedef struct CsrLogSubOrigin
|
||||
{
|
||||
CsrUint16 subOriginNumber; /* Id of the given SubOrigin */
|
||||
u16 subOriginNumber; /* Id of the given SubOrigin */
|
||||
const CsrCharString *subOriginName; /* Prefix Text for this SubOrigin */
|
||||
} CsrLogSubOrigin;
|
||||
|
||||
/* Register a task which is going to use the CSR_LOG_TEXT_XXX interface */
|
||||
#ifdef CSR_LOG_ENABLE
|
||||
void CsrLogTextRegister(CsrLogTextTaskId taskId, const CsrCharString *taskName, CsrUint16 subOriginsLength, const CsrLogSubOrigin *subOrigins);
|
||||
void CsrLogTextRegister(CsrLogTextTaskId taskId, const CsrCharString *taskName, u16 subOriginsLength, const CsrLogSubOrigin *subOrigins);
|
||||
#else
|
||||
#define CsrLogTextRegister(taskId, taskName, subOriginsLength, subOrigins)
|
||||
#endif
|
||||
@@ -33,8 +33,8 @@ void CsrLogTextRegister(CsrLogTextTaskId taskId, const CsrCharString *taskName,
|
||||
/* CRITICAL: Conditions that are threatening to the integrity/stability of the
|
||||
system as a whole. */
|
||||
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_CRITICAL_DISABLE)
|
||||
void CsrLogTextCritical(CsrLogTextTaskId taskId, CsrUint16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferCritical(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextCritical(CsrLogTextTaskId taskId, u16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferCritical(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
#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_BUFFER_CRITICAL(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferCritical taskId_subOrigin_length_buffer_formatString_varargs
|
||||
@@ -49,8 +49,8 @@ void CsrLogTextBufferCritical(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrS
|
||||
/* ERROR: Malfunction of a component rendering it unable to operate correctly,
|
||||
causing lack of functionality but not loss of system integrity/stability. */
|
||||
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_ERROR_DISABLE)
|
||||
void CsrLogTextError(CsrLogTextTaskId taskId, CsrUint16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferError(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextError(CsrLogTextTaskId taskId, u16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferError(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
#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_BUFFER_ERROR(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferError taskId_subOrigin_length_buffer_formatString_varargs
|
||||
@@ -66,8 +66,8 @@ void CsrLogTextBufferError(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrSize
|
||||
or violations of specifications, where the result of such deviations does not
|
||||
lead to malfunction of the component. */
|
||||
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_WARNING_DISABLE)
|
||||
void CsrLogTextWarning(CsrLogTextTaskId taskId, CsrUint16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferWarning(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextWarning(CsrLogTextTaskId taskId, u16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferWarning(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
#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_BUFFER_WARNING(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferWarning taskId_subOrigin_length_buffer_formatString_varargs
|
||||
@@ -82,8 +82,8 @@ void CsrLogTextBufferWarning(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrSi
|
||||
/* INFO: Important events that may aid in determining the conditions under which
|
||||
the more severe conditions are encountered. */
|
||||
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_INFO_DISABLE)
|
||||
void CsrLogTextInfo(CsrLogTextTaskId taskId, CsrUint16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferInfo(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextInfo(CsrLogTextTaskId taskId, u16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferInfo(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
#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_BUFFER_INFO(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferInfo taskId_subOrigin_length_buffer_formatString_varargs
|
||||
@@ -97,8 +97,8 @@ void CsrLogTextBufferInfo(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrSize
|
||||
|
||||
/* DEBUG: Similar to INFO, but dedicated to events that occur more frequently. */
|
||||
#if defined(CSR_LOG_ENABLE) && !defined(CSR_LOG_LEVEL_TEXT_DEBUG_DISABLE)
|
||||
void CsrLogTextDebug(CsrLogTextTaskId taskId, CsrUint16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferDebug(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextDebug(CsrLogTextTaskId taskId, u16 subOrigin, const CsrCharString *formatString, ...);
|
||||
void CsrLogTextBufferDebug(CsrLogTextTaskId taskId, u16 subOrigin, CsrSize bufferLength, const void *buffer, const CsrCharString *formatString, ...);
|
||||
#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_BUFFER_DEBUG(taskId_subOrigin_length_buffer_formatString_varargs) CsrLogTextBufferDebug taskId_subOrigin_length_buffer_formatString_varargs
|
||||
|
||||
@@ -31,7 +31,7 @@ extern "C" {
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Endian conversion */
|
||||
/*------------------------------------------------------------------*/
|
||||
#define CSR_GET_UINT16_FROM_LITTLE_ENDIAN(ptr) (((CsrUint16) ((u8 *) (ptr))[0]) | ((CsrUint16) ((u8 *) (ptr))[1]) << 8)
|
||||
#define CSR_GET_UINT16_FROM_LITTLE_ENDIAN(ptr) (((u16) ((u8 *) (ptr))[0]) | ((u16) ((u8 *) (ptr))[1]) << 8)
|
||||
#define CSR_GET_UINT32_FROM_LITTLE_ENDIAN(ptr) (((CsrUint32) ((u8 *) (ptr))[0]) | ((CsrUint32) ((u8 *) (ptr))[1]) << 8 | \
|
||||
((CsrUint32) ((u8 *) (ptr))[2]) << 16 | ((CsrUint32) ((u8 *) (ptr))[3]) << 24)
|
||||
#define CSR_COPY_UINT16_TO_LITTLE_ENDIAN(uint, ptr) ((u8 *) (ptr))[0] = ((u8) ((uint) & 0x00FF)); \
|
||||
@@ -40,7 +40,7 @@ extern "C" {
|
||||
((u8 *) (ptr))[1] = ((u8) (((uint) >> 8) & 0x000000FF)); \
|
||||
((u8 *) (ptr))[2] = ((u8) (((uint) >> 16) & 0x000000FF)); \
|
||||
((u8 *) (ptr))[3] = ((u8) (((uint) >> 24) & 0x000000FF))
|
||||
#define CSR_GET_UINT16_FROM_BIG_ENDIAN(ptr) (((CsrUint16) ((u8 *) (ptr))[1]) | ((CsrUint16) ((u8 *) (ptr))[0]) << 8)
|
||||
#define CSR_GET_UINT16_FROM_BIG_ENDIAN(ptr) (((u16) ((u8 *) (ptr))[1]) | ((u16) ((u8 *) (ptr))[0]) << 8)
|
||||
#define CSR_GET_UINT24_FROM_BIG_ENDIAN(ptr) (((CsrUint24) ((u8 *) (ptr))[2]) | \
|
||||
((CsrUint24) ((u8 *) (ptr))[1]) << 8 | ((CsrUint24) ((u8 *) (ptr))[0]) << 16)
|
||||
#define CSR_GET_UINT32_FROM_BIG_ENDIAN(ptr) (((CsrUint32) ((u8 *) (ptr))[3]) | ((CsrUint32) ((u8 *) (ptr))[2]) << 8 | \
|
||||
@@ -66,8 +66,8 @@ extern "C" {
|
||||
(output) = ((u8) (input));(input) += 2
|
||||
|
||||
#define CSR_CONVERT_16_FROM_XAP(output, input) \
|
||||
(output) = (CsrUint16) ((((CsrUint16) (input)[1]) << 8) | \
|
||||
((CsrUint16) (input)[0]));(input) += 2
|
||||
(output) = (u16) ((((u16) (input)[1]) << 8) | \
|
||||
((u16) (input)[0]));(input) += 2
|
||||
|
||||
#define CSR_CONVERT_32_FROM_XAP(output, input) \
|
||||
(output) = (((CsrUint32) (input)[1]) << 24) | \
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
static CsrMsgConvEntry *converter;
|
||||
|
||||
CsrMsgConvPrimEntry *CsrMsgConvFind(CsrUint16 primType)
|
||||
CsrMsgConvPrimEntry *CsrMsgConvFind(u16 primType)
|
||||
{
|
||||
CsrMsgConvPrimEntry *ptr = NULL;
|
||||
|
||||
@@ -41,7 +41,7 @@ CsrMsgConvPrimEntry *CsrMsgConvFind(CsrUint16 primType)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static const CsrMsgConvMsgEntry *find_msg_converter(CsrMsgConvPrimEntry *ptr, CsrUint16 msgType)
|
||||
static const CsrMsgConvMsgEntry *find_msg_converter(CsrMsgConvPrimEntry *ptr, u16 msgType)
|
||||
{
|
||||
const CsrMsgConvMsgEntry *cv = ptr->conv;
|
||||
if (ptr->lookupFunc)
|
||||
@@ -71,7 +71,7 @@ static const CsrMsgConvMsgEntry *find_msg_converter(CsrMsgConvPrimEntry *ptr, Cs
|
||||
return cv;
|
||||
}
|
||||
|
||||
static void *deserialize_data(CsrUint16 primType,
|
||||
static void *deserialize_data(u16 primType,
|
||||
CsrSize length,
|
||||
u8 *data)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ static void *deserialize_data(CsrUint16 primType,
|
||||
if (ptr)
|
||||
{
|
||||
const CsrMsgConvMsgEntry *cv;
|
||||
CsrUint16 msgId = 0;
|
||||
u16 msgId = 0;
|
||||
CsrSize offset = 0;
|
||||
CsrUint16Des(&msgId, data, &offset);
|
||||
|
||||
@@ -105,7 +105,7 @@ static void *deserialize_data(CsrUint16 primType,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static CsrSize sizeof_message(CsrUint16 primType, void *msg)
|
||||
static CsrSize sizeof_message(u16 primType, void *msg)
|
||||
{
|
||||
CsrMsgConvPrimEntry *ptr = CsrMsgConvFind(primType);
|
||||
CsrSize ret;
|
||||
@@ -113,7 +113,7 @@ static CsrSize sizeof_message(CsrUint16 primType, void *msg)
|
||||
if (ptr)
|
||||
{
|
||||
const CsrMsgConvMsgEntry *cv;
|
||||
CsrUint16 msgId = *(CsrUint16 *) msg;
|
||||
u16 msgId = *(u16 *) msg;
|
||||
|
||||
cv = find_msg_converter(ptr, msgId);
|
||||
if (cv)
|
||||
@@ -133,7 +133,7 @@ static CsrSize sizeof_message(CsrUint16 primType, void *msg)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static CsrBool free_message(CsrUint16 primType, u8 *data)
|
||||
static CsrBool free_message(u16 primType, u8 *data)
|
||||
{
|
||||
CsrMsgConvPrimEntry *ptr;
|
||||
CsrBool ret;
|
||||
@@ -143,7 +143,7 @@ static CsrBool free_message(CsrUint16 primType, u8 *data)
|
||||
if (ptr)
|
||||
{
|
||||
const CsrMsgConvMsgEntry *cv;
|
||||
CsrUint16 msgId = *(CsrUint16 *) data;
|
||||
u16 msgId = *(u16 *) data;
|
||||
|
||||
cv = find_msg_converter(ptr, msgId);
|
||||
if (cv)
|
||||
@@ -164,7 +164,7 @@ static CsrBool free_message(CsrUint16 primType, u8 *data)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u8 *serialize_message(CsrUint16 primType,
|
||||
static u8 *serialize_message(u16 primType,
|
||||
void *msg,
|
||||
CsrSize *length,
|
||||
u8 *buffer)
|
||||
@@ -180,7 +180,7 @@ static u8 *serialize_message(CsrUint16 primType,
|
||||
{
|
||||
const CsrMsgConvMsgEntry *cv;
|
||||
|
||||
cv = find_msg_converter(ptr, *(CsrUint16 *) msg);
|
||||
cv = find_msg_converter(ptr, *(u16 *) msg);
|
||||
if (cv)
|
||||
{
|
||||
ret = cv->serFunc(buffer, length, msg);
|
||||
@@ -198,12 +198,12 @@ static u8 *serialize_message(CsrUint16 primType,
|
||||
return ret;
|
||||
}
|
||||
|
||||
CsrSize CsrMsgConvSizeof(CsrUint16 primType, void *msg)
|
||||
CsrSize CsrMsgConvSizeof(u16 primType, void *msg)
|
||||
{
|
||||
return sizeof_message(primType, msg);
|
||||
}
|
||||
|
||||
u8 *CsrMsgConvSerialize(u8 *buffer, CsrSize maxBufferOffset, CsrSize *offset, CsrUint16 primType, void *msg)
|
||||
u8 *CsrMsgConvSerialize(u8 *buffer, CsrSize maxBufferOffset, CsrSize *offset, u16 primType, void *msg)
|
||||
{
|
||||
if (converter)
|
||||
{
|
||||
@@ -221,7 +221,7 @@ u8 *CsrMsgConvSerialize(u8 *buffer, CsrSize maxBufferOffset, CsrSize *offset, Cs
|
||||
}
|
||||
|
||||
/* Insert profile converter at head of converter list. */
|
||||
void CsrMsgConvInsert(CsrUint16 primType, const CsrMsgConvMsgEntry *ce)
|
||||
void CsrMsgConvInsert(u16 primType, const CsrMsgConvMsgEntry *ce)
|
||||
{
|
||||
CsrMsgConvPrimEntry *pc;
|
||||
pc = CsrMsgConvFind(primType);
|
||||
@@ -242,7 +242,7 @@ void CsrMsgConvInsert(CsrUint16 primType, const CsrMsgConvMsgEntry *ce)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(CsrMsgConvInsert);
|
||||
|
||||
CsrMsgConvMsgEntry *CsrMsgConvFindEntry(CsrUint16 primType, CsrUint16 msgType)
|
||||
CsrMsgConvMsgEntry *CsrMsgConvFindEntry(u16 primType, u16 msgType)
|
||||
{
|
||||
CsrMsgConvPrimEntry *ptr = CsrMsgConvFind(primType);
|
||||
if (ptr)
|
||||
@@ -253,18 +253,18 @@ CsrMsgConvMsgEntry *CsrMsgConvFindEntry(CsrUint16 primType, CsrUint16 msgType)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(CsrMsgConvFindEntry);
|
||||
|
||||
CsrMsgConvMsgEntry *CsrMsgConvFindEntryByMsg(CsrUint16 primType, const void *msg)
|
||||
CsrMsgConvMsgEntry *CsrMsgConvFindEntryByMsg(u16 primType, const void *msg)
|
||||
{
|
||||
CsrMsgConvPrimEntry *ptr = CsrMsgConvFind(primType);
|
||||
if (ptr && msg)
|
||||
{
|
||||
CsrUint16 msgType = *((CsrUint16 *) msg);
|
||||
u16 msgType = *((u16 *) msg);
|
||||
return (CsrMsgConvMsgEntry *) find_msg_converter(ptr, msgType);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CsrMsgConvCustomLookupRegister(CsrUint16 primType, CsrMsgCustomLookupFunc *lookupFunc)
|
||||
void CsrMsgConvCustomLookupRegister(u16 primType, CsrMsgCustomLookupFunc *lookupFunc)
|
||||
{
|
||||
CsrMsgConvPrimEntry *ptr = CsrMsgConvFind(primType);
|
||||
if (ptr)
|
||||
|
||||
@@ -28,7 +28,7 @@ typedef void *(CsrMsgDeserializeFunc)(u8 *buffer, CsrSize length);
|
||||
/* Converter entry for one message type */
|
||||
typedef struct CsrMsgConvMsgEntry
|
||||
{
|
||||
CsrUint16 msgType;
|
||||
u16 msgType;
|
||||
CsrMsgSizeofFunc *sizeofFunc;
|
||||
CsrMsgSerializeFunc *serFunc;
|
||||
CsrMsgDeserializeFunc *deserFunc;
|
||||
@@ -36,12 +36,12 @@ typedef struct CsrMsgConvMsgEntry
|
||||
} CsrMsgConvMsgEntry;
|
||||
|
||||
/* Optional lookup function */
|
||||
typedef CsrMsgConvMsgEntry *(CsrMsgCustomLookupFunc)(CsrMsgConvMsgEntry *ce, CsrUint16 msgType);
|
||||
typedef CsrMsgConvMsgEntry *(CsrMsgCustomLookupFunc)(CsrMsgConvMsgEntry *ce, u16 msgType);
|
||||
|
||||
/* All converter entries for one specific primitive */
|
||||
typedef struct CsrMsgConvPrimEntry
|
||||
{
|
||||
CsrUint16 primType;
|
||||
u16 primType;
|
||||
const CsrMsgConvMsgEntry *conv;
|
||||
CsrMsgCustomLookupFunc *lookupFunc;
|
||||
struct CsrMsgConvPrimEntry *next;
|
||||
@@ -50,21 +50,21 @@ typedef struct CsrMsgConvPrimEntry
|
||||
typedef struct
|
||||
{
|
||||
CsrMsgConvPrimEntry *profile_converters;
|
||||
void *(*deserialize_data)(CsrUint16 primType, CsrSize length, u8 * data);
|
||||
CsrBool (*free_message)(CsrUint16 primType, u8 *data);
|
||||
CsrSize (*sizeof_message)(CsrUint16 primType, void *msg);
|
||||
u8 *(*serialize_message)(CsrUint16 primType, void *msg,
|
||||
void *(*deserialize_data)(u16 primType, CsrSize length, u8 * data);
|
||||
CsrBool (*free_message)(u16 primType, u8 *data);
|
||||
CsrSize (*sizeof_message)(u16 primType, void *msg);
|
||||
u8 *(*serialize_message)(u16 primType, void *msg,
|
||||
CsrSize * length,
|
||||
u8 * buffer);
|
||||
} CsrMsgConvEntry;
|
||||
|
||||
CsrSize CsrMsgConvSizeof(CsrUint16 primType, void *msg);
|
||||
u8 *CsrMsgConvSerialize(u8 *buffer, CsrSize maxBufferOffset, CsrSize *offset, CsrUint16 primType, void *msg);
|
||||
void CsrMsgConvCustomLookupRegister(CsrUint16 primType, CsrMsgCustomLookupFunc *lookupFunc);
|
||||
void CsrMsgConvInsert(CsrUint16 primType, const CsrMsgConvMsgEntry *ce);
|
||||
CsrMsgConvPrimEntry *CsrMsgConvFind(CsrUint16 primType);
|
||||
CsrMsgConvMsgEntry *CsrMsgConvFindEntry(CsrUint16 primType, CsrUint16 msgType);
|
||||
CsrMsgConvMsgEntry *CsrMsgConvFindEntryByMsg(CsrUint16 primType, const void *msg);
|
||||
CsrSize CsrMsgConvSizeof(u16 primType, void *msg);
|
||||
u8 *CsrMsgConvSerialize(u8 *buffer, CsrSize maxBufferOffset, CsrSize *offset, u16 primType, void *msg);
|
||||
void CsrMsgConvCustomLookupRegister(u16 primType, CsrMsgCustomLookupFunc *lookupFunc);
|
||||
void CsrMsgConvInsert(u16 primType, const CsrMsgConvMsgEntry *ce);
|
||||
CsrMsgConvPrimEntry *CsrMsgConvFind(u16 primType);
|
||||
CsrMsgConvMsgEntry *CsrMsgConvFindEntry(u16 primType, u16 msgType);
|
||||
CsrMsgConvMsgEntry *CsrMsgConvFindEntryByMsg(u16 primType, const void *msg);
|
||||
CsrMsgConvEntry *CsrMsgConvGet(void);
|
||||
CsrMsgConvEntry *CsrMsgConvInit(void);
|
||||
#ifdef ENABLE_SHUTDOWN
|
||||
@@ -79,7 +79,7 @@ CsrUint32 CsrUtf16StringSerLen(const CsrUtf16String *str);
|
||||
|
||||
/* Prototypes for primitive type serializers */
|
||||
void CsrUint8Ser(u8 *buffer, CsrSize *offset, u8 value);
|
||||
void CsrUint16Ser(u8 *buffer, CsrSize *offset, CsrUint16 value);
|
||||
void CsrUint16Ser(u8 *buffer, CsrSize *offset, u16 value);
|
||||
void CsrUint32Ser(u8 *buffer, CsrSize *offset, CsrUint32 value);
|
||||
void CsrMemCpySer(u8 *buffer, CsrSize *offset, const void *value, CsrSize length);
|
||||
void CsrCharStringSer(u8 *buffer, CsrSize *offset, const CsrCharString *value);
|
||||
@@ -89,7 +89,7 @@ void CsrVoidPtrSer(u8 *buffer, CsrSize *offset, void *ptr);
|
||||
void CsrSizeSer(u8 *buffer, CsrSize *offset, CsrSize value);
|
||||
|
||||
void CsrUint8Des(u8 *value, u8 *buffer, CsrSize *offset);
|
||||
void CsrUint16Des(CsrUint16 *value, u8 *buffer, CsrSize *offset);
|
||||
void CsrUint16Des(u16 *value, u8 *buffer, CsrSize *offset);
|
||||
void CsrUint32Des(CsrUint32 *value, u8 *buffer, CsrSize *offset);
|
||||
void CsrMemCpyDes(void *value, u8 *buffer, CsrSize *offset, CsrSize length);
|
||||
void CsrCharStringDes(CsrCharString **value, u8 *buffer, CsrSize *offset);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "csr_types.h"
|
||||
#include "csr_panic.h"
|
||||
|
||||
void CsrPanic(u8 tech, CsrUint16 reason, const char *p)
|
||||
void CsrPanic(u8 tech, u16 reason, const char *p)
|
||||
{
|
||||
BUG_ON(1);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ extern "C" {
|
||||
|
||||
/* Panic interface used by technologies */
|
||||
/* DEPRECATED - replaced by csr_log_text.h */
|
||||
void CsrPanic(u8 tech, CsrUint16 reason, const char *p);
|
||||
void CsrPanic(u8 tech, u16 reason, const char *p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -18,44 +18,44 @@ extern "C" {
|
||||
/************************************************************************************
|
||||
* Segmentation of primitives in upstream and downstream segment
|
||||
************************************************************************************/
|
||||
typedef CsrUint16 CsrPrim;
|
||||
typedef u16 CsrPrim;
|
||||
#define CSR_PRIM_UPSTREAM ((CsrPrim) (0x8000))
|
||||
|
||||
/************************************************************************************
|
||||
* Primitive definitions for Synergy framework
|
||||
************************************************************************************/
|
||||
#define CSR_SYNERGY_EVENT_CLASS_BASE ((CsrUint16) (0x0600))
|
||||
#define CSR_SYNERGY_EVENT_CLASS_BASE ((u16) (0x0600))
|
||||
|
||||
#define CSR_HCI_PRIM ((CsrUint16) (0x0000 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_BCCMD_PRIM ((CsrUint16) (0x0001 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_HQ_PRIM ((CsrUint16) (0x0002 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_VM_PRIM ((CsrUint16) (0x0003 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_TM_BLUECORE_PRIM ((CsrUint16) (0x0004 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_FP_PRIM ((CsrUint16) (0x0005 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_IP_SOCKET_PRIM ((CsrUint16) (0x0006 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_IP_ETHER_PRIM ((CsrUint16) (0x0007 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_IP_IFCONFIG_PRIM ((CsrUint16) (0x0008 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_IP_INTERNAL_PRIM ((CsrUint16) (0x0009 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_FSAL_PRIM ((CsrUint16) (0x000A | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_DATA_STORE_PRIM ((CsrUint16) (0x000B | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_AM_PRIM ((CsrUint16) (0x000C | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_TLS_PRIM ((CsrUint16) (0x000D | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_DHCP_SERVER_PRIM ((CsrUint16) (0x000E | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_TFTP_PRIM ((CsrUint16) (0x000F | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_DSPM_PRIM ((CsrUint16) (0x0010 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_TLS_INTERNAL_PRIM ((CsrUint16) (0x0011 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_HCI_PRIM ((u16) (0x0000 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_BCCMD_PRIM ((u16) (0x0001 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_HQ_PRIM ((u16) (0x0002 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_VM_PRIM ((u16) (0x0003 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_TM_BLUECORE_PRIM ((u16) (0x0004 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_FP_PRIM ((u16) (0x0005 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_IP_SOCKET_PRIM ((u16) (0x0006 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_IP_ETHER_PRIM ((u16) (0x0007 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_IP_IFCONFIG_PRIM ((u16) (0x0008 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_IP_INTERNAL_PRIM ((u16) (0x0009 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_FSAL_PRIM ((u16) (0x000A | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_DATA_STORE_PRIM ((u16) (0x000B | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_AM_PRIM ((u16) (0x000C | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_TLS_PRIM ((u16) (0x000D | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_DHCP_SERVER_PRIM ((u16) (0x000E | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_TFTP_PRIM ((u16) (0x000F | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_DSPM_PRIM ((u16) (0x0010 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
#define CSR_TLS_INTERNAL_PRIM ((u16) (0x0011 | CSR_SYNERGY_EVENT_CLASS_BASE))
|
||||
|
||||
#define NUMBER_OF_CSR_FW_EVENTS (CSR_DSPM_PRIM - CSR_SYNERGY_EVENT_CLASS_BASE + 1)
|
||||
|
||||
#define CSR_SYNERGY_EVENT_CLASS_MISC_BASE ((CsrUint16) (0x06A0))
|
||||
#define CSR_SYNERGY_EVENT_CLASS_MISC_BASE ((u16) (0x06A0))
|
||||
|
||||
#define CSR_UI_PRIM ((CsrUint16) (0x0000 | CSR_SYNERGY_EVENT_CLASS_MISC_BASE))
|
||||
#define CSR_APP_PRIM ((CsrUint16) (0x0001 | CSR_SYNERGY_EVENT_CLASS_MISC_BASE))
|
||||
#define CSR_SDIO_PROBE_PRIM ((CsrUint16) (0x0002 | CSR_SYNERGY_EVENT_CLASS_MISC_BASE))
|
||||
#define CSR_UI_PRIM ((u16) (0x0000 | CSR_SYNERGY_EVENT_CLASS_MISC_BASE))
|
||||
#define CSR_APP_PRIM ((u16) (0x0001 | CSR_SYNERGY_EVENT_CLASS_MISC_BASE))
|
||||
#define CSR_SDIO_PROBE_PRIM ((u16) (0x0002 | CSR_SYNERGY_EVENT_CLASS_MISC_BASE))
|
||||
|
||||
#define NUMBER_OF_CSR_FW_MISC_EVENTS (CSR_SDIO_PROBE_PRIM - CSR_SYNERGY_EVENT_CLASS_MISC_BASE + 1)
|
||||
|
||||
#define CSR_ENV_PRIM ((CsrUint16) (0x00FF | CSR_SYNERGY_EVENT_CLASS_MISC_BASE))
|
||||
#define CSR_ENV_PRIM ((u16) (0x00FF | CSR_SYNERGY_EVENT_CLASS_MISC_BASE))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef CsrUint16 CsrResult;
|
||||
typedef u16 CsrResult;
|
||||
#define CSR_RESULT_SUCCESS ((CsrResult) 0x0000)
|
||||
#define CSR_RESULT_FAILURE ((CsrResult) 0xFFFF)
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ extern "C" {
|
||||
typedef CsrUint32 CsrSchedIdentifier;
|
||||
|
||||
/* A task identifier */
|
||||
typedef CsrUint16 CsrSchedTaskId;
|
||||
typedef u16 CsrSchedTaskId;
|
||||
|
||||
/* A queue identifier */
|
||||
typedef CsrUint16 CsrSchedQid;
|
||||
typedef u16 CsrSchedQid;
|
||||
#define CSR_SCHED_QID_INVALID ((CsrSchedQid) 0xFFFF)
|
||||
|
||||
/* A message identifier */
|
||||
@@ -50,7 +50,7 @@ typedef void (*schedEntryFunction_t)(void **inst);
|
||||
/*
|
||||
* Background interrupt definitions
|
||||
*/
|
||||
typedef CsrUint16 CsrSchedBgint;
|
||||
typedef u16 CsrSchedBgint;
|
||||
#define CSR_SCHED_BGINT_INVALID ((CsrSchedBgint) 0xFFFF)
|
||||
|
||||
typedef void (*CsrSchedBgintHandler)(void *);
|
||||
@@ -133,14 +133,14 @@ void CsrSchedBgintSet(CsrSchedBgint bgint);
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
|
||||
void CsrSchedMessagePutStringLog(CsrSchedQid q,
|
||||
CsrUint16 mi,
|
||||
u16 mi,
|
||||
void *mv,
|
||||
CsrUint32 line,
|
||||
const CsrCharString *file);
|
||||
#define CsrSchedMessagePut(q, mi, mv) CsrSchedMessagePutStringLog((q), (mi), (mv), __LINE__, __FILE__)
|
||||
#else
|
||||
void CsrSchedMessagePut(CsrSchedQid q,
|
||||
CsrUint16 mi,
|
||||
u16 mi,
|
||||
void *mv);
|
||||
#endif
|
||||
|
||||
@@ -164,14 +164,14 @@ void CsrSchedMessagePut(CsrSchedQid q,
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
|
||||
void CsrSchedMessageBroadcastStringLog(CsrUint16 mi,
|
||||
void CsrSchedMessageBroadcastStringLog(u16 mi,
|
||||
void *(*msg_build_func)(void *),
|
||||
void *msg_build_ptr,
|
||||
CsrUint32 line,
|
||||
const CsrCharString *file);
|
||||
#define CsrSchedMessageBroadcast(mi, fn, ptr) CsrSchedMessageBroadcastStringLog((mi), (fn), (ptr), __LINE__, __FILE__)
|
||||
#else
|
||||
void CsrSchedMessageBroadcast(CsrUint16 mi,
|
||||
void CsrSchedMessageBroadcast(u16 mi,
|
||||
void *(*msg_build_func)(void *),
|
||||
void *msg_build_ptr);
|
||||
#endif
|
||||
@@ -182,7 +182,7 @@ void CsrSchedMessageBroadcast(CsrUint16 mi,
|
||||
*
|
||||
* DESCRIPTION
|
||||
* Obtains a message from the message queue belonging to the calling task.
|
||||
* The message consists of one or both of a CsrUint16 and a void *.
|
||||
* The message consists of one or both of a u16 and a void *.
|
||||
*
|
||||
* RETURNS
|
||||
* CsrBool - TRUE if a message has been obtained from the queue, else FALSE.
|
||||
@@ -193,7 +193,7 @@ void CsrSchedMessageBroadcast(CsrUint16 mi,
|
||||
* them message is discarded.
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrBool CsrSchedMessageGet(CsrUint16 *pmi, void **pmv);
|
||||
CsrBool CsrSchedMessageGet(u16 *pmi, void **pmv);
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
* NAME
|
||||
@@ -219,16 +219,16 @@ CsrBool CsrSchedMessageGet(CsrUint16 *pmi, void **pmv);
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
|
||||
CsrSchedTid CsrSchedTimerSetStringLog(CsrTime delay,
|
||||
void (*fn)(CsrUint16 mi, void *mv),
|
||||
CsrUint16 fniarg,
|
||||
void (*fn)(u16 mi, void *mv),
|
||||
u16 fniarg,
|
||||
void *fnvarg,
|
||||
CsrUint32 line,
|
||||
const CsrCharString *file);
|
||||
#define CsrSchedTimerSet(d, fn, fni, fnv) CsrSchedTimerSetStringLog((d), (fn), (fni), (fnv), __LINE__, __FILE__)
|
||||
#else
|
||||
CsrSchedTid CsrSchedTimerSet(CsrTime delay,
|
||||
void (*fn)(CsrUint16 mi, void *mv),
|
||||
CsrUint16 fniarg,
|
||||
void (*fn)(u16 mi, void *mv),
|
||||
u16 fniarg,
|
||||
void *fnvarg);
|
||||
#endif
|
||||
|
||||
@@ -246,14 +246,14 @@ CsrSchedTid CsrSchedTimerSet(CsrTime delay,
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
|
||||
CsrBool CsrSchedTimerCancelStringLog(CsrSchedTid eventid,
|
||||
CsrUint16 *pmi,
|
||||
u16 *pmi,
|
||||
void **pmv,
|
||||
CsrUint32 line,
|
||||
const CsrCharString *file);
|
||||
#define CsrSchedTimerCancel(e, pmi, pmv) CsrSchedTimerCancelStringLog((e), (pmi), (pmv), __LINE__, __FILE__)
|
||||
#else
|
||||
CsrBool CsrSchedTimerCancel(CsrSchedTid eventid,
|
||||
CsrUint16 *pmi,
|
||||
u16 *pmi,
|
||||
void **pmv);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@ extern "C" {
|
||||
*----------------------------------------------------------------------------*/
|
||||
typedef struct
|
||||
{
|
||||
CsrUint16 manfId; /* Vendor ID to match or CSR_SDIO_ANY_MANF_ID */
|
||||
CsrUint16 cardId; /* Device ID to match or CSR_SDIO_ANY_CARD_ID */
|
||||
u16 manfId; /* Vendor ID to match or CSR_SDIO_ANY_MANF_ID */
|
||||
u16 cardId; /* Device ID to match or CSR_SDIO_ANY_CARD_ID */
|
||||
u8 sdioFunction; /* SDIO Function number to match or CSR_SDIO_ANY_SDIO_FUNCTION */
|
||||
u8 sdioInterface; /* SDIO Standard Interface Code to match or CSR_SDIO_ANY_SDIO_INTERFACE */
|
||||
} CsrSdioFunctionId;
|
||||
@@ -84,7 +84,7 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
CsrSdioFunctionId sdioId;
|
||||
CsrUint16 blockSize; /* Actual configured block size, or 0 if unconfigured */
|
||||
u16 blockSize; /* Actual configured block size, or 0 if unconfigured */
|
||||
CsrUint32 features; /* Bit mask with any of CSR_SDIO_FEATURE_* set */
|
||||
void *device; /* Handle of device containing the function */
|
||||
void *driverData; /* For use by the Function Driver */
|
||||
@@ -434,7 +434,7 @@ void CsrSdioResumeAcknowledge(CsrSdioFunction *function, CsrResult result);
|
||||
* (after the second operation) is in the valid range.
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrResult CsrSdioBlockSizeSet(CsrSdioFunction *function, CsrUint16 blockSize);
|
||||
CsrResult CsrSdioBlockSizeSet(CsrSdioFunction *function, u16 blockSize);
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
* NAME
|
||||
@@ -563,10 +563,10 @@ void CsrSdioWrite8Async(CsrSdioFunction *function, CsrUint32 address, u8 data, C
|
||||
* the callback function.
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
CsrResult CsrSdioRead16(CsrSdioFunction *function, CsrUint32 address, CsrUint16 *data);
|
||||
CsrResult CsrSdioWrite16(CsrSdioFunction *function, CsrUint32 address, CsrUint16 data);
|
||||
void CsrSdioRead16Async(CsrSdioFunction *function, CsrUint32 address, CsrUint16 *data, CsrSdioAsyncCallback callback);
|
||||
void CsrSdioWrite16Async(CsrSdioFunction *function, CsrUint32 address, CsrUint16 data, CsrSdioAsyncCallback callback);
|
||||
CsrResult CsrSdioRead16(CsrSdioFunction *function, CsrUint32 address, u16 *data);
|
||||
CsrResult CsrSdioWrite16(CsrSdioFunction *function, CsrUint32 address, u16 data);
|
||||
void CsrSdioRead16Async(CsrSdioFunction *function, CsrUint32 address, u16 *data, CsrSdioAsyncCallback callback);
|
||||
void CsrSdioWrite16Async(CsrSdioFunction *function, CsrUint32 address, u16 data, CsrSdioAsyncCallback callback);
|
||||
|
||||
/*----------------------------------------------------------------------------*
|
||||
* NAME
|
||||
|
||||
@@ -23,7 +23,7 @@ void CsrUint8Des(u8 *value, u8 *buffer, CsrSize *offset)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(CsrUint8Des);
|
||||
|
||||
void CsrUint16Des(CsrUint16 *value, u8 *buffer, CsrSize *offset)
|
||||
void CsrUint16Des(u16 *value, u8 *buffer, CsrSize *offset)
|
||||
{
|
||||
*value = (buffer[*offset + 0] << 0) |
|
||||
(buffer[*offset + 1] << 8);
|
||||
@@ -95,7 +95,7 @@ void CsrUint8Ser(u8 *buffer, CsrSize *offset, u8 value)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(CsrUint8Ser);
|
||||
|
||||
void CsrUint16Ser(u8 *buffer, CsrSize *offset, CsrUint16 value)
|
||||
void CsrUint16Ser(u8 *buffer, CsrSize *offset, u16 value)
|
||||
{
|
||||
buffer[*offset + 0] = (u8) ((value >> 0) & 0xFF);
|
||||
buffer[*offset + 1] = (u8) ((value >> 8) & 0xFF);
|
||||
@@ -150,7 +150,7 @@ void CsrUtf16StringSer(u8 *buffer, CsrSize *offset, const CsrUtf16String *value)
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
CsrUint16Ser(buffer, offset, (CsrUint16) value[i]);
|
||||
CsrUint16Ser(buffer, offset, (u16) value[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -43,7 +43,7 @@ typedef CsrUint32 CsrTime;
|
||||
typedef struct
|
||||
{
|
||||
CsrUint32 sec;
|
||||
CsrUint16 msec;
|
||||
u16 msec;
|
||||
} CsrTimeUtc;
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any poi
|
||||
typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
|
||||
|
||||
/* Unsigned fixed width types */
|
||||
typedef uint16_t CsrUint16;
|
||||
typedef uint32_t CsrUint32;
|
||||
|
||||
/* Signed fixed width types */
|
||||
@@ -46,7 +45,7 @@ typedef u8 CsrBool;
|
||||
/* String types */
|
||||
typedef char CsrCharString;
|
||||
typedef u8 CsrUtf8String;
|
||||
typedef CsrUint16 CsrUtf16String; /* 16-bit UTF16 strings */
|
||||
typedef u16 CsrUtf16String; /* 16-bit UTF16 strings */
|
||||
typedef CsrUint32 CsrUint24;
|
||||
|
||||
/*
|
||||
|
||||
@@ -28,8 +28,8 @@ CsrUtf16String *CsrUtf82Utf16String(const CsrUtf8String *utf8String);
|
||||
CsrUtf16String *CsrUtf16StrCpy(CsrUtf16String *target, const CsrUtf16String *source);
|
||||
CsrUtf16String *CsrUtf16StringDuplicate(const CsrUtf16String *source);
|
||||
|
||||
CsrUint16 CsrUtf16StrICmp(const CsrUtf16String *string1, const CsrUtf16String *string2);
|
||||
CsrUint16 CsrUtf16StrNICmp(const CsrUtf16String *string1, const CsrUtf16String *string2, CsrUint32 count);
|
||||
u16 CsrUtf16StrICmp(const CsrUtf16String *string1, const CsrUtf16String *string2);
|
||||
u16 CsrUtf16StrNICmp(const CsrUtf16String *string1, const CsrUtf16String *string2, CsrUint32 count);
|
||||
|
||||
CsrUtf16String *CsrUtf16MemCpy(CsrUtf16String *dest, const CsrUtf16String *src, CsrUint32 count);
|
||||
CsrUtf16String *CsrUtf16ConcatenateTexts(const CsrUtf16String *inputText1, const CsrUtf16String *inputText2,
|
||||
|
||||
@@ -75,7 +75,7 @@ static const CsrUint32 offsetsFromUtf8[4] =
|
||||
*********************************************************************************/
|
||||
CsrUtf16String *CsrUint32ToUtf16String(CsrUint32 number)
|
||||
{
|
||||
CsrUint16 count, noOfDigits;
|
||||
u16 count, noOfDigits;
|
||||
CsrUtf16String *output;
|
||||
CsrUint32 tempNumber;
|
||||
|
||||
@@ -115,10 +115,10 @@ CsrUtf16String *CsrUint32ToUtf16String(CsrUint32 number)
|
||||
*********************************************************************************/
|
||||
CsrUint32 CsrUtf16StringToUint32(const CsrUtf16String *unicodeString)
|
||||
{
|
||||
CsrUint16 numLen, count;
|
||||
u16 numLen, count;
|
||||
CsrUint32 newNumber = 0;
|
||||
|
||||
numLen = (CsrUint16) CsrUtf16StrLen(unicodeString);
|
||||
numLen = (u16) CsrUtf16StrLen(unicodeString);
|
||||
|
||||
if ((numLen > 10) || (numLen == 0) || (unicodeString == NULL)) /*CSRMAX number is 4.294.967.295 */
|
||||
{
|
||||
@@ -673,15 +673,15 @@ CsrUtf16String *CsrUtf82Utf16String(const CsrUtf8String *utf8String)
|
||||
|
||||
ch -= offsetsFromUtf8[extraBytes2Read];
|
||||
|
||||
if (ch <= 0xFFFF) /* Character can be encoded in one CsrUint16 */
|
||||
if (ch <= 0xFFFF) /* Character can be encoded in one u16 */
|
||||
{
|
||||
*dest++ = (CsrUint16) ch;
|
||||
*dest++ = (u16) ch;
|
||||
}
|
||||
else /* The character needs two CsrUint16 */
|
||||
else /* The character needs two u16 */
|
||||
{
|
||||
ch -= UNI_HALF_BASE;
|
||||
*dest++ = (CsrUint16) ((ch >> UNI_HALF_SHIFT) | UNI_SUR_HIGH_START);
|
||||
*dest++ = (CsrUint16) ((ch & 0x03FF) | UNI_SUR_LOW_START);
|
||||
*dest++ = (u16) ((ch >> UNI_HALF_SHIFT) | UNI_SUR_HIGH_START);
|
||||
*dest++ = (u16) ((ch & 0x03FF) | UNI_SUR_LOW_START);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -753,7 +753,7 @@ CsrUtf16String *CsrUtf16StringDuplicate(const CsrUtf16String *source)
|
||||
* Output: 0: if the strings are identical.
|
||||
*
|
||||
*********************************************************************************/
|
||||
CsrUint16 CsrUtf16StrICmp(const CsrUtf16String *string1, const CsrUtf16String *string2)
|
||||
u16 CsrUtf16StrICmp(const CsrUtf16String *string1, const CsrUtf16String *string2)
|
||||
{
|
||||
while (*string1 || *string2)
|
||||
{
|
||||
@@ -781,7 +781,7 @@ CsrUint16 CsrUtf16StrICmp(const CsrUtf16String *string1, const CsrUtf16String *s
|
||||
* Output: 0: if the strings are identical.
|
||||
*
|
||||
*********************************************************************************/
|
||||
CsrUint16 CsrUtf16StrNICmp(const CsrUtf16String *string1, const CsrUtf16String *string2, CsrUint32 count)
|
||||
u16 CsrUtf16StrNICmp(const CsrUtf16String *string1, const CsrUtf16String *string2, CsrUint32 count)
|
||||
{
|
||||
while ((*string1 || *string2) && count--)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user