Commit 8c87f69a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 163eb0d8
......@@ -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--)
{
......
......@@ -55,7 +55,7 @@ u8 CsrBitCountDense(CsrUint32 n)
/*------------------------------------------------------------------*/
CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue)
{
CsrUint16 currentIndex = 0;
u16 currentIndex = 0;
*returnValue = 0;
if ((string[currentIndex] == '0') && (CSR_TOUPPER(string[currentIndex + 1]) == 'X'))
{
......@@ -77,9 +77,9 @@ CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue)
return FALSE;
}
CsrBool CsrHexStrToUint16(const CsrCharString *string, CsrUint16 *returnValue)
CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue)
{
CsrUint16 currentIndex = 0;
u16 currentIndex = 0;
*returnValue = 0;
if ((string[currentIndex] == '0') && (CSR_TOUPPER(string[currentIndex + 1]) == 'X'))
{
......@@ -89,7 +89,7 @@ CsrBool CsrHexStrToUint16(const CsrCharString *string, CsrUint16 *returnValue)
{
while (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) || ((CSR_TOUPPER(string[currentIndex]) >= 'A') && (CSR_TOUPPER(string[currentIndex]) <= 'F')))
{
*returnValue = (CsrUint16) (*returnValue * 16 + (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) ? string[currentIndex] - '0' : CSR_TOUPPER(string[currentIndex]) - 'A' + 10));
*returnValue = (u16) (*returnValue * 16 + (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) ? string[currentIndex] - '0' : CSR_TOUPPER(string[currentIndex]) - 'A' + 10));
currentIndex++;
if (currentIndex >= 4)
{
......@@ -103,7 +103,7 @@ CsrBool CsrHexStrToUint16(const CsrCharString *string, CsrUint16 *returnValue)
CsrBool CsrHexStrToUint32(const CsrCharString *string, CsrUint32 *returnValue)
{
CsrUint16 currentIndex = 0;
u16 currentIndex = 0;
*returnValue = 0;
if ((string[currentIndex] == '0') && (CSR_TOUPPER(string[currentIndex + 1]) == 'X'))
{
......@@ -190,14 +190,14 @@ void CsrIntToBase10(CsrInt32 number, CsrCharString *str)
CsrStrCpy(str, res);
}
void CsrUInt16ToHex(CsrUint16 number, CsrCharString *str)
void CsrUInt16ToHex(u16 number, CsrCharString *str)
{
CsrUint16 index;
CsrUint16 currentValue;
u16 index;
u16 currentValue;
for (index = 0; index < 4; index++)
{
currentValue = (CsrUint16) (number & 0x000F);
currentValue = (u16) (number & 0x000F);
number >>= 4;
str[3 - index] = (char) (currentValue > 9 ? currentValue + 55 : currentValue + '0');
}
......@@ -206,7 +206,7 @@ void CsrUInt16ToHex(CsrUint16 number, CsrCharString *str)
void CsrUInt32ToHex(CsrUint32 number, CsrCharString *str)
{
CsrUint16 index;
u16 index;
CsrUint32 currentValue;
for (index = 0; index < 8; index++)
......@@ -334,7 +334,7 @@ CsrUint32 CsrStrToInt(const CsrCharString *str)
digit = 1;
/* Start from the string end */
for (i = (CsrUint16) (CsrStrLen(str) - 1); i >= 0; i--)
for (i = (u16) (CsrStrLen(str) - 1); i >= 0; i--)
{
/* Only convert numbers */
if ((str[i] >= '0') && (str[i] <= '9'))
......
......@@ -27,11 +27,11 @@ u8 CsrBitCountDense(CsrUint32 n);
/* Base conversion */
/*------------------------------------------------------------------*/
CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue);
CsrBool CsrHexStrToUint16(const CsrCharString *string, CsrUint16 *returnValue);
CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue);
CsrBool CsrHexStrToUint32(const CsrCharString *string, CsrUint32 *returnValue);
CsrUint32 CsrPow(CsrUint32 base, CsrUint32 exponent);
void CsrIntToBase10(CsrInt32 number, CsrCharString *str);
void CsrUInt16ToHex(CsrUint16 number, CsrCharString *str);
void CsrUInt16ToHex(u16 number, CsrCharString *str);
void CsrUInt32ToHex(CsrUint32 number, CsrCharString *str);
/*------------------------------------------------------------------*/
......
......@@ -66,7 +66,7 @@ typedef void (*CsrWifiFsmExternalWakupCallbackPtr)(void *context);
* @return
* CsrWifiFsmContext* fsm context
*/
extern CsrWifiFsmContext* CsrWifiFsmInit(void *applicationContext, void *externalContext, CsrUint16 maxProcesses, CsrLogTextTaskId loggingTaskId);
extern CsrWifiFsmContext* CsrWifiFsmInit(void *applicationContext, void *externalContext, u16 maxProcesses, CsrLogTextTaskId loggingTaskId);
/**
* @brief
......@@ -143,7 +143,7 @@ extern CsrUint32 CsrWifiFsmExecute(CsrWifiFsmContext *context);
* @return
* void
*/
extern void CsrWifiFsmSendEventExternal(CsrWifiFsmContext *context, CsrWifiFsmEvent *event, CsrUint16 source, CsrUint16 destination, CsrPrim primtype, CsrUint16 id);
extern void CsrWifiFsmSendEventExternal(CsrWifiFsmContext *context, CsrWifiFsmEvent *event, u16 source, u16 destination, CsrPrim primtype, u16 id);
/**
* @brief
......@@ -202,7 +202,7 @@ extern CsrUint32 CsrWifiFsmGetNextTimeout(CsrWifiFsmContext *context);
* @return
* void
*/
extern void CsrWifiFsmFastForward(CsrWifiFsmContext *context, CsrUint16 ms);
extern void CsrWifiFsmFastForward(CsrWifiFsmContext *context, u16 ms);
/**
* @brief
......
......@@ -30,7 +30,7 @@ extern "C" {
typedef struct CsrWifiFsmEvent
{
CsrPrim type;
CsrUint16 primtype;
u16 primtype;
CsrSchedQid destination;
CsrSchedQid source;
......
......@@ -54,9 +54,9 @@ typedef struct CsrWifiFsmEventList
typedef struct CsrWifiFsmTimerId
{
CsrPrim type;
CsrUint16 primtype;
u16 primtype;
CsrSchedQid destination;
CsrUint16 uniqueid;
u16 uniqueid;
} CsrWifiFsmTimerId;
/**
......@@ -71,7 +71,7 @@ typedef struct CsrWifiFsmTimerId
typedef struct CsrWifiFsmTimer
{
CsrPrim type;
CsrUint16 primtype;
u16 primtype;
CsrSchedQid destination;
CsrSchedQid source;
......@@ -109,7 +109,7 @@ typedef struct CsrWifiFsmTimerList
{
CsrWifiFsmTimer *first;
CsrWifiFsmTimer *last;
CsrUint16 nexttimerid;
u16 nexttimerid;
} CsrWifiFsmTimerList;
/**
......@@ -171,9 +171,9 @@ typedef void (*CsrWifiFsmProcResetFnPtr)(CsrWifiFsmContext *context);
* @param[in] context : External context
*
* @return
* CsrUint16 a valid destination OR CSR_WIFI_FSM_ENV
* u16 a valid destination OR CSR_WIFI_FSM_ENV
*/
typedef CsrUint16 (*CsrWifiFsmDestLookupCallbackPtr)(void *context, const CsrWifiFsmEvent *event);
typedef u16 (*CsrWifiFsmDestLookupCallbackPtr)(void *context, const CsrWifiFsmEvent *event);
#ifdef CSR_WIFI_FSM_DUMP_ENABLE
......@@ -223,7 +223,7 @@ typedef struct
const CsrBool saveAll;
const CsrWifiFsmEventEntry *eventEntryArray; /* array of transition function pointers for state */
#ifdef CSR_LOG_ENABLE
CsrUint16 stateNumber;
u16 stateNumber;
const CsrCharString *stateName;
#endif
} CsrWifiFsmTableEntry;
......@@ -237,7 +237,7 @@ typedef struct
*/
typedef struct
{
CsrUint16 numStates; /* number of states */
u16 numStates; /* number of states */
const CsrWifiFsmTableEntry *aStateEventMatrix; /* state event matrix */
} CsrWifiFsmTransitionFunctionTable;
......@@ -271,12 +271,12 @@ typedef struct
*/
typedef struct
{
CsrUint16 transitionNumber;
u16 transitionNumber;
CsrWifiFsmEvent event;
CsrUint16 fromState;
CsrUint16 toState;
u16 fromState;
u16 toState;
CsrWifiFsmTransitionFnPtr transitionFn;
CsrUint16 transitionCount; /* number consecutive of times this transition was seen */
u16 transitionCount; /* number consecutive of times this transition was seen */
#ifdef CSR_LOG_ENABLE
const CsrCharString *transitionName;
#endif
......@@ -288,7 +288,7 @@ typedef struct
*/
typedef struct
{
CsrUint16 numTransitions;
u16 numTransitions;
CsrWifiFsmTransitionRecord records[CSR_WIFI_FSM_MAX_TRANSITION_HISTORY];
} CsrWifiFsmTransitionRecords;
#endif
......@@ -304,8 +304,8 @@ typedef struct
typedef struct
{
const CsrWifiFsmProcessStateMachine *fsmInfo; /* state machine info that is constant regardless of context */
CsrUint16 instanceId; /* Runtime process id */
CsrUint16 state; /* Current state */
u16 instanceId; /* Runtime process id */
u16 state; /* Current state */
void *params; /* Instance user data */
CsrWifiFsmEventList savedEventQueue; /* The saved event queue */
struct CsrWifiFsmInstanceEntry *subFsm; /* Sub Fsm instance data */
......@@ -358,7 +358,7 @@ typedef void (*CsrWifiFsmOnTransitionFnPtr)(void *extContext, const CsrWifiFsmEv
* @return
* void
*/
typedef void (*CsrWifiFsmOnStateChangeFnPtr)(void *extContext, CsrUint16 nextstate);
typedef void (*CsrWifiFsmOnStateChangeFnPtr)(void *extContext, u16 nextstate);
/**
* @brief
......@@ -394,8 +394,8 @@ struct CsrWifiFsmContext
CsrBool useTempSaveList; /* Should the temp save list be used */
CsrWifiFsmEventList tempSaveList; /* The temp save event queue */
CsrWifiFsmEvent *eventForwardedOrSaved; /* The event that was forwarded or Saved */
CsrUint16 maxProcesses; /* Size of instanceArray */
CsrUint16 numProcesses; /* Current number allocated in instanceArray */
u16 maxProcesses; /* Size of instanceArray */
u16 numProcesses; /* Current number allocated in instanceArray */
CsrWifiFsmInstanceEntry *instanceArray; /* Array of processes for this component */
CsrWifiFsmInstanceEntry *ownerInstance; /* The Process that owns currentInstance (SubFsm support) */
CsrWifiFsmInstanceEntry *currentInstance; /* Current Process that is executing */
......@@ -429,7 +429,7 @@ struct CsrWifiFsmContext
CsrWifiFsmOnEventFnPtr onInvalidCallback; /* Invalid event Callback */
#endif
#ifdef CSR_WIFI_FSM_DUMP_ENABLE
CsrUint16 masterTransitionNumber; /* Increments on every transition */
u16 masterTransitionNumber; /* Increments on every transition */
#endif
};
......
......@@ -68,7 +68,7 @@ CsrResult CardIntEnabled(card_t *card, CsrBool *enabled);
/*****************************************************************************
* CardGetDataSlotSize
*/
CsrUint16 CardGetDataSlotSize(card_t *card);
u16 CardGetDataSlotSize(card_t *card);
/*****************************************************************************
* CardWriteBulkData -
......@@ -93,9 +93,9 @@ void CardClearFromHostDataSlotWithoutFreeingBulkData(card_t *card, const CsrInt1
/*****************************************************************************
* CardGetFreeFromHostDataSlots -
*/
CsrUint16 CardGetFreeFromHostDataSlots(card_t *card);
u16 CardGetFreeFromHostDataSlots(card_t *card);
CsrUint16 CardAreAllFromHostDataSlotsEmpty(card_t *card);
u16 CardAreAllFromHostDataSlotsEmpty(card_t *card);
CsrResult card_start_processor(card_t *card, enum unifi_dbg_processors_select which);
......@@ -112,7 +112,7 @@ CsrResult ConvertCsrSdioToCsrHipResult(card_t *card, CsrResult csrResult);
#ifdef CSR_WIFI_HIP_DEBUG_OFFLINE
void unifi_debug_log_to_buf(const CsrCharString *fmt, ...);
void unifi_debug_string_to_buf(const CsrCharString *str);
void unifi_debug_hex_to_buf(const CsrCharString *buff, CsrUint16 length);
void unifi_debug_hex_to_buf(const CsrCharString *buff, u16 length);
#endif
......
......@@ -599,8 +599,8 @@ static void _build_sdio_config_data(sdio_config_data_t *cfg_data,
static CsrResult card_hw_init(card_t *card)
{
CsrUint32 slut_address;
CsrUint16 initialised;
CsrUint16 finger_print;
u16 initialised;
u16 finger_print;
symbol_t slut;
sdio_config_data_t *cfg_data;
u8 cfg_data_buf[SDIO_CONFIG_DATA_SIZE];
......@@ -691,7 +691,7 @@ static CsrResult card_hw_init(card_t *card)
*/
while (!search_4slut_again)
{
CsrUint16 s;
u16 s;
CsrUint32 l;
r = unifi_card_read16(card, slut_address, &s);
......@@ -785,7 +785,7 @@ static CsrResult card_hw_init(card_t *card)
func_exit_r(CSR_WIFI_HIP_RESULT_INVALID_VALUE);
return CSR_WIFI_HIP_RESULT_INVALID_VALUE;
}
cfg_data->tohost_signal_padding = (CsrUint16) (card->sdio_io_block_size / cfg_data->sig_frag_size);
cfg_data->tohost_signal_padding = (u16) (card->sdio_io_block_size / cfg_data->sig_frag_size);
unifi_info(card->ospriv, "SDIO block size %d requires %d padding chunks\n",
card->sdio_io_block_size, cfg_data->tohost_signal_padding);
r = unifi_card_write16(card, slut.obj + SDIO_TO_HOST_SIG_PADDING_OFFSET, cfg_data->tohost_signal_padding);
......@@ -1051,7 +1051,7 @@ static CsrResult card_wait_for_unifi_to_reset(card_t *card)
}
if (r == CSR_RESULT_SUCCESS)
{
CsrUint16 mbox2;
u16 mbox2;
CsrInt16 enabled = io_enable & (1 << card->function);
if (!enabled)
......@@ -1236,7 +1236,7 @@ static CsrResult card_wait_for_unifi_to_disable(card_t *card)
CsrResult card_wait_for_firmware_to_start(card_t *card, CsrUint32 *paddr)
{
CsrInt32 i;
CsrUint16 mbox0, mbox1;
u16 mbox0, mbox1;
CsrResult r;
func_enter();
......@@ -1402,7 +1402,7 @@ CsrResult unifi_capture_panic(card_t *card)
*/
static CsrResult card_access_panic(card_t *card)
{
CsrUint16 data_u16 = 0;
u16 data_u16 = 0;
CsrInt32 i;
CsrResult r, sr;
......@@ -1535,7 +1535,7 @@ static CsrResult card_access_panic(card_t *card)
void unifi_read_panic(card_t *card)
{
CsrResult r;
CsrUint16 p_code, p_arg;
u16 p_code, p_arg;
func_enter();
......@@ -2045,7 +2045,7 @@ static CsrResult card_init_slots(card_t *card)
/* Get initial signal counts from UniFi, in case it has not been reset. */
{
CsrUint16 s;
u16 s;
/* Get the from-host-signals-written count */
r = unifi_card_read16(card, card->sdio_ctrl_addr + 0, &s);
......@@ -2219,11 +2219,11 @@ static void CardReassignDynamicReservation(card_t *card)
*/
static void CardCheckDynamicReservation(card_t *card, unifi_TrafficQueue queue)
{
CsrUint16 q_len, active_queues = 0, excess_queue_slots, div_extra_slots,
u16 q_len, active_queues = 0, excess_queue_slots, div_extra_slots,
queue_fair_share, reserved_slots = 0, q, excess_need_queues = 0, unmovable_slots = 0;
CsrInt32 i;
q_t *sigq;
CsrUint16 num_data_slots = card->config_data.num_fromhost_data_slots - UNIFI_RESERVED_COMMAND_SLOTS;
u16 num_data_slots = card->config_data.num_fromhost_data_slots - UNIFI_RESERVED_COMMAND_SLOTS;
func_enter();
......@@ -2453,7 +2453,7 @@ void CardClearFromHostDataSlotWithoutFreeingBulkData(card_t *card, const CsrInt1
#endif
CsrUint16 CardGetDataSlotSize(card_t *card)
u16 CardGetDataSlotSize(card_t *card)
{
return card->config_data.data_slot_size;
} /* CardGetDataSlotSize() */
......@@ -2472,9 +2472,9 @@ CsrUint16 CardGetDataSlotSize(card_t *card)
* Number of free from-host bulk data slots.
* ---------------------------------------------------------------------------
*/
CsrUint16 CardGetFreeFromHostDataSlots(card_t *card)
u16 CardGetFreeFromHostDataSlots(card_t *card)
{
CsrUint16 i, n = 0;
u16 i, n = 0;
func_enter();
......@@ -2507,9 +2507,9 @@ CsrUint16 CardGetFreeFromHostDataSlots(card_t *card)
* 0 Some or all the from-host bulk data slots are in use.
* ---------------------------------------------------------------------------
*/
CsrUint16 CardAreAllFromHostDataSlotsEmpty(card_t *card)
u16 CardAreAllFromHostDataSlotsEmpty(card_t *card)
{
CsrUint16 i;
u16 i;
for (i = 0; i < card->config_data.num_fromhost_data_slots; i++)
{
......@@ -2642,7 +2642,7 @@ static CsrResult unifi_read_chip_version(card_t *card)
{
CsrUint32 gbl_chip_version;
CsrResult r;
CsrUint16 ver;
u16 ver;
func_enter();
......@@ -2700,7 +2700,7 @@ static CsrResult unifi_read_chip_version(card_t *card)
static CsrResult unifi_reset_hardware(card_t *card)
{
CsrResult r;
CsrUint16 new_block_size = UNIFI_IO_BLOCK_SIZE;
u16 new_block_size = UNIFI_IO_BLOCK_SIZE;
CsrResult csrResult;
func_enter();
......@@ -3402,7 +3402,7 @@ CsrResult CardIntEnabled(card_t *card, CsrBool *enabled)
*/
CsrResult CardWriteBulkData(card_t *card, card_signal_t *csptr, unifi_TrafficQueue queue)
{
CsrUint16 i, slots[UNIFI_MAX_DATA_REFERENCES], j = 0;
u16 i, slots[UNIFI_MAX_DATA_REFERENCES], j = 0;
u8 *packed_sigptr, num_slots_required = 0;
bulk_data_desc_t *bulkdata = csptr->bulkdata;
CsrInt16 h, nslots;
......@@ -3512,7 +3512,7 @@ CsrResult CardWriteBulkData(card_t *card, card_signal_t *csptr, unifi_TrafficQue
* Fill in the slot number in the SIGNAL structure but
* preserve the offset already in there
*/
SET_PACKED_DATAREF_SLOT(packed_sigptr, i, slots[j] | (((CsrUint16)packed_sigptr[SIZEOF_SIGNAL_HEADER + (i * SIZEOF_DATAREF) + 1]) << 8));
SET_PACKED_DATAREF_SLOT(packed_sigptr, i, slots[j] | (((u16)packed_sigptr[SIZEOF_SIGNAL_HEADER + (i * SIZEOF_DATAREF) + 1]) << 8));
SET_PACKED_DATAREF_LEN(packed_sigptr, i, bulkdata[i].data_length);
/* Do not copy the data, just store the information to them */
......@@ -3607,7 +3607,7 @@ bulk_data_desc_t* card_find_data_slot(card_t *card, CsrInt16 slot)
static CsrResult firmware_present_in_flash(card_t *card)
{
CsrResult r;
CsrUint16 m1, m5;
u16 m1, m5;
if (ChipHelper_HasRom(card->helper))
{
......@@ -4107,7 +4107,7 @@ void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo)
CsrUint32 occupied_fh;
q_t *sigq;
CsrUint16 nslots, i;
u16 nslots, i;
CsrMemSet(hipqosinfo, 0, sizeof(unifi_HipQosInfo));
......@@ -4142,7 +4142,7 @@ void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo)
occupied_fh = (card->from_host_signals_w - count_fhr) % 128;
hipqosinfo->free_fh_fw_slots = (CsrUint16)(card->config_data.num_fromhost_sig_frags - occupied_fh);
hipqosinfo->free_fh_fw_slots = (u16)(card->config_data.num_fromhost_sig_frags - occupied_fh);
}
......
......@@ -202,7 +202,7 @@ static CsrResult retrying_write8(card_t *card, CsrInt16 funcnum, CsrUint32 addr,
static CsrResult retrying_read16(card_t *card, CsrInt16 funcnum,
CsrUint32 addr, CsrUint16 *pdata)
CsrUint32 addr, u16 *pdata)
{
CsrSdioFunction *sdio = card->sdio_if;
CsrResult r = CSR_RESULT_SUCCESS;
......@@ -263,7 +263,7 @@ static CsrResult retrying_read16(card_t *card, CsrInt16 funcnum,
static CsrResult retrying_write16(card_t *card, CsrInt16 funcnum,
CsrUint32 addr, CsrUint16 data)
CsrUint32 addr, u16 data)
{
CsrSdioFunction *sdio = card->sdio_if;
CsrResult r = CSR_RESULT_SUCCESS;
......@@ -391,7 +391,7 @@ CsrResult sdio_write_f0(card_t *card, CsrUint32 addr, u8 data)
CsrResult unifi_read_direct_8_or_16(card_t *card, CsrUint32 addr, u8 *pdata)
{
#ifdef CSR_WIFI_TRANSPORT_CSPI
CsrUint16 w;
u16 w;
CsrResult r;
r = retrying_read16(card, card->function, addr, &w);
......@@ -433,7 +433,7 @@ CsrResult unifi_write_direct_8_or_16(card_t *card, CsrUint32 addr, u8 data)
}
#ifdef CSR_WIFI_TRANSPORT_CSPI
return retrying_write16(card, card->function, addr, (CsrUint16)data);
return retrying_write16(card, card->function, addr, (u16)data);
#else
return retrying_write8(card, card->function, addr, data);
#endif
......@@ -462,7 +462,7 @@ CsrResult unifi_write_direct_8_or_16(card_t *card, CsrUint32 addr, u8 data)
* even address is read.
* ---------------------------------------------------------------------------
*/
CsrResult unifi_read_direct16(card_t *card, CsrUint32 addr, CsrUint16 *pdata)
CsrResult unifi_read_direct16(card_t *card, CsrUint32 addr, u16 *pdata)
{
return retrying_read16(card, card->function, addr, pdata);
} /* unifi_read_direct16() */
......@@ -490,7 +490,7 @@ CsrResult unifi_read_direct16(card_t *card, CsrUint32 addr, CsrUint16 *pdata)
* even address is written.
* ---------------------------------------------------------------------------
*/
CsrResult unifi_write_direct16(card_t *card, CsrUint32 addr, CsrUint16 data)
CsrResult unifi_write_direct16(card_t *card, CsrUint32 addr, u16 data)
{
return retrying_write16(card, card->function, addr, data);
} /* unifi_write_direct16() */
......@@ -516,7 +516,7 @@ CsrResult unifi_write_direct16(card_t *card, CsrUint32 addr, CsrUint16 data)
CsrResult unifi_read_direct32(card_t *card, CsrUint32 addr, CsrUint32 *pdata)
{
CsrResult r;
CsrUint16 w0, w1;
u16 w0, w1;
r = retrying_read16(card, card->function, addr, &w0);
if (r != CSR_RESULT_SUCCESS)
......@@ -564,12 +564,12 @@ CsrResult unifi_read_direct32(card_t *card, CsrUint32 addr, CsrUint32 *pdata)
* even address is read.
* ---------------------------------------------------------------------------
*/
static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pdata, CsrUint16 len, s8 m, CsrUint32 *num)
static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pdata, u16 len, s8 m, CsrUint32 *num)
{
CsrResult r;
CsrUint32 i;
u8 *cptr;
CsrUint16 w;
u16 w;
*num = 0;
......@@ -631,7 +631,7 @@ static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pd
* even address is read.
* ---------------------------------------------------------------------------
*/
CsrResult unifi_read_directn(card_t *card, CsrUint32 addr, void *pdata, CsrUint16 len)
CsrResult unifi_read_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len)
{
CsrUint32 num;
......@@ -664,7 +664,7 @@ CsrResult unifi_read_directn(card_t *card, CsrUint32 addr, void *pdata, CsrUint1
* This means we must write data as pairs of bytes in reverse order.
* ---------------------------------------------------------------------------
*/
CsrResult unifi_write_directn(card_t *card, CsrUint32 addr, void *pdata, CsrUint16 len)
CsrResult unifi_write_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len)
{
CsrResult r;
u8 *cptr;
......@@ -716,7 +716,7 @@ CsrResult unifi_write_directn(card_t *card, CsrUint32 addr, void *pdata, CsrUint
*/
static CsrResult set_dmem_page(card_t *card, CsrUint32 dmem_addr, CsrUint32 *paddr)
{
CsrUint16 page, addr;
u16 page, addr;
CsrUint32 len;
CsrResult r;
......@@ -756,7 +756,7 @@ static CsrResult set_dmem_page(card_t *card, CsrUint32 dmem_addr, CsrUint32 *pad
static CsrResult set_pmem_page(card_t *card, CsrUint32 pmem_addr,
enum chip_helper_window_type mem_type, CsrUint32 *paddr)
{
CsrUint16 page, addr;
u16 page, addr;
CsrUint32 len;
CsrResult r;
......@@ -1064,7 +1064,7 @@ CsrResult unifi_read_8_or_16(card_t *card, CsrUint32 unifi_addr, u8 *pdata)
CsrUint32 sdio_addr;
CsrResult r;
#ifdef CSR_WIFI_TRANSPORT_CSPI
CsrUint16 w;
u16 w;
#endif
r = set_page(card, unifi_addr, &sdio_addr);
......@@ -1115,7 +1115,7 @@ CsrResult unifi_write_8_or_16(card_t *card, CsrUint32 unifi_addr, u8 data)
CsrUint32 sdio_addr;
CsrResult r;
#ifdef CSR_WIFI_TRANSPORT_CSPI
CsrUint16 w;
u16 w;
#endif
r = set_page(card, unifi_addr, &sdio_addr);
......@@ -1162,7 +1162,7 @@ CsrResult unifi_write_8_or_16(card_t *card, CsrUint32 unifi_addr, u8 data)
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
* ---------------------------------------------------------------------------
*/
CsrResult unifi_card_read16(card_t *card, CsrUint32 unifi_addr, CsrUint16 *pdata)
CsrResult unifi_card_read16(card_t *card, CsrUint32 unifi_addr, u16 *pdata)
{
CsrUint32 sdio_addr;
CsrResult r;
......@@ -1199,7 +1199,7 @@ CsrResult unifi_card_read16(card_t *card, CsrUint32 unifi_addr, CsrUint16 *pdata
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
* ---------------------------------------------------------------------------
*/
CsrResult unifi_card_write16(card_t *card, CsrUint32 unifi_addr, CsrUint16 data)
CsrResult unifi_card_write16(card_t *card, CsrUint32 unifi_addr, u16 data)
{
CsrUint32 sdio_addr;
CsrResult r;
......@@ -1278,7 +1278,7 @@ CsrResult unifi_read32(card_t *card, CsrUint32 unifi_addr, CsrUint32 *pdata)
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
* ---------------------------------------------------------------------------
*/
CsrResult unifi_readn_match(card_t *card, CsrUint32 unifi_addr, void *pdata, CsrUint16 len, s8 match)
CsrResult unifi_readn_match(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len, s8 match)
{
CsrUint32 sdio_addr;
CsrResult r;
......@@ -1295,13 +1295,13 @@ CsrResult unifi_readn_match(card_t *card, CsrUint32 unifi_addr, void *pdata, Csr
} /* unifi_readn_match() */
CsrResult unifi_card_readn(card_t *card, CsrUint32 unifi_addr, void *pdata, CsrUint16 len)
CsrResult unifi_card_readn(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
{
return unifi_readn_match(card, unifi_addr, pdata, len, -1);
} /* unifi_card_readn() */
CsrResult unifi_readnz(card_t *card, CsrUint32 unifi_addr, void *pdata, CsrUint16 len)
CsrResult unifi_readnz(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
{
return unifi_readn_match(card, unifi_addr, pdata, len, 0);
} /* unifi_readnz() */
......@@ -1384,7 +1384,7 @@ CsrInt32 unifi_read_shared_count(card_t *card, CsrUint32 addr)
* CSR_WIFI_HIP_RESULT_INVALID_VALUE an odd length or length too big.
* ---------------------------------------------------------------------------
*/
CsrResult unifi_writen(card_t *card, CsrUint32 unifi_addr, void *pdata, CsrUint16 len)
CsrResult unifi_writen(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
{
CsrUint32 sdio_addr;
CsrResult r;
......@@ -1401,7 +1401,7 @@ CsrResult unifi_writen(card_t *card, CsrUint32 unifi_addr, void *pdata, CsrUint1
static CsrResult csr_sdio_block_rw(card_t *card, CsrInt16 funcnum,
CsrUint32 addr, u8 *pdata,
CsrUint16 count, CsrInt16 dir_is_write)
u16 count, CsrInt16 dir_is_write)
{
CsrResult csrResult;
......@@ -1505,7 +1505,7 @@ CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
pdata, (direction == UNIFI_SDIO_READ)?"To" : "From");
if (direction == UNIFI_SDIO_WRITE)
{
dump(pdata, (CsrUint16)len);
dump(pdata, (u16)len);
}
else
{
......@@ -1529,7 +1529,7 @@ CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
while (1)
{
csrResult = csr_sdio_block_rw(card, card->function, handle,
(u8 *)pdata, (CsrUint16)len,
(u8 *)pdata, (u16)len,
direction);
if (csrResult == CSR_SDIO_RESULT_NO_DEVICE)
{
......@@ -1550,7 +1550,7 @@ CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
{
if (dump_read)
{
dump(pdata, (CsrUint16)len);
dump(pdata, (u16)len);
}
break;
}
......@@ -1699,7 +1699,7 @@ CsrResult unifi_bulk_rw_noretry(card_t *card, CsrUint32 handle, void *pdata,
CsrResult csrResult;
csrResult = csr_sdio_block_rw(card, card->function, handle,
(u8 *)pdata, (CsrUint16)len, direction);
(u8 *)pdata, (u16)len, direction);
if (csrResult != CSR_RESULT_SUCCESS)
{
unifi_error(card->ospriv, "Block %s failed\n",
......
......@@ -58,10 +58,10 @@ static const struct chip_helper_init_values init_vals_v22_v23[] = {
{ 0x????, 0x???? }*/
};
static const CsrUint16 reset_program_a_v1_or_v2[] = {
static const u16 reset_program_a_v1_or_v2[] = {
0x0000
};
static const CsrUint16 reset_program_b_v1_or_v2[] = {
static const u16 reset_program_b_v1_or_v2[] = {
0x0010, 0xFE00, 0xA021, 0xFF00, 0x8111, 0x0009, 0x0CA4, 0x0114,
0x0280, 0x04F8, 0xFE00, 0x6F25, 0x06E0, 0x0010, 0xFC00, 0x0121,
0xFC00, 0x0225, 0xFE00, 0x7125, 0xFE00, 0x6D11, 0x03F0, 0xFE00,
......@@ -591,7 +591,7 @@ ChipDescript* ChipHelper_GetVersionSdio(u8 sdio_ver)
}
ChipDescript* ChipHelper_GetVersionAny(CsrUint16 from_FF9A, CsrUint16 from_FE81)
ChipDescript* ChipHelper_GetVersionAny(u16 from_FF9A, u16 from_FE81)
{
CsrUint32 i;
......@@ -624,7 +624,7 @@ ChipDescript* ChipHelper_GetVersionAny(CsrUint16 from_FF9A, CsrUint16 from_FE81)
}
ChipDescript* ChipHelper_GetVersionUniFi(CsrUint16 ver)
ChipDescript* ChipHelper_GetVersionUniFi(u16 ver)
{
return ChipHelper_GetVersionAny(0x0000, ver);
}
......@@ -636,7 +636,7 @@ ChipDescript *ChipHelper_Null(void)
}
ChipDescript* ChipHelper_GetVersionBlueCore(enum chip_helper_bluecore_age bc_age, CsrUint16 version)
ChipDescript* ChipHelper_GetVersionBlueCore(enum chip_helper_bluecore_age bc_age, u16 version)
{
if (bc_age == chip_helper_bluecore_pre_bc7)
{
......@@ -664,7 +664,7 @@ CHIP_HELPER_LIST(C_DEF)
/*
* Map register addresses between HOST and SPI access.
*/
CsrUint16 ChipHelper_MapAddress_SPI2HOST(ChipDescript *chip_help, CsrUint16 addr)
u16 ChipHelper_MapAddress_SPI2HOST(ChipDescript *chip_help, u16 addr)
{
CsrUint32 i;
for (i = 0; i < chip_help->map.len; i++)
......@@ -678,7 +678,7 @@ CsrUint16 ChipHelper_MapAddress_SPI2HOST(ChipDescript *chip_help, CsrUint16 addr
}
CsrUint16 ChipHelper_MapAddress_HOST2SPI(ChipDescript *chip_help, CsrUint16 addr)
u16 ChipHelper_MapAddress_HOST2SPI(ChipDescript *chip_help, u16 addr)
{
CsrUint32 i;
for (i = 0; i < chip_help->map.len; i++)
......@@ -698,7 +698,7 @@ CsrUint16 ChipHelper_MapAddress_HOST2SPI(ChipDescript *chip_help, CsrUint16 addr
start is unusable because something else is cluttering up
the address map then that is taken into account and this
function returns that address justt past that. */
CsrUint16 ChipHelper_WINDOW_ADDRESS(ChipDescript *chip_help,
u16 ChipHelper_WINDOW_ADDRESS(ChipDescript *chip_help,
enum chip_helper_window_index window)
{
if (window < CHIP_HELPER_WINDOW_COUNT &&
......@@ -711,7 +711,7 @@ CsrUint16 ChipHelper_WINDOW_ADDRESS(ChipDescript *chip_help,
/* This returns the size of the window minus any blocked section */
CsrUint16 ChipHelper_WINDOW_SIZE(ChipDescript *chip_help,
u16 ChipHelper_WINDOW_SIZE(ChipDescript *chip_help,
enum chip_helper_window_index window)
{
if (window < CHIP_HELPER_WINDOW_COUNT &&
......@@ -747,11 +747,11 @@ CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
enum chip_helper_window_index window,
enum chip_helper_window_type type,
CsrUint32 offset,
CsrUint16 *page, CsrUint16 *addr, CsrUint32 *len)
u16 *page, u16 *addr, CsrUint32 *len)
{
const struct window_info_t *win;
const struct window_shift_info_t *mode;
CsrUint16 of, pg;
u16 of, pg;
if (window >= CHIP_HELPER_WINDOW_COUNT)
{
......@@ -774,8 +774,8 @@ CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
return FALSE;
}
pg = (CsrUint16)(offset >> mode->page_shift) + mode->page_offset;
of = (CsrUint16)(offset & ((1 << mode->page_shift) - 1));
pg = (u16)(offset >> mode->page_shift) + mode->page_offset;
of = (u16)(offset & ((1 << mode->page_shift) - 1));
/* If 'blocked' is zero this does nothing, else decrease
the page register and increase the offset until we aren't
in the blocked region of the window. */
......
......@@ -47,11 +47,11 @@ struct val_array_t
const struct chip_helper_init_values *vals;
};
/* Just a (counted) CsrUint16 array */
/* Just a (counted) u16 array */
struct data_array_t
{
CsrUint32 len;
const CsrUint16 *vals;
const u16 *vals;
};
struct reset_prog_t
......@@ -64,7 +64,7 @@ struct reset_prog_t
different host transports. */
struct chip_map_address_t
{
CsrUint16 spi, host;
u16 spi, host;
};
struct map_array_t
......@@ -75,38 +75,38 @@ struct map_array_t
struct chip_device_regs_per_transport_t
{
CsrUint16 dbg_proc_select;
CsrUint16 dbg_stop_status;
CsrUint16 window1_page; /* PROG_PMEM1 or GW1 */
CsrUint16 window2_page; /* PROG_PMEM2 or GW2 */
CsrUint16 window3_page; /* SHARED or GW3 */
CsrUint16 io_log_addr;
u16 dbg_proc_select;
u16 dbg_stop_status;
u16 window1_page; /* PROG_PMEM1 or GW1 */
u16 window2_page; /* PROG_PMEM2 or GW2 */
u16 window3_page; /* SHARED or GW3 */
u16 io_log_addr;
};
struct chip_device_regs_t
{
CsrUint16 gbl_chip_version;
CsrUint16 gbl_misc_enables;
CsrUint16 dbg_emu_cmd;
u16 gbl_chip_version;
u16 gbl_misc_enables;
u16 dbg_emu_cmd;
struct chip_device_regs_per_transport_t host;
struct chip_device_regs_per_transport_t spi;
CsrUint16 dbg_reset;
CsrUint16 dbg_reset_value;
CsrUint16 dbg_reset_warn;
CsrUint16 dbg_reset_warn_value;
CsrUint16 dbg_reset_result;
CsrUint16 xap_pch;
CsrUint16 xap_pcl;
CsrUint16 proc_pc_snoop;
CsrUint16 watchdog_disable;
CsrUint16 mailbox0;
CsrUint16 mailbox1;
CsrUint16 mailbox2;
CsrUint16 mailbox3;
CsrUint16 sdio_host_int;
CsrUint16 shared_io_interrupt;
CsrUint16 sdio_hip_handshake;
CsrUint16 coex_status; /* Allows WAPI detection */
u16 dbg_reset;
u16 dbg_reset_value;
u16 dbg_reset_warn;
u16 dbg_reset_warn_value;
u16 dbg_reset_result;
u16 xap_pch;
u16 xap_pcl;
u16 proc_pc_snoop;
u16 watchdog_disable;
u16 mailbox0;
u16 mailbox1;
u16 mailbox2;
u16 mailbox3;
u16 sdio_host_int;
u16 shared_io_interrupt;
u16 sdio_hip_handshake;
u16 coex_status; /* Allows WAPI detection */
};
/* If allowed is false then this window does not provide this
......@@ -119,7 +119,7 @@ struct window_shift_info_t
{
CsrInt32 allowed;
CsrUint32 page_shift;
CsrUint16 page_offset;
u16 page_offset;
};
/* Each window has an address and size. These are obvious. It then
......@@ -129,9 +129,9 @@ struct window_shift_info_t
are unusable. */
struct window_info_t
{
CsrUint16 address;
CsrUint16 size;
CsrUint16 blocked;
u16 address;
u16 size;
u16 blocked;
const struct window_shift_info_t *mode;
};
......@@ -141,8 +141,8 @@ struct window_info_t
struct chip_version_t
{
CsrInt32 pre_bc7;
CsrUint16 mask;
CsrUint16 result;
u16 mask;
u16 result;
u8 sdio;
};
......@@ -193,7 +193,7 @@ struct chip_device_desc_t
/* The offsets into the data address space of interesting things. */
struct
{
CsrUint16 ram;
u16 ram;
/* maybe add shared / page tables? */
} data_offset;
......
......@@ -71,7 +71,7 @@ extern "C" {
CsrInt32 get_packed_struct_size(const u8 *buf);
CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig);
CsrResult write_pack(const CSR_SIGNAL *sig, u8 *ptr, CsrUint16 *sig_len);
CsrResult write_pack(const CSR_SIGNAL *sig, u8 *ptr, u16 *sig_len);
#ifdef __cplusplus
}
......
......@@ -52,7 +52,7 @@ static CsrResult do_patch_convert_download(card_t *card,
static CsrResult _find_in_slut(card_t *card, symbol_t *psym, CsrUint32 *pslut)
{
CsrUint32 slut_address;
CsrUint16 finger_print;
u16 finger_print;
CsrResult r;
CsrResult csrResult;
......@@ -121,7 +121,7 @@ static CsrResult _find_in_slut(card_t *card, symbol_t *psym, CsrUint32 *pslut)
while (1)
{
CsrUint16 id;
u16 id;
CsrUint32 obj;
r = unifi_card_read16(card, slut_address, &id);
......@@ -500,7 +500,7 @@ void* unifi_dl_fw_read_start(card_t *card, s8 is_fw)
static CsrResult safe_read_shared_location(card_t *card, CsrUint32 address, u8 *pdata)
{
CsrResult r;
CsrUint16 limit = 1000;
u16 limit = 1000;
u8 b, b2;
*pdata = 0;
......@@ -662,7 +662,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
CsrInt32 data_len;
CsrUint32 write_len;
CsrResult r;
const CsrUint16 buf_size = 2 * 1024;
const u16 buf_size = 2 * 1024;
offset = ptdl->dl_offset;
data_len = ptdl->dl_size;
......@@ -757,8 +757,8 @@ static CsrResult do_patch_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo,
{
CsrResult r;
CsrInt32 i;
CsrUint16 loader_version;
CsrUint16 handle;
u16 loader_version;
u16 handle;
CsrUint32 total_bytes;
/*
......@@ -795,7 +795,7 @@ static CsrResult do_patch_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo,
if (card->loader_led_mask)
{
r = unifi_card_write16(card, boot_ctrl_addr + 2,
(CsrUint16)card->loader_led_mask);
(u16)card->loader_led_mask);
if (r != CSR_RESULT_SUCCESS)
{
unifi_error(card->ospriv, "Patch download: Failed to write LED mask\n");
......
......@@ -38,12 +38,12 @@
/* Mini-coredump state */
typedef struct coredump_buf
{
CsrUint16 count; /* serial number of dump */
u16 count; /* serial number of dump */
CsrTime timestamp; /* host's system time at capture */
CsrInt16 requestor; /* request: 0=auto dump, 1=manual */
CsrUint16 chip_ver;
u16 chip_ver;
CsrUint32 fw_ver;
CsrUint16 *zone[HIP_CDUMP_NUM_ZONES];
u16 *zone[HIP_CDUMP_NUM_ZONES];
struct coredump_buf *next; /* circular list */
struct coredump_buf *prev; /* circular list */
......@@ -55,16 +55,16 @@ struct coredump_zone
unifi_coredump_space_t space; /* XAP memory space this zone covers */
enum unifi_dbg_processors_select cpu; /* XAP CPU core selector */
CsrUint32 gp; /* Generic Pointer to memory zone on XAP */
CsrUint16 offset; /* 16-bit XAP word offset of zone in memory space */
CsrUint16 length; /* Length of zone in XAP words */
u16 offset; /* 16-bit XAP word offset of zone in memory space */
u16 length; /* Length of zone in XAP words */
};
static CsrResult unifi_coredump_from_sdio(card_t *card, coredump_buffer *dump_buf);
static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_buf);
static CsrResult unifi_coredump_read_zone(card_t *card, CsrUint16 *zone,
static CsrResult unifi_coredump_read_zone(card_t *card, u16 *zone,
const struct coredump_zone *def);
static CsrInt32 get_value_from_coredump(const coredump_buffer *dump,
const unifi_coredump_space_t space, const CsrUint16 offset);
const unifi_coredump_space_t space, const u16 offset);
/* Table of chip memory zones we capture on mini-coredump */
static const struct coredump_zone zonedef_table[HIP_CDUMP_NUM_ZONES] = {
......@@ -190,7 +190,7 @@ CsrResult unifi_coredump_handle_request(card_t *card)
CsrResult unifi_coredump_capture(card_t *card, struct unifi_coredump_req *req)
{
CsrResult r = CSR_RESULT_SUCCESS;
static CsrUint16 dump_seq_no = 1;
static u16 dump_seq_no = 1;
CsrTime time_of_capture;
func_enter();
......@@ -295,10 +295,10 @@ CsrResult unifi_coredump_capture(card_t *card, struct unifi_coredump_req *req)
*/
static CsrInt32 get_value_from_coredump(const coredump_buffer *coreDump,
const unifi_coredump_space_t space,
const CsrUint16 offset_in_space)
const u16 offset_in_space)
{
CsrInt32 r = -1;
CsrUint16 offset_in_zone;
u16 offset_in_zone;
CsrUint32 zone_end_offset;
CsrInt32 i;
const struct coredump_zone *def = &zonedef_table[0];
......@@ -430,7 +430,7 @@ CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req)
req->index, find_dump->count, i);
/* Find the appropriate entry in the buffer */
req->value = get_value_from_coredump(find_dump, req->space, (CsrUint16)req->offset);
req->value = get_value_from_coredump(find_dump, req->space, (u16)req->offset);
if (req->value < 0)
{
r = CSR_WIFI_HIP_RESULT_RANGE; /* Un-captured register */
......@@ -476,7 +476,7 @@ CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req)
* It is assumed that the caller has already stopped the XAPs
* ---------------------------------------------------------------------------
*/
static CsrResult unifi_coredump_read_zone(card_t *card, CsrUint16 *zonebuf, const struct coredump_zone *def)
static CsrResult unifi_coredump_read_zone(card_t *card, u16 *zonebuf, const struct coredump_zone *def)
{
CsrResult r;
......@@ -508,7 +508,7 @@ static CsrResult unifi_coredump_read_zone(card_t *card, CsrUint16 *zonebuf, cons
def->space, def->offset, def->length, def->gp, def->cpu);
/* Read on-chip RAM (byte-wise) */
r = unifi_card_readn(card, def->gp, zonebuf, (CsrUint16)(def->length * 2));
r = unifi_card_readn(card, def->gp, zonebuf, (u16)(def->length * 2));
if (r == CSR_WIFI_HIP_RESULT_NO_DEVICE)
{
goto done;
......@@ -585,7 +585,7 @@ static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_b
*/
static CsrResult unifi_coredump_from_sdio(card_t *card, coredump_buffer *dump_buf)
{
CsrUint16 val;
u16 val;
CsrResult r;
CsrUint32 sdio_addr;
......@@ -661,7 +661,7 @@ static
coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode)
{
coredump_buffer *newnode = NULL;
CsrUint16 *newzone = NULL;
u16 *newzone = NULL;
CsrInt32 i;
CsrUint32 zone_size;
......@@ -676,8 +676,8 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode)
/* Allocate chip memory zone capture buffers */
for (i = 0; i < HIP_CDUMP_NUM_ZONES; i++)
{
zone_size = sizeof(CsrUint16) * zonedef_table[i].length;
newzone = (CsrUint16 *)CsrMemAlloc(zone_size);
zone_size = sizeof(u16) * zonedef_table[i].length;
newzone = (u16 *)CsrMemAlloc(zone_size);
newnode->zone[i] = newzone;
if (newzone != NULL)
{
......@@ -738,7 +738,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode)
* free for capturing.
* ---------------------------------------------------------------------------
*/
CsrResult unifi_coredump_init(card_t *card, CsrUint16 num_dump_buffers)
CsrResult unifi_coredump_init(card_t *card, u16 num_dump_buffers)
{
#ifndef UNIFI_DISABLE_COREDUMP
void *ospriv = card->ospriv;
......
......@@ -38,7 +38,7 @@
CsrInt32 get_packed_struct_size(const u8 *buf)
{
CsrInt32 size = 0;
CsrUint16 sig_id;
u16 sig_id;
sig_id = CSR_GET_UINT16_FROM_LITTLE_ENDIAN(buf);
......@@ -2984,7 +2984,7 @@ CsrResult read_unpack_signal(const u8 *ptr, CSR_SIGNAL *sig)
* CSR_WIFI_HIP_RESULT_INVALID_VALUE if the ID of signal was not recognised.
* ---------------------------------------------------------------------------
*/
CsrResult write_pack(const CSR_SIGNAL *sig, u8 *ptr, CsrUint16 *sig_len)
CsrResult write_pack(const CSR_SIGNAL *sig, u8 *ptr, u16 *sig_len)
{
CsrInt16 index = 0;
......
......@@ -104,7 +104,7 @@ static CsrResult send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
const bulk_data_param_t *bulkdata,
q_t *sigq, CsrUint32 priority_q, CsrUint32 run_bh)
{
CsrUint16 i, data_slot_size;
u16 i, data_slot_size;
card_signal_t *csptr;
CsrInt16 qe;
CsrResult r;
......@@ -128,7 +128,7 @@ static CsrResult send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
csptr = CSR_WIFI_HIP_Q_SLOT_DATA(sigq, qe);
/* Make up the card_signal struct */
csptr->signal_length = (CsrUint16)siglen;
csptr->signal_length = (u16)siglen;
CsrMemCpy((void *)csptr->sigbuf, (void *)sigptr, siglen);
for (i = 0; i < UNIFI_MAX_DATA_REFERENCES; ++i)
......@@ -307,7 +307,7 @@ CsrResult unifi_send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
const bulk_data_param_t *bulkdata)
{
q_t *sig_soft_q;
CsrUint16 signal_id;
u16 signal_id;
CsrResult r;
CsrUint32 run_bh;
CsrUint32 priority_q;
......@@ -328,7 +328,7 @@ CsrResult unifi_send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
*/
if (signal_id == CSR_MA_PACKET_REQUEST_ID)
{
CsrUint16 frame_priority;
u16 frame_priority;
if (card->periodic_wake_mode == UNIFI_PERIODIC_WAKE_HOST_ENABLED)
{
......@@ -386,7 +386,7 @@ CsrResult unifi_send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
CsrResult unifi_send_resources_available(card_t *card, const u8 *sigptr)
{
q_t *sig_soft_q;
CsrUint16 signal_id = GET_SIGNAL_ID(sigptr);
u16 signal_id = GET_SIGNAL_ID(sigptr);
/*
* If the signal is a CSR_MA_PACKET_REQUEST ,
......@@ -394,7 +394,7 @@ CsrResult unifi_send_resources_available(card_t *card, const u8 *sigptr)
*/
if (signal_id == CSR_MA_PACKET_REQUEST_ID)
{
CsrUint16 frame_priority;
u16 frame_priority;
CsrUint32 priority_q;
/* Map the frame priority to a traffic queue index. */
......
......@@ -944,7 +944,7 @@ CsrInt32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef)
}
CsrUint32 SigGetFilterPos(CsrUint16 aSigID)
CsrUint32 SigGetFilterPos(u16 aSigID)
{
switch (aSigID)
{
......
......@@ -22,13 +22,13 @@ extern "C" {
typedef CsrInt16 csr_place_holding_type;
typedef CsrUint16 CSR_ASSOCIATION_ID;
typedef u16 CSR_ASSOCIATION_ID;
typedef CsrUint16 CSR_AUTONOMOUS_SCAN_ID;
typedef u16 CSR_AUTONOMOUS_SCAN_ID;
typedef CsrUint16 CSR_BEACON_PERIODS;
typedef u16 CSR_BEACON_PERIODS;
typedef CsrUint16 CSR_BLACKOUT_ID;
typedef u16 CSR_BLACKOUT_ID;
typedef enum CSR_BLACKOUT_SOURCE
{
......@@ -57,9 +57,9 @@ typedef enum CSR_BOOT_LOADER_OPERATION
CSR_BOOT_LOADER_IMAGE_3 = 0x13
} CSR_BOOT_LOADER_OPERATION;
typedef CsrUint16 CSR_CAPABILITY_INFORMATION;
typedef u16 CSR_CAPABILITY_INFORMATION;
typedef CsrUint16 CSR_CHANNEL_STARTING_FACTOR;
typedef u16 CSR_CHANNEL_STARTING_FACTOR;
typedef CsrUint32 CSR_CIPHER_SUITE_SELECTOR;
......@@ -142,11 +142,11 @@ typedef enum CSR_MEMORY_SPACE
CSR_BT_PROCESSOR_ROM = 0x32
} CSR_MEMORY_SPACE;
typedef CsrUint16 CSR_MICROSECONDS16;
typedef u16 CSR_MICROSECONDS16;
typedef CsrUint32 CSR_MICROSECONDS32;
typedef CsrUint16 CSR_NATURAL16;
typedef u16 CSR_NATURAL16;
typedef enum CSR_PS_SCHEME
{
......@@ -161,7 +161,7 @@ typedef enum CSR_PACKET_FILTER_MODE
CSR_PFM_OPT_IN = 0x0003
} CSR_PACKET_FILTER_MODE;
typedef CsrUint16 CSR_PERIODIC_ID;
typedef u16 CSR_PERIODIC_ID;
typedef enum CSR_PERIODIC_SCHEDULING_MODE
{
......@@ -344,9 +344,9 @@ typedef enum CSR_SIGNAL_ID
CSR_DEBUG_GENERIC_INDICATION_ID = 0x080b
} CSR_SIGNAL_ID;
typedef CsrUint16 CSR_SIMPLE_POINTER;
typedef u16 CSR_SIMPLE_POINTER;
typedef CsrUint16 CSR_STARTING_SEQUENCE_NUMBER;
typedef u16 CSR_STARTING_SEQUENCE_NUMBER;
typedef enum CSR_SYMBOL_ID
{
......@@ -377,7 +377,7 @@ typedef struct CSR_TSF_TIME
u8 x[8];
} CSR_TSF_TIME;
typedef CsrUint16 CSR_TIME_UNITS;
typedef u16 CSR_TIME_UNITS;
typedef enum CSR_TRANSMISSION_CONTROL
{
......@@ -405,9 +405,9 @@ typedef enum CSR_TRANSMISSION_STATUS
CSR_TX_REJECTED_DTIM_STARTED = 0x0010
} CSR_TRANSMISSION_STATUS;
typedef CsrUint16 CSR_TRIGGER_ID;
typedef u16 CSR_TRIGGER_ID;
typedef CsrUint16 CSR_TRIGGERED_ID;
typedef u16 CSR_TRIGGERED_ID;
typedef enum CSR_HIP_VERSIONS
{
......@@ -415,17 +415,17 @@ typedef enum CSR_HIP_VERSIONS
CSR_HIP_VERSION = 0x0900
} CSR_HIP_VERSIONS;
typedef CsrUint16 CSR_BUFFER_HANDLE;
typedef u16 CSR_BUFFER_HANDLE;
typedef CsrUint16 CSR_CHANNEL_NUMBER;
typedef u16 CSR_CHANNEL_NUMBER;
typedef struct CSR_DATA_REFERENCE
{
CsrUint16 SlotNumber;
CsrUint16 DataLength;
u16 SlotNumber;
u16 DataLength;
} CSR_DATAREF;
typedef CsrUint16 CSR_DIALOG_TOKEN;
typedef u16 CSR_DIALOG_TOKEN;
typedef struct CSR_GENERIC_POINTER
{
......@@ -574,11 +574,11 @@ typedef struct CSR_MLME_STOP_MEASURE_REQUEST
CSR_DIALOG_TOKEN DialogToken;
} CSR_MLME_STOP_MEASURE_REQUEST;
typedef CsrUint16 CSR_PROCESS_ID;
typedef u16 CSR_PROCESS_ID;
typedef CsrUint16 CSR_RATE;
typedef u16 CSR_RATE;
typedef CsrUint16 CSR_SEQUENCE_NUMBER;
typedef u16 CSR_SEQUENCE_NUMBER;
typedef struct CSR_SIGNAL_PRIMITIVE_HEADER
{
......@@ -587,9 +587,9 @@ typedef struct CSR_SIGNAL_PRIMITIVE_HEADER
CSR_PROCESS_ID SenderProcessId;
} CSR_SIGNAL_PRIMITIVE_HEADER;
typedef CsrUint16 CSR_TRAFFIC_WINDOW;
typedef u16 CSR_TRAFFIC_WINDOW;
typedef CsrUint16 CSR_VIF_IDENTIFIER;
typedef u16 CSR_VIF_IDENTIFIER;
typedef struct CSR_DEBUG_GENERIC_CONFIRM
{
......@@ -1416,7 +1416,7 @@ typedef struct CSR_SIGNAL_PRIMITIVE
#define SIG_FILTER_SIZE 6
CsrUint32 SigGetFilterPos(CsrUint16 aSigID);
CsrUint32 SigGetFilterPos(u16 aSigID);
#ifdef __cplusplus
}
......
......@@ -97,8 +97,8 @@ static enum ta_frame_identity ta_detect_protocol(card_t *card, CsrWifiRouterCtrl
const u8 *sta_macaddr)
{
ta_data_t *tad = &card->ta_sampling;
CsrUint16 proto;
CsrUint16 source_port, dest_port;
u16 proto;
u16 source_port, dest_port;
CsrWifiMacAddress srcAddress;
CsrUint32 snap_hdr, oui_hdr;
......@@ -347,7 +347,7 @@ void unifi_ta_sample(card_t *card,
const u8 *saddr,
const u8 *sta_macaddr,
CsrUint32 timestamp,
CsrUint16 rate)
u16 rate)
{
ta_data_t *tad = &card->ta_sampling;
enum ta_frame_identity identity;
......@@ -530,7 +530,7 @@ CsrResult unifi_ta_configure(card_t *card,
*/
void unifi_ta_classification(card_t *card,
CsrWifiRouterCtrlTrafficType traffic_type,
CsrUint16 period)
u16 period)
{
unifi_trace(card->ospriv, UDBG3,
"Changed current ta classification to: %d\n", traffic_type);
......
......@@ -42,7 +42,7 @@ typedef struct ta_l4stats
typedef struct ta_data
{
/* Current packet filter configuration */
CsrUint16 packet_filter;
u16 packet_filter;
/* Current packet custom filter configuration */
CsrWifiRouterCtrlTrafficFilter custom_filter;
......
......@@ -45,7 +45,7 @@ CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain)
{
CsrCharString *p = str;
sdio_config_data_t *cfg;
CsrUint16 i, n;
u16 i, n;
CsrInt32 remaining = *remain;
CsrInt32 written;
#ifdef CSR_UNSAFE_SDIO_ACCESS
......@@ -65,7 +65,7 @@ CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain)
i = n = 0;
written = CsrSnprintf(p, remaining, "Chip ID %u\n",
(CsrUint16)card->chip_id);
(u16)card->chip_id);
UNIFI_SNPRINTF_RET(p, remaining, written);
written = CsrSnprintf(p, remaining, "Chip Version %04X\n",
card->chip_version);
......@@ -107,7 +107,7 @@ CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain)
/* Added by protocol version 0x0001 */
written = CsrSnprintf(p, remaining, "overlay_size %u\n",
(CsrUint16)cfg->overlay_size);
(u16)cfg->overlay_size);
UNIFI_SNPRINTF_RET(p, remaining, written);
/* Added by protocol version 0x0300 */
......@@ -134,16 +134,16 @@ CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain)
UNIFI_SNPRINTF_RET(p, remaining, written);
written = CsrSnprintf(p, remaining, "fhsr: %u\n",
(CsrUint16)card->from_host_signals_r);
(u16)card->from_host_signals_r);
UNIFI_SNPRINTF_RET(p, remaining, written);
written = CsrSnprintf(p, remaining, "fhsw: %u\n",
(CsrUint16)card->from_host_signals_w);
(u16)card->from_host_signals_w);
UNIFI_SNPRINTF_RET(p, remaining, written);
written = CsrSnprintf(p, remaining, "thsr: %u\n",
(CsrUint16)card->to_host_signals_r);
(u16)card->to_host_signals_r);
UNIFI_SNPRINTF_RET(p, remaining, written);
written = CsrSnprintf(p, remaining, "thsw: %u\n",
(CsrUint16)card->to_host_signals_w);
(u16)card->to_host_signals_w);
UNIFI_SNPRINTF_RET(p, remaining, written);
written = CsrSnprintf(p, remaining,
"fh buffer contains: %u signals, %u bytes\n",
......@@ -189,7 +189,7 @@ CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain)
for (i = 0; i < n && card->from_host_data; i++)
{
written = CsrSnprintf(p, remaining, " %u",
(CsrUint16)card->from_host_data[i].bd.data_length);
(u16)card->from_host_data[i].bd.data_length);
UNIFI_SNPRINTF_RET(p, remaining, written);
}
written = CsrSnprintf(p, remaining, "\n");
......@@ -201,7 +201,7 @@ CsrInt32 unifi_print_status(card_t *card, CsrCharString *str, CsrInt32 *remain)
for (i = 0; i < n && card->to_host_data; i++)
{
written = CsrSnprintf(p, remaining, " %u",
(CsrUint16)card->to_host_data[i].data_length);
(u16)card->to_host_data[i].data_length);
UNIFI_SNPRINTF_RET(p, remaining, written);
}
......
......@@ -148,7 +148,7 @@ typedef struct _bulk_data_desc
/* Structure of an entry in the Symbol Look Up Table (SLUT). */
typedef struct _symbol
{
CsrUint16 id;
u16 id;
CsrUint32 obj;
} symbol_t;
......@@ -194,10 +194,10 @@ typedef struct _bulk_data_param
*/
typedef struct _card_info
{
CsrUint16 chip_id;
CsrUint16 chip_version;
u16 chip_id;
u16 chip_version;
CsrUint32 fw_build;
CsrUint16 fw_hip_version;
u16 fw_hip_version;
CsrUint32 sdio_block_size;
} card_info_t;
......@@ -514,7 +514,7 @@ void unifi_ta_sample(card_t *card,
const u8 *saddr,
const u8 *sta_macaddr,
CsrUint32 timestamp,
CsrUint16 rate);
u16 rate);
/**
* Notify the HIP core lib for a detected Traffic Classification.
......@@ -530,7 +530,7 @@ void unifi_ta_sample(card_t *card,
*/
void unifi_ta_classification(card_t *card,
CsrWifiRouterCtrlTrafficType traffic_type,
CsrUint16 period);
u16 period);
#endif
/**
......@@ -545,9 +545,9 @@ void unifi_ta_classification(card_t *card,
CsrResult unifi_card_hard_reset(card_t *card);
CsrResult unifi_card_readn(card_t *card, CsrUint32 unifi_addr, void *pdata, CsrUint16 len);
CsrResult unifi_card_read16(card_t *card, CsrUint32 unifi_addr, CsrUint16 *pdata);
CsrResult unifi_card_write16(card_t *card, CsrUint32 unifi_addr, CsrUint16 data);
CsrResult unifi_card_readn(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len);
CsrResult unifi_card_read16(card_t *card, CsrUint32 unifi_addr, u16 *pdata);
CsrResult unifi_card_write16(card_t *card, CsrUint32 unifi_addr, u16 data);
enum unifi_dbg_processors_select
......@@ -660,15 +660,15 @@ void unifi_receive_event(void *ospriv,
* @ingroup upperedge
*/
CsrResult unifi_reque_ma_packet_request(void *ospriv, CsrUint32 host_tag,
CsrUint16 status,
u16 status,
bulk_data_desc_t *bulkDataDesc);
#endif
typedef struct
{
CsrUint16 free_fh_sig_queue_slots[UNIFI_NO_OF_TX_QS];
CsrUint16 free_fh_bulkdata_slots;
CsrUint16 free_fh_fw_slots;
u16 free_fh_sig_queue_slots[UNIFI_NO_OF_TX_QS];
u16 free_fh_bulkdata_slots;
u16 free_fh_fw_slots;
} unifi_HipQosInfo;
void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo);
......@@ -859,20 +859,20 @@ void unifi_request_max_sdio_clock(card_t *card);
/* Functions to lookup bulk data command names. */
const CsrCharString* lookup_bulkcmd_name(CsrUint16 id);
const CsrCharString* lookup_bulkcmd_name(u16 id);
/* Function to log HIP's global debug buffer */
#ifdef CSR_WIFI_HIP_DEBUG_OFFLINE
void unifi_debug_buf_dump(void);
void unifi_debug_log_to_buf(const CsrCharString *fmt, ...);
void unifi_debug_hex_to_buf(const CsrCharString *buff, CsrUint16 length);
void unifi_debug_hex_to_buf(const CsrCharString *buff, u16 length);
#endif
/* Mini-coredump utility functions */
CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req);
CsrResult unifi_coredump_capture(card_t *card, struct unifi_coredump_req *req);
CsrResult unifi_coredump_request_at_next_reset(card_t *card, s8 enable);
CsrResult unifi_coredump_init(card_t *card, CsrUint16 num_dump_buffers);
CsrResult unifi_coredump_init(card_t *card, u16 num_dump_buffers);
void unifi_coredump_free(card_t *card);
#ifdef __cplusplus
......
......@@ -29,7 +29,7 @@ static const struct sig_name Unifi_bulkcmd_names[] = {
{ 15, "Padding" }
};
const CsrCharString* lookup_bulkcmd_name(CsrUint16 id)
const CsrCharString* lookup_bulkcmd_name(u16 id)
{
if (id < 9)
{
......
......@@ -99,7 +99,7 @@ static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
xbv_container new_cont, CsrUint32 ioff);
static CsrUint32 write_uint16(void *buf, const CsrUint32 offset,
const CsrUint16 val);
const u16 val);
static CsrUint32 write_uint32(void *buf, const CsrUint32 offset,
const CsrUint32 val);
static CsrUint32 write_bytes(void *buf, const CsrUint32 offset,
......@@ -109,7 +109,7 @@ static CsrUint32 write_tag(void *buf, const CsrUint32 offset,
static CsrUint32 write_chunk(void *buf, const CsrUint32 offset,
const CsrCharString *tag_str,
const CsrUint32 payload_len);
static CsrUint16 calc_checksum(void *buf, const CsrUint32 offset,
static u16 calc_checksum(void *buf, const CsrUint32 offset,
const CsrUint32 bytes_len);
static CsrUint32 calc_patch_size(const xbv1_t *fwinfo);
......@@ -118,7 +118,7 @@ static CsrUint32 write_xbv_header(void *buf, const CsrUint32 offset,
static CsrUint32 write_ptch_header(void *buf, const CsrUint32 offset,
const CsrUint32 fw_id);
static CsrUint32 write_patchcmd(void *buf, const CsrUint32 offset,
const CsrUint32 dst_genaddr, const CsrUint16 len);
const CsrUint32 dst_genaddr, const u16 len);
static CsrUint32 write_reset_ptdl(void *buf, const CsrUint32 offset,
const xbv1_t *fwinfo, CsrUint32 fw_id);
static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset,
......@@ -361,8 +361,8 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
/* Fill in the VMEQ */
vmeq->addr = temp[0];
vmeq->mask = (CsrUint16)temp[1];
vmeq->value = (CsrUint16)temp[2];
vmeq->mask = (u16)temp[1];
vmeq->value = (u16)temp[2];
}
else if (TAG_EQ(tag.t_name, "FWID"))
{
......@@ -568,19 +568,19 @@ static CsrInt32 read_uint(card_t *card, ct_t *ct, CsrUint32 *u, CsrUint32 len)
} /* read_uint() */
static CsrUint32 write_uint16(void *buf, const CsrUint32 offset, const CsrUint16 val)
static CsrUint32 write_uint16(void *buf, const CsrUint32 offset, const u16 val)
{
u8 *dst = (u8 *)buf + offset;
*dst++ = (u8)(val & 0xff); /* LSB first */
*dst = (u8)(val >> 8);
return sizeof(CsrUint16);
return sizeof(u16);
}
static CsrUint32 write_uint32(void *buf, const CsrUint32 offset, const CsrUint32 val)
{
(void)write_uint16(buf, offset + 0, (CsrUint16)(val & 0xffff));
(void)write_uint16(buf, offset + 2, (CsrUint16)(val >> 16));
(void)write_uint16(buf, offset + 0, (u16)(val & 0xffff));
(void)write_uint16(buf, offset + 2, (u16)(val >> 16));
return sizeof(CsrUint32);
}
......@@ -616,18 +616,18 @@ static CsrUint32 write_chunk(void *buf, const CsrUint32 offset, const CsrCharStr
}
static CsrUint16 calc_checksum(void *buf, const CsrUint32 offset, const CsrUint32 bytes_len)
static u16 calc_checksum(void *buf, const CsrUint32 offset, const CsrUint32 bytes_len)
{
CsrUint32 i;
u8 *src = (u8 *)buf + offset;
CsrUint16 sum = 0;
CsrUint16 val;
u16 sum = 0;
u16 val;
for (i = 0; i < bytes_len / 2; i++)
{
/* Contents copied to file is LE, host might not be */
val = (CsrUint16) * src++; /* LSB */
val += (CsrUint16)(*src++) << 8; /* MSB */
val = (u16) * src++; /* LSB */
val += (u16)(*src++) << 8; /* MSB */
sum += val;
}
......@@ -711,11 +711,11 @@ static CsrUint32 write_ptch_header(void *buf, const CsrUint32 offset, const CsrU
#define UF_MEMPUT_MAC 0x0000
#define UF_MEMPUT_PHY 0x1000
static CsrUint32 write_patchcmd(void *buf, const CsrUint32 offset, const CsrUint32 dst_genaddr, const CsrUint16 len)
static CsrUint32 write_patchcmd(void *buf, const CsrUint32 offset, const CsrUint32 dst_genaddr, const u16 len)
{
CsrUint32 written = 0;
CsrUint32 region = (dst_genaddr >> 28);
CsrUint16 cmd_and_len = UF_MEMPUT_MAC;
u16 cmd_and_len = UF_MEMPUT_MAC;
if (region == UF_REGION_PHY)
{
......@@ -731,8 +731,8 @@ static CsrUint32 write_patchcmd(void *buf, const CsrUint32 offset, const CsrUint
written += write_uint16(buf, offset + written, cmd_and_len);
/* Write the destination generic address */
written += write_uint16(buf, offset + written, (CsrUint16)(dst_genaddr >> 16));
written += write_uint16(buf, offset + written, (CsrUint16)(dst_genaddr & 0xffff));
written += write_uint16(buf, offset + written, (u16)(dst_genaddr >> 16));
written += write_uint16(buf, offset + written, (u16)(dst_genaddr & 0xffff));
/* The data payload should be appended to the command */
return written;
......@@ -748,7 +748,7 @@ static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset, fwreadfn_
CsrUint32 left = fwdl->dl_size; /* Bytes left in this fwdl */
CsrUint32 dl_addr = fwdl->dl_addr; /* Target address of fwdl image on XAP */
CsrUint32 dl_offs = fwdl->dl_offset; /* Offset of fwdl image data in source */
CsrUint16 csum;
u16 csum;
CsrUint32 csum_start_offs; /* first offset to include in checksum */
CsrUint32 sec_data_len; /* section data byte count */
CsrUint32 sec_len; /* section data + header byte count */
......@@ -768,15 +768,15 @@ static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset, fwreadfn_
csum_start_offs = offset + written;
/* Patch-chunk header: fw_id. Note that this is in XAP word order */
written += write_uint16(buf, offset + written, (CsrUint16)(fw_id >> 16));
written += write_uint16(buf, offset + written, (CsrUint16)(fw_id & 0xffff));
written += write_uint16(buf, offset + written, (u16)(fw_id >> 16));
written += write_uint16(buf, offset + written, (u16)(fw_id & 0xffff));
/* Patch-chunk header: section length in uint16s */
written += write_uint16(buf, offset + written, (CsrUint16)(sec_len / 2));
written += write_uint16(buf, offset + written, (u16)(sec_len / 2));
/* Write the appropriate patch command for the data's destination ptr */
written += write_patchcmd(buf, offset + written, dl_addr, (CsrUint16)(sec_data_len / 2));
written += write_patchcmd(buf, offset + written, dl_addr, (u16)(sec_data_len / 2));
/* Write the data itself (limited to the max chunk length) */
if (readfn(NULL, (void *)dlpriv, dl_offs, fw_buf, sec_data_len) < 0)
......@@ -789,7 +789,7 @@ static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset, fwreadfn_
fw_buf,
sec_data_len);
/* CsrUint16 checksum calculated over data written */
/* u16 checksum calculated over data written */
csum = calc_checksum(buf, csum_start_offs, written - (csum_start_offs - offset));
written += write_uint16(buf, offset + written, csum);
......@@ -813,7 +813,7 @@ static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset, fwreadfn_
static CsrUint32 write_reset_ptdl(void *buf, const CsrUint32 offset, const xbv1_t *fwinfo, CsrUint32 fw_id)
{
CsrUint32 written = 0;
CsrUint16 csum;
u16 csum;
CsrUint32 csum_start_offs; /* first offset to include in checksum */
CsrUint32 sec_len; /* section data + header byte count */
......@@ -826,11 +826,11 @@ static CsrUint32 write_reset_ptdl(void *buf, const CsrUint32 offset, const xbv1_
csum_start_offs = offset + written;
/* Patch-chunk header: fw_id. Note that this is in XAP word order */
written += write_uint16(buf, offset + written, (CsrUint16)(fw_id >> 16));
written += write_uint16(buf, offset + written, (CsrUint16)(fw_id & 0xffff));
written += write_uint16(buf, offset + written, (u16)(fw_id >> 16));
written += write_uint16(buf, offset + written, (u16)(fw_id & 0xffff));
/* Patch-chunk header: section length in uint16s */
written += write_uint16(buf, offset + written, (CsrUint16)(sec_len / 2));
written += write_uint16(buf, offset + written, (u16)(sec_len / 2));
/*
* Restart addresses to be executed on subsequent loader restart command.
......@@ -846,7 +846,7 @@ static CsrUint32 write_reset_ptdl(void *buf, const CsrUint32 offset, const xbv1_
written += write_uint16(buf, offset + written, (UF_PHY_START_VEC >> 16));
written += write_uint16(buf, offset + written, (UF_PHY_START_VEC & 0xffff));
/* CsrUint16 checksum calculated over data written */
/* u16 checksum calculated over data written */
csum = calc_checksum(buf, csum_start_offs, written - (csum_start_offs - offset));
written += write_uint16(buf, offset + written, csum);
......@@ -936,7 +936,7 @@ CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *f
return -1;
}
slut[count].id = (CsrUint16)id;
slut[count].id = (u16)id;
slut[count].obj = obj;
count++;
}
......
......@@ -34,8 +34,8 @@ extern "C" {
struct VMEQ
{
CsrUint32 addr;
CsrUint16 mask;
CsrUint16 value;
u16 mask;
u16 value;
};
struct VAND
......
......@@ -39,7 +39,7 @@ extern "C" {
* Allocates and fills in a message with the signature CsrWifiEvent
*
*----------------------------------------------------------------------------*/
CsrWifiFsmEvent* CsrWifiEvent_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrSchedQid dst, CsrSchedQid src);
CsrWifiFsmEvent* CsrWifiEvent_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src);
typedef struct
{
......@@ -55,12 +55,12 @@ typedef struct
* Allocates and fills in a message with the signature CsrWifiEventCsrUint8
*
*----------------------------------------------------------------------------*/
CsrWifiEventCsrUint8* CsrWifiEventCsrUint8_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrSchedQid dst, CsrSchedQid src, u8 value);
CsrWifiEventCsrUint8* CsrWifiEventCsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u8 value);
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 value;
u16 value;
} CsrWifiEventCsrUint16;
/*----------------------------------------------------------------------------*
......@@ -71,7 +71,7 @@ typedef struct
* Allocates and fills in a message with the signature CsrWifiEventCsrUint16
*
*----------------------------------------------------------------------------*/
CsrWifiEventCsrUint16* CsrWifiEventCsrUint16_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrSchedQid dst, CsrSchedQid src, CsrUint16 value);
CsrWifiEventCsrUint16* CsrWifiEventCsrUint16_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value);
typedef struct
{
......@@ -87,12 +87,12 @@ typedef struct
* Allocates and fills in a message with the signature CsrWifiEventCsrUint32
*
*----------------------------------------------------------------------------*/
CsrWifiEventCsrUint32* CsrWifiEventCsrUint32_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrSchedQid dst, CsrSchedQid src, CsrUint32 value);
CsrWifiEventCsrUint32* CsrWifiEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, CsrUint32 value);
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 value16;
u16 value16;
u8 value8;
} CsrWifiEventCsrUint16CsrUint8;
......@@ -104,7 +104,7 @@ typedef struct
* Allocates and fills in a message with the signature CsrWifiEventCsrUint16CsrUint8
*
*----------------------------------------------------------------------------*/
CsrWifiEventCsrUint16CsrUint8* CsrWifiEventCsrUint16CsrUint8_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrSchedQid dst, CsrSchedQid src, CsrUint16 value16, u8 value8);
CsrWifiEventCsrUint16CsrUint8* CsrWifiEventCsrUint16CsrUint8_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u16 value16, u8 value8);
#ifdef __cplusplus
}
......
......@@ -21,11 +21,11 @@ extern "C" {
#endif
void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, CsrUint16 v);
void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v);
void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v);
void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v);
void CsrUint16DesBigEndian(CsrUint16 *v, u8 *buffer, CsrSize *offset);
void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset);
void CsrUint24DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset);
void CsrUint32DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset);
......
......@@ -43,11 +43,11 @@ static CsrMsgConvMsgEntry csrwifinmeap_conv_lut[] = {
{ 0, NULL, NULL, NULL, NULL },
};
CsrMsgConvMsgEntry* CsrWifiNmeApConverterLookup(CsrMsgConvMsgEntry *ce, CsrUint16 msgType)
CsrMsgConvMsgEntry* CsrWifiNmeApConverterLookup(CsrMsgConvMsgEntry *ce, u16 msgType)
{
if (msgType & CSR_PRIM_UPSTREAM)
{
CsrUint16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_COUNT;
u16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_COUNT;
if (idx < (CSR_WIFI_NME_AP_PRIM_UPSTREAM_COUNT + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_COUNT) &&
csrwifinmeap_conv_lut[idx].msgType == msgType)
{
......
......@@ -25,7 +25,7 @@
* eventClass: only the value CSR_WIFI_NME_AP_PRIM will be handled
* message: the message to free
*----------------------------------------------------------------------------*/
void CsrWifiNmeApFreeDownstreamMessageContents(CsrUint16 eventClass, void *message)
void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message)
{
if (eventClass != CSR_WIFI_NME_AP_PRIM)
{
......@@ -65,7 +65,7 @@ void CsrWifiNmeApFreeDownstreamMessageContents(CsrUint16 eventClass, void *messa
break;
}
{
CsrUint16 i3;
u16 i3;
for (i3 = 0; i3 < p->p2pGoParam.operatingChanList.channelEntryListCount; i3++)
{
CsrPmemFree(p->p2pGoParam.operatingChanList.channelEntryList[i3].operatingChannel);
......
......@@ -25,7 +25,7 @@
* eventClass: only the value CSR_WIFI_NME_AP_PRIM will be handled
* message: the message to free
*----------------------------------------------------------------------------*/
void CsrWifiNmeApFreeUpstreamMessageContents(CsrUint16 eventClass, void *message)
void CsrWifiNmeApFreeUpstreamMessageContents(u16 eventClass, void *message)
{
if (eventClass != CSR_WIFI_NME_AP_PRIM)
{
......
......@@ -46,7 +46,7 @@ extern "C" {
* PARAMETERS
* Deallocates the resources in a CSR_WIFI_NME_AP upstream message
*----------------------------------------------------------------------------*/
void CsrWifiNmeApFreeUpstreamMessageContents(CsrUint16 eventClass, void *message);
void CsrWifiNmeApFreeUpstreamMessageContents(u16 eventClass, void *message);
/*----------------------------------------------------------------------------*
* CsrWifiNmeApFreeDownstreamMessageContents
......@@ -58,7 +58,7 @@ void CsrWifiNmeApFreeUpstreamMessageContents(CsrUint16 eventClass, void *message
* PARAMETERS
* Deallocates the resources in a CSR_WIFI_NME_AP downstream message
*----------------------------------------------------------------------------*/
void CsrWifiNmeApFreeDownstreamMessageContents(CsrUint16 eventClass, void *message);
void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message);
/*----------------------------------------------------------------------------*
* Enum to string functions
......
......@@ -77,10 +77,10 @@ typedef u8 CsrWifiNmeApPersCredentialType;
*******************************************************************************/
typedef struct
{
CsrUint16 apGroupkeyTimeout;
u16 apGroupkeyTimeout;
CsrBool apStrictGtkRekey;
CsrUint16 apGmkTimeout;
CsrUint16 apResponseTimeout;
u16 apGmkTimeout;
u16 apResponseTimeout;
u8 apRetransLimit;
} CsrWifiNmeApConfig;
......@@ -222,7 +222,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrWifiSmeWpsDpid selectedDevicePasswordId;
CsrWifiSmeWpsConfigType selectedConfigMethod;
u8 pin[8];
......@@ -254,7 +254,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrWifiSmeApType apType;
CsrBool cloakSsid;
CsrWifiSsid ssid;
......@@ -282,7 +282,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
} CsrWifiNmeApStopReq;
/*******************************************************************************
......@@ -332,7 +332,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrWifiMacAddress staMacAddress;
CsrBool keepBlocking;
} CsrWifiNmeApStaRemoveReq;
......@@ -373,7 +373,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrResult status;
} CsrWifiNmeApWpsRegisterCfm;
......@@ -395,7 +395,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrResult status;
CsrWifiSsid ssid;
} CsrWifiNmeApStartCfm;
......@@ -419,7 +419,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrResult status;
} CsrWifiNmeApStopCfm;
......@@ -443,7 +443,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrWifiSmeApType apType;
CsrResult status;
} CsrWifiNmeApStopInd;
......@@ -488,7 +488,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrWifiSmeMediaStatus mediaStatus;
CsrWifiMacAddress peerMacAddress;
CsrWifiMacAddress peerDeviceAddress;
......
......@@ -43,7 +43,7 @@ extern "C" {
* PARAMETERS
* Deallocates the resources in a CSR_WIFI_NME upstream message
*----------------------------------------------------------------------------*/
void CsrWifiNmeFreeUpstreamMessageContents(CsrUint16 eventClass, void *message);
void CsrWifiNmeFreeUpstreamMessageContents(u16 eventClass, void *message);
/*----------------------------------------------------------------------------*
* CsrWifiNmeFreeDownstreamMessageContents
......@@ -55,7 +55,7 @@ void CsrWifiNmeFreeUpstreamMessageContents(CsrUint16 eventClass, void *message);
* PARAMETERS
* Deallocates the resources in a CSR_WIFI_NME downstream message
*----------------------------------------------------------------------------*/
void CsrWifiNmeFreeDownstreamMessageContents(CsrUint16 eventClass, void *message);
void CsrWifiNmeFreeDownstreamMessageContents(u16 eventClass, void *message);
/*----------------------------------------------------------------------------*
* Enum to string functions
......
......@@ -67,7 +67,7 @@ typedef void (*CsrWifiNmeFrameFreeFunction)(void *frame);
- For future use.
*******************************************************************************/
typedef CsrUint16 CsrWifiNmeAuthMode;
typedef u16 CsrWifiNmeAuthMode;
#define CSR_WIFI_NME_AUTH_MODE_80211_OPEN ((CsrWifiNmeAuthMode) 0x0001)
#define CSR_WIFI_NME_AUTH_MODE_80211_SHARED ((CsrWifiNmeAuthMode) 0x0002)
#define CSR_WIFI_NME_AUTH_MODE_8021X_WPA ((CsrWifiNmeAuthMode) 0x0004)
......@@ -204,7 +204,7 @@ typedef u8 CsrWifiNmeConnectionStatus;
FAST/LEAP/TLS/TTLS/PEAP/etc.
*******************************************************************************/
typedef CsrUint16 CsrWifiNmeCredentialType;
typedef u16 CsrWifiNmeCredentialType;
#define CSR_WIFI_NME_CREDENTIAL_TYPE_OPEN_SYSTEM ((CsrWifiNmeCredentialType) 0x0000)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WEP64 ((CsrWifiNmeCredentialType) 0x0001)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WEP128 ((CsrWifiNmeCredentialType) 0x0002)
......@@ -246,7 +246,7 @@ typedef CsrUint16 CsrWifiNmeCredentialType;
- EAP-LEAP Method.
*******************************************************************************/
typedef CsrUint16 CsrWifiNmeEapMethod;
typedef u16 CsrWifiNmeEapMethod;
#define CSR_WIFI_NME_EAP_METHOD_TLS ((CsrWifiNmeEapMethod) 0x0001)
#define CSR_WIFI_NME_EAP_METHOD_TTLS_MSCHAPV2 ((CsrWifiNmeEapMethod) 0x0002)
#define CSR_WIFI_NME_EAP_METHOD_PEAP_GTC ((CsrWifiNmeEapMethod) 0x0004)
......@@ -290,7 +290,7 @@ typedef CsrUint16 CsrWifiNmeEapMethod;
- SMS4 key for broadcast messages.
*******************************************************************************/
typedef CsrUint16 CsrWifiNmeEncryption;
typedef u16 CsrWifiNmeEncryption;
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_NONE ((CsrWifiNmeEncryption) 0x0000)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_WEP40 ((CsrWifiNmeEncryption) 0x0001)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_WEP104 ((CsrWifiNmeEncryption) 0x0002)
......@@ -469,7 +469,7 @@ typedef u8 CsrWifiNmeWmmQosInfo;
Mask type for use with the values defined by CsrWifiNmeEapMethod.
*******************************************************************************/
typedef CsrUint16 CsrWifiNmeEapMethodMask;
typedef u16 CsrWifiNmeEapMethodMask;
/*******************************************************************************
NAME
......@@ -479,7 +479,7 @@ typedef CsrUint16 CsrWifiNmeEapMethodMask;
Mask type for use with the values defined by CsrWifiNmeEncryption
*******************************************************************************/
typedef CsrUint16 CsrWifiNmeEncryptionMask;
typedef u16 CsrWifiNmeEncryptionMask;
/*******************************************************************************
NAME
......@@ -546,7 +546,7 @@ typedef struct
*******************************************************************************/
typedef struct
{
CsrUint16 encryptionMode;
u16 encryptionMode;
CsrCharString *passphrase;
} CsrWifiNmePassphrase;
......@@ -565,7 +565,7 @@ typedef struct
*******************************************************************************/
typedef struct
{
CsrUint16 encryptionMode;
u16 encryptionMode;
u8 psk[32];
} CsrWifiNmePsk;
......@@ -596,7 +596,7 @@ typedef struct
{
CsrUint32 certificateLength;
u8 *certificate;
CsrUint16 privateKeyLength;
u16 privateKeyLength;
u8 *privateKey;
CsrUint32 caCertificateLength;
u8 *caCertificate;
......@@ -715,7 +715,7 @@ typedef struct
u8 *clientCertificate;
CsrUint32 certificateAuthorityCertificateLength;
u8 *certificateAuthorityCertificate;
CsrUint16 privateKeyLength;
u16 privateKeyLength;
u8 *privateKey;
CsrCharString *privateKeyPassword;
CsrUint32 sessionLength;
......@@ -1035,7 +1035,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
u8 profileIdentitysCount;
CsrWifiNmeProfileIdentity *profileIdentitys;
} CsrWifiNmeProfileOrderSetReq;
......@@ -1059,7 +1059,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrWifiNmeProfileIdentity profileIdentity;
} CsrWifiNmeProfileConnectReq;
......@@ -1087,7 +1087,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
u8 pin[8];
CsrWifiSsid ssid;
CsrWifiMacAddress bssid;
......@@ -1111,7 +1111,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
} CsrWifiNmeWpsCancelReq;
/*******************************************************************************
......@@ -1130,7 +1130,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
} CsrWifiNmeConnectionStatusGetReq;
/*******************************************************************************
......@@ -1361,7 +1361,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrResult status;
} CsrWifiNmeProfileOrderSetCfm;
......@@ -1397,7 +1397,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrResult status;
u8 connectAttemptsCount;
CsrWifiNmeConnectAttempt *connectAttempts;
......@@ -1426,7 +1426,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrResult status;
CsrWifiNmeProfile profile;
} CsrWifiNmeWpsCfm;
......@@ -1448,7 +1448,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrResult status;
} CsrWifiNmeWpsCancelCfm;
......@@ -1471,7 +1471,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrResult status;
CsrWifiNmeConnectionStatus connectionStatus;
} CsrWifiNmeConnectionStatusGetCfm;
......@@ -1499,7 +1499,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
CsrWifiNmeProfile profile;
} CsrWifiNmeProfileUpdateInd;
......@@ -1531,7 +1531,7 @@ typedef struct
typedef struct
{
CsrWifiFsmEvent common;
CsrUint16 interfaceTag;
u16 interfaceTag;
u8 connectAttemptsCount;
CsrWifiNmeConnectAttempt *connectAttempts;
} CsrWifiNmeProfileDisconnectInd;
......
......@@ -37,11 +37,11 @@ static CsrMsgConvMsgEntry csrwifirouter_conv_lut[] = {
{ 0, NULL, NULL, NULL, NULL },
};
CsrMsgConvMsgEntry* CsrWifiRouterConverterLookup(CsrMsgConvMsgEntry *ce, CsrUint16 msgType)
CsrMsgConvMsgEntry* CsrWifiRouterConverterLookup(CsrMsgConvMsgEntry *ce, u16 msgType)
{
if (msgType & CSR_PRIM_UPSTREAM)
{
CsrUint16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_COUNT;
u16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_COUNT;
if (idx < (CSR_WIFI_ROUTER_PRIM_UPSTREAM_COUNT + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_COUNT) &&
csrwifirouter_conv_lut[idx].msgType == msgType)
{
......
......@@ -90,11 +90,11 @@ static CsrMsgConvMsgEntry csrwifirouterctrl_conv_lut[] = {
{ 0, NULL, NULL, NULL, NULL },
};
CsrMsgConvMsgEntry* CsrWifiRouterCtrlConverterLookup(CsrMsgConvMsgEntry *ce, CsrUint16 msgType)
CsrMsgConvMsgEntry* CsrWifiRouterCtrlConverterLookup(CsrMsgConvMsgEntry *ce, u16 msgType)
{
if (msgType & CSR_PRIM_UPSTREAM)
{
CsrUint16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_ROUTER_CTRL_PRIM_DOWNSTREAM_COUNT;
u16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_ROUTER_CTRL_PRIM_DOWNSTREAM_COUNT;
if (idx < (CSR_WIFI_ROUTER_CTRL_PRIM_UPSTREAM_COUNT + CSR_WIFI_ROUTER_CTRL_PRIM_DOWNSTREAM_COUNT) &&
csrwifirouterctrl_conv_lut[idx].msgType == msgType)
{
......
......@@ -25,7 +25,7 @@
* eventClass: only the value CSR_WIFI_ROUTER_CTRL_PRIM will be handled
* message: the message to free
*----------------------------------------------------------------------------*/
void CsrWifiRouterCtrlFreeDownstreamMessageContents(CsrUint16 eventClass, void *message)
void CsrWifiRouterCtrlFreeDownstreamMessageContents(u16 eventClass, void *message)
{
if (eventClass != CSR_WIFI_ROUTER_CTRL_PRIM)
{
......
......@@ -25,7 +25,7 @@
* eventClass: only the value CSR_WIFI_ROUTER_CTRL_PRIM will be handled
* message: the message to free
*----------------------------------------------------------------------------*/
void CsrWifiRouterCtrlFreeUpstreamMessageContents(CsrUint16 eventClass, void *message)
void CsrWifiRouterCtrlFreeUpstreamMessageContents(u16 eventClass, void *message)
{
if (eventClass != CSR_WIFI_ROUTER_CTRL_PRIM)
{
......
......@@ -39,7 +39,7 @@ extern "C" {
* PARAMETERS
* Deallocates the resources in a CSR_WIFI_ROUTER_CTRL upstream message
*----------------------------------------------------------------------------*/
void CsrWifiRouterCtrlFreeUpstreamMessageContents(CsrUint16 eventClass, void *message);
void CsrWifiRouterCtrlFreeUpstreamMessageContents(u16 eventClass, void *message);
/*----------------------------------------------------------------------------*
* CsrWifiRouterCtrlFreeDownstreamMessageContents
......@@ -51,7 +51,7 @@ void CsrWifiRouterCtrlFreeUpstreamMessageContents(CsrUint16 eventClass, void *me
* PARAMETERS
* Deallocates the resources in a CSR_WIFI_ROUTER_CTRL downstream message
*----------------------------------------------------------------------------*/
void CsrWifiRouterCtrlFreeDownstreamMessageContents(CsrUint16 eventClass, void *message);
void CsrWifiRouterCtrlFreeDownstreamMessageContents(u16 eventClass, void *message);
/*----------------------------------------------------------------------------*
* Enum to string functions
......
......@@ -25,7 +25,7 @@
* eventClass: only the value CSR_WIFI_ROUTER_PRIM will be handled
* message: the message to free
*----------------------------------------------------------------------------*/
void CsrWifiRouterFreeDownstreamMessageContents(CsrUint16 eventClass, void *message)
void CsrWifiRouterFreeDownstreamMessageContents(u16 eventClass, void *message)
{
if (eventClass != CSR_WIFI_ROUTER_PRIM)
{
......
......@@ -25,7 +25,7 @@
* eventClass: only the value CSR_WIFI_ROUTER_PRIM will be handled
* message: the message to free
*----------------------------------------------------------------------------*/
void CsrWifiRouterFreeUpstreamMessageContents(CsrUint16 eventClass, void *message)
void CsrWifiRouterFreeUpstreamMessageContents(u16 eventClass, void *message)
{
if (eventClass != CSR_WIFI_ROUTER_PRIM)
{
......
......@@ -39,7 +39,7 @@ extern "C" {
* PARAMETERS
* Deallocates the resources in a CSR_WIFI_ROUTER upstream message
*----------------------------------------------------------------------------*/
void CsrWifiRouterFreeUpstreamMessageContents(CsrUint16 eventClass, void *message);
void CsrWifiRouterFreeUpstreamMessageContents(u16 eventClass, void *message);
/*----------------------------------------------------------------------------*
* CsrWifiRouterFreeDownstreamMessageContents
......@@ -51,7 +51,7 @@ void CsrWifiRouterFreeUpstreamMessageContents(CsrUint16 eventClass, void *messag
* PARAMETERS
* Deallocates the resources in a CSR_WIFI_ROUTER downstream message
*----------------------------------------------------------------------------*/
void CsrWifiRouterFreeDownstreamMessageContents(CsrUint16 eventClass, void *message);
void CsrWifiRouterFreeDownstreamMessageContents(u16 eventClass, void *message);
/*----------------------------------------------------------------------------*
* Enum to string functions
......
This diff is collapsed.
......@@ -64,10 +64,10 @@ void CsrWifiRouterTransportDeinit(unifi_priv_t *priv)
void CsrWifiRouterTransportRecv(unifi_priv_t *priv, u8* buffer, CsrSize bufferLength)
{
CsrMsgConvMsgEntry* msgEntry;
CsrUint16 primType;
u16 primType;
CsrSchedQid src;
CsrSchedQid dest;
CsrUint16 msgType;
u16 msgType;
CsrSize offset = 0;
CsrWifiFsmEvent* msg;
......@@ -96,13 +96,13 @@ void CsrWifiRouterTransportRecv(unifi_priv_t *priv, u8* buffer, CsrSize bufferLe
if (req.dataRef1Length)
{
CsrUint16 dr1Offset = (bufferLength - req.dataRef2Length) - req.dataRef1Length;
u16 dr1Offset = (bufferLength - req.dataRef2Length) - req.dataRef1Length;
req.dataRef1 = &buffer[dr1Offset];
}
if (req.dataRef2Length)
{
CsrUint16 dr2Offset = bufferLength - req.dataRef2Length;
u16 dr2Offset = bufferLength - req.dataRef2Length;
req.dataRef2 = &buffer[dr2Offset];
}
......@@ -159,7 +159,7 @@ void CsrWifiRouterTransportRecv(unifi_priv_t *priv, u8* buffer, CsrSize bufferLe
CsrPmemFree(msg);
}
static void CsrWifiRouterTransportSerialiseAndSend(CsrUint16 primType, void* msg)
static void CsrWifiRouterTransportSerialiseAndSend(u16 primType, void* msg)
{
CsrWifiFsmEvent* evt = (CsrWifiFsmEvent*)msg;
CsrMsgConvMsgEntry* msgEntry;
......@@ -198,9 +198,9 @@ static void CsrWifiRouterTransportSerialiseAndSend(CsrUint16 primType, void* msg
}
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
void CsrSchedMessagePutStringLog(CsrSchedQid q, CsrUint16 mi, void *mv, CsrUint32 line, CsrCharString *file)
void CsrSchedMessagePutStringLog(CsrSchedQid q, u16 mi, void *mv, CsrUint32 line, CsrCharString *file)
#else
void CsrSchedMessagePut(CsrSchedQid q, CsrUint16 mi, void *mv)
void CsrSchedMessagePut(CsrSchedQid q, u16 mi, void *mv)
#endif
{
CsrWifiFsmEvent* evt = (CsrWifiFsmEvent*)mv;
......
This diff is collapsed.
This diff is collapsed.
......@@ -156,11 +156,11 @@ static CsrMsgConvMsgEntry csrwifisme_conv_lut[] = {
{ 0, NULL, NULL, NULL, NULL },
};
CsrMsgConvMsgEntry* CsrWifiSmeConverterLookup(CsrMsgConvMsgEntry *ce, CsrUint16 msgType)
CsrMsgConvMsgEntry* CsrWifiSmeConverterLookup(CsrMsgConvMsgEntry *ce, u16 msgType)
{
if (msgType & CSR_PRIM_UPSTREAM)
{
CsrUint16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_SME_PRIM_DOWNSTREAM_COUNT;
u16 idx = (msgType & ~CSR_PRIM_UPSTREAM) + CSR_WIFI_SME_PRIM_DOWNSTREAM_COUNT;
if (idx < (CSR_WIFI_SME_PRIM_UPSTREAM_COUNT + CSR_WIFI_SME_PRIM_DOWNSTREAM_COUNT) &&
csrwifisme_conv_lut[idx].msgType == msgType)
{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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