staging: csr: remove CsrUint32 typedef
Use the in-kernel u32 type instead. Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ab2b8c7383
commit
26a6b2e168
|
@ -227,7 +227,7 @@ bh_thread_function(void *arg)
|
||||||
unifi_priv_t *priv = (unifi_priv_t*)arg;
|
unifi_priv_t *priv = (unifi_priv_t*)arg;
|
||||||
CsrResult csrResult;
|
CsrResult csrResult;
|
||||||
long ret;
|
long ret;
|
||||||
CsrUint32 timeout, t;
|
u32 timeout, t;
|
||||||
struct uf_thread *this_thread;
|
struct uf_thread *this_thread;
|
||||||
|
|
||||||
unifi_trace(priv, UDBG2, "bh_thread_function starting\n");
|
unifi_trace(priv, UDBG2, "bh_thread_function starting\n");
|
||||||
|
|
|
@ -66,7 +66,7 @@ CsrResult CsrEventCreate(CsrEventHandle *eventHandle);
|
||||||
* CSR_FE_RESULT_INVALID_POINTER in case the eventBits pointer is invalid
|
* CSR_FE_RESULT_INVALID_POINTER in case the eventBits pointer is invalid
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrResult CsrEventWait(CsrEventHandle *eventHandle, u16 timeoutInMs, CsrUint32 *eventBits);
|
CsrResult CsrEventWait(CsrEventHandle *eventHandle, u16 timeoutInMs, u32 *eventBits);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
* NAME
|
* NAME
|
||||||
|
@ -81,7 +81,7 @@ CsrResult CsrEventWait(CsrEventHandle *eventHandle, u16 timeoutInMs, CsrUint32 *
|
||||||
* CSR_FE_RESULT_INVALID_HANDLE in case the eventHandle is invalid
|
* CSR_FE_RESULT_INVALID_HANDLE in case the eventHandle is invalid
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrResult CsrEventSet(CsrEventHandle *eventHandle, CsrUint32 eventBits);
|
CsrResult CsrEventSet(CsrEventHandle *eventHandle, u32 eventBits);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
* NAME
|
* NAME
|
||||||
|
@ -195,7 +195,7 @@ void CsrGlobalMutexUnlock(void);
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrResult CsrThreadCreate(void (*threadFunction)(void *pointer), void *pointer,
|
CsrResult CsrThreadCreate(void (*threadFunction)(void *pointer), void *pointer,
|
||||||
CsrUint32 stackSize, u16 priority,
|
u32 stackSize, u16 priority,
|
||||||
const CsrCharString *threadName, CsrThreadHandle *threadHandle);
|
const CsrCharString *threadName, CsrThreadHandle *threadHandle);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
|
@ -257,7 +257,7 @@ void CsrThreadSleep(u16 sleepTimeInMs);
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
#ifdef CSR_MEM_DEBUG
|
#ifdef CSR_MEM_DEBUG
|
||||||
void *CsrMemAllocDebug(CsrSize size,
|
void *CsrMemAllocDebug(CsrSize size,
|
||||||
const CsrCharString *file, CsrUint32 line);
|
const CsrCharString *file, u32 line);
|
||||||
#define CsrMemAlloc(sz) CsrMemAllocDebug((sz), __FILE__, __LINE__)
|
#define CsrMemAlloc(sz) CsrMemAllocDebug((sz), __FILE__, __LINE__)
|
||||||
#else
|
#else
|
||||||
void *CsrMemAlloc(CsrSize size);
|
void *CsrMemAlloc(CsrSize size);
|
||||||
|
@ -278,7 +278,7 @@ void *CsrMemAlloc(CsrSize size);
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
#ifdef CSR_MEM_DEBUG
|
#ifdef CSR_MEM_DEBUG
|
||||||
void *CsrMemCallocDebug(CsrSize numberOfElements, CsrSize elementSize,
|
void *CsrMemCallocDebug(CsrSize numberOfElements, CsrSize elementSize,
|
||||||
const CsrCharString *file, CsrUint32 line);
|
const CsrCharString *file, u32 line);
|
||||||
#define CsrMemCalloc(cnt, sz) CsrMemAllocDebug((cnt), (sz), __FILE__, __LINE__)
|
#define CsrMemCalloc(cnt, sz) CsrMemAllocDebug((cnt), (sz), __FILE__, __LINE__)
|
||||||
#else
|
#else
|
||||||
void *CsrMemCalloc(CsrSize numberOfElements, CsrSize elementSize);
|
void *CsrMemCalloc(CsrSize numberOfElements, CsrSize elementSize);
|
||||||
|
@ -311,7 +311,7 @@ void CsrMemFree(void *pointer);
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
#ifdef CSR_MEM_DEBUG
|
#ifdef CSR_MEM_DEBUG
|
||||||
void *CsrMemAllocDmaDebug(CsrSize size,
|
void *CsrMemAllocDmaDebug(CsrSize size,
|
||||||
const CsrCharString *file, CsrUint32 line);
|
const CsrCharString *file, u32 line);
|
||||||
#define CsrMemAllocDma(sz) CsrMemAllocDmaDebug((sz), __FILE__, __LINE__)
|
#define CsrMemAllocDma(sz) CsrMemAllocDmaDebug((sz), __FILE__, __LINE__)
|
||||||
#else
|
#else
|
||||||
void *CsrMemAllocDma(CsrSize size);
|
void *CsrMemAllocDma(CsrSize size);
|
||||||
|
|
|
@ -49,7 +49,7 @@ struct CsrEvent
|
||||||
{
|
{
|
||||||
pthread_cond_t event;
|
pthread_cond_t event;
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
CsrUint32 eventBits;
|
u32 eventBits;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct CsrEvent CsrEventHandle;
|
typedef struct CsrEvent CsrEventHandle;
|
||||||
|
|
|
@ -102,7 +102,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
CsrPrim type;
|
CsrPrim type;
|
||||||
u16 value1;
|
u16 value1;
|
||||||
CsrUint32 value2;
|
u32 value2;
|
||||||
} CsrEventCsrUint16CsrUint32;
|
} CsrEventCsrUint16CsrUint32;
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
|
@ -113,7 +113,7 @@ typedef struct
|
||||||
* Allocates and fills in a message with the signature CsrEventCsrUint16
|
* Allocates and fills in a message with the signature CsrEventCsrUint16
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrEventCsrUint16CsrUint32 *CsrEventCsrUint16CsrUint32_struct(u16 primtype, u16 msgtype, u16 value1, CsrUint32 value2);
|
CsrEventCsrUint16CsrUint32 *CsrEventCsrUint16CsrUint32_struct(u16 primtype, u16 msgtype, u16 value1, u32 value2);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,7 @@ CsrEventCsrUint16CsrCharString *CsrEventCsrUint16CsrCharString_struct(u16 primty
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrPrim type;
|
CsrPrim type;
|
||||||
CsrUint32 value;
|
u32 value;
|
||||||
} CsrEventCsrUint32;
|
} CsrEventCsrUint32;
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
|
@ -146,12 +146,12 @@ typedef struct
|
||||||
* Allocates and fills in a message with the signature CsrEventCsrUint32
|
* Allocates and fills in a message with the signature CsrEventCsrUint32
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrEventCsrUint32 *CsrEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrUint32 value);
|
CsrEventCsrUint32 *CsrEventCsrUint32_struct(u16 primtype, u16 msgtype, u32 value);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrPrim type;
|
CsrPrim type;
|
||||||
CsrUint32 value1;
|
u32 value1;
|
||||||
u16 value2;
|
u16 value2;
|
||||||
} CsrEventCsrUint32CsrUint16;
|
} CsrEventCsrUint32CsrUint16;
|
||||||
|
|
||||||
|
@ -163,12 +163,12 @@ typedef struct
|
||||||
* Allocates and fills in a message with the signature CsrEventCsrUint32CsrUint16
|
* Allocates and fills in a message with the signature CsrEventCsrUint32CsrUint16
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrEventCsrUint32CsrUint16 *CsrEventCsrUint32CsrUint16_struct(u16 primtype, u16 msgtype, CsrUint32 value1, CsrUint32 value2);
|
CsrEventCsrUint32CsrUint16 *CsrEventCsrUint32CsrUint16_struct(u16 primtype, u16 msgtype, u32 value1, u32 value2);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrPrim type;
|
CsrPrim type;
|
||||||
CsrUint32 value1;
|
u32 value1;
|
||||||
CsrCharString *value2;
|
CsrCharString *value2;
|
||||||
} CsrEventCsrUint32CsrCharString;
|
} CsrEventCsrUint32CsrCharString;
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ typedef struct
|
||||||
* Allocates and fills in a message with the signature CsrEventCsrUint32CsrCharString
|
* Allocates and fills in a message with the signature CsrEventCsrUint32CsrCharString
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrEventCsrUint32CsrCharString *CsrEventCsrUint32CsrCharString_struct(u16 primtype, u16 msgtype, CsrUint32 value1, CsrCharString *value2);
|
CsrEventCsrUint32CsrCharString *CsrEventCsrUint32CsrCharString_struct(u16 primtype, u16 msgtype, u32 value1, CsrCharString *value2);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ extern "C" {
|
||||||
/*----------------------------------------------------*/
|
/*----------------------------------------------------*/
|
||||||
/* Filtering on environment specific log levels */
|
/* Filtering on environment specific log levels */
|
||||||
/*----------------------------------------------------*/
|
/*----------------------------------------------------*/
|
||||||
typedef CsrUint32 CsrLogLevelEnvironment;
|
typedef u32 CsrLogLevelEnvironment;
|
||||||
#define CSR_LOG_LEVEL_ENVIRONMENT_OFF ((CsrLogLevelEnvironment) 0x00000000) /* No environment data/events are logged */
|
#define CSR_LOG_LEVEL_ENVIRONMENT_OFF ((CsrLogLevelEnvironment) 0x00000000) /* No environment data/events are logged */
|
||||||
#define CSR_LOG_LEVEL_ENVIRONMENT_BCI_ACL ((CsrLogLevelEnvironment) 0x00000001) /* BlueCore Channel Interface HCI Acl data are logged */
|
#define CSR_LOG_LEVEL_ENVIRONMENT_BCI_ACL ((CsrLogLevelEnvironment) 0x00000001) /* BlueCore Channel Interface HCI Acl data are logged */
|
||||||
#define CSR_LOG_LEVEL_ENVIRONMENT_BCI_HCI ((CsrLogLevelEnvironment) 0x00000002) /* BlueCore Channel Interface HCI Cmd/Evt data are logged */
|
#define CSR_LOG_LEVEL_ENVIRONMENT_BCI_HCI ((CsrLogLevelEnvironment) 0x00000002) /* BlueCore Channel Interface HCI Cmd/Evt data are logged */
|
||||||
|
@ -47,7 +47,7 @@ typedef CsrUint32 CsrLogLevelEnvironment;
|
||||||
/*----------------------------------------------------*/
|
/*----------------------------------------------------*/
|
||||||
/* Filtering on task specific log levels */
|
/* Filtering on task specific log levels */
|
||||||
/*----------------------------------------------------*/
|
/*----------------------------------------------------*/
|
||||||
typedef CsrUint32 CsrLogLevelTask;
|
typedef u32 CsrLogLevelTask;
|
||||||
#define CSR_LOG_LEVEL_TASK_OFF ((CsrLogLevelTask) 0x00000000) /* No events are logged for this task */
|
#define CSR_LOG_LEVEL_TASK_OFF ((CsrLogLevelTask) 0x00000000) /* No events are logged for this task */
|
||||||
#define CSR_LOG_LEVEL_TASK_TEXT ((CsrLogLevelTask) 0x00000001) /* Text strings printed by a task are logged NB: This bit does not affect the CSR_LOG_TEXT_LEVEL interface. This has to be configured separately */
|
#define CSR_LOG_LEVEL_TASK_TEXT ((CsrLogLevelTask) 0x00000001) /* Text strings printed by a task are logged NB: This bit does not affect the CSR_LOG_TEXT_LEVEL interface. This has to be configured separately */
|
||||||
#define CSR_LOG_LEVEL_TASK_TEXT_LOC ((CsrLogLevelTask) 0x00000002) /* The locaction where the text string call occured are logged. NB: This is a supplement to CSR_LOG_LEVEL_TASK_TEXT, it has no effect without it */
|
#define CSR_LOG_LEVEL_TASK_TEXT_LOC ((CsrLogLevelTask) 0x00000002) /* The locaction where the text string call occured are logged. NB: This is a supplement to CSR_LOG_LEVEL_TASK_TEXT, it has no effect without it */
|
||||||
|
@ -104,7 +104,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const CsrCharString *techVer;
|
const CsrCharString *techVer;
|
||||||
CsrUint32 primitiveInfoCount;
|
u32 primitiveInfoCount;
|
||||||
CsrLogPrimitiveInformation *primitiveInfo;
|
CsrLogPrimitiveInformation *primitiveInfo;
|
||||||
} CsrLogTechInformation;
|
} CsrLogTechInformation;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ typedef struct
|
||||||
/*---------------------------------*/
|
/*---------------------------------*/
|
||||||
typedef u8 bitmask8_t;
|
typedef u8 bitmask8_t;
|
||||||
typedef u16 bitmask16_t;
|
typedef u16 bitmask16_t;
|
||||||
typedef CsrUint32 bitmask32_t;
|
typedef u32 bitmask32_t;
|
||||||
|
|
||||||
#ifdef CSR_LOG_ENABLE
|
#ifdef CSR_LOG_ENABLE
|
||||||
#ifdef CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER
|
#ifdef CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER
|
||||||
|
@ -141,7 +141,7 @@ typedef CsrUint32 bitmask32_t;
|
||||||
|
|
||||||
/* DEPRECATED - replaced by csr_log_text.h */
|
/* DEPRECATED - replaced by csr_log_text.h */
|
||||||
void CsrLogTaskText(const CsrCharString *text,
|
void CsrLogTaskText(const CsrCharString *text,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
|
|
||||||
#define CSR_LOG_STATE_TRANSITION_MASK_FSM_NAME (0x001)
|
#define CSR_LOG_STATE_TRANSITION_MASK_FSM_NAME (0x001)
|
||||||
|
@ -154,15 +154,15 @@ void CsrLogTaskText(const CsrCharString *text,
|
||||||
|
|
||||||
/* DEPRECATED - replaced by csr_log_text.h */
|
/* DEPRECATED - replaced by csr_log_text.h */
|
||||||
void CsrLogStateTransition(bitmask16_t mask,
|
void CsrLogStateTransition(bitmask16_t mask,
|
||||||
CsrUint32 identifier,
|
u32 identifier,
|
||||||
const CsrCharString *fsm_name,
|
const CsrCharString *fsm_name,
|
||||||
CsrUint32 prev_state,
|
u32 prev_state,
|
||||||
const CsrCharString *prev_state_str,
|
const CsrCharString *prev_state_str,
|
||||||
CsrUint32 in_event,
|
u32 in_event,
|
||||||
const CsrCharString *in_event_str,
|
const CsrCharString *in_event_str,
|
||||||
CsrUint32 next_state,
|
u32 next_state,
|
||||||
const CsrCharString *next_state_str,
|
const CsrCharString *next_state_str,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
|
|
||||||
/*---------------------------------*/
|
/*---------------------------------*/
|
||||||
|
@ -183,7 +183,7 @@ void CsrLogDeactivate(CsrSchedQid tskid);
|
||||||
#define SYNERGY_SERIALIZER_TYPE_DUMP (0x000)
|
#define SYNERGY_SERIALIZER_TYPE_DUMP (0x000)
|
||||||
#define SYNERGY_SERIALIZER_TYPE_SER (0x001)
|
#define SYNERGY_SERIALIZER_TYPE_SER (0x001)
|
||||||
|
|
||||||
void CsrLogMessagePut(CsrUint32 line,
|
void CsrLogMessagePut(u32 line,
|
||||||
const CsrCharString *file,
|
const CsrCharString *file,
|
||||||
CsrSchedQid src_task_id,
|
CsrSchedQid src_task_id,
|
||||||
CsrSchedQid dst_taskid,
|
CsrSchedQid dst_taskid,
|
||||||
|
@ -198,7 +198,7 @@ void CsrLogMessageGet(CsrSchedQid src_task_id,
|
||||||
u16 prim_type,
|
u16 prim_type,
|
||||||
const void *msg);
|
const void *msg);
|
||||||
|
|
||||||
void CsrLogTimedEventIn(CsrUint32 line,
|
void CsrLogTimedEventIn(u32 line,
|
||||||
const CsrCharString *file,
|
const CsrCharString *file,
|
||||||
CsrSchedQid task_id,
|
CsrSchedQid task_id,
|
||||||
CsrSchedTid tid,
|
CsrSchedTid tid,
|
||||||
|
@ -212,7 +212,7 @@ void CsrLogTimedEventFire(CsrSchedQid task_id,
|
||||||
void CsrLogTimedEventDone(CsrSchedQid task_id,
|
void CsrLogTimedEventDone(CsrSchedQid task_id,
|
||||||
CsrSchedTid tid);
|
CsrSchedTid tid);
|
||||||
|
|
||||||
void CsrLogTimedEventCancel(CsrUint32 line,
|
void CsrLogTimedEventCancel(u32 line,
|
||||||
const CsrCharString *file,
|
const CsrCharString *file,
|
||||||
CsrSchedQid task_id,
|
CsrSchedQid task_id,
|
||||||
CsrSchedTid tid,
|
CsrSchedTid tid,
|
||||||
|
@ -230,17 +230,17 @@ void CsrLogBgintServiceDone(CsrSchedBgint irq);
|
||||||
void CsrLogExceptionStateEvent(u16 prim_type,
|
void CsrLogExceptionStateEvent(u16 prim_type,
|
||||||
CsrPrim msg_type,
|
CsrPrim msg_type,
|
||||||
u16 state,
|
u16 state,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
void CsrLogExceptionGeneral(u16 prim_type,
|
void CsrLogExceptionGeneral(u16 prim_type,
|
||||||
u16 state,
|
u16 state,
|
||||||
const CsrCharString *text,
|
const CsrCharString *text,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
void CsrLogExceptionWarning(u16 prim_type,
|
void CsrLogExceptionWarning(u16 prim_type,
|
||||||
u16 state,
|
u16 state,
|
||||||
const CsrCharString *text,
|
const CsrCharString *text,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -45,7 +45,7 @@ void CsrLogLevelTaskSetSpecific(CsrSchedQid taskId, CsrLogLevelTask taskLogLevel
|
||||||
/*--------------------------------------------*/
|
/*--------------------------------------------*/
|
||||||
/* Filtering on log text warning levels */
|
/* Filtering on log text warning levels */
|
||||||
/*--------------------------------------------*/
|
/*--------------------------------------------*/
|
||||||
typedef CsrUint32 CsrLogLevelText;
|
typedef u32 CsrLogLevelText;
|
||||||
#define CSR_LOG_LEVEL_TEXT_OFF ((CsrLogLevelText) 0x0000)
|
#define CSR_LOG_LEVEL_TEXT_OFF ((CsrLogLevelText) 0x0000)
|
||||||
|
|
||||||
#define CSR_LOG_LEVEL_TEXT_CRITICAL ((CsrLogLevelText) 0x0001)
|
#define CSR_LOG_LEVEL_TEXT_CRITICAL ((CsrLogLevelText) 0x0001)
|
||||||
|
@ -64,7 +64,7 @@ typedef CsrUint32 CsrLogLevelText;
|
||||||
* clashes the technologies are only allowed to assign values within the same restrictive range as allies to
|
* clashes the technologies are only allowed to assign values within the same restrictive range as allies to
|
||||||
* primitive identifiers. eg. for the framework components outside the scheduler is only allowed to assign
|
* primitive identifiers. eg. for the framework components outside the scheduler is only allowed to assign
|
||||||
* taskId's in the range 0x0600xxxx to 0x06FFxxxx. And so on for other technologies. */
|
* taskId's in the range 0x0600xxxx to 0x06FFxxxx. And so on for other technologies. */
|
||||||
typedef CsrUint32 CsrLogTextTaskId;
|
typedef u32 CsrLogTextTaskId;
|
||||||
|
|
||||||
/* Set the text logging level for all Tasks */
|
/* Set the text logging level for all Tasks */
|
||||||
/* This function call takes precedence over all previous calls to CsrLogLevelTextSetTask() and CsrLogLevelTextSetTaskSubOrigin() */
|
/* This function call takes precedence over all previous calls to CsrLogLevelTextSetTask() and CsrLogLevelTextSetTaskSubOrigin() */
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* Bits - intended to operate on CsrUint32 values */
|
/* Bits - intended to operate on u32 values */
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
#define CSR_MASK_IS_SET(val, mask) (((val) & (mask)) == (mask))
|
#define CSR_MASK_IS_SET(val, mask) (((val) & (mask)) == (mask))
|
||||||
#define CSR_MASK_IS_UNSET(val, mask) ((((val) & (mask)) ^ mask) == (mask))
|
#define CSR_MASK_IS_UNSET(val, mask) ((((val) & (mask)) ^ mask) == (mask))
|
||||||
|
@ -32,8 +32,8 @@ extern "C" {
|
||||||
/* Endian conversion */
|
/* Endian conversion */
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
#define CSR_GET_UINT16_FROM_LITTLE_ENDIAN(ptr) (((u16) ((u8 *) (ptr))[0]) | ((u16) ((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 | \
|
#define CSR_GET_UINT32_FROM_LITTLE_ENDIAN(ptr) (((u32) ((u8 *) (ptr))[0]) | ((u32) ((u8 *) (ptr))[1]) << 8 | \
|
||||||
((CsrUint32) ((u8 *) (ptr))[2]) << 16 | ((CsrUint32) ((u8 *) (ptr))[3]) << 24)
|
((u32) ((u8 *) (ptr))[2]) << 16 | ((u32) ((u8 *) (ptr))[3]) << 24)
|
||||||
#define CSR_COPY_UINT16_TO_LITTLE_ENDIAN(uint, ptr) ((u8 *) (ptr))[0] = ((u8) ((uint) & 0x00FF)); \
|
#define CSR_COPY_UINT16_TO_LITTLE_ENDIAN(uint, ptr) ((u8 *) (ptr))[0] = ((u8) ((uint) & 0x00FF)); \
|
||||||
((u8 *) (ptr))[1] = ((u8) ((uint) >> 8))
|
((u8 *) (ptr))[1] = ((u8) ((uint) >> 8))
|
||||||
#define CSR_COPY_UINT32_TO_LITTLE_ENDIAN(uint, ptr) ((u8 *) (ptr))[0] = ((u8) ((uint) & 0x000000FF)); \
|
#define CSR_COPY_UINT32_TO_LITTLE_ENDIAN(uint, ptr) ((u8 *) (ptr))[0] = ((u8) ((uint) & 0x000000FF)); \
|
||||||
|
@ -43,8 +43,8 @@ extern "C" {
|
||||||
#define CSR_GET_UINT16_FROM_BIG_ENDIAN(ptr) (((u16) ((u8 *) (ptr))[1]) | ((u16) ((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]) | \
|
#define CSR_GET_UINT24_FROM_BIG_ENDIAN(ptr) (((CsrUint24) ((u8 *) (ptr))[2]) | \
|
||||||
((CsrUint24) ((u8 *) (ptr))[1]) << 8 | ((CsrUint24) ((u8 *) (ptr))[0]) << 16)
|
((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 | \
|
#define CSR_GET_UINT32_FROM_BIG_ENDIAN(ptr) (((u32) ((u8 *) (ptr))[3]) | ((u32) ((u8 *) (ptr))[2]) << 8 | \
|
||||||
((CsrUint32) ((u8 *) (ptr))[1]) << 16 | ((CsrUint32) ((u8 *) (ptr))[0]) << 24)
|
((u32) ((u8 *) (ptr))[1]) << 16 | ((u32) ((u8 *) (ptr))[0]) << 24)
|
||||||
#define CSR_COPY_UINT16_TO_BIG_ENDIAN(uint, ptr) ((u8 *) (ptr))[1] = ((u8) ((uint) & 0x00FF)); \
|
#define CSR_COPY_UINT16_TO_BIG_ENDIAN(uint, ptr) ((u8 *) (ptr))[1] = ((u8) ((uint) & 0x00FF)); \
|
||||||
((u8 *) (ptr))[0] = ((u8) ((uint) >> 8))
|
((u8 *) (ptr))[0] = ((u8) ((uint) >> 8))
|
||||||
#define CSR_COPY_UINT24_TO_BIG_ENDIAN(uint, ptr) ((u8 *) (ptr))[2] = ((u8) ((uint) & 0x000000FF)); \
|
#define CSR_COPY_UINT24_TO_BIG_ENDIAN(uint, ptr) ((u8 *) (ptr))[2] = ((u8) ((uint) & 0x000000FF)); \
|
||||||
|
@ -70,10 +70,10 @@ extern "C" {
|
||||||
((u16) (input)[0]));(input) += 2
|
((u16) (input)[0]));(input) += 2
|
||||||
|
|
||||||
#define CSR_CONVERT_32_FROM_XAP(output, input) \
|
#define CSR_CONVERT_32_FROM_XAP(output, input) \
|
||||||
(output) = (((CsrUint32) (input)[1]) << 24) | \
|
(output) = (((u32) (input)[1]) << 24) | \
|
||||||
(((CsrUint32) (input)[0]) << 16) | \
|
(((u32) (input)[0]) << 16) | \
|
||||||
(((CsrUint32) (input)[3]) << 8) | \
|
(((u32) (input)[3]) << 8) | \
|
||||||
((CsrUint32) (input)[2]);input += 4
|
((u32) (input)[2]);input += 4
|
||||||
|
|
||||||
#define CSR_ADD_UINT8_TO_XAP(output, input) \
|
#define CSR_ADD_UINT8_TO_XAP(output, input) \
|
||||||
(output)[0] = (input); \
|
(output)[0] = (input); \
|
||||||
|
|
|
@ -73,14 +73,14 @@ void CsrMsgConvDeinit(void);
|
||||||
|
|
||||||
/* SHOULD BE INTERNAL TO FRAMEWORK AKA DEPRECATED */
|
/* SHOULD BE INTERNAL TO FRAMEWORK AKA DEPRECATED */
|
||||||
|
|
||||||
CsrUint32 CsrCharStringSerLen(const CsrCharString *str);
|
u32 CsrCharStringSerLen(const CsrCharString *str);
|
||||||
CsrUint32 CsrUtf8StringSerLen(const CsrUtf8String *str);
|
u32 CsrUtf8StringSerLen(const CsrUtf8String *str);
|
||||||
CsrUint32 CsrUtf16StringSerLen(const CsrUtf16String *str);
|
u32 CsrUtf16StringSerLen(const CsrUtf16String *str);
|
||||||
|
|
||||||
/* Prototypes for primitive type serializers */
|
/* Prototypes for primitive type serializers */
|
||||||
void CsrUint8Ser(u8 *buffer, CsrSize *offset, u8 value);
|
void CsrUint8Ser(u8 *buffer, CsrSize *offset, u8 value);
|
||||||
void CsrUint16Ser(u8 *buffer, CsrSize *offset, u16 value);
|
void CsrUint16Ser(u8 *buffer, CsrSize *offset, u16 value);
|
||||||
void CsrUint32Ser(u8 *buffer, CsrSize *offset, CsrUint32 value);
|
void CsrUint32Ser(u8 *buffer, CsrSize *offset, u32 value);
|
||||||
void CsrMemCpySer(u8 *buffer, CsrSize *offset, const void *value, CsrSize length);
|
void CsrMemCpySer(u8 *buffer, CsrSize *offset, const void *value, CsrSize length);
|
||||||
void CsrCharStringSer(u8 *buffer, CsrSize *offset, const CsrCharString *value);
|
void CsrCharStringSer(u8 *buffer, CsrSize *offset, const CsrCharString *value);
|
||||||
void CsrUtf8StringSer(u8 *buffer, CsrSize *offset, const CsrUtf8String *value);
|
void CsrUtf8StringSer(u8 *buffer, CsrSize *offset, const CsrUtf8String *value);
|
||||||
|
@ -90,7 +90,7 @@ void CsrSizeSer(u8 *buffer, CsrSize *offset, CsrSize value);
|
||||||
|
|
||||||
void CsrUint8Des(u8 *value, u8 *buffer, CsrSize *offset);
|
void CsrUint8Des(u8 *value, u8 *buffer, CsrSize *offset);
|
||||||
void CsrUint16Des(u16 *value, u8 *buffer, CsrSize *offset);
|
void CsrUint16Des(u16 *value, u8 *buffer, CsrSize *offset);
|
||||||
void CsrUint32Des(CsrUint32 *value, u8 *buffer, CsrSize *offset);
|
void CsrUint32Des(u32 *value, u8 *buffer, CsrSize *offset);
|
||||||
void CsrMemCpyDes(void *value, u8 *buffer, CsrSize *offset, CsrSize length);
|
void CsrMemCpyDes(void *value, u8 *buffer, CsrSize *offset, CsrSize length);
|
||||||
void CsrCharStringDes(CsrCharString **value, u8 *buffer, CsrSize *offset);
|
void CsrCharStringDes(CsrCharString **value, u8 *buffer, CsrSize *offset);
|
||||||
void CsrUtf8StringDes(CsrUtf8String **value, u8 *buffer, CsrSize *offset);
|
void CsrUtf8StringDes(CsrUtf8String **value, u8 *buffer, CsrSize *offset);
|
||||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef CSR_PMEM_DEBUG
|
#ifdef CSR_PMEM_DEBUG
|
||||||
void *CsrPmemAllocDebug(CsrSize size,
|
void *CsrPmemAllocDebug(CsrSize size,
|
||||||
const CsrCharString *file, CsrUint32 line);
|
const CsrCharString *file, u32 line);
|
||||||
#define CsrPmemAlloc(sz) CsrPmemAllocDebug((sz), __FILE__, __LINE__)
|
#define CsrPmemAlloc(sz) CsrPmemAllocDebug((sz), __FILE__, __LINE__)
|
||||||
#else
|
#else
|
||||||
void *CsrPmemAlloc(CsrSize size);
|
void *CsrPmemAlloc(CsrSize size);
|
||||||
|
@ -108,8 +108,8 @@ typedef u8 CsrPmemDebugAllocType;
|
||||||
#define CSR_PMEM_DEBUG_TYPE_MEM_CALLOC 3
|
#define CSR_PMEM_DEBUG_TYPE_MEM_CALLOC 3
|
||||||
#define CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA 4
|
#define CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA 4
|
||||||
|
|
||||||
typedef void (CsrPmemDebugOnAlloc)(void *ptr, void *userptr, CsrSize size, CsrPmemDebugAllocType type, const CsrCharString* file, CsrUint32 line);
|
typedef void (CsrPmemDebugOnAlloc)(void *ptr, void *userptr, CsrSize size, CsrPmemDebugAllocType type, const CsrCharString* file, u32 line);
|
||||||
typedef void (CsrPmemDebugOnFree)(void *ptr, void *userptr, CsrPmemDebugAllocType type, const CsrCharString* file, CsrUint32 line);
|
typedef void (CsrPmemDebugOnFree)(void *ptr, void *userptr, CsrPmemDebugAllocType type, const CsrCharString* file, u32 line);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
* NAME
|
* NAME
|
||||||
|
@ -127,10 +127,10 @@ typedef void (CsrPmemDebugOnFree)(void *ptr, void *userptr, CsrPmemDebugAllocTyp
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void CsrPmemDebugInstallHooks(u8 headSize, u8 endSize, CsrPmemDebugOnAlloc *onAllocCallback, CsrPmemDebugOnFree *onFreeCallback);
|
void CsrPmemDebugInstallHooks(u8 headSize, u8 endSize, CsrPmemDebugOnAlloc *onAllocCallback, CsrPmemDebugOnFree *onFreeCallback);
|
||||||
|
|
||||||
void *CsrPmemDebugAlloc(CsrSize size, CsrPmemDebugAllocType type, const CsrCharString* file, CsrUint32 line);
|
void *CsrPmemDebugAlloc(CsrSize size, CsrPmemDebugAllocType type, const CsrCharString* file, u32 line);
|
||||||
#define CsrPmemAlloc(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)
|
#define CsrPmemAlloc(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)
|
||||||
|
|
||||||
void CsrPmemDebugFree(void *ptr, CsrPmemDebugAllocType type, const CsrCharString* file, CsrUint32 line);
|
void CsrPmemDebugFree(void *ptr, CsrPmemDebugAllocType type, const CsrCharString* file, u32 line);
|
||||||
#define CsrPmemFree(ptr) CsrPmemDebugFree(ptr, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)
|
#define CsrPmemFree(ptr) CsrPmemDebugFree(ptr, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* An identifier issued by the scheduler. */
|
/* An identifier issued by the scheduler. */
|
||||||
typedef CsrUint32 CsrSchedIdentifier;
|
typedef u32 CsrSchedIdentifier;
|
||||||
|
|
||||||
/* A task identifier */
|
/* A task identifier */
|
||||||
typedef u16 CsrSchedTaskId;
|
typedef u16 CsrSchedTaskId;
|
||||||
|
@ -135,7 +135,7 @@ void CsrSchedBgintSet(CsrSchedBgint bgint);
|
||||||
void CsrSchedMessagePutStringLog(CsrSchedQid q,
|
void CsrSchedMessagePutStringLog(CsrSchedQid q,
|
||||||
u16 mi,
|
u16 mi,
|
||||||
void *mv,
|
void *mv,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
#define CsrSchedMessagePut(q, mi, mv) CsrSchedMessagePutStringLog((q), (mi), (mv), __LINE__, __FILE__)
|
#define CsrSchedMessagePut(q, mi, mv) CsrSchedMessagePutStringLog((q), (mi), (mv), __LINE__, __FILE__)
|
||||||
#else
|
#else
|
||||||
|
@ -167,7 +167,7 @@ void CsrSchedMessagePut(CsrSchedQid q,
|
||||||
void CsrSchedMessageBroadcastStringLog(u16 mi,
|
void CsrSchedMessageBroadcastStringLog(u16 mi,
|
||||||
void *(*msg_build_func)(void *),
|
void *(*msg_build_func)(void *),
|
||||||
void *msg_build_ptr,
|
void *msg_build_ptr,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
#define CsrSchedMessageBroadcast(mi, fn, ptr) CsrSchedMessageBroadcastStringLog((mi), (fn), (ptr), __LINE__, __FILE__)
|
#define CsrSchedMessageBroadcast(mi, fn, ptr) CsrSchedMessageBroadcastStringLog((mi), (fn), (ptr), __LINE__, __FILE__)
|
||||||
#else
|
#else
|
||||||
|
@ -222,7 +222,7 @@ CsrSchedTid CsrSchedTimerSetStringLog(CsrTime delay,
|
||||||
void (*fn)(u16 mi, void *mv),
|
void (*fn)(u16 mi, void *mv),
|
||||||
u16 fniarg,
|
u16 fniarg,
|
||||||
void *fnvarg,
|
void *fnvarg,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
#define CsrSchedTimerSet(d, fn, fni, fnv) CsrSchedTimerSetStringLog((d), (fn), (fni), (fnv), __LINE__, __FILE__)
|
#define CsrSchedTimerSet(d, fn, fni, fnv) CsrSchedTimerSetStringLog((d), (fn), (fni), (fnv), __LINE__, __FILE__)
|
||||||
#else
|
#else
|
||||||
|
@ -248,7 +248,7 @@ CsrSchedTid CsrSchedTimerSet(CsrTime delay,
|
||||||
CsrBool CsrSchedTimerCancelStringLog(CsrSchedTid eventid,
|
CsrBool CsrSchedTimerCancelStringLog(CsrSchedTid eventid,
|
||||||
u16 *pmi,
|
u16 *pmi,
|
||||||
void **pmv,
|
void **pmv,
|
||||||
CsrUint32 line,
|
u32 line,
|
||||||
const CsrCharString *file);
|
const CsrCharString *file);
|
||||||
#define CsrSchedTimerCancel(e, pmi, pmv) CsrSchedTimerCancelStringLog((e), (pmi), (pmv), __LINE__, __FILE__)
|
#define CsrSchedTimerCancel(e, pmi, pmv) CsrSchedTimerCancelStringLog((e), (pmi), (pmv), __LINE__, __FILE__)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -85,7 +85,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
CsrSdioFunctionId sdioId;
|
CsrSdioFunctionId sdioId;
|
||||||
u16 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 */
|
u32 features; /* Bit mask with any of CSR_SDIO_FEATURE_* set */
|
||||||
void *device; /* Handle of device containing the function */
|
void *device; /* Handle of device containing the function */
|
||||||
void *driverData; /* For use by the Function Driver */
|
void *driverData; /* For use by the Function Driver */
|
||||||
void *priv; /* For use by the SDIO Driver */
|
void *priv; /* For use by the SDIO Driver */
|
||||||
|
@ -479,7 +479,7 @@ CsrResult CsrSdioBlockSizeSet(CsrSdioFunction *function, u16 blockSize);
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrResult CsrSdioMaxBusClockFrequencySet(CsrSdioFunction *function, CsrUint32 maxFrequency);
|
CsrResult CsrSdioMaxBusClockFrequencySet(CsrSdioFunction *function, u32 maxFrequency);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
* NAME
|
* NAME
|
||||||
|
@ -519,10 +519,10 @@ CsrResult CsrSdioMaxBusClockFrequencySet(CsrSdioFunction *function, CsrUint32 ma
|
||||||
* the callback function.
|
* the callback function.
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrResult CsrSdioRead8(CsrSdioFunction *function, CsrUint32 address, u8 *data);
|
CsrResult CsrSdioRead8(CsrSdioFunction *function, u32 address, u8 *data);
|
||||||
CsrResult CsrSdioWrite8(CsrSdioFunction *function, CsrUint32 address, u8 data);
|
CsrResult CsrSdioWrite8(CsrSdioFunction *function, u32 address, u8 data);
|
||||||
void CsrSdioRead8Async(CsrSdioFunction *function, CsrUint32 address, u8 *data, CsrSdioAsyncCallback callback);
|
void CsrSdioRead8Async(CsrSdioFunction *function, u32 address, u8 *data, CsrSdioAsyncCallback callback);
|
||||||
void CsrSdioWrite8Async(CsrSdioFunction *function, CsrUint32 address, u8 data, CsrSdioAsyncCallback callback);
|
void CsrSdioWrite8Async(CsrSdioFunction *function, u32 address, u8 data, CsrSdioAsyncCallback callback);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
* NAME
|
* NAME
|
||||||
|
@ -563,10 +563,10 @@ void CsrSdioWrite8Async(CsrSdioFunction *function, CsrUint32 address, u8 data, C
|
||||||
* the callback function.
|
* the callback function.
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrResult CsrSdioRead16(CsrSdioFunction *function, CsrUint32 address, u16 *data);
|
CsrResult CsrSdioRead16(CsrSdioFunction *function, u32 address, u16 *data);
|
||||||
CsrResult CsrSdioWrite16(CsrSdioFunction *function, CsrUint32 address, u16 data);
|
CsrResult CsrSdioWrite16(CsrSdioFunction *function, u32 address, u16 data);
|
||||||
void CsrSdioRead16Async(CsrSdioFunction *function, CsrUint32 address, u16 *data, CsrSdioAsyncCallback callback);
|
void CsrSdioRead16Async(CsrSdioFunction *function, u32 address, u16 *data, CsrSdioAsyncCallback callback);
|
||||||
void CsrSdioWrite16Async(CsrSdioFunction *function, CsrUint32 address, u16 data, CsrSdioAsyncCallback callback);
|
void CsrSdioWrite16Async(CsrSdioFunction *function, u32 address, u16 data, CsrSdioAsyncCallback callback);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
* NAME
|
* NAME
|
||||||
|
@ -608,10 +608,10 @@ void CsrSdioWrite16Async(CsrSdioFunction *function, CsrUint32 address, u16 data,
|
||||||
* the callback function.
|
* the callback function.
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrResult CsrSdioF0Read8(CsrSdioFunction *function, CsrUint32 address, u8 *data);
|
CsrResult CsrSdioF0Read8(CsrSdioFunction *function, u32 address, u8 *data);
|
||||||
CsrResult CsrSdioF0Write8(CsrSdioFunction *function, CsrUint32 address, u8 data);
|
CsrResult CsrSdioF0Write8(CsrSdioFunction *function, u32 address, u8 data);
|
||||||
void CsrSdioF0Read8Async(CsrSdioFunction *function, CsrUint32 address, u8 *data, CsrSdioAsyncCallback callback);
|
void CsrSdioF0Read8Async(CsrSdioFunction *function, u32 address, u8 *data, CsrSdioAsyncCallback callback);
|
||||||
void CsrSdioF0Write8Async(CsrSdioFunction *function, CsrUint32 address, u8 data, CsrSdioAsyncCallback callback);
|
void CsrSdioF0Write8Async(CsrSdioFunction *function, u32 address, u8 data, CsrSdioAsyncCallback callback);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
* NAME
|
* NAME
|
||||||
|
@ -654,10 +654,10 @@ void CsrSdioF0Write8Async(CsrSdioFunction *function, CsrUint32 address, u8 data,
|
||||||
* the callback function.
|
* the callback function.
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrResult CsrSdioRead(CsrSdioFunction *function, CsrUint32 address, void *data, CsrUint32 length);
|
CsrResult CsrSdioRead(CsrSdioFunction *function, u32 address, void *data, u32 length);
|
||||||
CsrResult CsrSdioWrite(CsrSdioFunction *function, CsrUint32 address, const void *data, CsrUint32 length);
|
CsrResult CsrSdioWrite(CsrSdioFunction *function, u32 address, const void *data, u32 length);
|
||||||
void CsrSdioReadAsync(CsrSdioFunction *function, CsrUint32 address, void *data, CsrUint32 length, CsrSdioAsyncCallback callback);
|
void CsrSdioReadAsync(CsrSdioFunction *function, u32 address, void *data, u32 length, CsrSdioAsyncCallback callback);
|
||||||
void CsrSdioWriteAsync(CsrSdioFunction *function, CsrUint32 address, const void *data, CsrUint32 length, CsrSdioAsyncCallback callback);
|
void CsrSdioWriteAsync(CsrSdioFunction *function, u32 address, const void *data, u32 length, CsrSdioAsyncCallback callback);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
* NAME
|
* NAME
|
||||||
|
|
|
@ -31,7 +31,7 @@ void CsrUint16Des(u16 *value, u8 *buffer, CsrSize *offset)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(CsrUint16Des);
|
EXPORT_SYMBOL_GPL(CsrUint16Des);
|
||||||
|
|
||||||
void CsrUint32Des(CsrUint32 *value, u8 *buffer, CsrSize *offset)
|
void CsrUint32Des(u32 *value, u8 *buffer, CsrSize *offset)
|
||||||
{
|
{
|
||||||
*value = (buffer[*offset + 0] << 0) |
|
*value = (buffer[*offset + 0] << 0) |
|
||||||
(buffer[*offset + 1] << 8) |
|
(buffer[*offset + 1] << 8) |
|
||||||
|
@ -63,7 +63,7 @@ void CsrUtf8StringDes(CsrUtf8String **value, u8 *buffer, CsrSize *offset)
|
||||||
|
|
||||||
void CsrUtf16StringDes(CsrUtf16String **value, u8 *buffer, CsrSize *offset)
|
void CsrUtf16StringDes(CsrUtf16String **value, u8 *buffer, CsrSize *offset)
|
||||||
{
|
{
|
||||||
CsrUint32 length, i;
|
u32 length, i;
|
||||||
|
|
||||||
CsrUint32Des(&length, buffer, offset);
|
CsrUint32Des(&length, buffer, offset);
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ void CsrUint16Ser(u8 *buffer, CsrSize *offset, u16 value)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(CsrUint16Ser);
|
EXPORT_SYMBOL_GPL(CsrUint16Ser);
|
||||||
|
|
||||||
void CsrUint32Ser(u8 *buffer, CsrSize *offset, CsrUint32 value)
|
void CsrUint32Ser(u8 *buffer, CsrSize *offset, u32 value)
|
||||||
{
|
{
|
||||||
buffer[*offset + 0] = (u8) ((value >> 0) & 0xFF);
|
buffer[*offset + 0] = (u8) ((value >> 0) & 0xFF);
|
||||||
buffer[*offset + 1] = (u8) ((value >> 8) & 0xFF);
|
buffer[*offset + 1] = (u8) ((value >> 8) & 0xFF);
|
||||||
|
@ -143,8 +143,8 @@ void CsrUtf16StringSer(u8 *buffer, CsrSize *offset, const CsrUtf16String *value)
|
||||||
{
|
{
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
CsrUint32 length = CsrUtf16StrLen(value) + 1;
|
u32 length = CsrUtf16StrLen(value) + 1;
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
|
|
||||||
CsrUint32Ser(buffer, offset, length);
|
CsrUint32Ser(buffer, offset, length);
|
||||||
|
|
||||||
|
@ -173,11 +173,11 @@ void CsrVoidPtrSer(u8 *buffer, CsrSize *offset, void *ptr)
|
||||||
CsrSizeSer(buffer, offset, (CsrSize) ptr);
|
CsrSizeSer(buffer, offset, (CsrSize) ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
CsrUint32 CsrCharStringSerLen(const CsrCharString *str)
|
u32 CsrCharStringSerLen(const CsrCharString *str)
|
||||||
{
|
{
|
||||||
if (str)
|
if (str)
|
||||||
{
|
{
|
||||||
return (CsrUint32) (CsrStrLen(str) + sizeof(*str));
|
return (u32) (CsrStrLen(str) + sizeof(*str));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -185,11 +185,11 @@ CsrUint32 CsrCharStringSerLen(const CsrCharString *str)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CsrUint32 CsrUtf8StringSerLen(const CsrUtf8String *str)
|
u32 CsrUtf8StringSerLen(const CsrUtf8String *str)
|
||||||
{
|
{
|
||||||
if (str)
|
if (str)
|
||||||
{
|
{
|
||||||
return (CsrUint32) (CsrStrLen((CsrCharString *) str) + sizeof(*str));
|
return (u32) (CsrStrLen((CsrCharString *) str) + sizeof(*str));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -197,16 +197,16 @@ CsrUint32 CsrUtf8StringSerLen(const CsrUtf8String *str)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CsrUint32 CsrUtf16StringSerLen(const CsrUtf16String *str)
|
u32 CsrUtf16StringSerLen(const CsrUtf16String *str)
|
||||||
{
|
{
|
||||||
if (str)
|
if (str)
|
||||||
{
|
{
|
||||||
/* We always write down the length of the string */
|
/* We always write down the length of the string */
|
||||||
return sizeof(CsrUint32) + (CsrUtf16StrLen(str) + 1) * sizeof(*str);
|
return sizeof(u32) + (CsrUtf16StrLen(str) + 1) * sizeof(*str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return sizeof(CsrUint32);
|
return sizeof(u32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ extern "C" {
|
||||||
reference, usually associated with system startup.
|
reference, usually associated with system startup.
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef CsrUint32 CsrTime;
|
typedef u32 CsrTime;
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -42,7 +42,7 @@ typedef CsrUint32 CsrTime;
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrUint32 sec;
|
u32 sec;
|
||||||
u16 msec;
|
u16 msec;
|
||||||
} CsrTimeUtc;
|
} CsrTimeUtc;
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,6 @@ typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointer
|
||||||
typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
|
typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
|
||||||
typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
|
typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
|
||||||
|
|
||||||
/* Unsigned fixed width types */
|
|
||||||
typedef uint32_t CsrUint32;
|
|
||||||
|
|
||||||
/* Signed fixed width types */
|
/* Signed fixed width types */
|
||||||
typedef int32_t CsrInt32;
|
typedef int32_t CsrInt32;
|
||||||
|
|
||||||
|
@ -45,7 +42,7 @@ typedef u8 CsrBool;
|
||||||
typedef char CsrCharString;
|
typedef char CsrCharString;
|
||||||
typedef u8 CsrUtf8String;
|
typedef u8 CsrUtf8String;
|
||||||
typedef u16 CsrUtf16String; /* 16-bit UTF16 strings */
|
typedef u16 CsrUtf16String; /* 16-bit UTF16 strings */
|
||||||
typedef CsrUint32 CsrUint24;
|
typedef u32 CsrUint24;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 64-bit integers
|
* 64-bit integers
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CsrUtf16String *CsrUint32ToUtf16String(CsrUint32 number);
|
CsrUtf16String *CsrUint32ToUtf16String(u32 number);
|
||||||
|
|
||||||
CsrUint32 CsrUtf16StringToUint32(const CsrUtf16String *unicodeString);
|
u32 CsrUtf16StringToUint32(const CsrUtf16String *unicodeString);
|
||||||
CsrUint32 CsrUtf16StrLen(const CsrUtf16String *unicodeString);
|
u32 CsrUtf16StrLen(const CsrUtf16String *unicodeString);
|
||||||
|
|
||||||
CsrUtf8String *CsrUtf16String2Utf8(const CsrUtf16String *source);
|
CsrUtf8String *CsrUtf16String2Utf8(const CsrUtf16String *source);
|
||||||
|
|
||||||
|
@ -29,9 +29,9 @@ CsrUtf16String *CsrUtf16StrCpy(CsrUtf16String *target, const CsrUtf16String *sou
|
||||||
CsrUtf16String *CsrUtf16StringDuplicate(const CsrUtf16String *source);
|
CsrUtf16String *CsrUtf16StringDuplicate(const CsrUtf16String *source);
|
||||||
|
|
||||||
u16 CsrUtf16StrICmp(const CsrUtf16String *string1, const CsrUtf16String *string2);
|
u16 CsrUtf16StrICmp(const CsrUtf16String *string1, const CsrUtf16String *string2);
|
||||||
u16 CsrUtf16StrNICmp(const CsrUtf16String *string1, const CsrUtf16String *string2, CsrUint32 count);
|
u16 CsrUtf16StrNICmp(const CsrUtf16String *string1, const CsrUtf16String *string2, u32 count);
|
||||||
|
|
||||||
CsrUtf16String *CsrUtf16MemCpy(CsrUtf16String *dest, const CsrUtf16String *src, CsrUint32 count);
|
CsrUtf16String *CsrUtf16MemCpy(CsrUtf16String *dest, const CsrUtf16String *src, u32 count);
|
||||||
CsrUtf16String *CsrUtf16ConcatenateTexts(const CsrUtf16String *inputText1, const CsrUtf16String *inputText2,
|
CsrUtf16String *CsrUtf16ConcatenateTexts(const CsrUtf16String *inputText1, const CsrUtf16String *inputText2,
|
||||||
const CsrUtf16String *inputText3, const CsrUtf16String *inputText4);
|
const CsrUtf16String *inputText3, const CsrUtf16String *inputText4);
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ CsrUtf16String *CsrXML2Utf16String(CsrUtf16String *str);
|
||||||
|
|
||||||
CsrInt32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2);
|
CsrInt32 CsrUtf8StrCmp(const CsrUtf8String *string1, const CsrUtf8String *string2);
|
||||||
CsrInt32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count);
|
CsrInt32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *string2, CsrSize count);
|
||||||
CsrUint32 CsrUtf8StringLengthInBytes(const CsrUtf8String *string);
|
u32 CsrUtf8StringLengthInBytes(const CsrUtf8String *string);
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
|
|
|
@ -13,15 +13,15 @@
|
||||||
#include "csr_unicode.h"
|
#include "csr_unicode.h"
|
||||||
#include "csr_util.h"
|
#include "csr_util.h"
|
||||||
|
|
||||||
#define UNI_SUR_HIGH_START ((CsrUint32) 0xD800)
|
#define UNI_SUR_HIGH_START ((u32) 0xD800)
|
||||||
#define UNI_SUR_HIGH_END ((CsrUint32) 0xDBFF)
|
#define UNI_SUR_HIGH_END ((u32) 0xDBFF)
|
||||||
#define UNI_SUR_LOW_START ((CsrUint32) 0xDC00)
|
#define UNI_SUR_LOW_START ((u32) 0xDC00)
|
||||||
#define UNI_SUR_LOW_END ((CsrUint32) 0xDFFF)
|
#define UNI_SUR_LOW_END ((u32) 0xDFFF)
|
||||||
#define UNI_REPLACEMENT_CHAR ((CsrUint32) 0xFFFD)
|
#define UNI_REPLACEMENT_CHAR ((u32) 0xFFFD)
|
||||||
#define UNI_HALF_SHIFT ((u8) 10) /* used for shifting by 10 bits */
|
#define UNI_HALF_SHIFT ((u8) 10) /* used for shifting by 10 bits */
|
||||||
#define UNI_HALF_BASE ((CsrUint32) 0x00010000)
|
#define UNI_HALF_BASE ((u32) 0x00010000)
|
||||||
#define UNI_BYTEMASK ((CsrUint32) 0xBF)
|
#define UNI_BYTEMASK ((u32) 0xBF)
|
||||||
#define UNI_BYTEMARK ((CsrUint32) 0x80)
|
#define UNI_BYTEMARK ((u32) 0x80)
|
||||||
|
|
||||||
#define CAPITAL(x) ((x >= 'a') && (x <= 'z') ? ((x) & 0x00DF) : (x))
|
#define CAPITAL(x) ((x >= 'a') && (x <= 'z') ? ((x) & 0x00DF) : (x))
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ static const s8 trailingBytesForUtf8[256] =
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 - 0xFF */
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 - 0xFF */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Values to be substracted from a CsrUint32 when converting from UTF8 to UTF16 */
|
/* Values to be substracted from a u32 when converting from UTF8 to UTF16 */
|
||||||
static const CsrUint32 offsetsFromUtf8[4] =
|
static const u32 offsetsFromUtf8[4] =
|
||||||
{
|
{
|
||||||
0x00000000, 0x00003080, 0x000E2080, 0x03C82080
|
0x00000000, 0x00003080, 0x000E2080, 0x03C82080
|
||||||
};
|
};
|
||||||
|
@ -73,11 +73,11 @@ static const CsrUint32 offsetsFromUtf8[4] =
|
||||||
* Output: A string of UTF-16 characters.
|
* Output: A string of UTF-16 characters.
|
||||||
*
|
*
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
CsrUtf16String *CsrUint32ToUtf16String(CsrUint32 number)
|
CsrUtf16String *CsrUint32ToUtf16String(u32 number)
|
||||||
{
|
{
|
||||||
u16 count, noOfDigits;
|
u16 count, noOfDigits;
|
||||||
CsrUtf16String *output;
|
CsrUtf16String *output;
|
||||||
CsrUint32 tempNumber;
|
u32 tempNumber;
|
||||||
|
|
||||||
/* calculate the number of digits in the output */
|
/* calculate the number of digits in the output */
|
||||||
tempNumber = number;
|
tempNumber = number;
|
||||||
|
@ -113,10 +113,10 @@ CsrUtf16String *CsrUint32ToUtf16String(CsrUint32 number)
|
||||||
* Output: 32 bit number.
|
* Output: 32 bit number.
|
||||||
*
|
*
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
CsrUint32 CsrUtf16StringToUint32(const CsrUtf16String *unicodeString)
|
u32 CsrUtf16StringToUint32(const CsrUtf16String *unicodeString)
|
||||||
{
|
{
|
||||||
u16 numLen, count;
|
u16 numLen, count;
|
||||||
CsrUint32 newNumber = 0;
|
u32 newNumber = 0;
|
||||||
|
|
||||||
numLen = (u16) CsrUtf16StrLen(unicodeString);
|
numLen = (u16) CsrUtf16StrLen(unicodeString);
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ CsrUint32 CsrUtf16StringToUint32(const CsrUtf16String *unicodeString)
|
||||||
* Output: A pointer to an unicoded string.
|
* Output: A pointer to an unicoded string.
|
||||||
*
|
*
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
CsrUtf16String *CsrUtf16MemCpy(CsrUtf16String *dest, const CsrUtf16String *src, CsrUint32 count)
|
CsrUtf16String *CsrUtf16MemCpy(CsrUtf16String *dest, const CsrUtf16String *src, u32 count)
|
||||||
{
|
{
|
||||||
return CsrMemCpy((u8 *) dest, (u8 *) src, count * sizeof(CsrUtf16String));
|
return CsrMemCpy((u8 *) dest, (u8 *) src, count * sizeof(CsrUtf16String));
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ CsrUtf16String *CsrUtf16ConcatenateTexts(const CsrUtf16String *inputText1, const
|
||||||
const CsrUtf16String *inputText3, const CsrUtf16String *inputText4)
|
const CsrUtf16String *inputText3, const CsrUtf16String *inputText4)
|
||||||
{
|
{
|
||||||
CsrUtf16String *outputText;
|
CsrUtf16String *outputText;
|
||||||
CsrUint32 textLen, textLen1, textLen2, textLen3, textLen4;
|
u32 textLen, textLen1, textLen2, textLen3, textLen4;
|
||||||
|
|
||||||
textLen1 = CsrUtf16StrLen(inputText1);
|
textLen1 = CsrUtf16StrLen(inputText1);
|
||||||
textLen2 = CsrUtf16StrLen(inputText2);
|
textLen2 = CsrUtf16StrLen(inputText2);
|
||||||
|
@ -225,9 +225,9 @@ CsrUtf16String *CsrUtf16ConcatenateTexts(const CsrUtf16String *inputText1, const
|
||||||
* Output: The number of 16 bit elements in the string.
|
* Output: The number of 16 bit elements in the string.
|
||||||
*
|
*
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
CsrUint32 CsrUtf16StrLen(const CsrUtf16String *unicodeString)
|
u32 CsrUtf16StrLen(const CsrUtf16String *unicodeString)
|
||||||
{
|
{
|
||||||
CsrUint32 length;
|
u32 length;
|
||||||
|
|
||||||
length = 0;
|
length = 0;
|
||||||
if (unicodeString != NULL)
|
if (unicodeString != NULL)
|
||||||
|
@ -256,10 +256,10 @@ CsrUint32 CsrUtf16StrLen(const CsrUtf16String *unicodeString)
|
||||||
CsrUtf8String *CsrUtf16String2Utf8(const CsrUtf16String *source)
|
CsrUtf8String *CsrUtf16String2Utf8(const CsrUtf16String *source)
|
||||||
{
|
{
|
||||||
CsrUtf8String *dest, *destStart = NULL;
|
CsrUtf8String *dest, *destStart = NULL;
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
CsrUint32 ch;
|
u32 ch;
|
||||||
CsrUint32 length;
|
u32 length;
|
||||||
CsrUint32 sourceLength;
|
u32 sourceLength;
|
||||||
u8 bytes;
|
u8 bytes;
|
||||||
CsrBool appendNull = FALSE;
|
CsrBool appendNull = FALSE;
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ CsrUtf8String *CsrUtf16String2Utf8(const CsrUtf16String *source)
|
||||||
{
|
{
|
||||||
if (i + 1 < sourceLength) /* The low surrogate is in the source */
|
if (i + 1 < sourceLength) /* The low surrogate is in the source */
|
||||||
{
|
{
|
||||||
CsrUint32 ch2 = source[++i];
|
u32 ch2 = source[++i];
|
||||||
if ((ch2 >= UNI_SUR_LOW_START) && (ch2 <= UNI_SUR_LOW_END)) /* And it is a legal low surrogate */
|
if ((ch2 >= UNI_SUR_LOW_START) && (ch2 <= UNI_SUR_LOW_END)) /* And it is a legal low surrogate */
|
||||||
{
|
{
|
||||||
length += 4;
|
length += 4;
|
||||||
|
@ -330,7 +330,7 @@ CsrUtf8String *CsrUtf16String2Utf8(const CsrUtf16String *source)
|
||||||
{
|
{
|
||||||
if (i + 1 < sourceLength) /* The low surrogate is in the source */
|
if (i + 1 < sourceLength) /* The low surrogate is in the source */
|
||||||
{
|
{
|
||||||
CsrUint32 ch2 = source[++i];
|
u32 ch2 = source[++i];
|
||||||
if ((ch2 >= UNI_SUR_LOW_START) && (ch2 <= UNI_SUR_LOW_END)) /* And it is a legal low surrogate, convert to UTF-32 */
|
if ((ch2 >= UNI_SUR_LOW_START) && (ch2 <= UNI_SUR_LOW_END)) /* And it is a legal low surrogate, convert to UTF-32 */
|
||||||
{
|
{
|
||||||
ch = ((ch - UNI_SUR_HIGH_START) << UNI_HALF_SHIFT) + (ch2 - UNI_SUR_LOW_START) + UNI_HALF_BASE;
|
ch = ((ch - UNI_SUR_HIGH_START) << UNI_HALF_SHIFT) + (ch2 - UNI_SUR_LOW_START) + UNI_HALF_BASE;
|
||||||
|
@ -356,19 +356,19 @@ CsrUtf8String *CsrUtf16String2Utf8(const CsrUtf16String *source)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Figure out how many bytes that are required */
|
/* Figure out how many bytes that are required */
|
||||||
if (ch < (CsrUint32) 0x80)
|
if (ch < (u32) 0x80)
|
||||||
{
|
{
|
||||||
bytes = 1;
|
bytes = 1;
|
||||||
}
|
}
|
||||||
else if (ch < (CsrUint32) 0x800)
|
else if (ch < (u32) 0x800)
|
||||||
{
|
{
|
||||||
bytes = 2;
|
bytes = 2;
|
||||||
}
|
}
|
||||||
else if (ch < (CsrUint32) 0x10000)
|
else if (ch < (u32) 0x10000)
|
||||||
{
|
{
|
||||||
bytes = 3;
|
bytes = 3;
|
||||||
}
|
}
|
||||||
else if (ch < (CsrUint32) 0x110000)
|
else if (ch < (u32) 0x110000)
|
||||||
{
|
{
|
||||||
bytes = 4;
|
bytes = 4;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ CsrUtf8String *CsrUtf16String2Utf8(const CsrUtf16String *source)
|
||||||
TRUE if the given code unit is legal.
|
TRUE if the given code unit is legal.
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
static CsrBool isLegalUtf8(const CsrUtf8String *codeUnit, CsrUint32 length)
|
static CsrBool isLegalUtf8(const CsrUtf8String *codeUnit, u32 length)
|
||||||
{
|
{
|
||||||
const CsrUtf8String *srcPtr = codeUnit + length;
|
const CsrUtf8String *srcPtr = codeUnit + length;
|
||||||
u8 byte;
|
u8 byte;
|
||||||
|
@ -633,9 +633,9 @@ CsrUtf16String *CsrUtf82Utf16String(const CsrUtf8String *utf8String)
|
||||||
{
|
{
|
||||||
*dest++ = UNI_REPLACEMENT_CHAR;
|
*dest++ = UNI_REPLACEMENT_CHAR;
|
||||||
}
|
}
|
||||||
else /* It is legal, convert the character to an CsrUint32 */
|
else /* It is legal, convert the character to an u32 */
|
||||||
{
|
{
|
||||||
CsrUint32 ch = 0;
|
u32 ch = 0;
|
||||||
|
|
||||||
switch (extraBytes2Read) /* Everything falls through */
|
switch (extraBytes2Read) /* Everything falls through */
|
||||||
{
|
{
|
||||||
|
@ -731,7 +731,7 @@ CsrUtf16String *CsrUtf16StrCpy(CsrUtf16String *target, const CsrUtf16String *sou
|
||||||
CsrUtf16String *CsrUtf16StringDuplicate(const CsrUtf16String *source)
|
CsrUtf16String *CsrUtf16StringDuplicate(const CsrUtf16String *source)
|
||||||
{
|
{
|
||||||
CsrUtf16String *target = NULL;
|
CsrUtf16String *target = NULL;
|
||||||
CsrUint32 length;
|
u32 length;
|
||||||
|
|
||||||
if (source) /* if source is not NULL*/
|
if (source) /* if source is not NULL*/
|
||||||
{
|
{
|
||||||
|
@ -781,7 +781,7 @@ u16 CsrUtf16StrICmp(const CsrUtf16String *string1, const CsrUtf16String *string2
|
||||||
* Output: 0: if the strings are identical.
|
* Output: 0: if the strings are identical.
|
||||||
*
|
*
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
u16 CsrUtf16StrNICmp(const CsrUtf16String *string1, const CsrUtf16String *string2, CsrUint32 count)
|
u16 CsrUtf16StrNICmp(const CsrUtf16String *string1, const CsrUtf16String *string2, u32 count)
|
||||||
{
|
{
|
||||||
while ((*string1 || *string2) && count--)
|
while ((*string1 || *string2) && count--)
|
||||||
{
|
{
|
||||||
|
@ -814,7 +814,7 @@ CsrUtf16String *CsrUtf16String2XML(CsrUtf16String *str)
|
||||||
CsrUtf16String *scanString;
|
CsrUtf16String *scanString;
|
||||||
CsrUtf16String *outputString = NULL;
|
CsrUtf16String *outputString = NULL;
|
||||||
CsrUtf16String *resultString = str;
|
CsrUtf16String *resultString = str;
|
||||||
CsrUint32 stringLength = 0;
|
u32 stringLength = 0;
|
||||||
CsrBool encodeChars = FALSE;
|
CsrBool encodeChars = FALSE;
|
||||||
|
|
||||||
scanString = str;
|
scanString = str;
|
||||||
|
@ -907,7 +907,7 @@ CsrUtf16String *CsrXML2Utf16String(CsrUtf16String *str)
|
||||||
CsrUtf16String *scanString;
|
CsrUtf16String *scanString;
|
||||||
CsrUtf16String *outputString = NULL;
|
CsrUtf16String *outputString = NULL;
|
||||||
CsrUtf16String *resultString = str;
|
CsrUtf16String *resultString = str;
|
||||||
CsrUint32 stringLength = 0;
|
u32 stringLength = 0;
|
||||||
CsrBool encodeChars = FALSE;
|
CsrBool encodeChars = FALSE;
|
||||||
|
|
||||||
scanString = str;
|
scanString = str;
|
||||||
|
@ -1026,14 +1026,14 @@ CsrInt32 CsrUtf8StrNCmp(const CsrUtf8String *string1, const CsrUtf8String *strin
|
||||||
return CsrStrNCmp((const CsrCharString *) string1, (const CsrCharString *) string2, count);
|
return CsrStrNCmp((const CsrCharString *) string1, (const CsrCharString *) string2, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
CsrUint32 CsrUtf8StringLengthInBytes(const CsrUtf8String *string)
|
u32 CsrUtf8StringLengthInBytes(const CsrUtf8String *string)
|
||||||
{
|
{
|
||||||
CsrSize length = 0;
|
CsrSize length = 0;
|
||||||
if (string)
|
if (string)
|
||||||
{
|
{
|
||||||
length = CsrStrLen((const CsrCharString *) string);
|
length = CsrStrLen((const CsrCharString *) string);
|
||||||
}
|
}
|
||||||
return (CsrUint32) length;
|
return (u32) length;
|
||||||
}
|
}
|
||||||
|
|
||||||
CsrUtf8String *CsrUtf8StrCpy(CsrUtf8String *target, const CsrUtf8String *source)
|
CsrUtf8String *CsrUtf8StrCpy(CsrUtf8String *target, const CsrUtf8String *source)
|
||||||
|
@ -1093,7 +1093,7 @@ CsrUtf8String *CsrUtf8StrDup(const CsrUtf8String *source)
|
||||||
CsrUtf8String *CsrUtf8StringConcatenateTexts(const CsrUtf8String *inputText1, const CsrUtf8String *inputText2, const CsrUtf8String *inputText3, const CsrUtf8String *inputText4)
|
CsrUtf8String *CsrUtf8StringConcatenateTexts(const CsrUtf8String *inputText1, const CsrUtf8String *inputText2, const CsrUtf8String *inputText3, const CsrUtf8String *inputText4)
|
||||||
{
|
{
|
||||||
CsrUtf8String *outputText;
|
CsrUtf8String *outputText;
|
||||||
CsrUint32 textLen, textLen1, textLen2, textLen3, textLen4;
|
u32 textLen, textLen1, textLen2, textLen3, textLen4;
|
||||||
|
|
||||||
textLen1 = CsrUtf8StringLengthInBytes(inputText1);
|
textLen1 = CsrUtf8StringLengthInBytes(inputText1);
|
||||||
textLen2 = CsrUtf8StringLengthInBytes(inputText2);
|
textLen2 = CsrUtf8StringLengthInBytes(inputText2);
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
/* Time proportional with the number of 1's */
|
/* Time proportional with the number of 1's */
|
||||||
u8 CsrBitCountSparse(CsrUint32 n)
|
u8 CsrBitCountSparse(u32 n)
|
||||||
{
|
{
|
||||||
u8 count = 0;
|
u8 count = 0;
|
||||||
|
|
||||||
|
@ -35,11 +35,11 @@ u8 CsrBitCountSparse(CsrUint32 n)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Time proportional with the number of 0's */
|
/* Time proportional with the number of 0's */
|
||||||
u8 CsrBitCountDense(CsrUint32 n)
|
u8 CsrBitCountDense(u32 n)
|
||||||
{
|
{
|
||||||
u8 count = 8 * sizeof(CsrUint32);
|
u8 count = 8 * sizeof(u32);
|
||||||
|
|
||||||
n ^= (CsrUint32) (-1);
|
n ^= (u32) (-1);
|
||||||
|
|
||||||
while (n)
|
while (n)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CsrBool CsrHexStrToUint32(const CsrCharString *string, CsrUint32 *returnValue)
|
CsrBool CsrHexStrToUint32(const CsrCharString *string, u32 *returnValue)
|
||||||
{
|
{
|
||||||
u16 currentIndex = 0;
|
u16 currentIndex = 0;
|
||||||
*returnValue = 0;
|
*returnValue = 0;
|
||||||
|
@ -125,7 +125,7 @@ CsrBool CsrHexStrToUint32(const CsrCharString *string, CsrUint32 *returnValue)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CsrUint32 CsrPow(CsrUint32 base, CsrUint32 exponent)
|
u32 CsrPow(u32 base, u32 exponent)
|
||||||
{
|
{
|
||||||
if (exponent == 0)
|
if (exponent == 0)
|
||||||
{
|
{
|
||||||
|
@ -133,7 +133,7 @@ CsrUint32 CsrPow(CsrUint32 base, CsrUint32 exponent)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CsrUint32 i, t = base;
|
u32 i, t = base;
|
||||||
|
|
||||||
for (i = 1; i < exponent; i++)
|
for (i = 1; i < exponent; i++)
|
||||||
{
|
{
|
||||||
|
@ -204,14 +204,14 @@ void CsrUInt16ToHex(u16 number, CsrCharString *str)
|
||||||
str[4] = '\0';
|
str[4] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void CsrUInt32ToHex(CsrUint32 number, CsrCharString *str)
|
void CsrUInt32ToHex(u32 number, CsrCharString *str)
|
||||||
{
|
{
|
||||||
u16 index;
|
u16 index;
|
||||||
CsrUint32 currentValue;
|
u32 currentValue;
|
||||||
|
|
||||||
for (index = 0; index < 8; index++)
|
for (index = 0; index < 8; index++)
|
||||||
{
|
{
|
||||||
currentValue = (CsrUint32) (number & 0x0000000F);
|
currentValue = (u32) (number & 0x0000000F);
|
||||||
number >>= 4;
|
number >>= 4;
|
||||||
str[7 - index] = (char) (currentValue > 9 ? currentValue + 55 : currentValue + '0');
|
str[7 - index] = (char) (currentValue > 9 ? currentValue + 55 : currentValue + '0');
|
||||||
}
|
}
|
||||||
|
@ -324,11 +324,11 @@ CsrCharString *CsrStrNCpyZero(CsrCharString *dest,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert string with base 10 to integer */
|
/* Convert string with base 10 to integer */
|
||||||
CsrUint32 CsrStrToInt(const CsrCharString *str)
|
u32 CsrStrToInt(const CsrCharString *str)
|
||||||
{
|
{
|
||||||
s16 i;
|
s16 i;
|
||||||
CsrUint32 res;
|
u32 res;
|
||||||
CsrUint32 digit;
|
u32 digit;
|
||||||
|
|
||||||
res = 0;
|
res = 0;
|
||||||
digit = 1;
|
digit = 1;
|
||||||
|
@ -350,7 +350,7 @@ CsrUint32 CsrStrToInt(const CsrCharString *str)
|
||||||
CsrCharString *CsrStrDup(const CsrCharString *string)
|
CsrCharString *CsrStrDup(const CsrCharString *string)
|
||||||
{
|
{
|
||||||
CsrCharString *copy;
|
CsrCharString *copy;
|
||||||
CsrUint32 len;
|
u32 len;
|
||||||
|
|
||||||
copy = NULL;
|
copy = NULL;
|
||||||
if (string != NULL)
|
if (string != NULL)
|
||||||
|
@ -366,7 +366,7 @@ int CsrStrNICmp(const CsrCharString *string1,
|
||||||
const CsrCharString *string2,
|
const CsrCharString *string2,
|
||||||
CsrSize count)
|
CsrSize count)
|
||||||
{
|
{
|
||||||
CsrUint32 index;
|
u32 index;
|
||||||
int returnValue = 0;
|
int returnValue = 0;
|
||||||
|
|
||||||
for (index = 0; index < count; index++)
|
for (index = 0; index < count; index++)
|
||||||
|
|
|
@ -18,21 +18,21 @@ extern "C" {
|
||||||
#include "csr_macro.h"
|
#include "csr_macro.h"
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* Bits - intended to operate on CsrUint32 values */
|
/* Bits - intended to operate on u32 values */
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
u8 CsrBitCountSparse(CsrUint32 n);
|
u8 CsrBitCountSparse(u32 n);
|
||||||
u8 CsrBitCountDense(CsrUint32 n);
|
u8 CsrBitCountDense(u32 n);
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* Base conversion */
|
/* Base conversion */
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue);
|
CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue);
|
||||||
CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue);
|
CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue);
|
||||||
CsrBool CsrHexStrToUint32(const CsrCharString *string, CsrUint32 *returnValue);
|
CsrBool CsrHexStrToUint32(const CsrCharString *string, u32 *returnValue);
|
||||||
CsrUint32 CsrPow(CsrUint32 base, CsrUint32 exponent);
|
u32 CsrPow(u32 base, u32 exponent);
|
||||||
void CsrIntToBase10(CsrInt32 number, CsrCharString *str);
|
void CsrIntToBase10(CsrInt32 number, CsrCharString *str);
|
||||||
void CsrUInt16ToHex(u16 number, CsrCharString *str);
|
void CsrUInt16ToHex(u16 number, CsrCharString *str);
|
||||||
void CsrUInt32ToHex(CsrUint32 number, CsrCharString *str);
|
void CsrUInt32ToHex(u32 number, CsrCharString *str);
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* Standard C Library functions */
|
/* Standard C Library functions */
|
||||||
|
@ -74,7 +74,7 @@ CsrInt32 CsrVsnprintf(CsrCharString *string, CsrSize count, const CsrCharString
|
||||||
void *CsrMemDup(const void *buf1, CsrSize count);
|
void *CsrMemDup(const void *buf1, CsrSize count);
|
||||||
int CsrStrNICmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count);
|
int CsrStrNICmp(const CsrCharString *string1, const CsrCharString *string2, CsrSize count);
|
||||||
CsrCharString *CsrStrDup(const CsrCharString *string);
|
CsrCharString *CsrStrDup(const CsrCharString *string);
|
||||||
CsrUint32 CsrStrToInt(const CsrCharString *string);
|
u32 CsrStrToInt(const CsrCharString *string);
|
||||||
CsrCharString *CsrStrNCpyZero(CsrCharString *dest, const CsrCharString *src, CsrSize count);
|
CsrCharString *CsrStrNCpyZero(CsrCharString *dest, const CsrCharString *src, CsrSize count);
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
|
@ -122,9 +122,9 @@ extern void CsrWifiFsmShutdown(CsrWifiFsmContext *context);
|
||||||
* @param[in] context : FSM context
|
* @param[in] context : FSM context
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* CsrUint32 Time in ms until next timeout or 0xFFFFFFFF for no timer set
|
* u32 Time in ms until next timeout or 0xFFFFFFFF for no timer set
|
||||||
*/
|
*/
|
||||||
extern CsrUint32 CsrWifiFsmExecute(CsrWifiFsmContext *context);
|
extern u32 CsrWifiFsmExecute(CsrWifiFsmContext *context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
|
@ -174,9 +174,9 @@ extern void CsrWifiFsmSendEventExternal(CsrWifiFsmContext *context, CsrWifiFsmEv
|
||||||
* @param[in] context : FSM context
|
* @param[in] context : FSM context
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* CsrUint32 32 bit ms tick
|
* u32 32 bit ms tick
|
||||||
*/
|
*/
|
||||||
extern CsrUint32 CsrWifiFsmGetTimeOfDayMs(CsrWifiFsmContext *context);
|
extern u32 CsrWifiFsmGetTimeOfDayMs(CsrWifiFsmContext *context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
|
@ -188,9 +188,9 @@ extern CsrUint32 CsrWifiFsmGetTimeOfDayMs(CsrWifiFsmContext *context);
|
||||||
* @param[in] context : FSM context
|
* @param[in] context : FSM context
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* CsrUint32 Time in ms until next timeout or 0xFFFFFFFF for no timer set
|
* u32 Time in ms until next timeout or 0xFFFFFFFF for no timer set
|
||||||
*/
|
*/
|
||||||
extern CsrUint32 CsrWifiFsmGetNextTimeout(CsrWifiFsmContext *context);
|
extern u32 CsrWifiFsmGetNextTimeout(CsrWifiFsmContext *context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
|
@ -217,7 +217,7 @@ extern void CsrWifiFsmFastForward(CsrWifiFsmContext *context, u16 ms);
|
||||||
* @return
|
* @return
|
||||||
* void
|
* void
|
||||||
*/
|
*/
|
||||||
extern void CsrWifiFsmTestAdvanceTime(CsrWifiFsmContext *context, CsrUint32 ms);
|
extern void CsrWifiFsmTestAdvanceTime(CsrWifiFsmContext *context, u32 ms);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
|
|
|
@ -79,7 +79,7 @@ typedef struct CsrWifiFsmTimer
|
||||||
struct CsrWifiFsmTimer *next;
|
struct CsrWifiFsmTimer *next;
|
||||||
|
|
||||||
CsrWifiFsmTimerId timerid;
|
CsrWifiFsmTimerId timerid;
|
||||||
CsrUint32 timeoutTimeMs;
|
u32 timeoutTimeMs;
|
||||||
} CsrWifiFsmTimer;
|
} CsrWifiFsmTimer;
|
||||||
|
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ typedef void (*CsrWifiFsmDumpFnPtr)(CsrWifiFsmContext *context, void *fsmData);
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrUint32 eventid;
|
u32 eventid;
|
||||||
CsrWifiFsmTransitionFnPtr transition;
|
CsrWifiFsmTransitionFnPtr transition;
|
||||||
#ifdef CSR_LOG_ENABLE
|
#ifdef CSR_LOG_ENABLE
|
||||||
const CsrCharString *transitionName;
|
const CsrCharString *transitionName;
|
||||||
|
@ -253,7 +253,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const CsrCharString *processName;
|
const CsrCharString *processName;
|
||||||
const CsrUint32 processId;
|
const u32 processId;
|
||||||
const CsrWifiFsmTransitionFunctionTable transitionTable;
|
const CsrWifiFsmTransitionFunctionTable transitionTable;
|
||||||
const CsrWifiFsmTableEntry unhandledTransitions;
|
const CsrWifiFsmTableEntry unhandledTransitions;
|
||||||
const CsrWifiFsmTableEntry ignoreFunctions;
|
const CsrWifiFsmTableEntry ignoreFunctions;
|
||||||
|
@ -389,7 +389,7 @@ struct CsrWifiFsmContext
|
||||||
#ifdef CSR_WIFI_FSM_MUTEX_ENABLE
|
#ifdef CSR_WIFI_FSM_MUTEX_ENABLE
|
||||||
CsrMutexHandle externalEventQueueLock; /* The external event queue mutex */
|
CsrMutexHandle externalEventQueueLock; /* The external event queue mutex */
|
||||||
#endif
|
#endif
|
||||||
CsrUint32 timeOffset; /* Amount to adjust the TimeOfDayMs by */
|
u32 timeOffset; /* Amount to adjust the TimeOfDayMs by */
|
||||||
CsrWifiFsmTimerList timerQueue; /* The internal timer queue */
|
CsrWifiFsmTimerList timerQueue; /* The internal timer queue */
|
||||||
CsrBool useTempSaveList; /* Should the temp save list be used */
|
CsrBool useTempSaveList; /* Should the temp save list be used */
|
||||||
CsrWifiFsmEventList tempSaveList; /* The temp save event queue */
|
CsrWifiFsmEventList tempSaveList; /* The temp save event queue */
|
||||||
|
@ -409,7 +409,7 @@ struct CsrWifiFsmContext
|
||||||
|
|
||||||
#ifndef CSR_WIFI_FSM_SCHEDULER_DISABLED
|
#ifndef CSR_WIFI_FSM_SCHEDULER_DISABLED
|
||||||
CsrSchedTid schedTimerId; /* Scheduler TimerId for use in Scheduler Tasks */
|
CsrSchedTid schedTimerId; /* Scheduler TimerId for use in Scheduler Tasks */
|
||||||
CsrUint32 schedTimerNexttimeoutMs; /* Next timeout time for the current timer */
|
u32 schedTimerNexttimeoutMs; /* Next timeout time for the current timer */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CSR_WIFI_FSM_MUTEX_ENABLE
|
#ifdef CSR_WIFI_FSM_MUTEX_ENABLE
|
||||||
|
|
|
@ -99,11 +99,11 @@ u16 CardAreAllFromHostDataSlotsEmpty(card_t *card);
|
||||||
|
|
||||||
CsrResult card_start_processor(card_t *card, enum unifi_dbg_processors_select which);
|
CsrResult card_start_processor(card_t *card, enum unifi_dbg_processors_select which);
|
||||||
|
|
||||||
CsrResult card_wait_for_firmware_to_start(card_t *card, CsrUint32 *paddr);
|
CsrResult card_wait_for_firmware_to_start(card_t *card, u32 *paddr);
|
||||||
|
|
||||||
CsrResult unifi_dl_firmware(card_t *card, void *arg);
|
CsrResult unifi_dl_firmware(card_t *card, void *arg);
|
||||||
CsrResult unifi_dl_patch(card_t *card, void *arg, CsrUint32 boot_ctrl);
|
CsrResult unifi_dl_patch(card_t *card, void *arg, u32 boot_ctrl);
|
||||||
CsrResult unifi_do_loader_op(card_t *card, CsrUint32 op_addr, u8 opcode);
|
CsrResult unifi_do_loader_op(card_t *card, u32 op_addr, u8 opcode);
|
||||||
void* unifi_dl_fw_read_start(card_t *card, s8 is_fw);
|
void* unifi_dl_fw_read_start(card_t *card, s8 is_fw);
|
||||||
|
|
||||||
CsrResult unifi_coredump_handle_request(card_t *card);
|
CsrResult unifi_coredump_handle_request(card_t *card);
|
||||||
|
|
|
@ -67,7 +67,7 @@ static CsrResult unifi_read_chip_version(card_t *card);
|
||||||
card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv)
|
card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv)
|
||||||
{
|
{
|
||||||
card_t *card;
|
card_t *card;
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
|
|
||||||
func_enter();
|
func_enter();
|
||||||
|
|
||||||
|
@ -86,9 +86,9 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv)
|
||||||
card->unifi_interrupt_seq = 1;
|
card->unifi_interrupt_seq = 1;
|
||||||
|
|
||||||
/* Make these invalid. */
|
/* Make these invalid. */
|
||||||
card->proc_select = (CsrUint32)(-1);
|
card->proc_select = (u32)(-1);
|
||||||
card->dmem_page = (CsrUint32)(-1);
|
card->dmem_page = (u32)(-1);
|
||||||
card->pmem_page = (CsrUint32)(-1);
|
card->pmem_page = (u32)(-1);
|
||||||
|
|
||||||
card->bh_reason_host = 0;
|
card->bh_reason_host = 0;
|
||||||
card->bh_reason_unifi = 0;
|
card->bh_reason_unifi = 0;
|
||||||
|
@ -137,7 +137,7 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv)
|
||||||
* warnings when casting pointer types, e.g. on 64-bit systems.
|
* warnings when casting pointer types, e.g. on 64-bit systems.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
CsrUint32 val = 0x01234567;
|
u32 val = 0x01234567;
|
||||||
|
|
||||||
if (*((u8 *)&val) == 0x01)
|
if (*((u8 *)&val) == 0x01)
|
||||||
{
|
{
|
||||||
|
@ -288,9 +288,9 @@ CsrResult unifi_init(card_t *card)
|
||||||
* The page registers will be maintained by unifi_read...() and
|
* The page registers will be maintained by unifi_read...() and
|
||||||
* unifi_write...().
|
* unifi_write...().
|
||||||
*/
|
*/
|
||||||
card->proc_select = (CsrUint32)(-1);
|
card->proc_select = (u32)(-1);
|
||||||
card->dmem_page = (CsrUint32)(-1);
|
card->dmem_page = (u32)(-1);
|
||||||
card->pmem_page = (CsrUint32)(-1);
|
card->pmem_page = (u32)(-1);
|
||||||
r = unifi_write_direct16(card, ChipHelper_HOST_WINDOW3_PAGE(card->helper) * 2, 0);
|
r = unifi_write_direct16(card, ChipHelper_HOST_WINDOW3_PAGE(card->helper) * 2, 0);
|
||||||
if (r == CSR_WIFI_HIP_RESULT_NO_DEVICE)
|
if (r == CSR_WIFI_HIP_RESULT_NO_DEVICE)
|
||||||
{
|
{
|
||||||
|
@ -598,7 +598,7 @@ static void _build_sdio_config_data(sdio_config_data_t *cfg_data,
|
||||||
*/
|
*/
|
||||||
static CsrResult card_hw_init(card_t *card)
|
static CsrResult card_hw_init(card_t *card)
|
||||||
{
|
{
|
||||||
CsrUint32 slut_address;
|
u32 slut_address;
|
||||||
u16 initialised;
|
u16 initialised;
|
||||||
u16 finger_print;
|
u16 finger_print;
|
||||||
symbol_t slut;
|
symbol_t slut;
|
||||||
|
@ -692,7 +692,7 @@ static CsrResult card_hw_init(card_t *card)
|
||||||
while (!search_4slut_again)
|
while (!search_4slut_again)
|
||||||
{
|
{
|
||||||
u16 s;
|
u16 s;
|
||||||
CsrUint32 l;
|
u32 l;
|
||||||
|
|
||||||
r = unifi_card_read16(card, slut_address, &s);
|
r = unifi_card_read16(card, slut_address, &s);
|
||||||
if (r != CSR_RESULT_SUCCESS)
|
if (r != CSR_RESULT_SUCCESS)
|
||||||
|
@ -810,7 +810,7 @@ static CsrResult card_hw_init(card_t *card)
|
||||||
|
|
||||||
case CSR_SLT_BUILD_ID_NUMBER:
|
case CSR_SLT_BUILD_ID_NUMBER:
|
||||||
{
|
{
|
||||||
CsrUint32 n;
|
u32 n;
|
||||||
r = unifi_read32(card, slut.obj, &n);
|
r = unifi_read32(card, slut.obj, &n);
|
||||||
if (r == CSR_WIFI_HIP_RESULT_NO_DEVICE)
|
if (r == CSR_WIFI_HIP_RESULT_NO_DEVICE)
|
||||||
{
|
{
|
||||||
|
@ -1233,7 +1233,7 @@ static CsrResult card_wait_for_unifi_to_disable(card_t *card)
|
||||||
* CSR_RESULT_SUCCESS on success, CSR error code on failure.
|
* CSR_RESULT_SUCCESS on success, CSR error code on failure.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult card_wait_for_firmware_to_start(card_t *card, CsrUint32 *paddr)
|
CsrResult card_wait_for_firmware_to_start(card_t *card, u32 *paddr)
|
||||||
{
|
{
|
||||||
CsrInt32 i;
|
CsrInt32 i;
|
||||||
u16 mbox0, mbox1;
|
u16 mbox0, mbox1;
|
||||||
|
@ -1335,7 +1335,7 @@ CsrResult card_wait_for_firmware_to_start(card_t *card, CsrUint32 *paddr)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
*paddr = (((CsrUint32)mbox1 << 16) | mbox0);
|
*paddr = (((u32)mbox1 << 16) | mbox0);
|
||||||
|
|
||||||
func_exit();
|
func_exit();
|
||||||
return CSR_RESULT_SUCCESS;
|
return CSR_RESULT_SUCCESS;
|
||||||
|
@ -1681,7 +1681,7 @@ static CsrResult card_allocate_memory_resources(card_t *card)
|
||||||
|
|
||||||
/* Allocate memory for the array used for slot host tag mapping */
|
/* Allocate memory for the array used for slot host tag mapping */
|
||||||
card->fh_slot_host_tag_record =
|
card->fh_slot_host_tag_record =
|
||||||
(CsrUint32 *)CsrMemAlloc(n * sizeof(CsrUint32));
|
(u32 *)CsrMemAlloc(n * sizeof(u32));
|
||||||
|
|
||||||
if (card->fh_slot_host_tag_record == NULL)
|
if (card->fh_slot_host_tag_record == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2640,7 +2640,7 @@ static CsrResult unifi_prepare_hw(card_t *card)
|
||||||
|
|
||||||
static CsrResult unifi_read_chip_version(card_t *card)
|
static CsrResult unifi_read_chip_version(card_t *card)
|
||||||
{
|
{
|
||||||
CsrUint32 gbl_chip_version;
|
u32 gbl_chip_version;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
u16 ver;
|
u16 ver;
|
||||||
|
|
||||||
|
@ -3025,14 +3025,14 @@ CsrResult unifi_card_hard_reset(card_t *card)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
const struct chip_helper_reset_values *init_data;
|
const struct chip_helper_reset_values *init_data;
|
||||||
CsrUint32 chunks;
|
u32 chunks;
|
||||||
|
|
||||||
func_enter();
|
func_enter();
|
||||||
|
|
||||||
/* Clear cache of page registers */
|
/* Clear cache of page registers */
|
||||||
card->proc_select = (CsrUint32)(-1);
|
card->proc_select = (u32)(-1);
|
||||||
card->dmem_page = (CsrUint32)(-1);
|
card->dmem_page = (u32)(-1);
|
||||||
card->pmem_page = (CsrUint32)(-1);
|
card->pmem_page = (u32)(-1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to have a valid card->helper before we use software hard reset.
|
* We need to have a valid card->helper before we use software hard reset.
|
||||||
|
@ -3665,7 +3665,7 @@ static CsrResult firmware_present_in_flash(card_t *card)
|
||||||
static void bootstrap_chip_hw(card_t *card)
|
static void bootstrap_chip_hw(card_t *card)
|
||||||
{
|
{
|
||||||
const struct chip_helper_init_values *vals;
|
const struct chip_helper_init_values *vals;
|
||||||
CsrUint32 i, len;
|
u32 i, len;
|
||||||
void *sdio = card->sdio_if;
|
void *sdio = card->sdio_if;
|
||||||
CsrResult csrResult;
|
CsrResult csrResult;
|
||||||
|
|
||||||
|
@ -3816,7 +3816,7 @@ CsrResult card_start_processor(card_t *card, enum unifi_dbg_processors_select wh
|
||||||
* None
|
* None
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void unifi_set_interrupt_mode(card_t *card, CsrUint32 mode)
|
void unifi_set_interrupt_mode(card_t *card, u32 mode)
|
||||||
{
|
{
|
||||||
if (mode == CSR_WIFI_INTMODE_RUN_BH_ONCE)
|
if (mode == CSR_WIFI_INTMODE_RUN_BH_ONCE)
|
||||||
{
|
{
|
||||||
|
@ -4104,7 +4104,7 @@ void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo)
|
||||||
{
|
{
|
||||||
CsrInt32 count_fhr;
|
CsrInt32 count_fhr;
|
||||||
s16 t;
|
s16 t;
|
||||||
CsrUint32 occupied_fh;
|
u32 occupied_fh;
|
||||||
|
|
||||||
q_t *sigq;
|
q_t *sigq;
|
||||||
u16 nslots, i;
|
u16 nslots, i;
|
||||||
|
|
|
@ -173,7 +173,7 @@ typedef struct
|
||||||
u16 initialised;
|
u16 initialised;
|
||||||
|
|
||||||
/* Added by protocol version 0x0001 */
|
/* Added by protocol version 0x0001 */
|
||||||
CsrUint32 overlay_size;
|
u32 overlay_size;
|
||||||
|
|
||||||
/* Added by protocol version 0x0300 */
|
/* Added by protocol version 0x0300 */
|
||||||
u16 data_slot_round;
|
u16 data_slot_round;
|
||||||
|
@ -407,11 +407,11 @@ struct card
|
||||||
* array is indexed by slot numbers and each index stores
|
* array is indexed by slot numbers and each index stores
|
||||||
* information of the last host tag it was used for
|
* information of the last host tag it was used for
|
||||||
*/
|
*/
|
||||||
CsrUint32 *fh_slot_host_tag_record;
|
u32 *fh_slot_host_tag_record;
|
||||||
|
|
||||||
|
|
||||||
/* Info read from Symbol Table during probe */
|
/* Info read from Symbol Table during probe */
|
||||||
CsrUint32 build_id;
|
u32 build_id;
|
||||||
CsrCharString build_id_string[128];
|
CsrCharString build_id_string[128];
|
||||||
|
|
||||||
/* Retrieve from SDIO driver. */
|
/* Retrieve from SDIO driver. */
|
||||||
|
@ -455,7 +455,7 @@ struct card
|
||||||
u8 request_max_clock;
|
u8 request_max_clock;
|
||||||
|
|
||||||
/* Last SDIO clock frequency set */
|
/* Last SDIO clock frequency set */
|
||||||
CsrUint32 sdio_clock_speed;
|
u32 sdio_clock_speed;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Current host state (copy of value in IOABORT register and
|
* Current host state (copy of value in IOABORT register and
|
||||||
|
@ -518,7 +518,7 @@ struct card
|
||||||
* SHARED_IO_INTERRUPT register.
|
* SHARED_IO_INTERRUPT register.
|
||||||
* Flag to say we need to generate an interrupt at end of processing.
|
* Flag to say we need to generate an interrupt at end of processing.
|
||||||
*/
|
*/
|
||||||
CsrUint32 unifi_interrupt_seq;
|
u32 unifi_interrupt_seq;
|
||||||
u8 generate_interrupt;
|
u8 generate_interrupt;
|
||||||
|
|
||||||
|
|
||||||
|
@ -548,17 +548,17 @@ struct card
|
||||||
sdio_config_data_t config_data;
|
sdio_config_data_t config_data;
|
||||||
|
|
||||||
/* SDIO address of the Initialised flag and Control Data struct */
|
/* SDIO address of the Initialised flag and Control Data struct */
|
||||||
CsrUint32 init_flag_addr;
|
u32 init_flag_addr;
|
||||||
CsrUint32 sdio_ctrl_addr;
|
u32 sdio_ctrl_addr;
|
||||||
|
|
||||||
/* The last value written to the Shared Data Memory Page register */
|
/* The last value written to the Shared Data Memory Page register */
|
||||||
CsrUint32 proc_select;
|
u32 proc_select;
|
||||||
CsrUint32 dmem_page;
|
u32 dmem_page;
|
||||||
CsrUint32 pmem_page;
|
u32 pmem_page;
|
||||||
|
|
||||||
/* SDIO traffic counters limited to 32 bits for Synergy compatibility */
|
/* SDIO traffic counters limited to 32 bits for Synergy compatibility */
|
||||||
CsrUint32 sdio_bytes_read;
|
u32 sdio_bytes_read;
|
||||||
CsrUint32 sdio_bytes_written;
|
u32 sdio_bytes_written;
|
||||||
|
|
||||||
u8 memory_resources_allocated;
|
u8 memory_resources_allocated;
|
||||||
|
|
||||||
|
@ -585,42 +585,42 @@ struct card
|
||||||
#ifdef CSR_WIFI_HIP_DATA_PLANE_PROFILE
|
#ifdef CSR_WIFI_HIP_DATA_PLANE_PROFILE
|
||||||
struct cmd_profile
|
struct cmd_profile
|
||||||
{
|
{
|
||||||
CsrUint32 cmd52_count;
|
u32 cmd52_count;
|
||||||
CsrUint32 cmd53_count;
|
u32 cmd53_count;
|
||||||
CsrUint32 tx_count;
|
u32 tx_count;
|
||||||
CsrUint32 tx_cfm_count;
|
u32 tx_cfm_count;
|
||||||
CsrUint32 rx_count;
|
u32 rx_count;
|
||||||
CsrUint32 bh_count;
|
u32 bh_count;
|
||||||
CsrUint32 process_count;
|
u32 process_count;
|
||||||
CsrUint32 protocol_count;
|
u32 protocol_count;
|
||||||
|
|
||||||
CsrUint32 cmd52_f0_r_count;
|
u32 cmd52_f0_r_count;
|
||||||
CsrUint32 cmd52_f0_w_count;
|
u32 cmd52_f0_w_count;
|
||||||
CsrUint32 cmd52_r8or16_count;
|
u32 cmd52_r8or16_count;
|
||||||
CsrUint32 cmd52_w8or16_count;
|
u32 cmd52_w8or16_count;
|
||||||
CsrUint32 cmd52_r16_count;
|
u32 cmd52_r16_count;
|
||||||
CsrUint32 cmd52_w16_count;
|
u32 cmd52_w16_count;
|
||||||
CsrUint32 cmd52_r32_count;
|
u32 cmd52_r32_count;
|
||||||
|
|
||||||
CsrUint32 sdio_cmd_signal;
|
u32 sdio_cmd_signal;
|
||||||
CsrUint32 sdio_cmd_clear_slot;
|
u32 sdio_cmd_clear_slot;
|
||||||
CsrUint32 sdio_cmd_to_host;
|
u32 sdio_cmd_to_host;
|
||||||
CsrUint32 sdio_cmd_from_host;
|
u32 sdio_cmd_from_host;
|
||||||
CsrUint32 sdio_cmd_from_host_and_clear;
|
u32 sdio_cmd_from_host_and_clear;
|
||||||
} hip_prof;
|
} hip_prof;
|
||||||
struct cmd_profile cmd_prof;
|
struct cmd_profile cmd_prof;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Interrupt processing mode flags */
|
/* Interrupt processing mode flags */
|
||||||
CsrUint32 intmode;
|
u32 intmode;
|
||||||
|
|
||||||
#ifdef UNIFI_DEBUG
|
#ifdef UNIFI_DEBUG
|
||||||
u8 lsb;
|
u8 lsb;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Historic firmware panic codes */
|
/* Historic firmware panic codes */
|
||||||
CsrUint32 panic_data_phy_addr;
|
u32 panic_data_phy_addr;
|
||||||
CsrUint32 panic_data_mac_addr;
|
u32 panic_data_mac_addr;
|
||||||
u16 last_phy_panic_code;
|
u16 last_phy_panic_code;
|
||||||
u16 last_phy_panic_arg;
|
u16 last_phy_panic_arg;
|
||||||
u16 last_mac_panic_code;
|
u16 last_mac_panic_code;
|
||||||
|
@ -657,34 +657,34 @@ CsrInt32 card_read_signal_counts(card_t *card);
|
||||||
bulk_data_desc_t* card_find_data_slot(card_t *card, s16 slot);
|
bulk_data_desc_t* card_find_data_slot(card_t *card, s16 slot);
|
||||||
|
|
||||||
|
|
||||||
CsrResult unifi_read32(card_t *card, CsrUint32 unifi_addr, CsrUint32 *pdata);
|
CsrResult unifi_read32(card_t *card, u32 unifi_addr, u32 *pdata);
|
||||||
CsrResult unifi_readnz(card_t *card, CsrUint32 unifi_addr,
|
CsrResult unifi_readnz(card_t *card, u32 unifi_addr,
|
||||||
void *pdata, u16 len);
|
void *pdata, u16 len);
|
||||||
CsrInt32 unifi_read_shared_count(card_t *card, CsrUint32 addr);
|
CsrInt32 unifi_read_shared_count(card_t *card, u32 addr);
|
||||||
|
|
||||||
CsrResult unifi_writen(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len);
|
CsrResult unifi_writen(card_t *card, u32 unifi_addr, void *pdata, u16 len);
|
||||||
|
|
||||||
CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle,
|
CsrResult unifi_bulk_rw(card_t *card, u32 handle,
|
||||||
void *pdata, CsrUint32 len, s16 direction);
|
void *pdata, u32 len, s16 direction);
|
||||||
CsrResult unifi_bulk_rw_noretry(card_t *card, CsrUint32 handle,
|
CsrResult unifi_bulk_rw_noretry(card_t *card, u32 handle,
|
||||||
void *pdata, CsrUint32 len, s16 direction);
|
void *pdata, u32 len, s16 direction);
|
||||||
#define UNIFI_SDIO_READ 0
|
#define UNIFI_SDIO_READ 0
|
||||||
#define UNIFI_SDIO_WRITE 1
|
#define UNIFI_SDIO_WRITE 1
|
||||||
|
|
||||||
CsrResult unifi_read_8_or_16(card_t *card, CsrUint32 unifi_addr, u8 *pdata);
|
CsrResult unifi_read_8_or_16(card_t *card, u32 unifi_addr, u8 *pdata);
|
||||||
CsrResult unifi_write_8_or_16(card_t *card, CsrUint32 unifi_addr, u8 data);
|
CsrResult unifi_write_8_or_16(card_t *card, u32 unifi_addr, u8 data);
|
||||||
CsrResult unifi_read_direct_8_or_16(card_t *card, CsrUint32 addr, u8 *pdata);
|
CsrResult unifi_read_direct_8_or_16(card_t *card, u32 addr, u8 *pdata);
|
||||||
CsrResult unifi_write_direct_8_or_16(card_t *card, CsrUint32 addr, u8 data);
|
CsrResult unifi_write_direct_8_or_16(card_t *card, u32 addr, u8 data);
|
||||||
|
|
||||||
CsrResult unifi_read_direct16(card_t *card, CsrUint32 addr, u16 *pdata);
|
CsrResult unifi_read_direct16(card_t *card, u32 addr, u16 *pdata);
|
||||||
CsrResult unifi_read_direct32(card_t *card, CsrUint32 addr, CsrUint32 *pdata);
|
CsrResult unifi_read_direct32(card_t *card, u32 addr, u32 *pdata);
|
||||||
CsrResult unifi_read_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len);
|
CsrResult unifi_read_directn(card_t *card, u32 addr, void *pdata, u16 len);
|
||||||
|
|
||||||
CsrResult unifi_write_direct16(card_t *card, CsrUint32 addr, u16 data);
|
CsrResult unifi_write_direct16(card_t *card, u32 addr, u16 data);
|
||||||
CsrResult unifi_write_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len);
|
CsrResult unifi_write_directn(card_t *card, u32 addr, void *pdata, u16 len);
|
||||||
|
|
||||||
CsrResult sdio_read_f0(card_t *card, CsrUint32 addr, u8 *pdata);
|
CsrResult sdio_read_f0(card_t *card, u32 addr, u8 *pdata);
|
||||||
CsrResult sdio_write_f0(card_t *card, CsrUint32 addr, u8 data);
|
CsrResult sdio_write_f0(card_t *card, u32 addr, u8 data);
|
||||||
|
|
||||||
void unifi_read_panic(card_t *card);
|
void unifi_read_panic(card_t *card);
|
||||||
#ifdef CSR_PRE_ALLOC_NET_DATA
|
#ifdef CSR_PRE_ALLOC_NET_DATA
|
||||||
|
|
|
@ -212,7 +212,7 @@ CsrResult prealloc_netdata_alloc(card_t *card)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrResult prealloc_netdata_get(card_t *card, bulk_data_desc_t *bulk_data_slot, CsrUint32 size)
|
static CsrResult prealloc_netdata_get(card_t *card, bulk_data_desc_t *bulk_data_slot, u32 size)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ CsrResult unifi_force_low_power_mode(card_t *card)
|
||||||
* CSR_RESULT_SUCCESS on success or a CSR error code.
|
* CSR_RESULT_SUCCESS on success or a CSR error code.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_bh(card_t *card, CsrUint32 *remaining)
|
CsrResult unifi_bh(card_t *card, u32 *remaining)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
CsrResult csrResult;
|
CsrResult csrResult;
|
||||||
|
@ -1315,7 +1315,7 @@ static CsrResult process_to_host_signals(card_t *card, CsrInt32 *processed)
|
||||||
if (GET_SIGNAL_ID(bufptr + 2) == CSR_MA_PACKET_CONFIRM_ID)
|
if (GET_SIGNAL_ID(bufptr + 2) == CSR_MA_PACKET_CONFIRM_ID)
|
||||||
{
|
{
|
||||||
/* Get host tag and transmission status */
|
/* Get host tag and transmission status */
|
||||||
CsrUint32 host_tag = GET_PACKED_MA_PACKET_CONFIRM_HOST_TAG(bufptr + 2);
|
u32 host_tag = GET_PACKED_MA_PACKET_CONFIRM_HOST_TAG(bufptr + 2);
|
||||||
u16 status = GET_PACKED_MA_PACKET_CONFIRM_TRANSMISSION_STATUS(bufptr + 2);
|
u16 status = GET_PACKED_MA_PACKET_CONFIRM_TRANSMISSION_STATUS(bufptr + 2);
|
||||||
|
|
||||||
unifi_trace(card->ospriv, UDBG4, "process_to_host_signals signal ID=%x host Tag=%x status=%x\n",
|
unifi_trace(card->ospriv, UDBG4, "process_to_host_signals signal ID=%x host Tag=%x status=%x\n",
|
||||||
|
@ -1841,8 +1841,8 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr,
|
||||||
*/
|
*/
|
||||||
static CsrResult check_fh_sig_slots(card_t *card, u16 needed, CsrInt32 *space_fh)
|
static CsrResult check_fh_sig_slots(card_t *card, u16 needed, CsrInt32 *space_fh)
|
||||||
{
|
{
|
||||||
CsrUint32 count_fhw;
|
u32 count_fhw;
|
||||||
CsrUint32 occupied_fh, slots_fh;
|
u32 occupied_fh, slots_fh;
|
||||||
CsrInt32 count_fhr;
|
CsrInt32 count_fhr;
|
||||||
|
|
||||||
count_fhw = card->from_host_signals_w;
|
count_fhw = card->from_host_signals_w;
|
||||||
|
@ -2180,7 +2180,7 @@ static CsrResult process_fh_traffic_queue(card_t *card, CsrInt32 *processed)
|
||||||
u16 needed_chunks;
|
u16 needed_chunks;
|
||||||
CsrInt32 space_chunks;
|
CsrInt32 space_chunks;
|
||||||
u16 q_index;
|
u16 q_index;
|
||||||
CsrUint32 host_tag = 0;
|
u32 host_tag = 0;
|
||||||
u16 slot_num = 0;
|
u16 slot_num = 0;
|
||||||
|
|
||||||
*processed = 0;
|
*processed = 0;
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
* CSR_RESULT_FAILURE an SDIO error occurred
|
* CSR_RESULT_FAILURE an SDIO error occurred
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult retrying_read8(card_t *card, s16 funcnum, CsrUint32 addr, u8 *pdata)
|
static CsrResult retrying_read8(card_t *card, s16 funcnum, u32 addr, u8 *pdata)
|
||||||
{
|
{
|
||||||
CsrSdioFunction *sdio = card->sdio_if;
|
CsrSdioFunction *sdio = card->sdio_if;
|
||||||
CsrResult r = CSR_RESULT_SUCCESS;
|
CsrResult r = CSR_RESULT_SUCCESS;
|
||||||
|
@ -128,7 +128,7 @@ static CsrResult retrying_read8(card_t *card, s16 funcnum, CsrUint32 addr, u8 *p
|
||||||
} /* retrying_read8() */
|
} /* retrying_read8() */
|
||||||
|
|
||||||
|
|
||||||
static CsrResult retrying_write8(card_t *card, s16 funcnum, CsrUint32 addr, u8 data)
|
static CsrResult retrying_write8(card_t *card, s16 funcnum, u32 addr, u8 data)
|
||||||
{
|
{
|
||||||
CsrSdioFunction *sdio = card->sdio_if;
|
CsrSdioFunction *sdio = card->sdio_if;
|
||||||
CsrResult r = CSR_RESULT_SUCCESS;
|
CsrResult r = CSR_RESULT_SUCCESS;
|
||||||
|
@ -202,7 +202,7 @@ static CsrResult retrying_write8(card_t *card, s16 funcnum, CsrUint32 addr, u8 d
|
||||||
|
|
||||||
|
|
||||||
static CsrResult retrying_read16(card_t *card, s16 funcnum,
|
static CsrResult retrying_read16(card_t *card, s16 funcnum,
|
||||||
CsrUint32 addr, u16 *pdata)
|
u32 addr, u16 *pdata)
|
||||||
{
|
{
|
||||||
CsrSdioFunction *sdio = card->sdio_if;
|
CsrSdioFunction *sdio = card->sdio_if;
|
||||||
CsrResult r = CSR_RESULT_SUCCESS;
|
CsrResult r = CSR_RESULT_SUCCESS;
|
||||||
|
@ -263,7 +263,7 @@ static CsrResult retrying_read16(card_t *card, s16 funcnum,
|
||||||
|
|
||||||
|
|
||||||
static CsrResult retrying_write16(card_t *card, s16 funcnum,
|
static CsrResult retrying_write16(card_t *card, s16 funcnum,
|
||||||
CsrUint32 addr, u16 data)
|
u32 addr, u16 data)
|
||||||
{
|
{
|
||||||
CsrSdioFunction *sdio = card->sdio_if;
|
CsrSdioFunction *sdio = card->sdio_if;
|
||||||
CsrResult r = CSR_RESULT_SUCCESS;
|
CsrResult r = CSR_RESULT_SUCCESS;
|
||||||
|
@ -338,7 +338,7 @@ static CsrResult retrying_write16(card_t *card, s16 funcnum,
|
||||||
* CSR_RESULT_FAILURE an SDIO error occurred
|
* CSR_RESULT_FAILURE an SDIO error occurred
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult sdio_read_f0(card_t *card, CsrUint32 addr, u8 *pdata)
|
CsrResult sdio_read_f0(card_t *card, u32 addr, u8 *pdata)
|
||||||
{
|
{
|
||||||
#if defined (CSR_WIFI_HIP_DEBUG_OFFLINE) && defined (CSR_WIFI_HIP_DATA_PLANE_PROFILE)
|
#if defined (CSR_WIFI_HIP_DEBUG_OFFLINE) && defined (CSR_WIFI_HIP_DATA_PLANE_PROFILE)
|
||||||
card->cmd_prof.cmd52_f0_r_count++;
|
card->cmd_prof.cmd52_f0_r_count++;
|
||||||
|
@ -364,7 +364,7 @@ CsrResult sdio_read_f0(card_t *card, CsrUint32 addr, u8 *pdata)
|
||||||
* CSR_RESULT_FAILURE an SDIO error occurred
|
* CSR_RESULT_FAILURE an SDIO error occurred
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult sdio_write_f0(card_t *card, CsrUint32 addr, u8 data)
|
CsrResult sdio_write_f0(card_t *card, u32 addr, u8 data)
|
||||||
{
|
{
|
||||||
#if defined (CSR_WIFI_HIP_DEBUG_OFFLINE) && defined (CSR_WIFI_HIP_DATA_PLANE_PROFILE)
|
#if defined (CSR_WIFI_HIP_DEBUG_OFFLINE) && defined (CSR_WIFI_HIP_DATA_PLANE_PROFILE)
|
||||||
card->cmd_prof.cmd52_f0_w_count++;
|
card->cmd_prof.cmd52_f0_w_count++;
|
||||||
|
@ -388,7 +388,7 @@ CsrResult sdio_write_f0(card_t *card, CsrUint32 addr, u8 data)
|
||||||
* CSR_RESULT_SUCCESS on success, non-zero error code on error:
|
* CSR_RESULT_SUCCESS on success, non-zero error code on error:
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_read_direct_8_or_16(card_t *card, CsrUint32 addr, u8 *pdata)
|
CsrResult unifi_read_direct_8_or_16(card_t *card, u32 addr, u8 *pdata)
|
||||||
{
|
{
|
||||||
#ifdef CSR_WIFI_TRANSPORT_CSPI
|
#ifdef CSR_WIFI_TRANSPORT_CSPI
|
||||||
u16 w;
|
u16 w;
|
||||||
|
@ -423,7 +423,7 @@ CsrResult unifi_read_direct_8_or_16(card_t *card, CsrUint32 addr, u8 *pdata)
|
||||||
* to memory until the preceding even address is written.
|
* to memory until the preceding even address is written.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_write_direct_8_or_16(card_t *card, CsrUint32 addr, u8 data)
|
CsrResult unifi_write_direct_8_or_16(card_t *card, u32 addr, u8 data)
|
||||||
{
|
{
|
||||||
if (addr & 1)
|
if (addr & 1)
|
||||||
{
|
{
|
||||||
|
@ -462,7 +462,7 @@ CsrResult unifi_write_direct_8_or_16(card_t *card, CsrUint32 addr, u8 data)
|
||||||
* even address is read.
|
* even address is read.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_read_direct16(card_t *card, CsrUint32 addr, u16 *pdata)
|
CsrResult unifi_read_direct16(card_t *card, u32 addr, u16 *pdata)
|
||||||
{
|
{
|
||||||
return retrying_read16(card, card->function, addr, pdata);
|
return retrying_read16(card, card->function, addr, pdata);
|
||||||
} /* unifi_read_direct16() */
|
} /* unifi_read_direct16() */
|
||||||
|
@ -490,7 +490,7 @@ CsrResult unifi_read_direct16(card_t *card, CsrUint32 addr, u16 *pdata)
|
||||||
* even address is written.
|
* even address is written.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_write_direct16(card_t *card, CsrUint32 addr, u16 data)
|
CsrResult unifi_write_direct16(card_t *card, u32 addr, u16 data)
|
||||||
{
|
{
|
||||||
return retrying_write16(card, card->function, addr, data);
|
return retrying_write16(card, card->function, addr, data);
|
||||||
} /* unifi_write_direct16() */
|
} /* unifi_write_direct16() */
|
||||||
|
@ -513,7 +513,7 @@ CsrResult unifi_write_direct16(card_t *card, CsrUint32 addr, u16 data)
|
||||||
* CSR_RESULT_FAILURE an SDIO error occurred
|
* CSR_RESULT_FAILURE an SDIO error occurred
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_read_direct32(card_t *card, CsrUint32 addr, CsrUint32 *pdata)
|
CsrResult unifi_read_direct32(card_t *card, u32 addr, u32 *pdata)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
u16 w0, w1;
|
u16 w0, w1;
|
||||||
|
@ -530,7 +530,7 @@ CsrResult unifi_read_direct32(card_t *card, CsrUint32 addr, CsrUint32 *pdata)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
*pdata = ((CsrUint32)w1 << 16) | (CsrUint32)w0;
|
*pdata = ((u32)w1 << 16) | (u32)w0;
|
||||||
|
|
||||||
return CSR_RESULT_SUCCESS;
|
return CSR_RESULT_SUCCESS;
|
||||||
} /* unifi_read_direct32() */
|
} /* unifi_read_direct32() */
|
||||||
|
@ -564,10 +564,10 @@ CsrResult unifi_read_direct32(card_t *card, CsrUint32 addr, CsrUint32 *pdata)
|
||||||
* even address is read.
|
* even address is read.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pdata, u16 len, s8 m, CsrUint32 *num)
|
static CsrResult unifi_read_directn_match(card_t *card, u32 addr, void *pdata, u16 len, s8 m, u32 *num)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
u8 *cptr;
|
u8 *cptr;
|
||||||
u16 w;
|
u16 w;
|
||||||
|
|
||||||
|
@ -631,9 +631,9 @@ static CsrResult unifi_read_directn_match(card_t *card, CsrUint32 addr, void *pd
|
||||||
* even address is read.
|
* even address is read.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_read_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len)
|
CsrResult unifi_read_directn(card_t *card, u32 addr, void *pdata, u16 len)
|
||||||
{
|
{
|
||||||
CsrUint32 num;
|
u32 num;
|
||||||
|
|
||||||
return unifi_read_directn_match(card, addr, pdata, len, -1, &num);
|
return unifi_read_directn_match(card, addr, pdata, len, -1, &num);
|
||||||
} /* unifi_read_directn() */
|
} /* unifi_read_directn() */
|
||||||
|
@ -664,7 +664,7 @@ CsrResult unifi_read_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len)
|
||||||
* This means we must write data as pairs of bytes in reverse order.
|
* This means we must write data as pairs of bytes in reverse order.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_write_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len)
|
CsrResult unifi_write_directn(card_t *card, u32 addr, void *pdata, u16 len)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
u8 *cptr;
|
u8 *cptr;
|
||||||
|
@ -714,10 +714,10 @@ CsrResult unifi_write_directn(card_t *card, CsrUint32 addr, void *pdata, u16 len
|
||||||
* CSR_RESULT_FAILURE an SDIO error occurred
|
* CSR_RESULT_FAILURE an SDIO error occurred
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult set_dmem_page(card_t *card, CsrUint32 dmem_addr, CsrUint32 *paddr)
|
static CsrResult set_dmem_page(card_t *card, u32 dmem_addr, u32 *paddr)
|
||||||
{
|
{
|
||||||
u16 page, addr;
|
u16 page, addr;
|
||||||
CsrUint32 len;
|
u32 len;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
|
|
||||||
*paddr = 0;
|
*paddr = 0;
|
||||||
|
@ -753,11 +753,11 @@ static CsrResult set_dmem_page(card_t *card, CsrUint32 dmem_addr, CsrUint32 *pad
|
||||||
} /* set_dmem_page() */
|
} /* set_dmem_page() */
|
||||||
|
|
||||||
|
|
||||||
static CsrResult set_pmem_page(card_t *card, CsrUint32 pmem_addr,
|
static CsrResult set_pmem_page(card_t *card, u32 pmem_addr,
|
||||||
enum chip_helper_window_type mem_type, CsrUint32 *paddr)
|
enum chip_helper_window_type mem_type, u32 *paddr)
|
||||||
{
|
{
|
||||||
u16 page, addr;
|
u16 page, addr;
|
||||||
CsrUint32 len;
|
u32 len;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
|
|
||||||
*paddr = 0;
|
*paddr = 0;
|
||||||
|
@ -814,10 +814,10 @@ static CsrResult set_pmem_page(card_t *card, CsrUint32 pmem_addr,
|
||||||
* CSR_WIFI_HIP_RESULT_INVALID_VALUE the address is invalid
|
* CSR_WIFI_HIP_RESULT_INVALID_VALUE the address is invalid
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult set_page(card_t *card, CsrUint32 generic_addr, CsrUint32 *paddr)
|
static CsrResult set_page(card_t *card, u32 generic_addr, u32 *paddr)
|
||||||
{
|
{
|
||||||
CsrInt32 space;
|
CsrInt32 space;
|
||||||
CsrUint32 addr;
|
u32 addr;
|
||||||
CsrResult r = CSR_RESULT_SUCCESS;
|
CsrResult r = CSR_RESULT_SUCCESS;
|
||||||
|
|
||||||
if (!paddr)
|
if (!paddr)
|
||||||
|
@ -1018,7 +1018,7 @@ CsrResult unifi_set_proc_select(card_t *card, enum unifi_dbg_processors_select s
|
||||||
return CSR_WIFI_HIP_RESULT_INVALID_VALUE;
|
return CSR_WIFI_HIP_RESULT_INVALID_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (card->proc_select != (CsrUint32)select)
|
if (card->proc_select != (u32)select)
|
||||||
{
|
{
|
||||||
r = unifi_write_direct16(card,
|
r = unifi_write_direct16(card,
|
||||||
ChipHelper_DBG_HOST_PROC_SELECT(card->helper) * 2,
|
ChipHelper_DBG_HOST_PROC_SELECT(card->helper) * 2,
|
||||||
|
@ -1033,7 +1033,7 @@ CsrResult unifi_set_proc_select(card_t *card, enum unifi_dbg_processors_select s
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
card->proc_select = (CsrUint32)select;
|
card->proc_select = (u32)select;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CSR_RESULT_SUCCESS;
|
return CSR_RESULT_SUCCESS;
|
||||||
|
@ -1059,9 +1059,9 @@ CsrResult unifi_set_proc_select(card_t *card, enum unifi_dbg_processors_select s
|
||||||
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_read_8_or_16(card_t *card, CsrUint32 unifi_addr, u8 *pdata)
|
CsrResult unifi_read_8_or_16(card_t *card, u32 unifi_addr, u8 *pdata)
|
||||||
{
|
{
|
||||||
CsrUint32 sdio_addr;
|
u32 sdio_addr;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
#ifdef CSR_WIFI_TRANSPORT_CSPI
|
#ifdef CSR_WIFI_TRANSPORT_CSPI
|
||||||
u16 w;
|
u16 w;
|
||||||
|
@ -1110,9 +1110,9 @@ CsrResult unifi_read_8_or_16(card_t *card, CsrUint32 unifi_addr, u8 *pdata)
|
||||||
* write with the previously cached odd byte.
|
* write with the previously cached odd byte.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_write_8_or_16(card_t *card, CsrUint32 unifi_addr, u8 data)
|
CsrResult unifi_write_8_or_16(card_t *card, u32 unifi_addr, u8 data)
|
||||||
{
|
{
|
||||||
CsrUint32 sdio_addr;
|
u32 sdio_addr;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
#ifdef CSR_WIFI_TRANSPORT_CSPI
|
#ifdef CSR_WIFI_TRANSPORT_CSPI
|
||||||
u16 w;
|
u16 w;
|
||||||
|
@ -1162,9 +1162,9 @@ 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
|
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_card_read16(card_t *card, CsrUint32 unifi_addr, u16 *pdata)
|
CsrResult unifi_card_read16(card_t *card, u32 unifi_addr, u16 *pdata)
|
||||||
{
|
{
|
||||||
CsrUint32 sdio_addr;
|
u32 sdio_addr;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
|
|
||||||
r = set_page(card, unifi_addr, &sdio_addr);
|
r = set_page(card, unifi_addr, &sdio_addr);
|
||||||
|
@ -1199,9 +1199,9 @@ CsrResult unifi_card_read16(card_t *card, CsrUint32 unifi_addr, u16 *pdata)
|
||||||
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_card_write16(card_t *card, CsrUint32 unifi_addr, u16 data)
|
CsrResult unifi_card_write16(card_t *card, u32 unifi_addr, u16 data)
|
||||||
{
|
{
|
||||||
CsrUint32 sdio_addr;
|
u32 sdio_addr;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
|
|
||||||
r = set_page(card, unifi_addr, &sdio_addr);
|
r = set_page(card, unifi_addr, &sdio_addr);
|
||||||
|
@ -1236,9 +1236,9 @@ CsrResult unifi_card_write16(card_t *card, CsrUint32 unifi_addr, u16 data)
|
||||||
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_read32(card_t *card, CsrUint32 unifi_addr, CsrUint32 *pdata)
|
CsrResult unifi_read32(card_t *card, u32 unifi_addr, u32 *pdata)
|
||||||
{
|
{
|
||||||
CsrUint32 sdio_addr;
|
u32 sdio_addr;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
|
|
||||||
r = set_page(card, unifi_addr, &sdio_addr);
|
r = set_page(card, unifi_addr, &sdio_addr);
|
||||||
|
@ -1278,11 +1278,11 @@ CsrResult unifi_read32(card_t *card, CsrUint32 unifi_addr, CsrUint32 *pdata)
|
||||||
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
* CSR_WIFI_HIP_RESULT_INVALID_VALUE a bad generic pointer was specified
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_readn_match(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len, s8 match)
|
CsrResult unifi_readn_match(card_t *card, u32 unifi_addr, void *pdata, u16 len, s8 match)
|
||||||
{
|
{
|
||||||
CsrUint32 sdio_addr;
|
u32 sdio_addr;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
CsrUint32 num;
|
u32 num;
|
||||||
|
|
||||||
r = set_page(card, unifi_addr, &sdio_addr);
|
r = set_page(card, unifi_addr, &sdio_addr);
|
||||||
if (r != CSR_RESULT_SUCCESS)
|
if (r != CSR_RESULT_SUCCESS)
|
||||||
|
@ -1295,13 +1295,13 @@ CsrResult unifi_readn_match(card_t *card, CsrUint32 unifi_addr, void *pdata, u16
|
||||||
} /* unifi_readn_match() */
|
} /* unifi_readn_match() */
|
||||||
|
|
||||||
|
|
||||||
CsrResult unifi_card_readn(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
|
CsrResult unifi_card_readn(card_t *card, u32 unifi_addr, void *pdata, u16 len)
|
||||||
{
|
{
|
||||||
return unifi_readn_match(card, unifi_addr, pdata, len, -1);
|
return unifi_readn_match(card, unifi_addr, pdata, len, -1);
|
||||||
} /* unifi_card_readn() */
|
} /* unifi_card_readn() */
|
||||||
|
|
||||||
|
|
||||||
CsrResult unifi_readnz(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
|
CsrResult unifi_readnz(card_t *card, u32 unifi_addr, void *pdata, u16 len)
|
||||||
{
|
{
|
||||||
return unifi_readn_match(card, unifi_addr, pdata, len, 0);
|
return unifi_readn_match(card, unifi_addr, pdata, len, 0);
|
||||||
} /* unifi_readnz() */
|
} /* unifi_readnz() */
|
||||||
|
@ -1323,7 +1323,7 @@ CsrResult unifi_readnz(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
|
||||||
* Value read from memory (0-127) or -1 on error
|
* Value read from memory (0-127) or -1 on error
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrInt32 unifi_read_shared_count(card_t *card, CsrUint32 addr)
|
CsrInt32 unifi_read_shared_count(card_t *card, u32 addr)
|
||||||
{
|
{
|
||||||
u8 b;
|
u8 b;
|
||||||
/* I've increased this count, because I have seen cases where
|
/* I've increased this count, because I have seen cases where
|
||||||
|
@ -1384,9 +1384,9 @@ CsrInt32 unifi_read_shared_count(card_t *card, CsrUint32 addr)
|
||||||
* CSR_WIFI_HIP_RESULT_INVALID_VALUE an odd length or length too big.
|
* CSR_WIFI_HIP_RESULT_INVALID_VALUE an odd length or length too big.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_writen(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
|
CsrResult unifi_writen(card_t *card, u32 unifi_addr, void *pdata, u16 len)
|
||||||
{
|
{
|
||||||
CsrUint32 sdio_addr;
|
u32 sdio_addr;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
|
|
||||||
r = set_page(card, unifi_addr, &sdio_addr);
|
r = set_page(card, unifi_addr, &sdio_addr);
|
||||||
|
@ -1400,7 +1400,7 @@ CsrResult unifi_writen(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len)
|
||||||
|
|
||||||
|
|
||||||
static CsrResult csr_sdio_block_rw(card_t *card, s16 funcnum,
|
static CsrResult csr_sdio_block_rw(card_t *card, s16 funcnum,
|
||||||
CsrUint32 addr, u8 *pdata,
|
u32 addr, u8 *pdata,
|
||||||
u16 count, s16 dir_is_write)
|
u16 count, s16 dir_is_write)
|
||||||
{
|
{
|
||||||
CsrResult csrResult;
|
CsrResult csrResult;
|
||||||
|
@ -1472,8 +1472,8 @@ static CsrResult csr_sdio_block_rw(card_t *card, s16 funcnum,
|
||||||
* This function uses SDIO CMD53, which is the block transfer mode.
|
* This function uses SDIO CMD53, which is the block transfer mode.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
|
CsrResult unifi_bulk_rw(card_t *card, u32 handle, void *pdata,
|
||||||
CsrUint32 len, s16 direction)
|
u32 len, s16 direction)
|
||||||
{
|
{
|
||||||
#define CMD53_RETRIES 3
|
#define CMD53_RETRIES 3
|
||||||
/*
|
/*
|
||||||
|
@ -1693,8 +1693,8 @@ CsrResult unifi_bulk_rw(card_t *card, CsrUint32 handle, void *pdata,
|
||||||
* This function uses SDIO CMD53, which is the block transfer mode.
|
* This function uses SDIO CMD53, which is the block transfer mode.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_bulk_rw_noretry(card_t *card, CsrUint32 handle, void *pdata,
|
CsrResult unifi_bulk_rw_noretry(card_t *card, u32 handle, void *pdata,
|
||||||
CsrUint32 len, s16 direction)
|
u32 len, s16 direction)
|
||||||
{
|
{
|
||||||
CsrResult csrResult;
|
CsrResult csrResult;
|
||||||
|
|
||||||
|
|
|
@ -577,7 +577,7 @@ static const struct chip_device_desc_t *chip_ver_to_desc[] =
|
||||||
|
|
||||||
ChipDescript* ChipHelper_GetVersionSdio(u8 sdio_ver)
|
ChipDescript* ChipHelper_GetVersionSdio(u8 sdio_ver)
|
||||||
{
|
{
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
|
|
||||||
for (i = 0; i < nelem(chip_ver_to_desc); i++)
|
for (i = 0; i < nelem(chip_ver_to_desc); i++)
|
||||||
{
|
{
|
||||||
|
@ -593,7 +593,7 @@ ChipDescript* ChipHelper_GetVersionSdio(u8 sdio_ver)
|
||||||
|
|
||||||
ChipDescript* ChipHelper_GetVersionAny(u16 from_FF9A, u16 from_FE81)
|
ChipDescript* ChipHelper_GetVersionAny(u16 from_FF9A, u16 from_FE81)
|
||||||
{
|
{
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
|
|
||||||
if ((from_FF9A & 0xFF00) != 0)
|
if ((from_FF9A & 0xFF00) != 0)
|
||||||
{
|
{
|
||||||
|
@ -666,7 +666,7 @@ CHIP_HELPER_LIST(C_DEF)
|
||||||
*/
|
*/
|
||||||
u16 ChipHelper_MapAddress_SPI2HOST(ChipDescript *chip_help, u16 addr)
|
u16 ChipHelper_MapAddress_SPI2HOST(ChipDescript *chip_help, u16 addr)
|
||||||
{
|
{
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
for (i = 0; i < chip_help->map.len; i++)
|
for (i = 0; i < chip_help->map.len; i++)
|
||||||
{
|
{
|
||||||
if (chip_help->map.vals[i].spi == addr)
|
if (chip_help->map.vals[i].spi == addr)
|
||||||
|
@ -680,7 +680,7 @@ u16 ChipHelper_MapAddress_SPI2HOST(ChipDescript *chip_help, u16 addr)
|
||||||
|
|
||||||
u16 ChipHelper_MapAddress_HOST2SPI(ChipDescript *chip_help, u16 addr)
|
u16 ChipHelper_MapAddress_HOST2SPI(ChipDescript *chip_help, u16 addr)
|
||||||
{
|
{
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
for (i = 0; i < chip_help->map.len; i++)
|
for (i = 0; i < chip_help->map.len; i++)
|
||||||
{
|
{
|
||||||
if (chip_help->map.vals[i].host == addr)
|
if (chip_help->map.vals[i].host == addr)
|
||||||
|
@ -725,7 +725,7 @@ u16 ChipHelper_WINDOW_SIZE(ChipDescript *chip_help,
|
||||||
|
|
||||||
/* Get the register writes we should do to make sure that
|
/* Get the register writes we should do to make sure that
|
||||||
the chip is running with most clocks on. */
|
the chip is running with most clocks on. */
|
||||||
CsrUint32 ChipHelper_ClockStartupSequence(ChipDescript *chip_help,
|
u32 ChipHelper_ClockStartupSequence(ChipDescript *chip_help,
|
||||||
const struct chip_helper_init_values **val)
|
const struct chip_helper_init_values **val)
|
||||||
{
|
{
|
||||||
*val = chip_help->init.vals;
|
*val = chip_help->init.vals;
|
||||||
|
@ -734,7 +734,7 @@ CsrUint32 ChipHelper_ClockStartupSequence(ChipDescript
|
||||||
|
|
||||||
|
|
||||||
/* Get the set of values tat we should write to the chip to perform a reset. */
|
/* Get the set of values tat we should write to the chip to perform a reset. */
|
||||||
CsrUint32 ChipHelper_HostResetSequence(ChipDescript *chip_help,
|
u32 ChipHelper_HostResetSequence(ChipDescript *chip_help,
|
||||||
const struct chip_helper_reset_values **val)
|
const struct chip_helper_reset_values **val)
|
||||||
{
|
{
|
||||||
*val = chip_help->reset_prog.vals;
|
*val = chip_help->reset_prog.vals;
|
||||||
|
@ -746,8 +746,8 @@ CsrUint32 ChipHelper_HostResetSequence(ChipDescript *c
|
||||||
CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
|
CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
|
||||||
enum chip_helper_window_index window,
|
enum chip_helper_window_index window,
|
||||||
enum chip_helper_window_type type,
|
enum chip_helper_window_type type,
|
||||||
CsrUint32 offset,
|
u32 offset,
|
||||||
u16 *page, u16 *addr, CsrUint32 *len)
|
u16 *page, u16 *addr, u32 *len)
|
||||||
{
|
{
|
||||||
const struct window_info_t *win;
|
const struct window_info_t *win;
|
||||||
const struct window_shift_info_t *mode;
|
const struct window_shift_info_t *mode;
|
||||||
|
|
|
@ -140,8 +140,8 @@ struct chip_helper_init_values
|
||||||
/* A block of data that should be written to the device */
|
/* A block of data that should be written to the device */
|
||||||
struct chip_helper_reset_values
|
struct chip_helper_reset_values
|
||||||
{
|
{
|
||||||
CsrUint32 gp_address;
|
u32 gp_address;
|
||||||
CsrUint32 len;
|
u32 len;
|
||||||
const u16 *data;
|
const u16 *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -230,10 +230,10 @@ ChipDescript* ChipHelper_GetVersionBlueCore(enum chip_helper_bluecore_age age,
|
||||||
CHIP_HELPER_DEF0(m, (u16, SDIO_HOST_INT, regs->sdio_host_int)) \
|
CHIP_HELPER_DEF0(m, (u16, SDIO_HOST_INT, regs->sdio_host_int)) \
|
||||||
CHIP_HELPER_DEF0(m, (u16, COEX_STATUS, regs->coex_status)) \
|
CHIP_HELPER_DEF0(m, (u16, COEX_STATUS, regs->coex_status)) \
|
||||||
CHIP_HELPER_DEF0(m, (u16, SHARED_IO_INTERRUPT, regs->shared_io_interrupt)) \
|
CHIP_HELPER_DEF0(m, (u16, SHARED_IO_INTERRUPT, regs->shared_io_interrupt)) \
|
||||||
CHIP_HELPER_DEF0(m, (CsrUint32, PROGRAM_MEMORY_RAM_OFFSET, prog_offset.ram)) \
|
CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_RAM_OFFSET, prog_offset.ram)) \
|
||||||
CHIP_HELPER_DEF0(m, (CsrUint32, PROGRAM_MEMORY_ROM_OFFSET, prog_offset.rom)) \
|
CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_ROM_OFFSET, prog_offset.rom)) \
|
||||||
CHIP_HELPER_DEF0(m, (CsrUint32, PROGRAM_MEMORY_FLASH_OFFSET, prog_offset.flash)) \
|
CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_FLASH_OFFSET, prog_offset.flash)) \
|
||||||
CHIP_HELPER_DEF0(m, (CsrUint32, PROGRAM_MEMORY_EXT_SRAM_OFFSET, prog_offset.ext_sram)) \
|
CHIP_HELPER_DEF0(m, (u32, PROGRAM_MEMORY_EXT_SRAM_OFFSET, prog_offset.ext_sram)) \
|
||||||
CHIP_HELPER_DEF0(m, (u16, DATA_MEMORY_RAM_OFFSET, data_offset.ram)) \
|
CHIP_HELPER_DEF0(m, (u16, DATA_MEMORY_RAM_OFFSET, data_offset.ram)) \
|
||||||
CHIP_HELPER_DEF0(m, (CsrInt32, HasFlash, bools.has_flash)) \
|
CHIP_HELPER_DEF0(m, (CsrInt32, HasFlash, bools.has_flash)) \
|
||||||
CHIP_HELPER_DEF0(m, (CsrInt32, HasExtSram, bools.has_ext_sram)) \
|
CHIP_HELPER_DEF0(m, (CsrInt32, HasExtSram, bools.has_ext_sram)) \
|
||||||
|
@ -244,8 +244,8 @@ ChipDescript* ChipHelper_GetVersionBlueCore(enum chip_helper_bluecore_age age,
|
||||||
CHIP_HELPER_DEF1(m, (u16, WINDOW_SIZE, enum chip_helper_window_index, window)) \
|
CHIP_HELPER_DEF1(m, (u16, WINDOW_SIZE, enum chip_helper_window_index, window)) \
|
||||||
CHIP_HELPER_DEF1(m, (u16, MapAddress_SPI2HOST, u16, addr)) \
|
CHIP_HELPER_DEF1(m, (u16, MapAddress_SPI2HOST, u16, addr)) \
|
||||||
CHIP_HELPER_DEF1(m, (u16, MapAddress_HOST2SPI, u16, addr)) \
|
CHIP_HELPER_DEF1(m, (u16, MapAddress_HOST2SPI, u16, addr)) \
|
||||||
CHIP_HELPER_DEF1(m, (CsrUint32, ClockStartupSequence, const struct chip_helper_init_values **, val)) \
|
CHIP_HELPER_DEF1(m, (u32, ClockStartupSequence, const struct chip_helper_init_values **, val)) \
|
||||||
CHIP_HELPER_DEF1(m, (CsrUint32, HostResetSequence, const struct chip_helper_reset_values **, val))
|
CHIP_HELPER_DEF1(m, (u32, HostResetSequence, const struct chip_helper_reset_values **, val))
|
||||||
|
|
||||||
/* Some magic to help the expansion */
|
/* Some magic to help the expansion */
|
||||||
#define CHIP_HELPER_DEF0(a, b) \
|
#define CHIP_HELPER_DEF0(a, b) \
|
||||||
|
@ -405,8 +405,8 @@ CHIP_HELPER_LIST(C_DEC)
|
||||||
CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
|
CsrInt32 ChipHelper_DecodeWindow(ChipDescript *chip_help,
|
||||||
enum chip_helper_window_index window,
|
enum chip_helper_window_index window,
|
||||||
enum chip_helper_window_type type,
|
enum chip_helper_window_type type,
|
||||||
CsrUint32 offset,
|
u32 offset,
|
||||||
u16 *page, u16 *addr, CsrUint32 *len);
|
u16 *page, u16 *addr, u32 *len);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* Close the extern "C" */
|
/* Close the extern "C" */
|
||||||
|
@ -459,8 +459,8 @@ public:
|
||||||
/* The DecodeWindow function, see the description of the C version. */
|
/* The DecodeWindow function, see the description of the C version. */
|
||||||
CsrInt32 DecodeWindow(chip_helper_window_index window,
|
CsrInt32 DecodeWindow(chip_helper_window_index window,
|
||||||
chip_helper_window_type type,
|
chip_helper_window_type type,
|
||||||
CsrUint32 offset,
|
u32 offset,
|
||||||
u16 &page, u16 &addr, CsrUint32 &len) const;
|
u16 &page, u16 &addr, u32 &len) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ChipDescript *m_desc;
|
ChipDescript *m_desc;
|
||||||
|
|
|
@ -43,20 +43,20 @@ extern "C" {
|
||||||
/* Address value pairs */
|
/* Address value pairs */
|
||||||
struct val_array_t
|
struct val_array_t
|
||||||
{
|
{
|
||||||
CsrUint32 len;
|
u32 len;
|
||||||
const struct chip_helper_init_values *vals;
|
const struct chip_helper_init_values *vals;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Just a (counted) u16 array */
|
/* Just a (counted) u16 array */
|
||||||
struct data_array_t
|
struct data_array_t
|
||||||
{
|
{
|
||||||
CsrUint32 len;
|
u32 len;
|
||||||
const u16 *vals;
|
const u16 *vals;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct reset_prog_t
|
struct reset_prog_t
|
||||||
{
|
{
|
||||||
CsrUint32 len;
|
u32 len;
|
||||||
const struct chip_helper_reset_values *vals;
|
const struct chip_helper_reset_values *vals;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ struct chip_map_address_t
|
||||||
|
|
||||||
struct map_array_t
|
struct map_array_t
|
||||||
{
|
{
|
||||||
CsrUint32 len;
|
u32 len;
|
||||||
const struct chip_map_address_t *vals;
|
const struct chip_map_address_t *vals;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ struct chip_device_regs_t
|
||||||
struct window_shift_info_t
|
struct window_shift_info_t
|
||||||
{
|
{
|
||||||
CsrInt32 allowed;
|
CsrInt32 allowed;
|
||||||
CsrUint32 page_shift;
|
u32 page_shift;
|
||||||
u16 page_offset;
|
u16 page_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -167,11 +167,11 @@ struct chip_device_desc_t
|
||||||
/* Some misc. info on the chip */
|
/* Some misc. info on the chip */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
CsrUint32 has_flash : 1;
|
u32 has_flash : 1;
|
||||||
CsrUint32 has_ext_sram : 1;
|
u32 has_ext_sram : 1;
|
||||||
CsrUint32 has_rom : 1;
|
u32 has_rom : 1;
|
||||||
CsrUint32 has_bt : 1;
|
u32 has_bt : 1;
|
||||||
CsrUint32 has_wlan : 1;
|
u32 has_wlan : 1;
|
||||||
} bools;
|
} bools;
|
||||||
|
|
||||||
/* This table is used to remap register addresses depending on what
|
/* This table is used to remap register addresses depending on what
|
||||||
|
@ -184,10 +184,10 @@ struct chip_device_desc_t
|
||||||
The RAM offset is probably the most useful. */
|
The RAM offset is probably the most useful. */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
CsrUint32 ram;
|
u32 ram;
|
||||||
CsrUint32 rom;
|
u32 rom;
|
||||||
CsrUint32 flash;
|
u32 flash;
|
||||||
CsrUint32 ext_sram;
|
u32 ext_sram;
|
||||||
} prog_offset;
|
} prog_offset;
|
||||||
|
|
||||||
/* The offsets into the data address space of interesting things. */
|
/* The offsets into the data address space of interesting things. */
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#undef CSR_WIFI_IGNORE_PATCH_VERSION_MISMATCH
|
#undef CSR_WIFI_IGNORE_PATCH_VERSION_MISMATCH
|
||||||
|
|
||||||
static CsrResult do_patch_download(card_t *card, void *dlpriv,
|
static CsrResult do_patch_download(card_t *card, void *dlpriv,
|
||||||
xbv1_t *pfwinfo, CsrUint32 boot_ctrl_addr);
|
xbv1_t *pfwinfo, u32 boot_ctrl_addr);
|
||||||
|
|
||||||
static CsrResult do_patch_convert_download(card_t *card,
|
static CsrResult do_patch_convert_download(card_t *card,
|
||||||
void *dlpriv, xbv1_t *pfwinfo);
|
void *dlpriv, xbv1_t *pfwinfo);
|
||||||
|
@ -49,9 +49,9 @@ static CsrResult do_patch_convert_download(card_t *card,
|
||||||
* CSR_WIFI_HIP_RESULT_NOT_FOUND if not found
|
* CSR_WIFI_HIP_RESULT_NOT_FOUND if not found
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult _find_in_slut(card_t *card, symbol_t *psym, CsrUint32 *pslut)
|
static CsrResult _find_in_slut(card_t *card, symbol_t *psym, u32 *pslut)
|
||||||
{
|
{
|
||||||
CsrUint32 slut_address;
|
u32 slut_address;
|
||||||
u16 finger_print;
|
u16 finger_print;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
CsrResult csrResult;
|
CsrResult csrResult;
|
||||||
|
@ -122,7 +122,7 @@ static CsrResult _find_in_slut(card_t *card, symbol_t *psym, CsrUint32 *pslut)
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
u16 id;
|
u16 id;
|
||||||
CsrUint32 obj;
|
u32 obj;
|
||||||
|
|
||||||
r = unifi_card_read16(card, slut_address, &id);
|
r = unifi_card_read16(card, slut_address, &id);
|
||||||
if (r != CSR_RESULT_SUCCESS)
|
if (r != CSR_RESULT_SUCCESS)
|
||||||
|
@ -186,9 +186,9 @@ static CsrResult _find_in_slut(card_t *card, symbol_t *psym, CsrUint32 *pslut)
|
||||||
static CsrResult do_patch_convert_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo)
|
static CsrResult do_patch_convert_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
CsrUint32 slut_base = 0xffffffff;
|
u32 slut_base = 0xffffffff;
|
||||||
void *pfw;
|
void *pfw;
|
||||||
CsrUint32 psize;
|
u32 psize;
|
||||||
symbol_t sym;
|
symbol_t sym;
|
||||||
|
|
||||||
/* Reset the chip to guarantee that the ROM loader is running */
|
/* Reset the chip to guarantee that the ROM loader is running */
|
||||||
|
@ -203,7 +203,7 @@ static CsrResult do_patch_convert_download(card_t *card, void *dlpriv, xbv1_t *p
|
||||||
/* If no unifi_helper is running, the firmware version must be read */
|
/* If no unifi_helper is running, the firmware version must be read */
|
||||||
if (card->build_id == 0)
|
if (card->build_id == 0)
|
||||||
{
|
{
|
||||||
CsrUint32 ver = 0;
|
u32 ver = 0;
|
||||||
sym.id = CSR_SLT_BUILD_ID_NUMBER;
|
sym.id = CSR_SLT_BUILD_ID_NUMBER;
|
||||||
sym.obj = 0; /* To be updated by _find_in_slut() */
|
sym.obj = 0; /* To be updated by _find_in_slut() */
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ CsrResult unifi_dl_firmware(card_t *card, void *dlpriv)
|
||||||
* This ends up telling UniFi to restart.
|
* This ends up telling UniFi to restart.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_dl_patch(card_t *card, void *dlpriv, CsrUint32 boot_ctrl)
|
CsrResult unifi_dl_patch(card_t *card, void *dlpriv, u32 boot_ctrl)
|
||||||
{
|
{
|
||||||
xbv1_t *fwinfo;
|
xbv1_t *fwinfo;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
|
@ -497,7 +497,7 @@ void* unifi_dl_fw_read_start(card_t *card, s8 is_fw)
|
||||||
* CSR_RESULT_SUCCESS on success, CSR error code on failure
|
* CSR_RESULT_SUCCESS on success, CSR error code on failure
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult safe_read_shared_location(card_t *card, CsrUint32 address, u8 *pdata)
|
static CsrResult safe_read_shared_location(card_t *card, u32 address, u8 *pdata)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
u16 limit = 1000;
|
u16 limit = 1000;
|
||||||
|
@ -559,7 +559,7 @@ static CsrResult safe_read_shared_location(card_t *card, CsrUint32 address, u8 *
|
||||||
#define OPERATION_TIMEOUT_LOOPS (100) /* when OPERATION_TIMEOUT_DELAY==1, (500) otherwise */
|
#define OPERATION_TIMEOUT_LOOPS (100) /* when OPERATION_TIMEOUT_DELAY==1, (500) otherwise */
|
||||||
#define OPERATION_TIMEOUT_DELAY 1 /* msec, or 200usecs */
|
#define OPERATION_TIMEOUT_DELAY 1 /* msec, or 200usecs */
|
||||||
|
|
||||||
CsrResult unifi_do_loader_op(card_t *card, CsrUint32 op_addr, u8 opcode)
|
CsrResult unifi_do_loader_op(card_t *card, u32 op_addr, u8 opcode)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
s16 op_retries;
|
s16 op_retries;
|
||||||
|
@ -654,13 +654,13 @@ CsrResult unifi_do_loader_op(card_t *card, CsrUint32 op_addr, u8 opcode)
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
|
static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
|
||||||
const struct PTDL *ptdl, CsrUint32 handle,
|
const struct PTDL *ptdl, u32 handle,
|
||||||
CsrUint32 op_addr)
|
u32 op_addr)
|
||||||
{
|
{
|
||||||
CsrUint32 offset;
|
u32 offset;
|
||||||
u8 *buf;
|
u8 *buf;
|
||||||
CsrInt32 data_len;
|
CsrInt32 data_len;
|
||||||
CsrUint32 write_len;
|
u32 write_len;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
const u16 buf_size = 2 * 1024;
|
const u16 buf_size = 2 * 1024;
|
||||||
|
|
||||||
|
@ -753,13 +753,13 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
|
||||||
* CSR_WIFI_HIP_RESULT_INVALID_VALUE for a bad laoader version number
|
* CSR_WIFI_HIP_RESULT_INVALID_VALUE for a bad laoader version number
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult do_patch_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo, CsrUint32 boot_ctrl_addr)
|
static CsrResult do_patch_download(card_t *card, void *dlpriv, xbv1_t *pfwinfo, u32 boot_ctrl_addr)
|
||||||
{
|
{
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
CsrInt32 i;
|
CsrInt32 i;
|
||||||
u16 loader_version;
|
u16 loader_version;
|
||||||
u16 handle;
|
u16 handle;
|
||||||
CsrUint32 total_bytes;
|
u32 total_bytes;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read info from the SDIO Loader Control Data Structure
|
* Read info from the SDIO Loader Control Data Structure
|
||||||
|
|
|
@ -42,7 +42,7 @@ typedef struct coredump_buf
|
||||||
CsrTime timestamp; /* host's system time at capture */
|
CsrTime timestamp; /* host's system time at capture */
|
||||||
s16 requestor; /* request: 0=auto dump, 1=manual */
|
s16 requestor; /* request: 0=auto dump, 1=manual */
|
||||||
u16 chip_ver;
|
u16 chip_ver;
|
||||||
CsrUint32 fw_ver;
|
u32 fw_ver;
|
||||||
u16 *zone[HIP_CDUMP_NUM_ZONES];
|
u16 *zone[HIP_CDUMP_NUM_ZONES];
|
||||||
|
|
||||||
struct coredump_buf *next; /* circular list */
|
struct coredump_buf *next; /* circular list */
|
||||||
|
@ -54,7 +54,7 @@ struct coredump_zone
|
||||||
{
|
{
|
||||||
unifi_coredump_space_t space; /* XAP memory space this zone covers */
|
unifi_coredump_space_t space; /* XAP memory space this zone covers */
|
||||||
enum unifi_dbg_processors_select cpu; /* XAP CPU core selector */
|
enum unifi_dbg_processors_select cpu; /* XAP CPU core selector */
|
||||||
CsrUint32 gp; /* Generic Pointer to memory zone on XAP */
|
u32 gp; /* Generic Pointer to memory zone on XAP */
|
||||||
u16 offset; /* 16-bit XAP word offset of zone in memory space */
|
u16 offset; /* 16-bit XAP word offset of zone in memory space */
|
||||||
u16 length; /* Length of zone in XAP words */
|
u16 length; /* Length of zone in XAP words */
|
||||||
};
|
};
|
||||||
|
@ -299,7 +299,7 @@ static CsrInt32 get_value_from_coredump(const coredump_buffer *coreDump,
|
||||||
{
|
{
|
||||||
CsrInt32 r = -1;
|
CsrInt32 r = -1;
|
||||||
u16 offset_in_zone;
|
u16 offset_in_zone;
|
||||||
CsrUint32 zone_end_offset;
|
u32 zone_end_offset;
|
||||||
CsrInt32 i;
|
CsrInt32 i;
|
||||||
const struct coredump_zone *def = &zonedef_table[0];
|
const struct coredump_zone *def = &zonedef_table[0];
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ static CsrResult unifi_coredump_from_sdio(card_t *card, coredump_buffer *dump_bu
|
||||||
{
|
{
|
||||||
u16 val;
|
u16 val;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
CsrUint32 sdio_addr;
|
u32 sdio_addr;
|
||||||
|
|
||||||
func_enter();
|
func_enter();
|
||||||
|
|
||||||
|
@ -663,7 +663,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode)
|
||||||
coredump_buffer *newnode = NULL;
|
coredump_buffer *newnode = NULL;
|
||||||
u16 *newzone = NULL;
|
u16 *newzone = NULL;
|
||||||
CsrInt32 i;
|
CsrInt32 i;
|
||||||
CsrUint32 zone_size;
|
u32 zone_size;
|
||||||
|
|
||||||
/* Allocate node header */
|
/* Allocate node header */
|
||||||
newnode = (coredump_buffer *)CsrMemAlloc(sizeof(coredump_buffer));
|
newnode = (coredump_buffer *)CsrMemAlloc(sizeof(coredump_buffer));
|
||||||
|
@ -744,7 +744,7 @@ CsrResult unifi_coredump_init(card_t *card, u16 num_dump_buffers)
|
||||||
void *ospriv = card->ospriv;
|
void *ospriv = card->ospriv;
|
||||||
coredump_buffer *prev = NULL;
|
coredump_buffer *prev = NULL;
|
||||||
coredump_buffer *newnode = NULL;
|
coredump_buffer *newnode = NULL;
|
||||||
CsrUint32 i = 0;
|
u32 i = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
func_enter();
|
func_enter();
|
||||||
|
|
|
@ -100,9 +100,9 @@ CSR_PRIORITY unifi_get_default_downgrade_priority(unifi_TrafficQueue queue)
|
||||||
* Calls unifi_pause_xmit() when the last slots are used.
|
* Calls unifi_pause_xmit() when the last slots are used.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static CsrResult send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
|
static CsrResult send_signal(card_t *card, const u8 *sigptr, u32 siglen,
|
||||||
const bulk_data_param_t *bulkdata,
|
const bulk_data_param_t *bulkdata,
|
||||||
q_t *sigq, CsrUint32 priority_q, CsrUint32 run_bh)
|
q_t *sigq, u32 priority_q, u32 run_bh)
|
||||||
{
|
{
|
||||||
u16 i, data_slot_size;
|
u16 i, data_slot_size;
|
||||||
card_signal_t *csptr;
|
card_signal_t *csptr;
|
||||||
|
@ -135,7 +135,7 @@ static CsrResult send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
|
||||||
{
|
{
|
||||||
if ((bulkdata != NULL) && (bulkdata->d[i].data_length != 0))
|
if ((bulkdata != NULL) && (bulkdata->d[i].data_length != 0))
|
||||||
{
|
{
|
||||||
CsrUint32 datalen = bulkdata->d[i].data_length;
|
u32 datalen = bulkdata->d[i].data_length;
|
||||||
|
|
||||||
/* Make sure data will fit in a bulk data slot */
|
/* Make sure data will fit in a bulk data slot */
|
||||||
if (bulkdata->d[i].os_data_ptr == NULL)
|
if (bulkdata->d[i].os_data_ptr == NULL)
|
||||||
|
@ -303,14 +303,14 @@ static CsrResult send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
|
||||||
* to the device. Signals are constructed using the UniFi packed structures.
|
* to the device. Signals are constructed using the UniFi packed structures.
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_send_signal(card_t *card, const u8 *sigptr, CsrUint32 siglen,
|
CsrResult unifi_send_signal(card_t *card, const u8 *sigptr, u32 siglen,
|
||||||
const bulk_data_param_t *bulkdata)
|
const bulk_data_param_t *bulkdata)
|
||||||
{
|
{
|
||||||
q_t *sig_soft_q;
|
q_t *sig_soft_q;
|
||||||
u16 signal_id;
|
u16 signal_id;
|
||||||
CsrResult r;
|
CsrResult r;
|
||||||
CsrUint32 run_bh;
|
u32 run_bh;
|
||||||
CsrUint32 priority_q;
|
u32 priority_q;
|
||||||
|
|
||||||
/* A NULL signal pointer is a request to check if UniFi is responsive */
|
/* A NULL signal pointer is a request to check if UniFi is responsive */
|
||||||
if (sigptr == NULL)
|
if (sigptr == NULL)
|
||||||
|
@ -395,7 +395,7 @@ CsrResult unifi_send_resources_available(card_t *card, const u8 *sigptr)
|
||||||
if (signal_id == CSR_MA_PACKET_REQUEST_ID)
|
if (signal_id == CSR_MA_PACKET_REQUEST_ID)
|
||||||
{
|
{
|
||||||
u16 frame_priority;
|
u16 frame_priority;
|
||||||
CsrUint32 priority_q;
|
u32 priority_q;
|
||||||
|
|
||||||
/* Map the frame priority to a traffic queue index. */
|
/* Map the frame priority to a traffic queue index. */
|
||||||
frame_priority = GET_PACKED_MA_PACKET_REQUEST_FRAME_PRIORITY(sigptr);
|
frame_priority = GET_PACKED_MA_PACKET_REQUEST_FRAME_PRIORITY(sigptr);
|
||||||
|
|
|
@ -944,7 +944,7 @@ CsrInt32 SigGetDataRefs(CSR_SIGNAL *aSignal, CSR_DATAREF **aDataRef)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CsrUint32 SigGetFilterPos(u16 aSigID)
|
u32 SigGetFilterPos(u16 aSigID)
|
||||||
{
|
{
|
||||||
switch (aSigID)
|
switch (aSigID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,9 +61,9 @@ typedef u16 CSR_CAPABILITY_INFORMATION;
|
||||||
|
|
||||||
typedef u16 CSR_CHANNEL_STARTING_FACTOR;
|
typedef u16 CSR_CHANNEL_STARTING_FACTOR;
|
||||||
|
|
||||||
typedef CsrUint32 CSR_CIPHER_SUITE_SELECTOR;
|
typedef u32 CSR_CIPHER_SUITE_SELECTOR;
|
||||||
|
|
||||||
typedef CsrUint32 CSR_CLIENT_TAG;
|
typedef u32 CSR_CLIENT_TAG;
|
||||||
|
|
||||||
typedef enum CSR_CONNECTION_STATUS
|
typedef enum CSR_CONNECTION_STATUS
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ typedef enum CSR_FRAME_TYPE
|
||||||
CSR_PROBE_REQUEST = 0x0004
|
CSR_PROBE_REQUEST = 0x0004
|
||||||
} CSR_FRAME_TYPE;
|
} CSR_FRAME_TYPE;
|
||||||
|
|
||||||
typedef CsrUint32 CSR_IPV4_ADDRESS;
|
typedef u32 CSR_IPV4_ADDRESS;
|
||||||
|
|
||||||
typedef enum CSR_IFINTERFACE
|
typedef enum CSR_IFINTERFACE
|
||||||
{
|
{
|
||||||
|
@ -144,7 +144,7 @@ typedef enum CSR_MEMORY_SPACE
|
||||||
|
|
||||||
typedef u16 CSR_MICROSECONDS16;
|
typedef u16 CSR_MICROSECONDS16;
|
||||||
|
|
||||||
typedef CsrUint32 CSR_MICROSECONDS32;
|
typedef u32 CSR_MICROSECONDS32;
|
||||||
|
|
||||||
typedef u16 CSR_NATURAL16;
|
typedef u16 CSR_NATURAL16;
|
||||||
|
|
||||||
|
@ -1416,7 +1416,7 @@ typedef struct CSR_SIGNAL_PRIMITIVE
|
||||||
|
|
||||||
#define SIG_FILTER_SIZE 6
|
#define SIG_FILTER_SIZE 6
|
||||||
|
|
||||||
CsrUint32 SigGetFilterPos(u16 aSigID);
|
u32 SigGetFilterPos(u16 aSigID);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,16 +100,16 @@ static enum ta_frame_identity ta_detect_protocol(card_t *card, CsrWifiRouterCtrl
|
||||||
u16 proto;
|
u16 proto;
|
||||||
u16 source_port, dest_port;
|
u16 source_port, dest_port;
|
||||||
CsrWifiMacAddress srcAddress;
|
CsrWifiMacAddress srcAddress;
|
||||||
CsrUint32 snap_hdr, oui_hdr;
|
u32 snap_hdr, oui_hdr;
|
||||||
|
|
||||||
if (data->data_length < TA_LLC_HEADER_SIZE)
|
if (data->data_length < TA_LLC_HEADER_SIZE)
|
||||||
{
|
{
|
||||||
return TA_FRAME_UNKNOWN;
|
return TA_FRAME_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
snap_hdr = (((CsrUint32)data->os_data_ptr[0]) << 24) |
|
snap_hdr = (((u32)data->os_data_ptr[0]) << 24) |
|
||||||
(((CsrUint32)data->os_data_ptr[1]) << 16) |
|
(((u32)data->os_data_ptr[1]) << 16) |
|
||||||
(((CsrUint32)data->os_data_ptr[2]) << 8);
|
(((u32)data->os_data_ptr[2]) << 8);
|
||||||
if (snap_hdr != snap_802_2)
|
if (snap_hdr != snap_802_2)
|
||||||
{
|
{
|
||||||
return TA_FRAME_UNKNOWN;
|
return TA_FRAME_UNKNOWN;
|
||||||
|
@ -122,9 +122,9 @@ static enum ta_frame_identity ta_detect_protocol(card_t *card, CsrWifiRouterCtrl
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
oui_hdr = (((CsrUint32)data->os_data_ptr[3]) << 24) |
|
oui_hdr = (((u32)data->os_data_ptr[3]) << 24) |
|
||||||
(((CsrUint32)data->os_data_ptr[4]) << 16) |
|
(((u32)data->os_data_ptr[4]) << 16) |
|
||||||
(((CsrUint32)data->os_data_ptr[5]) << 8);
|
(((u32)data->os_data_ptr[5]) << 8);
|
||||||
if ((oui_hdr == oui_rfc1042) || (oui_hdr == oui_8021h))
|
if ((oui_hdr == oui_rfc1042) || (oui_hdr == oui_8021h))
|
||||||
{
|
{
|
||||||
proto = (data->os_data_ptr[TA_ETHERNET_TYPE_OFFSET] * 256) +
|
proto = (data->os_data_ptr[TA_ETHERNET_TYPE_OFFSET] * 256) +
|
||||||
|
@ -346,12 +346,12 @@ void unifi_ta_sample(card_t *card,
|
||||||
const bulk_data_desc_t *data,
|
const bulk_data_desc_t *data,
|
||||||
const u8 *saddr,
|
const u8 *saddr,
|
||||||
const u8 *sta_macaddr,
|
const u8 *sta_macaddr,
|
||||||
CsrUint32 timestamp,
|
u32 timestamp,
|
||||||
u16 rate)
|
u16 rate)
|
||||||
{
|
{
|
||||||
ta_data_t *tad = &card->ta_sampling;
|
ta_data_t *tad = &card->ta_sampling;
|
||||||
enum ta_frame_identity identity;
|
enum ta_frame_identity identity;
|
||||||
CsrUint32 time_delta;
|
u32 time_delta;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -387,8 +387,8 @@ void unifi_ta_sample(card_t *card,
|
||||||
*/
|
*/
|
||||||
if (tad->stats.txFramesNum < TA_MAX_INTERVALS_IN_C1)
|
if (tad->stats.txFramesNum < TA_MAX_INTERVALS_IN_C1)
|
||||||
{
|
{
|
||||||
CsrUint32 interval;
|
u32 interval;
|
||||||
CsrUint32 index_in_intervals;
|
u32 index_in_intervals;
|
||||||
|
|
||||||
interval = timestamp - tad->tx_last_ts;
|
interval = timestamp - tad->tx_last_ts;
|
||||||
tad->tx_last_ts = timestamp;
|
tad->tx_last_ts = timestamp;
|
||||||
|
@ -423,7 +423,7 @@ void unifi_ta_sample(card_t *card,
|
||||||
* rxFramesNum can be flashed in tas_reset_data() by another thread.
|
* rxFramesNum can be flashed in tas_reset_data() by another thread.
|
||||||
* Use a temp to avoid division by zero.
|
* Use a temp to avoid division by zero.
|
||||||
*/
|
*/
|
||||||
CsrUint32 temp_rxFramesNum;
|
u32 temp_rxFramesNum;
|
||||||
temp_rxFramesNum = tad->stats.rxFramesNum;
|
temp_rxFramesNum = tad->stats.rxFramesNum;
|
||||||
|
|
||||||
/* Calculate this interval's mean frame Rx rate from the sum */
|
/* Calculate this interval's mean frame Rx rate from the sum */
|
||||||
|
@ -442,10 +442,10 @@ void unifi_ta_sample(card_t *card,
|
||||||
*/
|
*/
|
||||||
if (tad->packet_filter & CSR_WIFI_ROUTER_CTRL_TRAFFIC_PACKET_TYPE_CUSTOM)
|
if (tad->packet_filter & CSR_WIFI_ROUTER_CTRL_TRAFFIC_PACKET_TYPE_CUSTOM)
|
||||||
{
|
{
|
||||||
CsrUint32 rxTcpThroughput = tad->ta_l4stats.rxTcpBytesCount / time_delta;
|
u32 rxTcpThroughput = tad->ta_l4stats.rxTcpBytesCount / time_delta;
|
||||||
CsrUint32 txTcpThroughput = tad->ta_l4stats.txTcpBytesCount / time_delta;
|
u32 txTcpThroughput = tad->ta_l4stats.txTcpBytesCount / time_delta;
|
||||||
CsrUint32 rxUdpThroughput = tad->ta_l4stats.rxUdpBytesCount / time_delta;
|
u32 rxUdpThroughput = tad->ta_l4stats.rxUdpBytesCount / time_delta;
|
||||||
CsrUint32 txUdpThroughput = tad->ta_l4stats.txUdpBytesCount / time_delta;
|
u32 txUdpThroughput = tad->ta_l4stats.txUdpBytesCount / time_delta;
|
||||||
|
|
||||||
unifi_ta_indicate_l4stats(card->ospriv,
|
unifi_ta_indicate_l4stats(card->ospriv,
|
||||||
rxTcpThroughput,
|
rxTcpThroughput,
|
||||||
|
|
|
@ -29,10 +29,10 @@ extern "C" {
|
||||||
|
|
||||||
typedef struct ta_l4stats
|
typedef struct ta_l4stats
|
||||||
{
|
{
|
||||||
CsrUint32 rxTcpBytesCount;
|
u32 rxTcpBytesCount;
|
||||||
CsrUint32 txTcpBytesCount;
|
u32 txTcpBytesCount;
|
||||||
CsrUint32 rxUdpBytesCount;
|
u32 rxUdpBytesCount;
|
||||||
CsrUint32 txUdpBytesCount;
|
u32 txUdpBytesCount;
|
||||||
} ta_l4stats_t;
|
} ta_l4stats_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -48,10 +48,10 @@ typedef struct ta_data
|
||||||
CsrWifiRouterCtrlTrafficFilter custom_filter;
|
CsrWifiRouterCtrlTrafficFilter custom_filter;
|
||||||
|
|
||||||
/* The timestamp of the last tx packet processed. */
|
/* The timestamp of the last tx packet processed. */
|
||||||
CsrUint32 tx_last_ts;
|
u32 tx_last_ts;
|
||||||
|
|
||||||
/* The timestamp of the last packet processed. */
|
/* The timestamp of the last packet processed. */
|
||||||
CsrUint32 last_indication_time;
|
u32 last_indication_time;
|
||||||
|
|
||||||
/* Statistics */
|
/* Statistics */
|
||||||
CsrWifiRouterCtrlTrafficStats stats;
|
CsrWifiRouterCtrlTrafficStats stats;
|
||||||
|
@ -60,7 +60,7 @@ typedef struct ta_data
|
||||||
CsrWifiRouterCtrlTrafficType traffic_type;
|
CsrWifiRouterCtrlTrafficType traffic_type;
|
||||||
|
|
||||||
/* Sum of packet rx rates for this interval used to calculate mean */
|
/* Sum of packet rx rates for this interval used to calculate mean */
|
||||||
CsrUint32 rx_sum_rate;
|
u32 rx_sum_rate;
|
||||||
ta_l4stats_t ta_l4stats;
|
ta_l4stats_t ta_l4stats;
|
||||||
} ta_data_t;
|
} ta_data_t;
|
||||||
|
|
||||||
|
|
|
@ -140,16 +140,16 @@ typedef enum
|
||||||
typedef struct _bulk_data_desc
|
typedef struct _bulk_data_desc
|
||||||
{
|
{
|
||||||
const u8 *os_data_ptr;
|
const u8 *os_data_ptr;
|
||||||
CsrUint32 data_length;
|
u32 data_length;
|
||||||
const void *os_net_buf_ptr;
|
const void *os_net_buf_ptr;
|
||||||
CsrUint32 net_buf_length;
|
u32 net_buf_length;
|
||||||
} bulk_data_desc_t;
|
} bulk_data_desc_t;
|
||||||
|
|
||||||
/* Structure of an entry in the Symbol Look Up Table (SLUT). */
|
/* Structure of an entry in the Symbol Look Up Table (SLUT). */
|
||||||
typedef struct _symbol
|
typedef struct _symbol
|
||||||
{
|
{
|
||||||
u16 id;
|
u16 id;
|
||||||
CsrUint32 obj;
|
u32 obj;
|
||||||
} symbol_t;
|
} symbol_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -196,9 +196,9 @@ typedef struct _card_info
|
||||||
{
|
{
|
||||||
u16 chip_id;
|
u16 chip_id;
|
||||||
u16 chip_version;
|
u16 chip_version;
|
||||||
CsrUint32 fw_build;
|
u32 fw_build;
|
||||||
u16 fw_hip_version;
|
u16 fw_hip_version;
|
||||||
CsrUint32 sdio_block_size;
|
u32 sdio_block_size;
|
||||||
} card_info_t;
|
} card_info_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -225,14 +225,14 @@ typedef struct unifi_coredump_req
|
||||||
/* From user */
|
/* From user */
|
||||||
CsrInt32 index; /* 0=newest, -1=oldest */
|
CsrInt32 index; /* 0=newest, -1=oldest */
|
||||||
unifi_coredump_space_t space; /* memory space */
|
unifi_coredump_space_t space; /* memory space */
|
||||||
CsrUint32 offset; /* register offset in space */
|
u32 offset; /* register offset in space */
|
||||||
/* From driver */
|
/* From driver */
|
||||||
CsrUint32 drv_build; /* Driver build id */
|
u32 drv_build; /* Driver build id */
|
||||||
CsrUint32 chip_ver; /* Chip version */
|
u32 chip_ver; /* Chip version */
|
||||||
CsrUint32 fw_ver; /* Firmware version */
|
u32 fw_ver; /* Firmware version */
|
||||||
CsrInt32 requestor; /* Requestor: 0=auto dump, 1=manual */
|
CsrInt32 requestor; /* Requestor: 0=auto dump, 1=manual */
|
||||||
CsrTime timestamp; /* time of capture by driver */
|
CsrTime timestamp; /* time of capture by driver */
|
||||||
CsrUint32 serial; /* capture serial number */
|
u32 serial; /* capture serial number */
|
||||||
CsrInt32 value; /* register value */
|
CsrInt32 value; /* register value */
|
||||||
} unifi_coredump_req_t; /* mini-coredumped reg value request */
|
} unifi_coredump_req_t; /* mini-coredumped reg value request */
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ void unifi_cancel_pending_signals(card_t *card);
|
||||||
* @ingroup upperedge
|
* @ingroup upperedge
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_send_signal(card_t *card, const u8 *sigptr,
|
CsrResult unifi_send_signal(card_t *card, const u8 *sigptr,
|
||||||
CsrUint32 siglen,
|
u32 siglen,
|
||||||
const bulk_data_param_t *bulkdata);
|
const bulk_data_param_t *bulkdata);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -398,7 +398,7 @@ CsrResult unifi_check_io_status(card_t *card, CsrInt32 *status);
|
||||||
*
|
*
|
||||||
* @ingroup upperedge
|
* @ingroup upperedge
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_bh(card_t *card, CsrUint32 *remaining);
|
CsrResult unifi_bh(card_t *card, u32 *remaining);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -513,7 +513,7 @@ void unifi_ta_sample(card_t *card,
|
||||||
const bulk_data_desc_t *data,
|
const bulk_data_desc_t *data,
|
||||||
const u8 *saddr,
|
const u8 *saddr,
|
||||||
const u8 *sta_macaddr,
|
const u8 *sta_macaddr,
|
||||||
CsrUint32 timestamp,
|
u32 timestamp,
|
||||||
u16 rate);
|
u16 rate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -545,9 +545,9 @@ void unifi_ta_classification(card_t *card,
|
||||||
CsrResult unifi_card_hard_reset(card_t *card);
|
CsrResult unifi_card_hard_reset(card_t *card);
|
||||||
|
|
||||||
|
|
||||||
CsrResult unifi_card_readn(card_t *card, CsrUint32 unifi_addr, void *pdata, u16 len);
|
CsrResult unifi_card_readn(card_t *card, u32 unifi_addr, void *pdata, u16 len);
|
||||||
CsrResult unifi_card_read16(card_t *card, CsrUint32 unifi_addr, u16 *pdata);
|
CsrResult unifi_card_read16(card_t *card, u32 unifi_addr, u16 *pdata);
|
||||||
CsrResult unifi_card_write16(card_t *card, CsrUint32 unifi_addr, u16 data);
|
CsrResult unifi_card_write16(card_t *card, u32 unifi_addr, u16 data);
|
||||||
|
|
||||||
|
|
||||||
enum unifi_dbg_processors_select
|
enum unifi_dbg_processors_select
|
||||||
|
@ -643,7 +643,7 @@ CsrResult unifi_run_bh(void *ospriv);
|
||||||
* @ingroup upperedge
|
* @ingroup upperedge
|
||||||
*/
|
*/
|
||||||
void unifi_receive_event(void *ospriv,
|
void unifi_receive_event(void *ospriv,
|
||||||
u8 *sigdata, CsrUint32 siglen,
|
u8 *sigdata, u32 siglen,
|
||||||
const bulk_data_param_t *bulkdata);
|
const bulk_data_param_t *bulkdata);
|
||||||
|
|
||||||
#ifdef CSR_WIFI_REQUEUE_PACKET_TO_HAL
|
#ifdef CSR_WIFI_REQUEUE_PACKET_TO_HAL
|
||||||
|
@ -659,7 +659,7 @@ void unifi_receive_event(void *ospriv,
|
||||||
*
|
*
|
||||||
* @ingroup upperedge
|
* @ingroup upperedge
|
||||||
*/
|
*/
|
||||||
CsrResult unifi_reque_ma_packet_request(void *ospriv, CsrUint32 host_tag,
|
CsrResult unifi_reque_ma_packet_request(void *ospriv, u32 host_tag,
|
||||||
u16 status,
|
u16 status,
|
||||||
bulk_data_desc_t *bulkDataDesc);
|
bulk_data_desc_t *bulkDataDesc);
|
||||||
|
|
||||||
|
@ -719,7 +719,7 @@ void* unifi_fw_read_start(void *ospriv, s8 is_fw, const card_info_t *info);
|
||||||
*
|
*
|
||||||
* @ingroup upperedge
|
* @ingroup upperedge
|
||||||
*/
|
*/
|
||||||
CsrInt32 unifi_fw_read(void *ospriv, void *arg, CsrUint32 offset, void *buf, CsrUint32 len);
|
CsrInt32 unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -746,7 +746,7 @@ void unifi_fw_read_stop(void *ospriv, void *dlpriv);
|
||||||
*
|
*
|
||||||
* @ingroup upperedge
|
* @ingroup upperedge
|
||||||
*/
|
*/
|
||||||
void* unifi_fw_open_buffer(void *ospriv, void *fwbuf, CsrUint32 len);
|
void* unifi_fw_open_buffer(void *ospriv, void *fwbuf, u32 len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -806,10 +806,10 @@ void unifi_ta_indicate_protocol(void *ospriv,
|
||||||
*/
|
*/
|
||||||
void unifi_ta_indicate_sampling(void *ospriv, CsrWifiRouterCtrlTrafficStats *stats);
|
void unifi_ta_indicate_sampling(void *ospriv, CsrWifiRouterCtrlTrafficStats *stats);
|
||||||
void unifi_ta_indicate_l4stats(void *ospriv,
|
void unifi_ta_indicate_l4stats(void *ospriv,
|
||||||
CsrUint32 rxTcpThroughput,
|
u32 rxTcpThroughput,
|
||||||
CsrUint32 txTcpThroughput,
|
u32 txTcpThroughput,
|
||||||
CsrUint32 rxUdpThroughput,
|
u32 rxUdpThroughput,
|
||||||
CsrUint32 txUdpThroughput);
|
u32 txUdpThroughput);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void unifi_rx_queue_flush(void *ospriv);
|
void unifi_rx_queue_flush(void *ospriv);
|
||||||
|
@ -849,7 +849,7 @@ CsrResult unifi_capture_panic(card_t *card);
|
||||||
#define CSR_WIFI_INTMODE_DEFAULT 0
|
#define CSR_WIFI_INTMODE_DEFAULT 0
|
||||||
#define CSR_WIFI_INTMODE_RUN_BH_ONCE 1 /* Run BH once per interrupt */
|
#define CSR_WIFI_INTMODE_RUN_BH_ONCE 1 /* Run BH once per interrupt */
|
||||||
|
|
||||||
void unifi_set_interrupt_mode(card_t *card, CsrUint32 mode);
|
void unifi_set_interrupt_mode(card_t *card, u32 mode);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* unifi_request_max_clock() requests that max SDIO clock speed is set at the
|
* unifi_request_max_clock() requests that max SDIO clock speed is set at the
|
||||||
|
|
|
@ -38,7 +38,7 @@ enum udi_log_direction
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*udi_func_t)(void *ospriv, u8 *sigdata,
|
typedef void (*udi_func_t)(void *ospriv, u8 *sigdata,
|
||||||
CsrUint32 signal_len,
|
u32 signal_len,
|
||||||
const bulk_data_param_t *bulkdata,
|
const bulk_data_param_t *bulkdata,
|
||||||
enum udi_log_direction dir);
|
enum udi_log_direction dir);
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrCharString t_name[4];
|
CsrCharString t_name[4];
|
||||||
CsrUint32 t_len;
|
u32 t_len;
|
||||||
} tag_t;
|
} tag_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,44 +86,44 @@ typedef struct
|
||||||
xbv_container container;
|
xbv_container container;
|
||||||
CsrInt32 ioffset_end;
|
CsrInt32 ioffset_end;
|
||||||
} s[XBV_STACK_SIZE];
|
} s[XBV_STACK_SIZE];
|
||||||
CsrUint32 ptr;
|
u32 ptr;
|
||||||
} xbv_stack_t;
|
} xbv_stack_t;
|
||||||
|
|
||||||
static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag);
|
static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag);
|
||||||
static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, CsrUint32 len);
|
static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len);
|
||||||
static CsrInt32 read_uint(card_t *card, ct_t *ct, CsrUint32 *u, CsrUint32 len);
|
static CsrInt32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len);
|
||||||
static CsrInt32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
|
static CsrInt32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
|
||||||
xbv_mode new_mode, xbv_container old_cont);
|
xbv_mode new_mode, xbv_container old_cont);
|
||||||
static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||||
xbv_mode new_mode, xbv_container old_cont,
|
xbv_mode new_mode, xbv_container old_cont,
|
||||||
xbv_container new_cont, CsrUint32 ioff);
|
xbv_container new_cont, u32 ioff);
|
||||||
|
|
||||||
static CsrUint32 write_uint16(void *buf, const CsrUint32 offset,
|
static u32 write_uint16(void *buf, const u32 offset,
|
||||||
const u16 val);
|
const u16 val);
|
||||||
static CsrUint32 write_uint32(void *buf, const CsrUint32 offset,
|
static u32 write_uint32(void *buf, const u32 offset,
|
||||||
const CsrUint32 val);
|
const u32 val);
|
||||||
static CsrUint32 write_bytes(void *buf, const CsrUint32 offset,
|
static u32 write_bytes(void *buf, const u32 offset,
|
||||||
const u8 *data, const CsrUint32 len);
|
const u8 *data, const u32 len);
|
||||||
static CsrUint32 write_tag(void *buf, const CsrUint32 offset,
|
static u32 write_tag(void *buf, const u32 offset,
|
||||||
const CsrCharString *tag_str);
|
const CsrCharString *tag_str);
|
||||||
static CsrUint32 write_chunk(void *buf, const CsrUint32 offset,
|
static u32 write_chunk(void *buf, const u32 offset,
|
||||||
const CsrCharString *tag_str,
|
const CsrCharString *tag_str,
|
||||||
const CsrUint32 payload_len);
|
const u32 payload_len);
|
||||||
static u16 calc_checksum(void *buf, const CsrUint32 offset,
|
static u16 calc_checksum(void *buf, const u32 offset,
|
||||||
const CsrUint32 bytes_len);
|
const u32 bytes_len);
|
||||||
static CsrUint32 calc_patch_size(const xbv1_t *fwinfo);
|
static u32 calc_patch_size(const xbv1_t *fwinfo);
|
||||||
|
|
||||||
static CsrUint32 write_xbv_header(void *buf, const CsrUint32 offset,
|
static u32 write_xbv_header(void *buf, const u32 offset,
|
||||||
const CsrUint32 file_payload_length);
|
const u32 file_payload_length);
|
||||||
static CsrUint32 write_ptch_header(void *buf, const CsrUint32 offset,
|
static u32 write_ptch_header(void *buf, const u32 offset,
|
||||||
const CsrUint32 fw_id);
|
const u32 fw_id);
|
||||||
static CsrUint32 write_patchcmd(void *buf, const CsrUint32 offset,
|
static u32 write_patchcmd(void *buf, const u32 offset,
|
||||||
const CsrUint32 dst_genaddr, const u16 len);
|
const u32 dst_genaddr, const u16 len);
|
||||||
static CsrUint32 write_reset_ptdl(void *buf, const CsrUint32 offset,
|
static u32 write_reset_ptdl(void *buf, const u32 offset,
|
||||||
const xbv1_t *fwinfo, CsrUint32 fw_id);
|
const xbv1_t *fwinfo, u32 fw_id);
|
||||||
static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset,
|
static u32 write_fwdl_to_ptdl(void *buf, const u32 offset,
|
||||||
fwreadfn_t readfn, const struct FWDL *fwdl,
|
fwreadfn_t readfn, const struct FWDL *fwdl,
|
||||||
const void *fw_buf, const CsrUint32 fw_id,
|
const void *fw_buf, const u32 fw_id,
|
||||||
void *rdbuf);
|
void *rdbuf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -210,7 +210,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
|
||||||
/* File format version */
|
/* File format version */
|
||||||
if (TAG_EQ(tag.t_name, "VERF"))
|
if (TAG_EQ(tag.t_name, "VERF"))
|
||||||
{
|
{
|
||||||
CsrUint32 version;
|
u32 version;
|
||||||
|
|
||||||
if (xbv_check(fwinfo, &stack, xbv_unknown, xbv_xbv1) ||
|
if (xbv_check(fwinfo, &stack, xbv_unknown, xbv_xbv1) ||
|
||||||
(tag.t_len != 2) ||
|
(tag.t_len != 2) ||
|
||||||
|
@ -228,7 +228,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
|
||||||
else if (TAG_EQ(tag.t_name, "LIST"))
|
else if (TAG_EQ(tag.t_name, "LIST"))
|
||||||
{
|
{
|
||||||
CsrCharString name[4];
|
CsrCharString name[4];
|
||||||
CsrUint32 list_end;
|
u32 list_end;
|
||||||
|
|
||||||
list_end = ct.ioffset + tag.t_len;
|
list_end = ct.ioffset + tag.t_len;
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
|
||||||
}
|
}
|
||||||
else if (TAG_EQ(tag.t_name, "SLTP"))
|
else if (TAG_EQ(tag.t_name, "SLTP"))
|
||||||
{
|
{
|
||||||
CsrUint32 addr;
|
u32 addr;
|
||||||
|
|
||||||
if (xbv_check(fwinfo, &stack, xbv_firmware, xbv_fw) ||
|
if (xbv_check(fwinfo, &stack, xbv_firmware, xbv_fw) ||
|
||||||
(tag.t_len != 4) ||
|
(tag.t_len != 4) ||
|
||||||
|
@ -301,7 +301,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
|
||||||
}
|
}
|
||||||
else if (TAG_EQ(tag.t_name, "FWDL"))
|
else if (TAG_EQ(tag.t_name, "FWDL"))
|
||||||
{
|
{
|
||||||
CsrUint32 addr;
|
u32 addr;
|
||||||
struct FWDL *fwdl;
|
struct FWDL *fwdl;
|
||||||
|
|
||||||
if (xbv_check(fwinfo, &stack, xbv_firmware, xbv_fw) ||
|
if (xbv_check(fwinfo, &stack, xbv_firmware, xbv_fw) ||
|
||||||
|
@ -335,7 +335,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
|
||||||
}
|
}
|
||||||
else if (TAG_EQ(tag.t_name, "VMEQ"))
|
else if (TAG_EQ(tag.t_name, "VMEQ"))
|
||||||
{
|
{
|
||||||
CsrUint32 temp[3];
|
u32 temp[3];
|
||||||
struct VAND *vand;
|
struct VAND *vand;
|
||||||
struct VMEQ *vmeq;
|
struct VMEQ *vmeq;
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
|
||||||
}
|
}
|
||||||
else if (TAG_EQ(tag.t_name, "FWID"))
|
else if (TAG_EQ(tag.t_name, "FWID"))
|
||||||
{
|
{
|
||||||
CsrUint32 build_id;
|
u32 build_id;
|
||||||
|
|
||||||
if (xbv_check(fwinfo, &stack, xbv_patch, xbv_ptch) ||
|
if (xbv_check(fwinfo, &stack, xbv_patch, xbv_ptch) ||
|
||||||
(tag.t_len != 4) ||
|
(tag.t_len != 4) ||
|
||||||
|
@ -467,7 +467,7 @@ static CsrInt32 xbv_check(xbv1_t *fwinfo, const xbv_stack_t *stack,
|
||||||
/* Make checks as above and then enter a new list */
|
/* Make checks as above and then enter a new list */
|
||||||
static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||||
xbv_mode new_mode, xbv_container old_cont,
|
xbv_mode new_mode, xbv_container old_cont,
|
||||||
xbv_container new_cont, CsrUint32 new_ioff)
|
xbv_container new_cont, u32 new_ioff)
|
||||||
{
|
{
|
||||||
if (xbv_check(fwinfo, stack, new_mode, old_cont))
|
if (xbv_check(fwinfo, stack, new_mode, old_cont))
|
||||||
{
|
{
|
||||||
|
@ -489,14 +489,14 @@ static CsrInt32 xbv_push(xbv1_t *fwinfo, xbv_stack_t *stack,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 xbv2uint(u8 *ptr, CsrInt32 len)
|
static u32 xbv2uint(u8 *ptr, CsrInt32 len)
|
||||||
{
|
{
|
||||||
CsrUint32 u = 0;
|
u32 u = 0;
|
||||||
s16 i;
|
s16 i;
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
{
|
{
|
||||||
CsrUint32 b;
|
u32 b;
|
||||||
b = ptr[i];
|
b = ptr[i];
|
||||||
u += b << (i * 8);
|
u += b << (i * 8);
|
||||||
}
|
}
|
||||||
|
@ -533,7 +533,7 @@ static CsrInt32 read_tag(card_t *card, ct_t *ct, tag_t *tag)
|
||||||
} /* read_tag() */
|
} /* read_tag() */
|
||||||
|
|
||||||
|
|
||||||
static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, CsrUint32 len)
|
static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, u32 len)
|
||||||
{
|
{
|
||||||
/* read the tag value */
|
/* read the tag value */
|
||||||
if ((*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, len) != (CsrInt32)len)
|
if ((*ct->iread)(card->ospriv, ct->dlpriv, ct->ioffset, buf, len) != (CsrInt32)len)
|
||||||
|
@ -547,7 +547,7 @@ static CsrInt32 read_bytes(card_t *card, ct_t *ct, void *buf, CsrUint32 len)
|
||||||
} /* read_bytes() */
|
} /* read_bytes() */
|
||||||
|
|
||||||
|
|
||||||
static CsrInt32 read_uint(card_t *card, ct_t *ct, CsrUint32 *u, CsrUint32 len)
|
static CsrInt32 read_uint(card_t *card, ct_t *ct, u32 *u, u32 len)
|
||||||
{
|
{
|
||||||
u8 buf[4];
|
u8 buf[4];
|
||||||
|
|
||||||
|
@ -568,7 +568,7 @@ static CsrInt32 read_uint(card_t *card, ct_t *ct, CsrUint32 *u, CsrUint32 len)
|
||||||
} /* read_uint() */
|
} /* read_uint() */
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 write_uint16(void *buf, const CsrUint32 offset, const u16 val)
|
static u32 write_uint16(void *buf, const u32 offset, const u16 val)
|
||||||
{
|
{
|
||||||
u8 *dst = (u8 *)buf + offset;
|
u8 *dst = (u8 *)buf + offset;
|
||||||
*dst++ = (u8)(val & 0xff); /* LSB first */
|
*dst++ = (u8)(val & 0xff); /* LSB first */
|
||||||
|
@ -577,17 +577,17 @@ static CsrUint32 write_uint16(void *buf, const CsrUint32 offset, const u16 val)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 write_uint32(void *buf, const CsrUint32 offset, const CsrUint32 val)
|
static u32 write_uint32(void *buf, const u32 offset, const u32 val)
|
||||||
{
|
{
|
||||||
(void)write_uint16(buf, offset + 0, (u16)(val & 0xffff));
|
(void)write_uint16(buf, offset + 0, (u16)(val & 0xffff));
|
||||||
(void)write_uint16(buf, offset + 2, (u16)(val >> 16));
|
(void)write_uint16(buf, offset + 2, (u16)(val >> 16));
|
||||||
return sizeof(CsrUint32);
|
return sizeof(u32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 write_bytes(void *buf, const CsrUint32 offset, const u8 *data, const CsrUint32 len)
|
static u32 write_bytes(void *buf, const u32 offset, const u8 *data, const u32 len)
|
||||||
{
|
{
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
u8 *dst = (u8 *)buf + offset;
|
u8 *dst = (u8 *)buf + offset;
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
|
@ -598,7 +598,7 @@ static CsrUint32 write_bytes(void *buf, const CsrUint32 offset, const u8 *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 write_tag(void *buf, const CsrUint32 offset, const CsrCharString *tag_str)
|
static u32 write_tag(void *buf, const u32 offset, const CsrCharString *tag_str)
|
||||||
{
|
{
|
||||||
u8 *dst = (u8 *)buf + offset;
|
u8 *dst = (u8 *)buf + offset;
|
||||||
CsrMemCpy(dst, tag_str, 4);
|
CsrMemCpy(dst, tag_str, 4);
|
||||||
|
@ -606,19 +606,19 @@ static CsrUint32 write_tag(void *buf, const CsrUint32 offset, const CsrCharStrin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 write_chunk(void *buf, const CsrUint32 offset, const CsrCharString *tag_str, const CsrUint32 payload_len)
|
static u32 write_chunk(void *buf, const u32 offset, const CsrCharString *tag_str, const u32 payload_len)
|
||||||
{
|
{
|
||||||
CsrUint32 written = 0;
|
u32 written = 0;
|
||||||
written += write_tag(buf, offset, tag_str);
|
written += write_tag(buf, offset, tag_str);
|
||||||
written += write_uint32(buf, written + offset, (CsrUint32)payload_len);
|
written += write_uint32(buf, written + offset, (u32)payload_len);
|
||||||
|
|
||||||
return written;
|
return written;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static u16 calc_checksum(void *buf, const CsrUint32 offset, const CsrUint32 bytes_len)
|
static u16 calc_checksum(void *buf, const u32 offset, const u32 bytes_len)
|
||||||
{
|
{
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
u8 *src = (u8 *)buf + offset;
|
u8 *src = (u8 *)buf + offset;
|
||||||
u16 sum = 0;
|
u16 sum = 0;
|
||||||
u16 val;
|
u16 val;
|
||||||
|
@ -640,10 +640,10 @@ static u16 calc_checksum(void *buf, const CsrUint32 offset, const CsrUint32 byte
|
||||||
|
|
||||||
#define PTDL_RESET_DATA_SIZE 20 /* Size of reset vectors PTDL */
|
#define PTDL_RESET_DATA_SIZE 20 /* Size of reset vectors PTDL */
|
||||||
|
|
||||||
static CsrUint32 calc_patch_size(const xbv1_t *fwinfo)
|
static u32 calc_patch_size(const xbv1_t *fwinfo)
|
||||||
{
|
{
|
||||||
s16 i;
|
s16 i;
|
||||||
CsrUint32 size = 0;
|
u32 size = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Work out how big an equivalent patch format file must be for this image.
|
* Work out how big an equivalent patch format file must be for this image.
|
||||||
|
@ -673,9 +673,9 @@ static CsrUint32 calc_patch_size(const xbv1_t *fwinfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 write_xbv_header(void *buf, const CsrUint32 offset, const CsrUint32 file_payload_length)
|
static u32 write_xbv_header(void *buf, const u32 offset, const u32 file_payload_length)
|
||||||
{
|
{
|
||||||
CsrUint32 written = 0;
|
u32 written = 0;
|
||||||
|
|
||||||
/* The length value given to the XBV chunk is the length of all subsequent
|
/* The length value given to the XBV chunk is the length of all subsequent
|
||||||
* contents of the file, excluding the 8 byte size of the XBV1 header itself
|
* contents of the file, excluding the 8 byte size of the XBV1 header itself
|
||||||
|
@ -690,9 +690,9 @@ static CsrUint32 write_xbv_header(void *buf, const CsrUint32 offset, const CsrUi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 write_ptch_header(void *buf, const CsrUint32 offset, const CsrUint32 fw_id)
|
static u32 write_ptch_header(void *buf, const u32 offset, const u32 fw_id)
|
||||||
{
|
{
|
||||||
CsrUint32 written = 0;
|
u32 written = 0;
|
||||||
|
|
||||||
/* LIST is written with a zero length, to be updated later */
|
/* LIST is written with a zero length, to be updated later */
|
||||||
written += write_chunk(buf, offset + written, (CsrCharString *)"LIST", 0);
|
written += write_chunk(buf, offset + written, (CsrCharString *)"LIST", 0);
|
||||||
|
@ -711,10 +711,10 @@ static CsrUint32 write_ptch_header(void *buf, const CsrUint32 offset, const CsrU
|
||||||
#define UF_MEMPUT_MAC 0x0000
|
#define UF_MEMPUT_MAC 0x0000
|
||||||
#define UF_MEMPUT_PHY 0x1000
|
#define UF_MEMPUT_PHY 0x1000
|
||||||
|
|
||||||
static CsrUint32 write_patchcmd(void *buf, const CsrUint32 offset, const CsrUint32 dst_genaddr, const u16 len)
|
static u32 write_patchcmd(void *buf, const u32 offset, const u32 dst_genaddr, const u16 len)
|
||||||
{
|
{
|
||||||
CsrUint32 written = 0;
|
u32 written = 0;
|
||||||
CsrUint32 region = (dst_genaddr >> 28);
|
u32 region = (dst_genaddr >> 28);
|
||||||
u16 cmd_and_len = UF_MEMPUT_MAC;
|
u16 cmd_and_len = UF_MEMPUT_MAC;
|
||||||
|
|
||||||
if (region == UF_REGION_PHY)
|
if (region == UF_REGION_PHY)
|
||||||
|
@ -739,19 +739,19 @@ static CsrUint32 write_patchcmd(void *buf, const CsrUint32 offset, const CsrUint
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset, fwreadfn_t readfn,
|
static u32 write_fwdl_to_ptdl(void *buf, const u32 offset, fwreadfn_t readfn,
|
||||||
const struct FWDL *fwdl, const void *dlpriv,
|
const struct FWDL *fwdl, const void *dlpriv,
|
||||||
const CsrUint32 fw_id, void *fw_buf)
|
const u32 fw_id, void *fw_buf)
|
||||||
{
|
{
|
||||||
CsrUint32 written = 0;
|
u32 written = 0;
|
||||||
s16 chunks = 0;
|
s16 chunks = 0;
|
||||||
CsrUint32 left = fwdl->dl_size; /* Bytes left in this fwdl */
|
u32 left = fwdl->dl_size; /* Bytes left in this fwdl */
|
||||||
CsrUint32 dl_addr = fwdl->dl_addr; /* Target address of fwdl image on XAP */
|
u32 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 */
|
u32 dl_offs = fwdl->dl_offset; /* Offset of fwdl image data in source */
|
||||||
u16 csum;
|
u16 csum;
|
||||||
CsrUint32 csum_start_offs; /* first offset to include in checksum */
|
u32 csum_start_offs; /* first offset to include in checksum */
|
||||||
CsrUint32 sec_data_len; /* section data byte count */
|
u32 sec_data_len; /* section data byte count */
|
||||||
CsrUint32 sec_len; /* section data + header byte count */
|
u32 sec_len; /* section data + header byte count */
|
||||||
|
|
||||||
/* FWDL maps to one or more PTDLs, as max size for a PTDL is 1K words */
|
/* FWDL maps to one or more PTDLs, as max size for a PTDL is 1K words */
|
||||||
while (left)
|
while (left)
|
||||||
|
@ -810,12 +810,12 @@ static CsrUint32 write_fwdl_to_ptdl(void *buf, const CsrUint32 offset, fwreadfn_
|
||||||
#define UF_MAC_START_CMD 0x6000 /* MAC "Set start address" command */
|
#define UF_MAC_START_CMD 0x6000 /* MAC "Set start address" command */
|
||||||
#define UF_PHY_START_CMD 0x7000 /* PHY "Set start address" command */
|
#define UF_PHY_START_CMD 0x7000 /* PHY "Set start address" command */
|
||||||
|
|
||||||
static CsrUint32 write_reset_ptdl(void *buf, const CsrUint32 offset, const xbv1_t *fwinfo, CsrUint32 fw_id)
|
static u32 write_reset_ptdl(void *buf, const u32 offset, const xbv1_t *fwinfo, u32 fw_id)
|
||||||
{
|
{
|
||||||
CsrUint32 written = 0;
|
u32 written = 0;
|
||||||
u16 csum;
|
u16 csum;
|
||||||
CsrUint32 csum_start_offs; /* first offset to include in checksum */
|
u32 csum_start_offs; /* first offset to include in checksum */
|
||||||
CsrUint32 sec_len; /* section data + header byte count */
|
u32 sec_len; /* section data + header byte count */
|
||||||
|
|
||||||
sec_len = SEC_CMD_LEN + PTDL_VEC_HDR_SIZE; /* Total section byte length */
|
sec_len = SEC_CMD_LEN + PTDL_VEC_HDR_SIZE; /* Total section byte length */
|
||||||
|
|
||||||
|
@ -871,12 +871,12 @@ static CsrUint32 write_reset_ptdl(void *buf, const CsrUint32 offset, const xbv1_
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
||||||
symbol_t *slut, CsrUint32 slut_len)
|
symbol_t *slut, u32 slut_len)
|
||||||
{
|
{
|
||||||
s16 i;
|
s16 i;
|
||||||
CsrInt32 offset;
|
CsrInt32 offset;
|
||||||
CsrUint32 magic;
|
u32 magic;
|
||||||
CsrUint32 count = 0;
|
u32 count = 0;
|
||||||
ct_t ct;
|
ct_t ct;
|
||||||
|
|
||||||
if (fwinfo->mode != xbv_firmware)
|
if (fwinfo->mode != xbv_firmware)
|
||||||
|
@ -916,7 +916,7 @@ CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *f
|
||||||
|
|
||||||
while (count < slut_len)
|
while (count < slut_len)
|
||||||
{
|
{
|
||||||
CsrUint32 id, obj;
|
u32 id, obj;
|
||||||
|
|
||||||
/* Read Symbol Id */
|
/* Read Symbol Id */
|
||||||
if (read_uint(card, &ct, &id, 2))
|
if (read_uint(card, &ct, &id, 2))
|
||||||
|
@ -969,16 +969,16 @@ CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *f
|
||||||
#define PTCH_LIST_SIZE 16 /* sizeof PTCH+FWID chunk in LIST header */
|
#define PTCH_LIST_SIZE 16 /* sizeof PTCH+FWID chunk in LIST header */
|
||||||
|
|
||||||
void* xbv_to_patch(card_t *card, fwreadfn_t readfn,
|
void* xbv_to_patch(card_t *card, fwreadfn_t readfn,
|
||||||
const void *fw_buf, const xbv1_t *fwinfo, CsrUint32 *size)
|
const void *fw_buf, const xbv1_t *fwinfo, u32 *size)
|
||||||
{
|
{
|
||||||
void *patch_buf = NULL;
|
void *patch_buf = NULL;
|
||||||
CsrUint32 patch_buf_size;
|
u32 patch_buf_size;
|
||||||
CsrUint32 payload_offs = 0; /* Start of XBV payload */
|
u32 payload_offs = 0; /* Start of XBV payload */
|
||||||
s16 i;
|
s16 i;
|
||||||
CsrUint32 patch_offs = 0;
|
u32 patch_offs = 0;
|
||||||
CsrUint32 list_len_offs = 0; /* Offset of PTDL LIST length parameter */
|
u32 list_len_offs = 0; /* Offset of PTDL LIST length parameter */
|
||||||
CsrUint32 ptdl_start_offs = 0; /* Offset of first PTDL chunk */
|
u32 ptdl_start_offs = 0; /* Offset of first PTDL chunk */
|
||||||
CsrUint32 fw_id;
|
u32 fw_id;
|
||||||
void *rdbuf;
|
void *rdbuf;
|
||||||
|
|
||||||
if (!fw_buf || !fwinfo || !card)
|
if (!fw_buf || !fwinfo || !card)
|
||||||
|
|
|
@ -33,39 +33,39 @@ extern "C" {
|
||||||
|
|
||||||
struct VMEQ
|
struct VMEQ
|
||||||
{
|
{
|
||||||
CsrUint32 addr;
|
u32 addr;
|
||||||
u16 mask;
|
u16 mask;
|
||||||
u16 value;
|
u16 value;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VAND
|
struct VAND
|
||||||
{
|
{
|
||||||
CsrUint32 first;
|
u32 first;
|
||||||
CsrUint32 count;
|
u32 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VERS
|
struct VERS
|
||||||
{
|
{
|
||||||
CsrUint32 num_vand;
|
u32 num_vand;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FWDL
|
struct FWDL
|
||||||
{
|
{
|
||||||
CsrUint32 dl_addr;
|
u32 dl_addr;
|
||||||
CsrUint32 dl_size;
|
u32 dl_size;
|
||||||
CsrUint32 dl_offset;
|
u32 dl_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FWOV
|
struct FWOV
|
||||||
{
|
{
|
||||||
CsrUint32 dl_size;
|
u32 dl_size;
|
||||||
CsrUint32 dl_offset;
|
u32 dl_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PTDL
|
struct PTDL
|
||||||
{
|
{
|
||||||
CsrUint32 dl_size;
|
u32 dl_size;
|
||||||
CsrUint32 dl_offset;
|
u32 dl_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_VMEQ 64
|
#define MAX_VMEQ 64
|
||||||
|
@ -90,11 +90,11 @@ typedef struct
|
||||||
/* Parts of a Firmware XBV1 */
|
/* Parts of a Firmware XBV1 */
|
||||||
|
|
||||||
struct VMEQ vmeq[MAX_VMEQ];
|
struct VMEQ vmeq[MAX_VMEQ];
|
||||||
CsrUint32 num_vmeq;
|
u32 num_vmeq;
|
||||||
struct VAND vand[MAX_VAND];
|
struct VAND vand[MAX_VAND];
|
||||||
struct VERS vers;
|
struct VERS vers;
|
||||||
|
|
||||||
CsrUint32 slut_addr;
|
u32 slut_addr;
|
||||||
|
|
||||||
/* F/W download image, possibly more than one part */
|
/* F/W download image, possibly more than one part */
|
||||||
struct FWDL fwdl[MAX_FWDL];
|
struct FWDL fwdl[MAX_FWDL];
|
||||||
|
@ -105,20 +105,20 @@ typedef struct
|
||||||
|
|
||||||
/* Parts of a Patch XBV1 */
|
/* Parts of a Patch XBV1 */
|
||||||
|
|
||||||
CsrUint32 build_id;
|
u32 build_id;
|
||||||
|
|
||||||
struct PTDL ptdl[MAX_PTDL];
|
struct PTDL ptdl[MAX_PTDL];
|
||||||
s16 num_ptdl;
|
s16 num_ptdl;
|
||||||
} xbv1_t;
|
} xbv1_t;
|
||||||
|
|
||||||
|
|
||||||
typedef CsrInt32 (*fwreadfn_t)(void *ospriv, void *dlpriv, CsrUint32 offset, void *buf, CsrUint32 len);
|
typedef CsrInt32 (*fwreadfn_t)(void *ospriv, void *dlpriv, u32 offset, void *buf, u32 len);
|
||||||
|
|
||||||
CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo);
|
CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo);
|
||||||
CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
CsrInt32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
|
||||||
symbol_t *slut, CsrUint32 slut_len);
|
symbol_t *slut, u32 slut_len);
|
||||||
void* xbv_to_patch(card_t *card, fwreadfn_t readfn, const void *fw_buf, const xbv1_t *fwinfo,
|
void* xbv_to_patch(card_t *card, fwreadfn_t readfn, const void *fw_buf, const xbv1_t *fwinfo,
|
||||||
CsrUint32 *size);
|
u32 *size);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ CsrWifiEventCsrUint16* CsrWifiEventCsrUint16_struct(u16 primtype, u16 msgtype, C
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
CsrUint32 value;
|
u32 value;
|
||||||
} CsrWifiEventCsrUint32;
|
} CsrWifiEventCsrUint32;
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*
|
/*----------------------------------------------------------------------------*
|
||||||
|
@ -87,7 +87,7 @@ typedef struct
|
||||||
* Allocates and fills in a message with the signature CsrWifiEventCsrUint32
|
* Allocates and fills in a message with the signature CsrWifiEventCsrUint32
|
||||||
*
|
*
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
CsrWifiEventCsrUint32* CsrWifiEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, CsrUint32 value);
|
CsrWifiEventCsrUint32* CsrWifiEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrSchedQid dst, CsrSchedQid src, u32 value);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,15 +22,15 @@ extern "C" {
|
||||||
|
|
||||||
|
|
||||||
void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v);
|
void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v);
|
||||||
void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v);
|
void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, u32 v);
|
||||||
void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v);
|
void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, u32 v);
|
||||||
|
|
||||||
void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset);
|
void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset);
|
||||||
void CsrUint24DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset);
|
void CsrUint24DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset);
|
||||||
void CsrUint32DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset);
|
void CsrUint32DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset);
|
||||||
|
|
||||||
void CsrUint24Ser(u8 *ptr, CsrSize *len, CsrUint32 v);
|
void CsrUint24Ser(u8 *ptr, CsrSize *len, u32 v);
|
||||||
void CsrUint24Des(CsrUint32 *v, u8 *buffer, CsrSize *offset);
|
void CsrUint24Des(u32 *v, u8 *buffer, CsrSize *offset);
|
||||||
|
|
||||||
|
|
||||||
CsrSize CsrWifiEventSizeof(void *msg);
|
CsrSize CsrWifiEventSizeof(void *msg);
|
||||||
|
|
|
@ -336,7 +336,7 @@ typedef u16 CsrWifiNmeEncryption;
|
||||||
- Used to register for all available indications
|
- Used to register for all available indications
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef CsrUint32 CsrWifiNmeIndications;
|
typedef u32 CsrWifiNmeIndications;
|
||||||
#define CSR_WIFI_NME_INDICATIONS_IND_AP_STATION ((CsrWifiNmeIndications) 0x00100000)
|
#define CSR_WIFI_NME_INDICATIONS_IND_AP_STATION ((CsrWifiNmeIndications) 0x00100000)
|
||||||
#define CSR_WIFI_NME_INDICATIONS_IND_AP_STOP ((CsrWifiNmeIndications) 0x00200000)
|
#define CSR_WIFI_NME_INDICATIONS_IND_AP_STOP ((CsrWifiNmeIndications) 0x00200000)
|
||||||
#define CSR_WIFI_NME_INDICATIONS_IND_SIM_UMTS_AUTH ((CsrWifiNmeIndications) 0x01000000)
|
#define CSR_WIFI_NME_INDICATIONS_IND_SIM_UMTS_AUTH ((CsrWifiNmeIndications) 0x01000000)
|
||||||
|
@ -489,7 +489,7 @@ typedef u16 CsrWifiNmeEncryptionMask;
|
||||||
Mask type for use with the values defined by CsrWifiNmeIndications
|
Mask type for use with the values defined by CsrWifiNmeIndications
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef CsrUint32 CsrWifiNmeIndicationsMask;
|
typedef u32 CsrWifiNmeIndicationsMask;
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
|
@ -501,7 +501,7 @@ typedef CsrUint32 CsrWifiNmeIndicationsMask;
|
||||||
specific indications
|
specific indications
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef CsrUint32 CsrWifiNmeNmeIndicationsMask;
|
typedef u32 CsrWifiNmeNmeIndicationsMask;
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
|
@ -594,11 +594,11 @@ typedef struct
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrUint32 certificateLength;
|
u32 certificateLength;
|
||||||
u8 *certificate;
|
u8 *certificate;
|
||||||
u16 privateKeyLength;
|
u16 privateKeyLength;
|
||||||
u8 *privateKey;
|
u8 *privateKey;
|
||||||
CsrUint32 caCertificateLength;
|
u32 caCertificateLength;
|
||||||
u8 *caCertificate;
|
u8 *caCertificate;
|
||||||
} CsrWifiNmeWapiCredentials;
|
} CsrWifiNmeWapiCredentials;
|
||||||
|
|
||||||
|
@ -711,17 +711,17 @@ typedef struct
|
||||||
CsrCharString *userName;
|
CsrCharString *userName;
|
||||||
CsrCharString *userPassword;
|
CsrCharString *userPassword;
|
||||||
CsrCharString *authServerUserIdentity;
|
CsrCharString *authServerUserIdentity;
|
||||||
CsrUint32 clientCertificateLength;
|
u32 clientCertificateLength;
|
||||||
u8 *clientCertificate;
|
u8 *clientCertificate;
|
||||||
CsrUint32 certificateAuthorityCertificateLength;
|
u32 certificateAuthorityCertificateLength;
|
||||||
u8 *certificateAuthorityCertificate;
|
u8 *certificateAuthorityCertificate;
|
||||||
u16 privateKeyLength;
|
u16 privateKeyLength;
|
||||||
u8 *privateKey;
|
u8 *privateKey;
|
||||||
CsrCharString *privateKeyPassword;
|
CsrCharString *privateKeyPassword;
|
||||||
CsrUint32 sessionLength;
|
u32 sessionLength;
|
||||||
u8 *session;
|
u8 *session;
|
||||||
CsrBool allowPacProvisioning;
|
CsrBool allowPacProvisioning;
|
||||||
CsrUint32 pacLength;
|
u32 pacLength;
|
||||||
u8 *pac;
|
u8 *pac;
|
||||||
CsrCharString *pacPassword;
|
CsrCharString *pacPassword;
|
||||||
} CsrWifiNmeEapCredentials;
|
} CsrWifiNmeEapCredentials;
|
||||||
|
|
|
@ -28,14 +28,14 @@ extern "C" {
|
||||||
|
|
||||||
typedef CsrPrim CsrWifiRouterCtrlPrim;
|
typedef CsrPrim CsrWifiRouterCtrlPrim;
|
||||||
|
|
||||||
typedef CsrResult (*CsrWifiRouterCtrlRawSdioByteWrite)(u8 func, CsrUint32 address, u8 data);
|
typedef CsrResult (*CsrWifiRouterCtrlRawSdioByteWrite)(u8 func, u32 address, u8 data);
|
||||||
typedef CsrResult (*CsrWifiRouterCtrlRawSdioByteRead)(u8 func, CsrUint32 address, u8 *pdata);
|
typedef CsrResult (*CsrWifiRouterCtrlRawSdioByteRead)(u8 func, u32 address, u8 *pdata);
|
||||||
typedef CsrResult (*CsrWifiRouterCtrlRawSdioFirmwareDownload)(CsrUint32 length, const u8 *pdata);
|
typedef CsrResult (*CsrWifiRouterCtrlRawSdioFirmwareDownload)(u32 length, const u8 *pdata);
|
||||||
typedef CsrResult (*CsrWifiRouterCtrlRawSdioReset)(void);
|
typedef CsrResult (*CsrWifiRouterCtrlRawSdioReset)(void);
|
||||||
typedef CsrResult (*CsrWifiRouterCtrlRawSdioCoreDumpPrepare)(CsrBool suspendSme);
|
typedef CsrResult (*CsrWifiRouterCtrlRawSdioCoreDumpPrepare)(CsrBool suspendSme);
|
||||||
typedef CsrResult (*CsrWifiRouterCtrlRawSdioByteBlockRead)(u8 func, CsrUint32 address, u8 *pdata, CsrUint32 length);
|
typedef CsrResult (*CsrWifiRouterCtrlRawSdioByteBlockRead)(u8 func, u32 address, u8 *pdata, u32 length);
|
||||||
typedef CsrResult (*CsrWifiRouterCtrlRawSdioGpRead16)(u8 func, CsrUint32 address, u16 *pdata);
|
typedef CsrResult (*CsrWifiRouterCtrlRawSdioGpRead16)(u8 func, u32 address, u16 *pdata);
|
||||||
typedef CsrResult (*CsrWifiRouterCtrlRawSdioGpWrite16)(u8 func, CsrUint32 address, u16 data);
|
typedef CsrResult (*CsrWifiRouterCtrlRawSdioGpWrite16)(u8 func, u32 address, u16 data);
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ typedef u8 CsrWifiRouterCtrlTrafficType;
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef CsrUint32 CsrWifiRouterCtrlPeerRecordHandle;
|
typedef u32 CsrWifiRouterCtrlPeerRecordHandle;
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
|
@ -467,9 +467,9 @@ typedef u8 CsrWifiRouterCtrlTrafficStreamId;
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrUint32 firmwarePatch;
|
u32 firmwarePatch;
|
||||||
CsrCharString *smeBuild;
|
CsrCharString *smeBuild;
|
||||||
CsrUint32 smeHip;
|
u32 smeHip;
|
||||||
} CsrWifiRouterCtrlSmeVersions;
|
} CsrWifiRouterCtrlSmeVersions;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -510,10 +510,10 @@ typedef struct
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrUint32 etherType;
|
u32 etherType;
|
||||||
u8 ipType;
|
u8 ipType;
|
||||||
CsrUint32 udpSourcePort;
|
u32 udpSourcePort;
|
||||||
CsrUint32 udpDestPort;
|
u32 udpDestPort;
|
||||||
} CsrWifiRouterCtrlTrafficFilter;
|
} CsrWifiRouterCtrlTrafficFilter;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -534,11 +534,11 @@ typedef struct
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrUint32 rxMeanRate;
|
u32 rxMeanRate;
|
||||||
CsrUint32 rxFramesNum;
|
u32 rxFramesNum;
|
||||||
CsrUint32 txFramesNum;
|
u32 txFramesNum;
|
||||||
CsrUint32 rxBytesCount;
|
u32 rxBytesCount;
|
||||||
CsrUint32 txBytesCount;
|
u32 txBytesCount;
|
||||||
u8 intervals[11];
|
u8 intervals[11];
|
||||||
} CsrWifiRouterCtrlTrafficStats;
|
} CsrWifiRouterCtrlTrafficStats;
|
||||||
|
|
||||||
|
@ -560,12 +560,12 @@ typedef struct
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrUint32 chipId;
|
u32 chipId;
|
||||||
CsrUint32 chipVersion;
|
u32 chipVersion;
|
||||||
CsrUint32 firmwareBuild;
|
u32 firmwareBuild;
|
||||||
CsrUint32 firmwareHip;
|
u32 firmwareHip;
|
||||||
CsrCharString *routerBuild;
|
CsrCharString *routerBuild;
|
||||||
CsrUint32 routerHip;
|
u32 routerHip;
|
||||||
} CsrWifiRouterCtrlVersions;
|
} CsrWifiRouterCtrlVersions;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -1044,7 +1044,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
CsrWifiRouterCtrlRequestorInfo clientData;
|
CsrWifiRouterCtrlRequestorInfo clientData;
|
||||||
CsrUint32 dataLength;
|
u32 dataLength;
|
||||||
u8 *data;
|
u8 *data;
|
||||||
} CsrWifiRouterCtrlWifiOnReq;
|
} CsrWifiRouterCtrlWifiOnReq;
|
||||||
|
|
||||||
|
|
|
@ -611,10 +611,10 @@ CsrSize CsrWifiRouterCtrlTrafficConfigReqSizeof(void *msg)
|
||||||
bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
|
bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
|
||||||
bufferSize += 2; /* CsrWifiRouterCtrlTrafficConfigType primitive->trafficConfigType */
|
bufferSize += 2; /* CsrWifiRouterCtrlTrafficConfigType primitive->trafficConfigType */
|
||||||
bufferSize += 2; /* u16 primitive->config.packetFilter */
|
bufferSize += 2; /* u16 primitive->config.packetFilter */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->config.customFilter.etherType */
|
bufferSize += 4; /* u32 primitive->config.customFilter.etherType */
|
||||||
bufferSize += 1; /* u8 primitive->config.customFilter.ipType */
|
bufferSize += 1; /* u8 primitive->config.customFilter.ipType */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->config.customFilter.udpSourcePort */
|
bufferSize += 4; /* u32 primitive->config.customFilter.udpSourcePort */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->config.customFilter.udpDestPort */
|
bufferSize += 4; /* u32 primitive->config.customFilter.udpDestPort */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,10 +628,10 @@ u8* CsrWifiRouterCtrlTrafficConfigReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->trafficConfigType);
|
CsrUint16Ser(ptr, len, (u16) primitive->trafficConfigType);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->config.packetFilter);
|
CsrUint16Ser(ptr, len, (u16) primitive->config.packetFilter);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->config.customFilter.etherType);
|
CsrUint32Ser(ptr, len, (u32) primitive->config.customFilter.etherType);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->config.customFilter.ipType);
|
CsrUint8Ser(ptr, len, (u8) primitive->config.customFilter.ipType);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->config.customFilter.udpSourcePort);
|
CsrUint32Ser(ptr, len, (u32) primitive->config.customFilter.udpSourcePort);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->config.customFilter.udpDestPort);
|
CsrUint32Ser(ptr, len, (u32) primitive->config.customFilter.udpDestPort);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -647,10 +647,10 @@ void* CsrWifiRouterCtrlTrafficConfigReqDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->trafficConfigType, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->trafficConfigType, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->config.packetFilter, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->config.packetFilter, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->config.customFilter.etherType, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->config.customFilter.etherType, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->config.customFilter.ipType, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->config.customFilter.ipType, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->config.customFilter.udpSourcePort, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->config.customFilter.udpSourcePort, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->config.customFilter.udpDestPort, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->config.customFilter.udpDestPort, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@ CsrSize CsrWifiRouterCtrlWifiOnReqSizeof(void *msg)
|
||||||
|
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
|
||||||
bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
|
bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->dataLength */
|
bufferSize += 4; /* u32 primitive->dataLength */
|
||||||
bufferSize += primitive->dataLength; /* u8 primitive->data */
|
bufferSize += primitive->dataLength; /* u8 primitive->data */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
@ -675,7 +675,7 @@ u8* CsrWifiRouterCtrlWifiOnReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
*len = 0;
|
*len = 0;
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->dataLength);
|
CsrUint32Ser(ptr, len, (u32) primitive->dataLength);
|
||||||
if (primitive->dataLength)
|
if (primitive->dataLength)
|
||||||
{
|
{
|
||||||
CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
|
CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
|
||||||
|
@ -692,7 +692,7 @@ void* CsrWifiRouterCtrlWifiOnReqDes(u8 *buffer, CsrSize length)
|
||||||
|
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->dataLength, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->dataLength, buffer, &offset);
|
||||||
if (primitive->dataLength)
|
if (primitive->dataLength)
|
||||||
{
|
{
|
||||||
primitive->data = (u8 *)CsrPmemAlloc(primitive->dataLength);
|
primitive->data = (u8 *)CsrPmemAlloc(primitive->dataLength);
|
||||||
|
@ -731,9 +731,9 @@ CsrSize CsrWifiRouterCtrlWifiOnResSizeof(void *msg)
|
||||||
bufferSize += 6; /* u8 primitive->stationMacAddress[i1].a[6] */
|
bufferSize += 6; /* u8 primitive->stationMacAddress[i1].a[6] */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bufferSize += 4; /* CsrUint32 primitive->smeVersions.firmwarePatch */
|
bufferSize += 4; /* u32 primitive->smeVersions.firmwarePatch */
|
||||||
bufferSize += (primitive->smeVersions.smeBuild?CsrStrLen(primitive->smeVersions.smeBuild) : 0) + 1; /* CsrCharString* primitive->smeVersions.smeBuild (0 byte len + 1 for NULL Term) */
|
bufferSize += (primitive->smeVersions.smeBuild?CsrStrLen(primitive->smeVersions.smeBuild) : 0) + 1; /* CsrCharString* primitive->smeVersions.smeBuild (0 byte len + 1 for NULL Term) */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->smeVersions.smeHip */
|
bufferSize += 4; /* u32 primitive->smeVersions.smeHip */
|
||||||
bufferSize += 1; /* CsrBool primitive->scheduledInterrupt */
|
bufferSize += 1; /* CsrBool primitive->scheduledInterrupt */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
@ -754,9 +754,9 @@ u8* CsrWifiRouterCtrlWifiOnResSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrMemCpySer(ptr, len, (const void *) primitive->stationMacAddress[i1].a, ((u16) (6)));
|
CsrMemCpySer(ptr, len, (const void *) primitive->stationMacAddress[i1].a, ((u16) (6)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->smeVersions.firmwarePatch);
|
CsrUint32Ser(ptr, len, (u32) primitive->smeVersions.firmwarePatch);
|
||||||
CsrCharStringSer(ptr, len, primitive->smeVersions.smeBuild);
|
CsrCharStringSer(ptr, len, primitive->smeVersions.smeBuild);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->smeVersions.smeHip);
|
CsrUint32Ser(ptr, len, (u32) primitive->smeVersions.smeHip);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->scheduledInterrupt);
|
CsrUint8Ser(ptr, len, (u8) primitive->scheduledInterrupt);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
@ -779,9 +779,9 @@ void* CsrWifiRouterCtrlWifiOnResDes(u8 *buffer, CsrSize length)
|
||||||
CsrMemCpyDes(primitive->stationMacAddress[i1].a, buffer, &offset, ((u16) (6)));
|
CsrMemCpyDes(primitive->stationMacAddress[i1].a, buffer, &offset, ((u16) (6)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->smeVersions.firmwarePatch, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->smeVersions.firmwarePatch, buffer, &offset);
|
||||||
CsrCharStringDes(&primitive->smeVersions.smeBuild, buffer, &offset);
|
CsrCharStringDes(&primitive->smeVersions.smeBuild, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->smeVersions.smeHip, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->smeVersions.smeHip, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->scheduledInterrupt, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->scheduledInterrupt, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
|
@ -953,7 +953,7 @@ u8* CsrWifiRouterCtrlPeerDelReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->peerRecordHandle);
|
CsrUint32Ser(ptr, len, (u32) primitive->peerRecordHandle);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,7 +967,7 @@ void* CsrWifiRouterCtrlPeerDelReqDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->peerRecordHandle, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->peerRecordHandle, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
}
|
}
|
||||||
|
@ -993,7 +993,7 @@ u8* CsrWifiRouterCtrlPeerUpdateReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->peerRecordHandle);
|
CsrUint32Ser(ptr, len, (u32) primitive->peerRecordHandle);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->powersaveMode);
|
CsrUint16Ser(ptr, len, (u16) primitive->powersaveMode);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
@ -1008,7 +1008,7 @@ void* CsrWifiRouterCtrlPeerUpdateReqDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->peerRecordHandle, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->peerRecordHandle, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->powersaveMode, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->powersaveMode, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
|
@ -1734,11 +1734,11 @@ CsrSize CsrWifiRouterCtrlTrafficSampleIndSizeof(void *msg)
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 38) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 38) */
|
||||||
bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
|
bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
|
||||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->stats.rxMeanRate */
|
bufferSize += 4; /* u32 primitive->stats.rxMeanRate */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->stats.rxFramesNum */
|
bufferSize += 4; /* u32 primitive->stats.rxFramesNum */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->stats.txFramesNum */
|
bufferSize += 4; /* u32 primitive->stats.txFramesNum */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->stats.rxBytesCount */
|
bufferSize += 4; /* u32 primitive->stats.rxBytesCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->stats.txBytesCount */
|
bufferSize += 4; /* u32 primitive->stats.txBytesCount */
|
||||||
bufferSize += 11; /* u8 primitive->stats.intervals[11] */
|
bufferSize += 11; /* u8 primitive->stats.intervals[11] */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
@ -1751,11 +1751,11 @@ u8* CsrWifiRouterCtrlTrafficSampleIndSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->stats.rxMeanRate);
|
CsrUint32Ser(ptr, len, (u32) primitive->stats.rxMeanRate);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->stats.rxFramesNum);
|
CsrUint32Ser(ptr, len, (u32) primitive->stats.rxFramesNum);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->stats.txFramesNum);
|
CsrUint32Ser(ptr, len, (u32) primitive->stats.txFramesNum);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->stats.rxBytesCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->stats.rxBytesCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->stats.txBytesCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->stats.txBytesCount);
|
||||||
CsrMemCpySer(ptr, len, (const void *) primitive->stats.intervals, ((u16) (11)));
|
CsrMemCpySer(ptr, len, (const void *) primitive->stats.intervals, ((u16) (11)));
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
@ -1770,11 +1770,11 @@ void* CsrWifiRouterCtrlTrafficSampleIndDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->stats.rxMeanRate, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->stats.rxMeanRate, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->stats.rxFramesNum, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->stats.rxFramesNum, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->stats.txFramesNum, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->stats.txFramesNum, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->stats.rxBytesCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->stats.rxBytesCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->stats.txBytesCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->stats.txBytesCount, buffer, &offset);
|
||||||
CsrMemCpyDes(primitive->stats.intervals, buffer, &offset, ((u16) (11)));
|
CsrMemCpyDes(primitive->stats.intervals, buffer, &offset, ((u16) (11)));
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
|
@ -1789,12 +1789,12 @@ CsrSize CsrWifiRouterCtrlWifiOnIndSizeof(void *msg)
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 27) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 27) */
|
||||||
bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
|
bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
|
||||||
bufferSize += 2; /* CsrResult primitive->status */
|
bufferSize += 2; /* CsrResult primitive->status */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.chipId */
|
bufferSize += 4; /* u32 primitive->versions.chipId */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.chipVersion */
|
bufferSize += 4; /* u32 primitive->versions.chipVersion */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.firmwareBuild */
|
bufferSize += 4; /* u32 primitive->versions.firmwareBuild */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.firmwareHip */
|
bufferSize += 4; /* u32 primitive->versions.firmwareHip */
|
||||||
bufferSize += (primitive->versions.routerBuild?CsrStrLen(primitive->versions.routerBuild) : 0) + 1; /* CsrCharString* primitive->versions.routerBuild (0 byte len + 1 for NULL Term) */
|
bufferSize += (primitive->versions.routerBuild?CsrStrLen(primitive->versions.routerBuild) : 0) + 1; /* CsrCharString* primitive->versions.routerBuild (0 byte len + 1 for NULL Term) */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.routerHip */
|
bufferSize += 4; /* u32 primitive->versions.routerHip */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1806,12 +1806,12 @@ u8* CsrWifiRouterCtrlWifiOnIndSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.chipId);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.chipId);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.chipVersion);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.chipVersion);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.firmwareBuild);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.firmwareBuild);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.firmwareHip);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.firmwareHip);
|
||||||
CsrCharStringSer(ptr, len, primitive->versions.routerBuild);
|
CsrCharStringSer(ptr, len, primitive->versions.routerBuild);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.routerHip);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.routerHip);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1825,12 +1825,12 @@ void* CsrWifiRouterCtrlWifiOnIndDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.chipId, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.chipId, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.chipVersion, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.chipVersion, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.firmwareBuild, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.firmwareBuild, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.firmwareHip, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.firmwareHip, buffer, &offset);
|
||||||
CsrCharStringDes(&primitive->versions.routerBuild, buffer, &offset);
|
CsrCharStringDes(&primitive->versions.routerBuild, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.routerHip, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.routerHip, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
}
|
}
|
||||||
|
@ -2067,7 +2067,7 @@ u8* CsrWifiRouterCtrlPeerAddCfmSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
CsrUint16Ser(ptr, len, (u16) primitive->clientData);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
|
CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->peerRecordHandle);
|
CsrUint32Ser(ptr, len, (u32) primitive->peerRecordHandle);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
@ -2083,7 +2083,7 @@ void* CsrWifiRouterCtrlPeerAddCfmDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
|
CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->peerRecordHandle, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->peerRecordHandle, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
|
|
|
@ -81,7 +81,7 @@ typedef u8 CsrWifiRouterEncapsulation;
|
||||||
CSR_WIFI_ROUTER_OUI_BT -
|
CSR_WIFI_ROUTER_OUI_BT -
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef CsrUint32 CsrWifiRouterOui;
|
typedef u32 CsrWifiRouterOui;
|
||||||
#define CSR_WIFI_ROUTER_OUI_RFC_1042 ((CsrWifiRouterOui) 0x000000)
|
#define CSR_WIFI_ROUTER_OUI_RFC_1042 ((CsrWifiRouterOui) 0x000000)
|
||||||
#define CSR_WIFI_ROUTER_OUI_BT ((CsrWifiRouterOui) 0x001958)
|
#define CSR_WIFI_ROUTER_OUI_BT ((CsrWifiRouterOui) 0x001958)
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ typedef struct
|
||||||
u16 interfaceTag;
|
u16 interfaceTag;
|
||||||
CsrWifiRouterEncapsulation encapsulation;
|
CsrWifiRouterEncapsulation encapsulation;
|
||||||
u16 protocol;
|
u16 protocol;
|
||||||
CsrUint32 oui;
|
u32 oui;
|
||||||
} CsrWifiRouterMaPacketSubscribeReq;
|
} CsrWifiRouterMaPacketSubscribeReq;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -248,7 +248,7 @@ typedef struct
|
||||||
u8 *frame;
|
u8 *frame;
|
||||||
CsrWifiRouterFrameFreeFunction freeFunction;
|
CsrWifiRouterFrameFreeFunction freeFunction;
|
||||||
CsrWifiRouterPriority priority;
|
CsrWifiRouterPriority priority;
|
||||||
CsrUint32 hostTag;
|
u32 hostTag;
|
||||||
CsrBool cfmRequested;
|
CsrBool cfmRequested;
|
||||||
} CsrWifiRouterMaPacketReq;
|
} CsrWifiRouterMaPacketReq;
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
u16 interfaceTag;
|
u16 interfaceTag;
|
||||||
CsrUint32 hostTag;
|
u32 hostTag;
|
||||||
CsrWifiRouterPriority priority;
|
CsrWifiRouterPriority priority;
|
||||||
CsrWifiMacAddress peerMacAddress;
|
CsrWifiMacAddress peerMacAddress;
|
||||||
} CsrWifiRouterMaPacketCancelReq;
|
} CsrWifiRouterMaPacketCancelReq;
|
||||||
|
@ -381,7 +381,7 @@ typedef struct
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
u16 interfaceTag;
|
u16 interfaceTag;
|
||||||
CsrResult result;
|
CsrResult result;
|
||||||
CsrUint32 hostTag;
|
u32 hostTag;
|
||||||
u16 rate;
|
u16 rate;
|
||||||
} CsrWifiRouterMaPacketCfm;
|
} CsrWifiRouterMaPacketCfm;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ CsrSize CsrWifiRouterMaPacketSubscribeReqSizeof(void *msg)
|
||||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||||
bufferSize += 1; /* CsrWifiRouterEncapsulation primitive->encapsulation */
|
bufferSize += 1; /* CsrWifiRouterEncapsulation primitive->encapsulation */
|
||||||
bufferSize += 2; /* u16 primitive->protocol */
|
bufferSize += 2; /* u16 primitive->protocol */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->oui */
|
bufferSize += 4; /* u32 primitive->oui */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ u8* CsrWifiRouterMaPacketSubscribeReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->encapsulation);
|
CsrUint8Ser(ptr, len, (u8) primitive->encapsulation);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->protocol);
|
CsrUint16Ser(ptr, len, (u16) primitive->protocol);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->oui);
|
CsrUint32Ser(ptr, len, (u32) primitive->oui);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ void* CsrWifiRouterMaPacketSubscribeReqDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->encapsulation, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->encapsulation, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->protocol, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->protocol, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->oui, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->oui, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ CsrSize CsrWifiRouterMaPacketReqSizeof(void *msg)
|
||||||
bufferSize += primitive->frameLength; /* u8 primitive->frame */
|
bufferSize += primitive->frameLength; /* u8 primitive->frame */
|
||||||
bufferSize += 4; /* CsrWifiRouterFrameFreeFunction primitive->freeFunction */
|
bufferSize += 4; /* CsrWifiRouterFrameFreeFunction primitive->freeFunction */
|
||||||
bufferSize += 2; /* CsrWifiRouterPriority primitive->priority */
|
bufferSize += 2; /* CsrWifiRouterPriority primitive->priority */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->hostTag */
|
bufferSize += 4; /* u32 primitive->hostTag */
|
||||||
bufferSize += 1; /* CsrBool primitive->cfmRequested */
|
bufferSize += 1; /* CsrBool primitive->cfmRequested */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ u8* CsrWifiRouterMaPacketReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
}
|
}
|
||||||
CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->freeFunction */
|
CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->freeFunction */
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->priority);
|
CsrUint16Ser(ptr, len, (u16) primitive->priority);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->hostTag);
|
CsrUint32Ser(ptr, len, (u32) primitive->hostTag);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->cfmRequested);
|
CsrUint8Ser(ptr, len, (u8) primitive->cfmRequested);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ void* CsrWifiRouterMaPacketReqDes(u8 *buffer, CsrSize length)
|
||||||
primitive->freeFunction = NULL; /* Special for Function Pointers... */
|
primitive->freeFunction = NULL; /* Special for Function Pointers... */
|
||||||
offset += 4;
|
offset += 4;
|
||||||
CsrUint16Des((u16 *) &primitive->priority, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->priority, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->hostTag, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->hostTag, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->cfmRequested, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->cfmRequested, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
|
@ -186,7 +186,7 @@ CsrSize CsrWifiRouterMaPacketCancelReqSizeof(void *msg)
|
||||||
|
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 17) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 17) */
|
||||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->hostTag */
|
bufferSize += 4; /* u32 primitive->hostTag */
|
||||||
bufferSize += 2; /* CsrWifiRouterPriority primitive->priority */
|
bufferSize += 2; /* CsrWifiRouterPriority primitive->priority */
|
||||||
bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
|
bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
|
@ -199,7 +199,7 @@ u8* CsrWifiRouterMaPacketCancelReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
*len = 0;
|
*len = 0;
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->hostTag);
|
CsrUint32Ser(ptr, len, (u32) primitive->hostTag);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->priority);
|
CsrUint16Ser(ptr, len, (u16) primitive->priority);
|
||||||
CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
|
CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
|
||||||
return(ptr);
|
return(ptr);
|
||||||
|
@ -214,7 +214,7 @@ void* CsrWifiRouterMaPacketCancelReqDes(u8 *buffer, CsrSize length)
|
||||||
|
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->hostTag, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->hostTag, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->priority, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->priority, buffer, &offset);
|
||||||
CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
|
CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ CsrSize CsrWifiRouterMaPacketCfmSizeof(void *msg)
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
|
||||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||||
bufferSize += 2; /* CsrResult primitive->result */
|
bufferSize += 2; /* CsrResult primitive->result */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->hostTag */
|
bufferSize += 4; /* u32 primitive->hostTag */
|
||||||
bufferSize += 2; /* u16 primitive->rate */
|
bufferSize += 2; /* u16 primitive->rate */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ u8* CsrWifiRouterMaPacketCfmSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->result);
|
CsrUint16Ser(ptr, len, (u16) primitive->result);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->hostTag);
|
CsrUint32Ser(ptr, len, (u32) primitive->hostTag);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->rate);
|
CsrUint16Ser(ptr, len, (u16) primitive->rate);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
@ -335,7 +335,7 @@ void* CsrWifiRouterMaPacketCfmDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->result, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->result, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->hostTag, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->hostTag, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->rate, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->rate, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
|
|
|
@ -198,7 +198,7 @@ static void CsrWifiRouterTransportSerialiseAndSend(u16 primType, void* msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
|
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
|
||||||
void CsrSchedMessagePutStringLog(CsrSchedQid q, u16 mi, void *mv, CsrUint32 line, CsrCharString *file)
|
void CsrSchedMessagePutStringLog(CsrSchedQid q, u16 mi, void *mv, u32 line, CsrCharString *file)
|
||||||
#else
|
#else
|
||||||
void CsrSchedMessagePut(CsrSchedQid q, u16 mi, void *mv)
|
void CsrSchedMessagePut(CsrSchedQid q, u16 mi, void *mv)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
#include "csr_wifi_msgconv.h"
|
#include "csr_wifi_msgconv.h"
|
||||||
#include "csr_wifi_lib.h"
|
#include "csr_wifi_lib.h"
|
||||||
|
|
||||||
void CsrUint24Des(CsrUint32 *v, u8 *buffer, CsrSize *offset)
|
void CsrUint24Des(u32 *v, u8 *buffer, CsrSize *offset)
|
||||||
{
|
{
|
||||||
CsrUint32 val;
|
u32 val;
|
||||||
|
|
||||||
val = ((buffer[(*offset) + 2] << 16) |
|
val = ((buffer[(*offset) + 2] << 16) |
|
||||||
(buffer[(*offset) + 1] << 8) |
|
(buffer[(*offset) + 1] << 8) |
|
||||||
|
@ -41,9 +41,9 @@ void CsrUint16DesBigEndian(u16 *v, u8 *buffer, CsrSize *offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CsrUint24DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset)
|
void CsrUint24DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset)
|
||||||
{
|
{
|
||||||
CsrUint32 val;
|
u32 val;
|
||||||
|
|
||||||
val = ((buffer[(*offset)] << 16) |
|
val = ((buffer[(*offset)] << 16) |
|
||||||
(buffer[(*offset) + 1] << 8) |
|
(buffer[(*offset) + 1] << 8) |
|
||||||
|
@ -54,9 +54,9 @@ void CsrUint24DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CsrUint32DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset)
|
void CsrUint32DesBigEndian(u32 *v, u8 *buffer, CsrSize *offset)
|
||||||
{
|
{
|
||||||
CsrUint32 val;
|
u32 val;
|
||||||
|
|
||||||
val = ((buffer[(*offset)] << 24) |
|
val = ((buffer[(*offset)] << 24) |
|
||||||
(buffer[(*offset) + 1] << 16) |
|
(buffer[(*offset) + 1] << 16) |
|
||||||
|
@ -68,7 +68,7 @@ void CsrUint32DesBigEndian(CsrUint32 *v, u8 *buffer, CsrSize *offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CsrUint24Ser(u8 *ptr, CsrSize *len, CsrUint32 v)
|
void CsrUint24Ser(u8 *ptr, CsrSize *len, u32 v)
|
||||||
{
|
{
|
||||||
ptr[(*len) + 2] = (u8)((v & 0x00ff0000) >> 16);
|
ptr[(*len) + 2] = (u8)((v & 0x00ff0000) >> 16);
|
||||||
ptr[(*len) + 1] = (u8)((v & 0x0000ff00) >> 8);
|
ptr[(*len) + 1] = (u8)((v & 0x0000ff00) >> 8);
|
||||||
|
@ -88,7 +88,7 @@ void CsrUint16SerBigEndian(u8 *ptr, CsrSize *len, u16 v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v)
|
void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, u32 v)
|
||||||
{
|
{
|
||||||
ptr[(*len)] = (u8)((v & 0xff000000) >> 24);
|
ptr[(*len)] = (u8)((v & 0xff000000) >> 24);
|
||||||
ptr[(*len) + 1] = (u8)((v & 0x00ff0000) >> 16);
|
ptr[(*len) + 1] = (u8)((v & 0x00ff0000) >> 16);
|
||||||
|
@ -99,7 +99,7 @@ void CsrUint32SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, CsrUint32 v)
|
void CsrUint24SerBigEndian(u8 *ptr, CsrSize *len, u32 v)
|
||||||
{
|
{
|
||||||
ptr[(*len)] = (u8)((v & 0x00ff0000) >> 16);
|
ptr[(*len)] = (u8)((v & 0x00ff0000) >> 16);
|
||||||
ptr[(*len) + 1] = (u8)((v & 0x0000ff00) >> 8);
|
ptr[(*len) + 1] = (u8)((v & 0x0000ff00) >> 8);
|
||||||
|
|
|
@ -829,7 +829,7 @@ typedef u16 CsrWifiSmeIEEE80211Result;
|
||||||
- Used to register for all available indications
|
- Used to register for all available indications
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef CsrUint32 CsrWifiSmeIndications;
|
typedef u32 CsrWifiSmeIndications;
|
||||||
#define CSR_WIFI_SME_INDICATIONS_NONE ((CsrWifiSmeIndications) 0x00000000)
|
#define CSR_WIFI_SME_INDICATIONS_NONE ((CsrWifiSmeIndications) 0x00000000)
|
||||||
#define CSR_WIFI_SME_INDICATIONS_WIFIOFF ((CsrWifiSmeIndications) 0x00000001)
|
#define CSR_WIFI_SME_INDICATIONS_WIFIOFF ((CsrWifiSmeIndications) 0x00000001)
|
||||||
#define CSR_WIFI_SME_INDICATIONS_SCANRESULT ((CsrWifiSmeIndications) 0x00000002)
|
#define CSR_WIFI_SME_INDICATIONS_SCANRESULT ((CsrWifiSmeIndications) 0x00000002)
|
||||||
|
@ -1862,7 +1862,7 @@ typedef u16 CsrWifiSmeEncryptionMask;
|
||||||
Mask type for use with the values defined by CsrWifiSmeIndications
|
Mask type for use with the values defined by CsrWifiSmeIndications
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef CsrUint32 CsrWifiSmeIndicationsMask;
|
typedef u32 CsrWifiSmeIndicationsMask;
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
|
@ -2127,29 +2127,29 @@ typedef struct
|
||||||
{
|
{
|
||||||
u8 unifiTxDataRate;
|
u8 unifiTxDataRate;
|
||||||
u8 unifiRxDataRate;
|
u8 unifiRxDataRate;
|
||||||
CsrUint32 dot11RetryCount;
|
u32 dot11RetryCount;
|
||||||
CsrUint32 dot11MultipleRetryCount;
|
u32 dot11MultipleRetryCount;
|
||||||
CsrUint32 dot11AckFailureCount;
|
u32 dot11AckFailureCount;
|
||||||
CsrUint32 dot11FrameDuplicateCount;
|
u32 dot11FrameDuplicateCount;
|
||||||
CsrUint32 dot11FcsErrorCount;
|
u32 dot11FcsErrorCount;
|
||||||
CsrUint32 dot11RtsSuccessCount;
|
u32 dot11RtsSuccessCount;
|
||||||
CsrUint32 dot11RtsFailureCount;
|
u32 dot11RtsFailureCount;
|
||||||
CsrUint32 dot11FailedCount;
|
u32 dot11FailedCount;
|
||||||
CsrUint32 dot11TransmittedFragmentCount;
|
u32 dot11TransmittedFragmentCount;
|
||||||
CsrUint32 dot11TransmittedFrameCount;
|
u32 dot11TransmittedFrameCount;
|
||||||
CsrUint32 dot11WepExcludedCount;
|
u32 dot11WepExcludedCount;
|
||||||
CsrUint32 dot11WepIcvErrorCount;
|
u32 dot11WepIcvErrorCount;
|
||||||
CsrUint32 dot11WepUndecryptableCount;
|
u32 dot11WepUndecryptableCount;
|
||||||
CsrUint32 dot11MulticastReceivedFrameCount;
|
u32 dot11MulticastReceivedFrameCount;
|
||||||
CsrUint32 dot11MulticastTransmittedFrameCount;
|
u32 dot11MulticastTransmittedFrameCount;
|
||||||
CsrUint32 dot11ReceivedFragmentCount;
|
u32 dot11ReceivedFragmentCount;
|
||||||
CsrUint32 dot11Rsna4WayHandshakeFailures;
|
u32 dot11Rsna4WayHandshakeFailures;
|
||||||
CsrUint32 dot11RsnaTkipCounterMeasuresInvoked;
|
u32 dot11RsnaTkipCounterMeasuresInvoked;
|
||||||
CsrUint32 dot11RsnaStatsTkipLocalMicFailures;
|
u32 dot11RsnaStatsTkipLocalMicFailures;
|
||||||
CsrUint32 dot11RsnaStatsTkipReplays;
|
u32 dot11RsnaStatsTkipReplays;
|
||||||
CsrUint32 dot11RsnaStatsTkipIcvErrors;
|
u32 dot11RsnaStatsTkipIcvErrors;
|
||||||
CsrUint32 dot11RsnaStatsCcmpReplays;
|
u32 dot11RsnaStatsCcmpReplays;
|
||||||
CsrUint32 dot11RsnaStatsCcmpDecryptErrors;
|
u32 dot11RsnaStatsCcmpDecryptErrors;
|
||||||
} CsrWifiSmeConnectionStats;
|
} CsrWifiSmeConnectionStats;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -2450,15 +2450,15 @@ typedef struct
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrUint32 chipId;
|
u32 chipId;
|
||||||
CsrUint32 chipVersion;
|
u32 chipVersion;
|
||||||
CsrUint32 firmwareBuild;
|
u32 firmwareBuild;
|
||||||
CsrUint32 firmwarePatch;
|
u32 firmwarePatch;
|
||||||
CsrUint32 firmwareHip;
|
u32 firmwareHip;
|
||||||
CsrCharString *routerBuild;
|
CsrCharString *routerBuild;
|
||||||
CsrUint32 routerHip;
|
u32 routerHip;
|
||||||
CsrCharString *smeBuild;
|
CsrCharString *smeBuild;
|
||||||
CsrUint32 smeHip;
|
u32 smeHip;
|
||||||
} CsrWifiSmeVersions;
|
} CsrWifiSmeVersions;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -2603,8 +2603,8 @@ typedef struct
|
||||||
u16 currentCoexPeriodMs;
|
u16 currentCoexPeriodMs;
|
||||||
u16 currentCoexLatencyMs;
|
u16 currentCoexLatencyMs;
|
||||||
CsrBool hasBtDevice;
|
CsrBool hasBtDevice;
|
||||||
CsrUint32 currentBlackoutDurationUs;
|
u32 currentBlackoutDurationUs;
|
||||||
CsrUint32 currentBlackoutPeriodUs;
|
u32 currentBlackoutPeriodUs;
|
||||||
CsrWifiSmeCoexScheme currentCoexScheme;
|
CsrWifiSmeCoexScheme currentCoexScheme;
|
||||||
} CsrWifiSmeCoexInfo;
|
} CsrWifiSmeCoexInfo;
|
||||||
|
|
||||||
|
@ -4560,7 +4560,7 @@ typedef struct
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
u16 interfaceTag;
|
u16 interfaceTag;
|
||||||
CsrWifiSmeListAction action;
|
CsrWifiSmeListAction action;
|
||||||
CsrUint32 transactionId;
|
u32 transactionId;
|
||||||
CsrBool strict;
|
CsrBool strict;
|
||||||
CsrWifiSmeTspecCtrlMask ctrlMask;
|
CsrWifiSmeTspecCtrlMask ctrlMask;
|
||||||
u16 tspecLength;
|
u16 tspecLength;
|
||||||
|
@ -4830,7 +4830,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
CsrUint32 dataLength;
|
u32 dataLength;
|
||||||
u8 *data;
|
u8 *data;
|
||||||
} CsrWifiSmeSetReq;
|
} CsrWifiSmeSetReq;
|
||||||
|
|
||||||
|
@ -6129,7 +6129,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
u16 interfaceTag;
|
u16 interfaceTag;
|
||||||
CsrUint32 transactionId;
|
u32 transactionId;
|
||||||
CsrWifiSmeTspecResultCode tspecResultCode;
|
CsrWifiSmeTspecResultCode tspecResultCode;
|
||||||
u16 tspecLength;
|
u16 tspecLength;
|
||||||
u8 *tspec;
|
u8 *tspec;
|
||||||
|
@ -6160,7 +6160,7 @@ typedef struct
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
u16 interfaceTag;
|
u16 interfaceTag;
|
||||||
CsrResult status;
|
CsrResult status;
|
||||||
CsrUint32 transactionId;
|
u32 transactionId;
|
||||||
CsrWifiSmeTspecResultCode tspecResultCode;
|
CsrWifiSmeTspecResultCode tspecResultCode;
|
||||||
u16 tspecLength;
|
u16 tspecLength;
|
||||||
u8 *tspec;
|
u8 *tspec;
|
||||||
|
@ -6465,7 +6465,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CsrWifiFsmEvent common;
|
CsrWifiFsmEvent common;
|
||||||
CsrUint32 dataLength;
|
u32 dataLength;
|
||||||
u8 *data;
|
u8 *data;
|
||||||
} CsrWifiSmeCoreDumpInd;
|
} CsrWifiSmeCoreDumpInd;
|
||||||
|
|
||||||
|
|
|
@ -1407,7 +1407,7 @@ CsrSize CsrWifiSmeTspecReqSizeof(void *msg)
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 18) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 18) */
|
||||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||||
bufferSize += 1; /* CsrWifiSmeListAction primitive->action */
|
bufferSize += 1; /* CsrWifiSmeListAction primitive->action */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->transactionId */
|
bufferSize += 4; /* u32 primitive->transactionId */
|
||||||
bufferSize += 1; /* CsrBool primitive->strict */
|
bufferSize += 1; /* CsrBool primitive->strict */
|
||||||
bufferSize += 1; /* CsrWifiSmeTspecCtrlMask primitive->ctrlMask */
|
bufferSize += 1; /* CsrWifiSmeTspecCtrlMask primitive->ctrlMask */
|
||||||
bufferSize += 2; /* u16 primitive->tspecLength */
|
bufferSize += 2; /* u16 primitive->tspecLength */
|
||||||
|
@ -1425,7 +1425,7 @@ u8* CsrWifiSmeTspecReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->action);
|
CsrUint8Ser(ptr, len, (u8) primitive->action);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->transactionId);
|
CsrUint32Ser(ptr, len, (u32) primitive->transactionId);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->strict);
|
CsrUint8Ser(ptr, len, (u8) primitive->strict);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->ctrlMask);
|
CsrUint8Ser(ptr, len, (u8) primitive->ctrlMask);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->tspecLength);
|
CsrUint16Ser(ptr, len, (u16) primitive->tspecLength);
|
||||||
|
@ -1451,7 +1451,7 @@ void* CsrWifiSmeTspecReqDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->action, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->action, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->transactionId, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->transactionId, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->strict, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->strict, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->ctrlMask, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->ctrlMask, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->tspecLength, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->tspecLength, buffer, &offset);
|
||||||
|
@ -1904,7 +1904,7 @@ CsrSize CsrWifiSmeSetReqSizeof(void *msg)
|
||||||
CsrSize bufferSize = 2;
|
CsrSize bufferSize = 2;
|
||||||
|
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->dataLength */
|
bufferSize += 4; /* u32 primitive->dataLength */
|
||||||
bufferSize += primitive->dataLength; /* u8 primitive->data */
|
bufferSize += primitive->dataLength; /* u8 primitive->data */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
@ -1915,7 +1915,7 @@ u8* CsrWifiSmeSetReqSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrWifiSmeSetReq *primitive = (CsrWifiSmeSetReq *)msg;
|
CsrWifiSmeSetReq *primitive = (CsrWifiSmeSetReq *)msg;
|
||||||
*len = 0;
|
*len = 0;
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->dataLength);
|
CsrUint32Ser(ptr, len, (u32) primitive->dataLength);
|
||||||
if (primitive->dataLength)
|
if (primitive->dataLength)
|
||||||
{
|
{
|
||||||
CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
|
CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
|
||||||
|
@ -1931,7 +1931,7 @@ void* CsrWifiSmeSetReqDes(u8 *buffer, CsrSize length)
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->dataLength, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->dataLength, buffer, &offset);
|
||||||
if (primitive->dataLength)
|
if (primitive->dataLength)
|
||||||
{
|
{
|
||||||
primitive->data = (u8 *)CsrPmemAlloc(primitive->dataLength);
|
primitive->data = (u8 *)CsrPmemAlloc(primitive->dataLength);
|
||||||
|
@ -2561,8 +2561,8 @@ CsrSize CsrWifiSmeCoexInfoGetCfmSizeof(void *msg)
|
||||||
bufferSize += 2; /* u16 primitive->coexInfo.currentCoexPeriodMs */
|
bufferSize += 2; /* u16 primitive->coexInfo.currentCoexPeriodMs */
|
||||||
bufferSize += 2; /* u16 primitive->coexInfo.currentCoexLatencyMs */
|
bufferSize += 2; /* u16 primitive->coexInfo.currentCoexLatencyMs */
|
||||||
bufferSize += 1; /* CsrBool primitive->coexInfo.hasBtDevice */
|
bufferSize += 1; /* CsrBool primitive->coexInfo.hasBtDevice */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->coexInfo.currentBlackoutDurationUs */
|
bufferSize += 4; /* u32 primitive->coexInfo.currentBlackoutDurationUs */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->coexInfo.currentBlackoutPeriodUs */
|
bufferSize += 4; /* u32 primitive->coexInfo.currentBlackoutPeriodUs */
|
||||||
bufferSize += 1; /* CsrWifiSmeCoexScheme primitive->coexInfo.currentCoexScheme */
|
bufferSize += 1; /* CsrWifiSmeCoexScheme primitive->coexInfo.currentCoexScheme */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
@ -2581,8 +2581,8 @@ u8* CsrWifiSmeCoexInfoGetCfmSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->coexInfo.currentCoexPeriodMs);
|
CsrUint16Ser(ptr, len, (u16) primitive->coexInfo.currentCoexPeriodMs);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->coexInfo.currentCoexLatencyMs);
|
CsrUint16Ser(ptr, len, (u16) primitive->coexInfo.currentCoexLatencyMs);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->coexInfo.hasBtDevice);
|
CsrUint8Ser(ptr, len, (u8) primitive->coexInfo.hasBtDevice);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->coexInfo.currentBlackoutDurationUs);
|
CsrUint32Ser(ptr, len, (u32) primitive->coexInfo.currentBlackoutDurationUs);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->coexInfo.currentBlackoutPeriodUs);
|
CsrUint32Ser(ptr, len, (u32) primitive->coexInfo.currentBlackoutPeriodUs);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->coexInfo.currentCoexScheme);
|
CsrUint8Ser(ptr, len, (u8) primitive->coexInfo.currentCoexScheme);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
@ -2603,8 +2603,8 @@ void* CsrWifiSmeCoexInfoGetCfmDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des((u16 *) &primitive->coexInfo.currentCoexPeriodMs, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->coexInfo.currentCoexPeriodMs, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->coexInfo.currentCoexLatencyMs, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->coexInfo.currentCoexLatencyMs, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->coexInfo.hasBtDevice, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->coexInfo.hasBtDevice, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->coexInfo.currentBlackoutDurationUs, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->coexInfo.currentBlackoutDurationUs, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->coexInfo.currentBlackoutPeriodUs, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->coexInfo.currentBlackoutPeriodUs, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->coexInfo.currentCoexScheme, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->coexInfo.currentCoexScheme, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
|
@ -2999,29 +2999,29 @@ CsrSize CsrWifiSmeConnectionStatsGetCfmSizeof(void *msg)
|
||||||
bufferSize += 2; /* CsrResult primitive->status */
|
bufferSize += 2; /* CsrResult primitive->status */
|
||||||
bufferSize += 1; /* u8 primitive->connectionStats.unifiTxDataRate */
|
bufferSize += 1; /* u8 primitive->connectionStats.unifiTxDataRate */
|
||||||
bufferSize += 1; /* u8 primitive->connectionStats.unifiRxDataRate */
|
bufferSize += 1; /* u8 primitive->connectionStats.unifiRxDataRate */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RetryCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RetryCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11MultipleRetryCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11MultipleRetryCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11AckFailureCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11AckFailureCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11FrameDuplicateCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11FrameDuplicateCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11FcsErrorCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11FcsErrorCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RtsSuccessCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RtsSuccessCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RtsFailureCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RtsFailureCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11FailedCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11FailedCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11TransmittedFragmentCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11TransmittedFragmentCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11TransmittedFrameCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11TransmittedFrameCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11WepExcludedCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11WepExcludedCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11WepIcvErrorCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11WepIcvErrorCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11WepUndecryptableCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11WepUndecryptableCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11MulticastReceivedFrameCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11MulticastReceivedFrameCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11MulticastTransmittedFrameCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11MulticastTransmittedFrameCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11ReceivedFragmentCount */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11ReceivedFragmentCount */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11Rsna4WayHandshakeFailures */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11Rsna4WayHandshakeFailures */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RsnaTkipCounterMeasuresInvoked */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RsnaTkipCounterMeasuresInvoked */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RsnaStatsTkipLocalMicFailures */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RsnaStatsTkipLocalMicFailures */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RsnaStatsTkipReplays */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RsnaStatsTkipReplays */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RsnaStatsTkipIcvErrors */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RsnaStatsTkipIcvErrors */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RsnaStatsCcmpReplays */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RsnaStatsCcmpReplays */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->connectionStats.dot11RsnaStatsCcmpDecryptErrors */
|
bufferSize += 4; /* u32 primitive->connectionStats.dot11RsnaStatsCcmpDecryptErrors */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3035,29 +3035,29 @@ u8* CsrWifiSmeConnectionStatsGetCfmSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->connectionStats.unifiTxDataRate);
|
CsrUint8Ser(ptr, len, (u8) primitive->connectionStats.unifiTxDataRate);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->connectionStats.unifiRxDataRate);
|
CsrUint8Ser(ptr, len, (u8) primitive->connectionStats.unifiRxDataRate);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RetryCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RetryCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11MultipleRetryCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11MultipleRetryCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11AckFailureCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11AckFailureCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11FrameDuplicateCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11FrameDuplicateCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11FcsErrorCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11FcsErrorCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RtsSuccessCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RtsSuccessCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RtsFailureCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RtsFailureCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11FailedCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11FailedCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11TransmittedFragmentCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11TransmittedFragmentCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11TransmittedFrameCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11TransmittedFrameCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11WepExcludedCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11WepExcludedCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11WepIcvErrorCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11WepIcvErrorCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11WepUndecryptableCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11WepUndecryptableCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11MulticastReceivedFrameCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11MulticastReceivedFrameCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11MulticastTransmittedFrameCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11MulticastTransmittedFrameCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11ReceivedFragmentCount);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11ReceivedFragmentCount);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11Rsna4WayHandshakeFailures);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11Rsna4WayHandshakeFailures);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RsnaTkipCounterMeasuresInvoked);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RsnaTkipCounterMeasuresInvoked);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RsnaStatsTkipLocalMicFailures);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RsnaStatsTkipLocalMicFailures);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RsnaStatsTkipReplays);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RsnaStatsTkipReplays);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RsnaStatsTkipIcvErrors);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RsnaStatsTkipIcvErrors);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RsnaStatsCcmpReplays);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RsnaStatsCcmpReplays);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->connectionStats.dot11RsnaStatsCcmpDecryptErrors);
|
CsrUint32Ser(ptr, len, (u32) primitive->connectionStats.dot11RsnaStatsCcmpDecryptErrors);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3073,29 +3073,29 @@ void* CsrWifiSmeConnectionStatsGetCfmDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->connectionStats.unifiTxDataRate, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->connectionStats.unifiTxDataRate, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->connectionStats.unifiRxDataRate, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->connectionStats.unifiRxDataRate, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RetryCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RetryCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11MultipleRetryCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11MultipleRetryCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11AckFailureCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11AckFailureCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11FrameDuplicateCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11FrameDuplicateCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11FcsErrorCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11FcsErrorCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RtsSuccessCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RtsSuccessCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RtsFailureCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RtsFailureCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11FailedCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11FailedCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11TransmittedFragmentCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11TransmittedFragmentCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11TransmittedFrameCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11TransmittedFrameCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11WepExcludedCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11WepExcludedCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11WepIcvErrorCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11WepIcvErrorCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11WepUndecryptableCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11WepUndecryptableCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11MulticastReceivedFrameCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11MulticastReceivedFrameCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11MulticastTransmittedFrameCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11MulticastTransmittedFrameCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11ReceivedFragmentCount, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11ReceivedFragmentCount, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11Rsna4WayHandshakeFailures, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11Rsna4WayHandshakeFailures, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RsnaTkipCounterMeasuresInvoked, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RsnaTkipCounterMeasuresInvoked, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RsnaStatsTkipLocalMicFailures, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RsnaStatsTkipLocalMicFailures, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RsnaStatsTkipReplays, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RsnaStatsTkipReplays, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RsnaStatsTkipIcvErrors, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RsnaStatsTkipIcvErrors, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RsnaStatsCcmpReplays, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RsnaStatsCcmpReplays, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->connectionStats.dot11RsnaStatsCcmpDecryptErrors, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->connectionStats.dot11RsnaStatsCcmpDecryptErrors, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
}
|
}
|
||||||
|
@ -5283,7 +5283,7 @@ CsrSize CsrWifiSmeTspecIndSizeof(void *msg)
|
||||||
|
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
|
||||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->transactionId */
|
bufferSize += 4; /* u32 primitive->transactionId */
|
||||||
bufferSize += 1; /* CsrWifiSmeTspecResultCode primitive->tspecResultCode */
|
bufferSize += 1; /* CsrWifiSmeTspecResultCode primitive->tspecResultCode */
|
||||||
bufferSize += 2; /* u16 primitive->tspecLength */
|
bufferSize += 2; /* u16 primitive->tspecLength */
|
||||||
bufferSize += primitive->tspecLength; /* u8 primitive->tspec */
|
bufferSize += primitive->tspecLength; /* u8 primitive->tspec */
|
||||||
|
@ -5297,7 +5297,7 @@ u8* CsrWifiSmeTspecIndSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
*len = 0;
|
*len = 0;
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->transactionId);
|
CsrUint32Ser(ptr, len, (u32) primitive->transactionId);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->tspecResultCode);
|
CsrUint8Ser(ptr, len, (u8) primitive->tspecResultCode);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->tspecLength);
|
CsrUint16Ser(ptr, len, (u16) primitive->tspecLength);
|
||||||
if (primitive->tspecLength)
|
if (primitive->tspecLength)
|
||||||
|
@ -5316,7 +5316,7 @@ void* CsrWifiSmeTspecIndDes(u8 *buffer, CsrSize length)
|
||||||
|
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->transactionId, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->transactionId, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->tspecResultCode, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->tspecResultCode, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->tspecLength, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->tspecLength, buffer, &offset);
|
||||||
if (primitive->tspecLength)
|
if (primitive->tspecLength)
|
||||||
|
@ -5349,7 +5349,7 @@ CsrSize CsrWifiSmeTspecCfmSizeof(void *msg)
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 15) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 15) */
|
||||||
bufferSize += 2; /* u16 primitive->interfaceTag */
|
bufferSize += 2; /* u16 primitive->interfaceTag */
|
||||||
bufferSize += 2; /* CsrResult primitive->status */
|
bufferSize += 2; /* CsrResult primitive->status */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->transactionId */
|
bufferSize += 4; /* u32 primitive->transactionId */
|
||||||
bufferSize += 1; /* CsrWifiSmeTspecResultCode primitive->tspecResultCode */
|
bufferSize += 1; /* CsrWifiSmeTspecResultCode primitive->tspecResultCode */
|
||||||
bufferSize += 2; /* u16 primitive->tspecLength */
|
bufferSize += 2; /* u16 primitive->tspecLength */
|
||||||
bufferSize += primitive->tspecLength; /* u8 primitive->tspec */
|
bufferSize += primitive->tspecLength; /* u8 primitive->tspec */
|
||||||
|
@ -5364,7 +5364,7 @@ u8* CsrWifiSmeTspecCfmSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->transactionId);
|
CsrUint32Ser(ptr, len, (u32) primitive->transactionId);
|
||||||
CsrUint8Ser(ptr, len, (u8) primitive->tspecResultCode);
|
CsrUint8Ser(ptr, len, (u8) primitive->tspecResultCode);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->tspecLength);
|
CsrUint16Ser(ptr, len, (u16) primitive->tspecLength);
|
||||||
if (primitive->tspecLength)
|
if (primitive->tspecLength)
|
||||||
|
@ -5384,7 +5384,7 @@ void* CsrWifiSmeTspecCfmDes(u8 *buffer, CsrSize length)
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->transactionId, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->transactionId, buffer, &offset);
|
||||||
CsrUint8Des((u8 *) &primitive->tspecResultCode, buffer, &offset);
|
CsrUint8Des((u8 *) &primitive->tspecResultCode, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->tspecLength, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->tspecLength, buffer, &offset);
|
||||||
if (primitive->tspecLength)
|
if (primitive->tspecLength)
|
||||||
|
@ -5416,15 +5416,15 @@ CsrSize CsrWifiSmeVersionsGetCfmSizeof(void *msg)
|
||||||
|
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 33) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 33) */
|
||||||
bufferSize += 2; /* CsrResult primitive->status */
|
bufferSize += 2; /* CsrResult primitive->status */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.chipId */
|
bufferSize += 4; /* u32 primitive->versions.chipId */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.chipVersion */
|
bufferSize += 4; /* u32 primitive->versions.chipVersion */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.firmwareBuild */
|
bufferSize += 4; /* u32 primitive->versions.firmwareBuild */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.firmwarePatch */
|
bufferSize += 4; /* u32 primitive->versions.firmwarePatch */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.firmwareHip */
|
bufferSize += 4; /* u32 primitive->versions.firmwareHip */
|
||||||
bufferSize += (primitive->versions.routerBuild?CsrStrLen(primitive->versions.routerBuild) : 0) + 1; /* CsrCharString* primitive->versions.routerBuild (0 byte len + 1 for NULL Term) */
|
bufferSize += (primitive->versions.routerBuild?CsrStrLen(primitive->versions.routerBuild) : 0) + 1; /* CsrCharString* primitive->versions.routerBuild (0 byte len + 1 for NULL Term) */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.routerHip */
|
bufferSize += 4; /* u32 primitive->versions.routerHip */
|
||||||
bufferSize += (primitive->versions.smeBuild?CsrStrLen(primitive->versions.smeBuild) : 0) + 1; /* CsrCharString* primitive->versions.smeBuild (0 byte len + 1 for NULL Term) */
|
bufferSize += (primitive->versions.smeBuild?CsrStrLen(primitive->versions.smeBuild) : 0) + 1; /* CsrCharString* primitive->versions.smeBuild (0 byte len + 1 for NULL Term) */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->versions.smeHip */
|
bufferSize += 4; /* u32 primitive->versions.smeHip */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5435,15 +5435,15 @@ u8* CsrWifiSmeVersionsGetCfmSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
*len = 0;
|
*len = 0;
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
CsrUint16Ser(ptr, len, (u16) primitive->status);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.chipId);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.chipId);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.chipVersion);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.chipVersion);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.firmwareBuild);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.firmwareBuild);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.firmwarePatch);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.firmwarePatch);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.firmwareHip);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.firmwareHip);
|
||||||
CsrCharStringSer(ptr, len, primitive->versions.routerBuild);
|
CsrCharStringSer(ptr, len, primitive->versions.routerBuild);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.routerHip);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.routerHip);
|
||||||
CsrCharStringSer(ptr, len, primitive->versions.smeBuild);
|
CsrCharStringSer(ptr, len, primitive->versions.smeBuild);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->versions.smeHip);
|
CsrUint32Ser(ptr, len, (u32) primitive->versions.smeHip);
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5456,15 +5456,15 @@ void* CsrWifiSmeVersionsGetCfmDes(u8 *buffer, CsrSize length)
|
||||||
|
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.chipId, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.chipId, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.chipVersion, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.chipVersion, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.firmwareBuild, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.firmwareBuild, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.firmwarePatch, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.firmwarePatch, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.firmwareHip, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.firmwareHip, buffer, &offset);
|
||||||
CsrCharStringDes(&primitive->versions.routerBuild, buffer, &offset);
|
CsrCharStringDes(&primitive->versions.routerBuild, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.routerHip, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.routerHip, buffer, &offset);
|
||||||
CsrCharStringDes(&primitive->versions.smeBuild, buffer, &offset);
|
CsrCharStringDes(&primitive->versions.smeBuild, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->versions.smeHip, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->versions.smeHip, buffer, &offset);
|
||||||
|
|
||||||
return primitive;
|
return primitive;
|
||||||
}
|
}
|
||||||
|
@ -5760,7 +5760,7 @@ CsrSize CsrWifiSmeCoreDumpIndSizeof(void *msg)
|
||||||
CsrSize bufferSize = 2;
|
CsrSize bufferSize = 2;
|
||||||
|
|
||||||
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */
|
/* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */
|
||||||
bufferSize += 4; /* CsrUint32 primitive->dataLength */
|
bufferSize += 4; /* u32 primitive->dataLength */
|
||||||
bufferSize += primitive->dataLength; /* u8 primitive->data */
|
bufferSize += primitive->dataLength; /* u8 primitive->data */
|
||||||
return bufferSize;
|
return bufferSize;
|
||||||
}
|
}
|
||||||
|
@ -5771,7 +5771,7 @@ u8* CsrWifiSmeCoreDumpIndSer(u8 *ptr, CsrSize *len, void *msg)
|
||||||
CsrWifiSmeCoreDumpInd *primitive = (CsrWifiSmeCoreDumpInd *)msg;
|
CsrWifiSmeCoreDumpInd *primitive = (CsrWifiSmeCoreDumpInd *)msg;
|
||||||
*len = 0;
|
*len = 0;
|
||||||
CsrUint16Ser(ptr, len, primitive->common.type);
|
CsrUint16Ser(ptr, len, primitive->common.type);
|
||||||
CsrUint32Ser(ptr, len, (CsrUint32) primitive->dataLength);
|
CsrUint32Ser(ptr, len, (u32) primitive->dataLength);
|
||||||
if (primitive->dataLength)
|
if (primitive->dataLength)
|
||||||
{
|
{
|
||||||
CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
|
CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
|
||||||
|
@ -5787,7 +5787,7 @@ void* CsrWifiSmeCoreDumpIndDes(u8 *buffer, CsrSize length)
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
CsrUint16Des(&primitive->common.type, buffer, &offset);
|
||||||
CsrUint32Des((CsrUint32 *) &primitive->dataLength, buffer, &offset);
|
CsrUint32Des((u32 *) &primitive->dataLength, buffer, &offset);
|
||||||
if (primitive->dataLength)
|
if (primitive->dataLength)
|
||||||
{
|
{
|
||||||
primitive->data = (u8 *)CsrPmemAlloc(primitive->dataLength);
|
primitive->data = (u8 *)CsrPmemAlloc(primitive->dataLength);
|
||||||
|
|
|
@ -1318,7 +1318,7 @@ unifi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||||
|
|
||||||
/* Apply scheduled interrupt mode, if requested by module param */
|
/* Apply scheduled interrupt mode, if requested by module param */
|
||||||
if (run_bh_once != -1) {
|
if (run_bh_once != -1) {
|
||||||
unifi_set_interrupt_mode(priv->card, (CsrUint32)run_bh_once);
|
unifi_set_interrupt_mode(priv->card, (u32)run_bh_once);
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->init_progress = UNIFI_INIT_COMPLETED;
|
priv->init_progress = UNIFI_INIT_COMPLETED;
|
||||||
|
@ -1703,7 +1703,7 @@ unifi_poll(struct file *filp, poll_table *wait)
|
||||||
static void
|
static void
|
||||||
udi_set_log_filter(ul_client_t *pcli, unifiio_filter_t *udi_filter)
|
udi_set_log_filter(ul_client_t *pcli, unifiio_filter_t *udi_filter)
|
||||||
{
|
{
|
||||||
CsrUint32 filter_pos;
|
u32 filter_pos;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (udi_filter->action == UfSigFil_AllOn)
|
if (udi_filter->action == UfSigFil_AllOn)
|
||||||
|
@ -1781,7 +1781,7 @@ udi_log_event(ul_client_t *pcli,
|
||||||
int i;
|
int i;
|
||||||
int total_len;
|
int total_len;
|
||||||
udi_msg_t *msgptr;
|
udi_msg_t *msgptr;
|
||||||
CsrUint32 filter_pos;
|
u32 filter_pos;
|
||||||
#ifdef OMNICLI_LINUX_EXTRA_LOG
|
#ifdef OMNICLI_LINUX_EXTRA_LOG
|
||||||
static volatile unsigned int printk_cpu = UINT_MAX;
|
static volatile unsigned int printk_cpu = UINT_MAX;
|
||||||
unsigned long long t;
|
unsigned long long t;
|
||||||
|
|
|
@ -140,7 +140,7 @@ unifi_fw_read_stop(void *ospriv, void *dlpriv)
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
unifi_fw_open_buffer(void *ospriv, void *fwbuf, CsrUint32 len)
|
unifi_fw_open_buffer(void *ospriv, void *fwbuf, u32 len)
|
||||||
{
|
{
|
||||||
unifi_priv_t *priv = (unifi_priv_t*)ospriv;
|
unifi_priv_t *priv = (unifi_priv_t*)ospriv;
|
||||||
func_enter();
|
func_enter();
|
||||||
|
@ -197,7 +197,7 @@ void unifi_fw_close_buffer(void *ospriv, void *fwbuf)
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrInt32
|
CsrInt32
|
||||||
unifi_fw_read(void *ospriv, void *arg, CsrUint32 offset, void *buf, CsrUint32 len)
|
unifi_fw_read(void *ospriv, void *arg, u32 offset, void *buf, u32 len)
|
||||||
{
|
{
|
||||||
const struct dlpriv *dlpriv = arg;
|
const struct dlpriv *dlpriv = arg;
|
||||||
|
|
||||||
|
|
|
@ -3619,9 +3619,9 @@ static struct notifier_block uf_netdev_notifier = {
|
||||||
static void
|
static void
|
||||||
process_amsdu(unifi_priv_t *priv, CSR_SIGNAL *signal, bulk_data_param_t *bulkdata)
|
process_amsdu(unifi_priv_t *priv, CSR_SIGNAL *signal, bulk_data_param_t *bulkdata)
|
||||||
{
|
{
|
||||||
CsrUint32 offset;
|
u32 offset;
|
||||||
CsrUint32 length = bulkdata->d[0].data_length;
|
u32 length = bulkdata->d[0].data_length;
|
||||||
CsrUint32 subframe_length, subframe_body_length, dot11_hdr_size;
|
u32 subframe_length, subframe_body_length, dot11_hdr_size;
|
||||||
u8 *ptr;
|
u8 *ptr;
|
||||||
bulk_data_param_t subframe_bulkdata;
|
bulk_data_param_t subframe_bulkdata;
|
||||||
u8 *dot11_hdr_ptr = (u8*)bulkdata->d[0].os_data_ptr;
|
u8 *dot11_hdr_ptr = (u8*)bulkdata->d[0].os_data_ptr;
|
||||||
|
|
|
@ -144,7 +144,7 @@ csr_io_rw_direct(struct mmc_card *card, int write, uint8_t fn,
|
||||||
|
|
||||||
|
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioRead8(CsrSdioFunction *function, CsrUint32 address, u8 *data)
|
CsrSdioRead8(CsrSdioFunction *function, u32 address, u8 *data)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -162,7 +162,7 @@ CsrSdioRead8(CsrSdioFunction *function, CsrUint32 address, u8 *data)
|
||||||
} /* CsrSdioRead8() */
|
} /* CsrSdioRead8() */
|
||||||
|
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioWrite8(CsrSdioFunction *function, CsrUint32 address, u8 data)
|
CsrSdioWrite8(CsrSdioFunction *function, u32 address, u8 data)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -180,7 +180,7 @@ CsrSdioWrite8(CsrSdioFunction *function, CsrUint32 address, u8 data)
|
||||||
} /* CsrSdioWrite8() */
|
} /* CsrSdioWrite8() */
|
||||||
|
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioRead16(CsrSdioFunction *function, CsrUint32 address, u16 *data)
|
CsrSdioRead16(CsrSdioFunction *function, u32 address, u16 *data)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
int err;
|
int err;
|
||||||
|
@ -207,7 +207,7 @@ CsrSdioRead16(CsrSdioFunction *function, CsrUint32 address, u16 *data)
|
||||||
|
|
||||||
|
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioWrite16(CsrSdioFunction *function, CsrUint32 address, u16 data)
|
CsrSdioWrite16(CsrSdioFunction *function, u32 address, u16 data)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
int err;
|
int err;
|
||||||
|
@ -234,7 +234,7 @@ CsrSdioWrite16(CsrSdioFunction *function, CsrUint32 address, u16 data)
|
||||||
|
|
||||||
|
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioF0Read8(CsrSdioFunction *function, CsrUint32 address, u8 *data)
|
CsrSdioF0Read8(CsrSdioFunction *function, u32 address, u8 *data)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -256,7 +256,7 @@ CsrSdioF0Read8(CsrSdioFunction *function, CsrUint32 address, u8 *data)
|
||||||
} /* CsrSdioF0Read8() */
|
} /* CsrSdioF0Read8() */
|
||||||
|
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioF0Write8(CsrSdioFunction *function, CsrUint32 address, u8 data)
|
CsrSdioF0Write8(CsrSdioFunction *function, u32 address, u8 data)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -279,7 +279,7 @@ CsrSdioF0Write8(CsrSdioFunction *function, CsrUint32 address, u8 data)
|
||||||
|
|
||||||
|
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioRead(CsrSdioFunction *function, CsrUint32 address, void *data, CsrUint32 length)
|
CsrSdioRead(CsrSdioFunction *function, u32 address, void *data, u32 length)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
int err;
|
int err;
|
||||||
|
@ -297,7 +297,7 @@ CsrSdioRead(CsrSdioFunction *function, CsrUint32 address, void *data, CsrUint32
|
||||||
} /* CsrSdioRead() */
|
} /* CsrSdioRead() */
|
||||||
|
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioWrite(CsrSdioFunction *function, CsrUint32 address, const void *data, CsrUint32 length)
|
CsrSdioWrite(CsrSdioFunction *function, u32 address, const void *data, u32 length)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
int err;
|
int err;
|
||||||
|
@ -404,14 +404,14 @@ csr_sdio_disable_hs(struct mmc_card *card)
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
CsrResult
|
CsrResult
|
||||||
CsrSdioMaxBusClockFrequencySet(CsrSdioFunction *function, CsrUint32 maxFrequency)
|
CsrSdioMaxBusClockFrequencySet(CsrSdioFunction *function, u32 maxFrequency)
|
||||||
{
|
{
|
||||||
struct sdio_func *func = (struct sdio_func *)function->priv;
|
struct sdio_func *func = (struct sdio_func *)function->priv;
|
||||||
struct mmc_host *host = func->card->host;
|
struct mmc_host *host = func->card->host;
|
||||||
struct mmc_ios *ios = &host->ios;
|
struct mmc_ios *ios = &host->ios;
|
||||||
unsigned int max_hz;
|
unsigned int max_hz;
|
||||||
int err;
|
int err;
|
||||||
CsrUint32 max_khz = maxFrequency/1000;
|
u32 max_khz = maxFrequency/1000;
|
||||||
|
|
||||||
if (!max_khz || max_khz > sdio_clock) {
|
if (!max_khz || max_khz > sdio_clock) {
|
||||||
max_khz = sdio_clock;
|
max_khz = sdio_clock;
|
||||||
|
|
|
@ -1299,7 +1299,7 @@ int sme_mgt_packet_filter_set(unifi_priv_t *priv)
|
||||||
}
|
}
|
||||||
|
|
||||||
int sme_mgt_tspec(unifi_priv_t *priv, CsrWifiSmeListAction action,
|
int sme_mgt_tspec(unifi_priv_t *priv, CsrWifiSmeListAction action,
|
||||||
CsrUint32 tid, CsrWifiSmeDataBlock *tspec, CsrWifiSmeDataBlock *tclas)
|
u32 tid, CsrWifiSmeDataBlock *tspec, CsrWifiSmeDataBlock *tclas)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
|
|
@ -395,10 +395,10 @@ unifi_ta_indicate_sampling(void *ospriv, CsrWifiRouterCtrlTrafficStats *stats)
|
||||||
|
|
||||||
void
|
void
|
||||||
unifi_ta_indicate_l4stats(void *ospriv,
|
unifi_ta_indicate_l4stats(void *ospriv,
|
||||||
CsrUint32 rxTcpThroughput,
|
u32 rxTcpThroughput,
|
||||||
CsrUint32 txTcpThroughput,
|
u32 txTcpThroughput,
|
||||||
CsrUint32 rxUdpThroughput,
|
u32 rxUdpThroughput,
|
||||||
CsrUint32 txUdpThroughput)
|
u32 txUdpThroughput)
|
||||||
{
|
{
|
||||||
|
|
||||||
} /* unifi_ta_indicate_l4stats() */
|
} /* unifi_ta_indicate_l4stats() */
|
||||||
|
|
|
@ -1093,7 +1093,7 @@ void CsrWifiRouterCtrlWifiOnResHandler(void* drvpriv, CsrWifiFsmEvent* msg)
|
||||||
if (res->status == CSR_RESULT_SUCCESS)
|
if (res->status == CSR_RESULT_SUCCESS)
|
||||||
{
|
{
|
||||||
int i; /* used as a loop counter */
|
int i; /* used as a loop counter */
|
||||||
CsrUint32 intmode = CSR_WIFI_INTMODE_DEFAULT;
|
u32 intmode = CSR_WIFI_INTMODE_DEFAULT;
|
||||||
#ifdef CSR_WIFI_SPLIT_PATCH
|
#ifdef CSR_WIFI_SPLIT_PATCH
|
||||||
CsrBool switching_ap_fw = FALSE;
|
CsrBool switching_ap_fw = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1147,7 +1147,7 @@ void CsrWifiRouterCtrlWifiOnResHandler(void* drvpriv, CsrWifiFsmEvent* msg)
|
||||||
* but let module param override.
|
* but let module param override.
|
||||||
*/
|
*/
|
||||||
if (run_bh_once != -1) {
|
if (run_bh_once != -1) {
|
||||||
intmode = (CsrUint32)run_bh_once;
|
intmode = (u32)run_bh_once;
|
||||||
} else if (res->scheduledInterrupt) {
|
} else if (res->scheduledInterrupt) {
|
||||||
intmode = CSR_WIFI_INTMODE_RUN_BH_ONCE;
|
intmode = CSR_WIFI_INTMODE_RUN_BH_ONCE;
|
||||||
}
|
}
|
||||||
|
@ -2098,7 +2098,7 @@ void CsrWifiRouterCtrlPeerDelReqHandler(void* drvpriv, CsrWifiFsmEvent* msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the new station to the station record data base */
|
/* Add the new station to the station record data base */
|
||||||
static int peer_add_new_record(unifi_priv_t *priv,CsrWifiRouterCtrlPeerAddReq *req,CsrUint32 *handle)
|
static int peer_add_new_record(unifi_priv_t *priv,CsrWifiRouterCtrlPeerAddReq *req,u32 *handle)
|
||||||
{
|
{
|
||||||
u8 i, powerModeTemp = 0;
|
u8 i, powerModeTemp = 0;
|
||||||
CsrBool freeSlotFound = FALSE;
|
CsrBool freeSlotFound = FALSE;
|
||||||
|
@ -2479,7 +2479,7 @@ void CsrWifiRouterCtrlPeerAddReqHandler(void* drvpriv,CsrWifiFsmEvent* msg)
|
||||||
CsrWifiRouterCtrlPeerAddReq* req = (CsrWifiRouterCtrlPeerAddReq*)msg;
|
CsrWifiRouterCtrlPeerAddReq* req = (CsrWifiRouterCtrlPeerAddReq*)msg;
|
||||||
CsrResult status = CSR_RESULT_SUCCESS;
|
CsrResult status = CSR_RESULT_SUCCESS;
|
||||||
unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
|
unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
|
||||||
CsrUint32 handle = 0;
|
u32 handle = 0;
|
||||||
netInterface_priv_t *interfacePriv = priv->interfacePriv[req->interfaceTag];
|
netInterface_priv_t *interfacePriv = priv->interfacePriv[req->interfaceTag];
|
||||||
|
|
||||||
unifi_trace(priv, UDBG2, "entering CsrWifiRouterCtrlPeerAddReqHandler \n");
|
unifi_trace(priv, UDBG2, "entering CsrWifiRouterCtrlPeerAddReqHandler \n");
|
||||||
|
|
|
@ -297,10 +297,10 @@ unifi_ta_indicate_sampling(void *ospriv, CsrWifiRouterCtrlTrafficStats *stats)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
unifi_ta_indicate_l4stats(void *ospriv,
|
unifi_ta_indicate_l4stats(void *ospriv,
|
||||||
CsrUint32 rxTcpThroughput,
|
u32 rxTcpThroughput,
|
||||||
CsrUint32 txTcpThroughput,
|
u32 txTcpThroughput,
|
||||||
CsrUint32 rxUdpThroughput,
|
u32 rxUdpThroughput,
|
||||||
CsrUint32 txUdpThroughput)
|
u32 txUdpThroughput)
|
||||||
{
|
{
|
||||||
unifi_priv_t *priv = (unifi_priv_t*)ospriv;
|
unifi_priv_t *priv = (unifi_priv_t*)ospriv;
|
||||||
|
|
||||||
|
|
|
@ -458,7 +458,7 @@ static int decode_parameter_from_string(unifi_priv_t* priv, char **str_ptr,
|
||||||
void *dst, int param_max_len)
|
void *dst, int param_max_len)
|
||||||
{
|
{
|
||||||
u8 int_str[7] = "0";
|
u8 int_str[7] = "0";
|
||||||
CsrUint32 param_str_len;
|
u32 param_str_len;
|
||||||
u8 *param_str_begin,*param_str_end;
|
u8 *param_str_begin,*param_str_end;
|
||||||
u8 *orig_str = *str_ptr;
|
u8 *orig_str = *str_ptr;
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ static int decode_parameter_from_string(unifi_priv_t* priv, char **str_ptr,
|
||||||
switch (param_type) {
|
switch (param_type) {
|
||||||
case PARAM_TYPE_INT:
|
case PARAM_TYPE_INT:
|
||||||
{
|
{
|
||||||
CsrUint32 *pdst_int = dst,num =0;
|
u32 *pdst_int = dst,num =0;
|
||||||
int i,j=0;
|
int i,j=0;
|
||||||
if (param_str_len > sizeof(int_str)) {
|
if (param_str_len > sizeof(int_str)) {
|
||||||
param_str_len = sizeof(int_str);
|
param_str_len = sizeof(int_str);
|
||||||
|
|
|
@ -213,7 +213,7 @@ ul_deregister_client(ul_client_t *ul_client)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
logging_handler(void *ospriv,
|
logging_handler(void *ospriv,
|
||||||
u8 *sigdata, CsrUint32 signal_len,
|
u8 *sigdata, u32 signal_len,
|
||||||
const bulk_data_param_t *bulkdata,
|
const bulk_data_param_t *bulkdata,
|
||||||
enum udi_log_direction direction)
|
enum udi_log_direction direction)
|
||||||
{
|
{
|
||||||
|
@ -340,7 +340,7 @@ _align_bulk_data_buffers(unifi_priv_t *priv, u8 *signal,
|
||||||
* The following complex casting is in place in order to eliminate 64-bit compilation warning
|
* The following complex casting is in place in order to eliminate 64-bit compilation warning
|
||||||
* "cast to/from pointer from/to integer of different size"
|
* "cast to/from pointer from/to integer of different size"
|
||||||
*/
|
*/
|
||||||
CsrUint32 align_offset = (CsrUint32)(long)(bulkdata->d[i].os_data_ptr) & (CSR_WIFI_ALIGN_BYTES-1);
|
u32 align_offset = (u32)(long)(bulkdata->d[i].os_data_ptr) & (CSR_WIFI_ALIGN_BYTES-1);
|
||||||
if (align_offset)
|
if (align_offset)
|
||||||
{
|
{
|
||||||
skb = (struct sk_buff*)bulkdata->d[i].os_net_buf_ptr;
|
skb = (struct sk_buff*)bulkdata->d[i].os_net_buf_ptr;
|
||||||
|
|
|
@ -49,7 +49,7 @@ typedef void (*udi_event_t)(ul_client_t *client,
|
||||||
int dir);
|
int dir);
|
||||||
|
|
||||||
void logging_handler(void *ospriv,
|
void logging_handler(void *ospriv,
|
||||||
u8 *sigdata, CsrUint32 signal_len,
|
u8 *sigdata, u32 signal_len,
|
||||||
const bulk_data_param_t *bulkdata,
|
const bulk_data_param_t *bulkdata,
|
||||||
enum udi_log_direction direction);
|
enum udi_log_direction direction);
|
||||||
|
|
||||||
|
|
|
@ -367,7 +367,7 @@ static CsrBool check_routing_pkt_data_ind(unifi_priv_t *priv,
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
unifi_process_receive_event(void *ospriv,
|
unifi_process_receive_event(void *ospriv,
|
||||||
u8 *sigdata, CsrUint32 siglen,
|
u8 *sigdata, u32 siglen,
|
||||||
const bulk_data_param_t *bulkdata)
|
const bulk_data_param_t *bulkdata)
|
||||||
{
|
{
|
||||||
unifi_priv_t *priv = (unifi_priv_t*)ospriv;
|
unifi_priv_t *priv = (unifi_priv_t*)ospriv;
|
||||||
|
@ -647,7 +647,7 @@ void rx_wq_handler(struct work_struct *work)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
unifi_receive_event(void *ospriv,
|
unifi_receive_event(void *ospriv,
|
||||||
u8 *sigdata, CsrUint32 siglen,
|
u8 *sigdata, u32 siglen,
|
||||||
const bulk_data_param_t *bulkdata)
|
const bulk_data_param_t *bulkdata)
|
||||||
{
|
{
|
||||||
#ifdef CSR_WIFI_RX_PATH_SPLIT
|
#ifdef CSR_WIFI_RX_PATH_SPLIT
|
||||||
|
|
|
@ -33,14 +33,14 @@ static void _update_buffered_pkt_params_after_alignment(unifi_priv_t *priv, bulk
|
||||||
tx_buffered_packets_t* buffered_pkt)
|
tx_buffered_packets_t* buffered_pkt)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb ;
|
struct sk_buff *skb ;
|
||||||
CsrUint32 align_offset;
|
u32 align_offset;
|
||||||
|
|
||||||
if (priv == NULL || bulkdata == NULL || buffered_pkt == NULL){
|
if (priv == NULL || bulkdata == NULL || buffered_pkt == NULL){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
skb = (struct sk_buff*)bulkdata->d[0].os_net_buf_ptr;
|
skb = (struct sk_buff*)bulkdata->d[0].os_net_buf_ptr;
|
||||||
align_offset = (CsrUint32)(long)(bulkdata->d[0].os_data_ptr) & (CSR_WIFI_ALIGN_BYTES-1);
|
align_offset = (u32)(long)(bulkdata->d[0].os_data_ptr) & (CSR_WIFI_ALIGN_BYTES-1);
|
||||||
if(align_offset){
|
if(align_offset){
|
||||||
skb_pull(skb,align_offset);
|
skb_pull(skb,align_offset);
|
||||||
}
|
}
|
||||||
|
@ -448,7 +448,7 @@ CsrResult enque_tx_data_pdu(unifi_priv_t *priv, bulk_data_param_t *bulkdata,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CSR_WIFI_REQUEUE_PACKET_TO_HAL
|
#ifdef CSR_WIFI_REQUEUE_PACKET_TO_HAL
|
||||||
CsrResult unifi_reque_ma_packet_request (void *ospriv, CsrUint32 host_tag,
|
CsrResult unifi_reque_ma_packet_request (void *ospriv, u32 host_tag,
|
||||||
u16 txStatus, bulk_data_desc_t *bulkDataDesc)
|
u16 txStatus, bulk_data_desc_t *bulkDataDesc)
|
||||||
{
|
{
|
||||||
CsrResult status = CSR_RESULT_SUCCESS;
|
CsrResult status = CSR_RESULT_SUCCESS;
|
||||||
|
@ -859,7 +859,7 @@ void uf_handle_tim_cfm(unifi_priv_t *priv, CSR_MLME_SET_TIM_CONFIRM *cfm, u16 re
|
||||||
*
|
*
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, CsrUint32 handle)
|
void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, u32 handle)
|
||||||
{
|
{
|
||||||
CSR_SIGNAL signal;
|
CSR_SIGNAL signal;
|
||||||
CsrInt32 r;
|
CsrInt32 r;
|
||||||
|
@ -868,7 +868,7 @@ void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, CsrUi
|
||||||
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
|
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
|
||||||
u8 senderIdLsb = 0;
|
u8 senderIdLsb = 0;
|
||||||
CsrWifiRouterCtrlStaInfo_t *staRecord = NULL;
|
CsrWifiRouterCtrlStaInfo_t *staRecord = NULL;
|
||||||
CsrUint32 oldTimSetStatus = 0, timSetStatus = 0;
|
u32 oldTimSetStatus = 0, timSetStatus = 0;
|
||||||
|
|
||||||
unifi_trace(priv, UDBG5, "entering the update_tim routine\n");
|
unifi_trace(priv, UDBG5, "entering the update_tim routine\n");
|
||||||
|
|
||||||
|
@ -1661,13 +1661,13 @@ CsrResult uf_process_ma_packet_req(unifi_priv_t *priv,
|
||||||
CsrWifiPacketType pktType;
|
CsrWifiPacketType pktType;
|
||||||
int frameType = 0;
|
int frameType = 0;
|
||||||
CsrBool queuePacketDozing = FALSE;
|
CsrBool queuePacketDozing = FALSE;
|
||||||
CsrUint32 priority_q;
|
u32 priority_q;
|
||||||
u16 frmCtrl;
|
u16 frmCtrl;
|
||||||
struct list_head * list = NULL; /* List to which buffered PDUs are to be enqueued*/
|
struct list_head * list = NULL; /* List to which buffered PDUs are to be enqueued*/
|
||||||
CsrBool setBcTim=FALSE;
|
CsrBool setBcTim=FALSE;
|
||||||
netInterface_priv_t *interfacePriv;
|
netInterface_priv_t *interfacePriv;
|
||||||
CsrBool requeueOnSamePos = FALSE;
|
CsrBool requeueOnSamePos = FALSE;
|
||||||
CsrUint32 handle = 0xFFFFFFFF;
|
u32 handle = 0xFFFFFFFF;
|
||||||
unsigned long lock_flags;
|
unsigned long lock_flags;
|
||||||
|
|
||||||
unifi_trace(priv, UDBG5,
|
unifi_trace(priv, UDBG5,
|
||||||
|
@ -2025,7 +2025,7 @@ u8 send_multicast_frames(unifi_priv_t *priv, u16 interfaceTag)
|
||||||
u8 pduSent =0;
|
u8 pduSent =0;
|
||||||
unsigned long lock_flags;
|
unsigned long lock_flags;
|
||||||
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
|
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
|
||||||
CsrUint32 hostTag = 0xffffffff;
|
u32 hostTag = 0xffffffff;
|
||||||
|
|
||||||
func_enter();
|
func_enter();
|
||||||
if(!isRouterBufferEnabled(priv,UNIFI_TRAFFIC_Q_VO)) {
|
if(!isRouterBufferEnabled(priv,UNIFI_TRAFFIC_Q_VO)) {
|
||||||
|
@ -2116,7 +2116,7 @@ u8 send_multicast_frames(unifi_priv_t *priv, u16 interfaceTag)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata,
|
void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata,
|
||||||
CsrUint32 siglen)
|
u32 siglen)
|
||||||
{
|
{
|
||||||
#ifdef CSR_SUPPORT_SME
|
#ifdef CSR_SUPPORT_SME
|
||||||
CSR_SIGNAL signal;
|
CSR_SIGNAL signal;
|
||||||
|
@ -2409,7 +2409,7 @@ void uf_send_buffered_data_from_ac(unifi_priv_t *priv,
|
||||||
void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q)
|
void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue q)
|
||||||
{
|
{
|
||||||
u16 interfaceTag = GET_ACTIVE_INTERFACE_TAG(priv);
|
u16 interfaceTag = GET_ACTIVE_INTERFACE_TAG(priv);
|
||||||
CsrUint32 startIndex=0,endIndex=0;
|
u32 startIndex=0,endIndex=0;
|
||||||
CsrWifiRouterCtrlStaInfo_t * staInfo = NULL;
|
CsrWifiRouterCtrlStaInfo_t * staInfo = NULL;
|
||||||
u8 queue;
|
u8 queue;
|
||||||
CsrBool moreData = FALSE;
|
CsrBool moreData = FALSE;
|
||||||
|
@ -2769,7 +2769,7 @@ void uf_send_qos_null(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRI
|
||||||
CSR_TRANSMISSION_CONTROL transmissionControl = (TRANSMISSION_CONTROL_EOSP_MASK | TRANSMISSION_CONTROL_TRIGGER_MASK);
|
CSR_TRANSMISSION_CONTROL transmissionControl = (TRANSMISSION_CONTROL_EOSP_MASK | TRANSMISSION_CONTROL_TRIGGER_MASK);
|
||||||
int r;
|
int r;
|
||||||
CSR_SIGNAL signal;
|
CSR_SIGNAL signal;
|
||||||
CsrUint32 priority_q;
|
u32 priority_q;
|
||||||
CSR_RATE transmitRate = 0;
|
CSR_RATE transmitRate = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2840,7 +2840,7 @@ void uf_send_nulldata(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRI
|
||||||
CSR_TRANSMISSION_CONTROL transmissionControl = 0;
|
CSR_TRANSMISSION_CONTROL transmissionControl = 0;
|
||||||
int r;
|
int r;
|
||||||
CSR_SIGNAL signal;
|
CSR_SIGNAL signal;
|
||||||
CsrUint32 priority_q;
|
u32 priority_q;
|
||||||
CSR_RATE transmitRate = 0;
|
CSR_RATE transmitRate = 0;
|
||||||
CSR_MA_PACKET_REQUEST *req = &signal.u.MaPacketRequest;
|
CSR_MA_PACKET_REQUEST *req = &signal.u.MaPacketRequest;
|
||||||
unsigned long lock_flags;
|
unsigned long lock_flags;
|
||||||
|
@ -3481,7 +3481,7 @@ CsrWifiRouterCtrlStaInfo_t *CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(
|
||||||
}
|
}
|
||||||
/* generic function to get the station record handler from the handle */
|
/* generic function to get the station record handler from the handle */
|
||||||
CsrWifiRouterCtrlStaInfo_t * CsrWifiRouterCtrlGetStationRecordFromHandle(unifi_priv_t *priv,
|
CsrWifiRouterCtrlStaInfo_t * CsrWifiRouterCtrlGetStationRecordFromHandle(unifi_priv_t *priv,
|
||||||
CsrUint32 handle,
|
u32 handle,
|
||||||
u16 interfaceTag)
|
u16 interfaceTag)
|
||||||
{
|
{
|
||||||
netInterface_priv_t *interfacePriv;
|
netInterface_priv_t *interfacePriv;
|
||||||
|
@ -3497,7 +3497,7 @@ CsrWifiRouterCtrlStaInfo_t * CsrWifiRouterCtrlGetStationRecordFromHandle(unifi_p
|
||||||
/* Function to do inactivity */
|
/* Function to do inactivity */
|
||||||
void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, CsrTime currentTime)
|
void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, CsrTime currentTime)
|
||||||
{
|
{
|
||||||
CsrUint32 i;
|
u32 i;
|
||||||
CsrWifiRouterCtrlStaInfo_t *staInfo;
|
CsrWifiRouterCtrlStaInfo_t *staInfo;
|
||||||
CsrTime elapsedTime; /* Time in microseconds */
|
CsrTime elapsedTime; /* Time in microseconds */
|
||||||
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
|
netInterface_priv_t *interfacePriv = priv->interfacePriv[interfaceTag];
|
||||||
|
@ -3523,7 +3523,7 @@ void uf_check_inactivity(unifi_priv_t *priv, u16 interfaceTag, CsrTime currentTi
|
||||||
|
|
||||||
elapsedTime = (currentTime >= staInfo->lastActivity)?
|
elapsedTime = (currentTime >= staInfo->lastActivity)?
|
||||||
(currentTime - staInfo->lastActivity):
|
(currentTime - staInfo->lastActivity):
|
||||||
(~((CsrUint32)0) - staInfo->lastActivity + currentTime);
|
(~((u32)0) - staInfo->lastActivity + currentTime);
|
||||||
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags);
|
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags);
|
||||||
|
|
||||||
if (elapsedTime > MAX_INACTIVITY_INTERVAL) {
|
if (elapsedTime > MAX_INACTIVITY_INTERVAL) {
|
||||||
|
@ -3578,7 +3578,7 @@ void uf_update_sta_activity(unifi_priv_t *priv, u16 interfaceTag, const u8 *peer
|
||||||
* 64 bit handling */
|
* 64 bit handling */
|
||||||
elapsedTime = (currentTime >= interfacePriv->last_inactivity_check)?
|
elapsedTime = (currentTime >= interfacePriv->last_inactivity_check)?
|
||||||
(currentTime - interfacePriv->last_inactivity_check):
|
(currentTime - interfacePriv->last_inactivity_check):
|
||||||
(~((CsrUint32)0) - interfacePriv->last_inactivity_check + currentTime);
|
(~((u32)0) - interfacePriv->last_inactivity_check + currentTime);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags);
|
spin_unlock_irqrestore(&priv->staRecord_lock,lock_flags);
|
||||||
|
|
||||||
|
|
|
@ -322,7 +322,7 @@ typedef struct CsrWifiRouterCtrlStaInfo_t {
|
||||||
|
|
||||||
/* Sme sends these parameters */
|
/* Sme sends these parameters */
|
||||||
CsrWifiMacAddress peerMacAddress;
|
CsrWifiMacAddress peerMacAddress;
|
||||||
CsrUint32 assignedHandle;
|
u32 assignedHandle;
|
||||||
CsrBool wmmOrQosEnabled;
|
CsrBool wmmOrQosEnabled;
|
||||||
CsrWifiAcPowersaveMode powersaveMode[MAX_ACCESS_CATOGORY];
|
CsrWifiAcPowersaveMode powersaveMode[MAX_ACCESS_CATOGORY];
|
||||||
u16 maxSpLength;
|
u16 maxSpLength;
|
||||||
|
@ -648,10 +648,10 @@ struct unifi_priv {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CsrUint32 rxTcpThroughput;
|
u32 rxTcpThroughput;
|
||||||
CsrUint32 txTcpThroughput;
|
u32 txTcpThroughput;
|
||||||
CsrUint32 rxUdpThroughput;
|
u32 rxUdpThroughput;
|
||||||
CsrUint32 txUdpThroughput;
|
u32 txUdpThroughput;
|
||||||
|
|
||||||
#ifdef CSR_WIFI_SECURITY_WAPI_ENABLE
|
#ifdef CSR_WIFI_SECURITY_WAPI_ENABLE
|
||||||
/*Set if multicast KeyID = 1*/
|
/*Set if multicast KeyID = 1*/
|
||||||
|
@ -749,7 +749,7 @@ typedef struct netInterface_priv
|
||||||
u8 mc_list[UNIFI_MAX_MULTICAST_ADDRESSES*ETH_ALEN];
|
u8 mc_list[UNIFI_MAX_MULTICAST_ADDRESSES*ETH_ALEN];
|
||||||
/* The multicast addresses count that the thread needs to set. */
|
/* The multicast addresses count that the thread needs to set. */
|
||||||
int mc_list_count;
|
int mc_list_count;
|
||||||
CsrUint32 tag;
|
u32 tag;
|
||||||
#ifdef CSR_SUPPORT_SME
|
#ifdef CSR_SUPPORT_SME
|
||||||
/* (un)controlled port configuration */
|
/* (un)controlled port configuration */
|
||||||
unifi_port_config_t controlled_data_port;
|
unifi_port_config_t controlled_data_port;
|
||||||
|
@ -791,7 +791,7 @@ typedef struct netInterface_priv
|
||||||
CSR_CLIENT_TAG m4_hostTag;
|
CSR_CLIENT_TAG m4_hostTag;
|
||||||
CsrBool dtimActive;
|
CsrBool dtimActive;
|
||||||
CsrBool intraBssEnabled;
|
CsrBool intraBssEnabled;
|
||||||
CsrUint32 multicastPduHostTag; /* Used to set the tim after getting
|
u32 multicastPduHostTag; /* Used to set the tim after getting
|
||||||
a confirm for it */
|
a confirm for it */
|
||||||
CsrBool bcTimSet;
|
CsrBool bcTimSet;
|
||||||
CsrBool bcTimSetReqPendingFlag;
|
CsrBool bcTimSetReqPendingFlag;
|
||||||
|
@ -981,7 +981,7 @@ void uf_send_nulldata(unifi_priv_t * priv,u16 interfaceTag, const u8 *da,CSR_PRI
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, u8 *peerMacAddress, CSR_CLIENT_TAG hostTag, u16 interfaceTag, CSR_TRANSMISSION_CONTROL transmissionControl, CSR_RATE TransmitRate, CSR_PRIORITY priority, CSR_PROCESS_ID senderId, bulk_data_param_t *bulkdata);
|
CsrResult uf_process_ma_packet_req(unifi_priv_t *priv, u8 *peerMacAddress, CSR_CLIENT_TAG hostTag, u16 interfaceTag, CSR_TRANSMISSION_CONTROL transmissionControl, CSR_RATE TransmitRate, CSR_PRIORITY priority, CSR_PROCESS_ID senderId, bulk_data_param_t *bulkdata);
|
||||||
void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata, CsrUint32 siglen);
|
void uf_process_ma_vif_availibility_ind(unifi_priv_t *priv,u8 *sigdata, u32 siglen);
|
||||||
#ifdef CSR_SUPPORT_SME
|
#ifdef CSR_SUPPORT_SME
|
||||||
void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue queue);
|
void uf_send_buffered_frames(unifi_priv_t *priv,unifi_TrafficQueue queue);
|
||||||
int uf_process_station_records_for_sending_data(unifi_priv_t *priv,u16 interfaceTag,
|
int uf_process_station_records_for_sending_data(unifi_priv_t *priv,u16 interfaceTag,
|
||||||
|
@ -1053,7 +1053,7 @@ unifi_frame_ma_packet_req(unifi_priv_t *priv, CSR_PRIORITY priority,
|
||||||
/* handle is 6 bits to accomodate in senderId LSB (only 64 station can be associated) */
|
/* handle is 6 bits to accomodate in senderId LSB (only 64 station can be associated) */
|
||||||
#define CSR_WIFI_BROADCAST_OR_MULTICAST_HANDLE 0x3F
|
#define CSR_WIFI_BROADCAST_OR_MULTICAST_HANDLE 0x3F
|
||||||
|
|
||||||
void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, CsrUint32 handle);
|
void update_tim(unifi_priv_t * priv, u16 aid, u8 setTim, u16 interfaceTag, u32 handle);
|
||||||
void uf_handle_tim_cfm(unifi_priv_t *priv, CSR_MLME_SET_TIM_CONFIRM *cfm, u16 senderProcessId);
|
void uf_handle_tim_cfm(unifi_priv_t *priv, CSR_MLME_SET_TIM_CONFIRM *cfm, u16 senderProcessId);
|
||||||
|
|
||||||
/* Clear the Peer station Record, in case of wifioff/unexpected card removal */
|
/* Clear the Peer station Record, in case of wifioff/unexpected card removal */
|
||||||
|
@ -1082,7 +1082,7 @@ CsrWifiRouterCtrlStaInfo_t *CsrWifiRouterCtrlGetStationRecordFromPeerMacAddress(
|
||||||
|
|
||||||
/* Fetch the station record handler from data base for matching handle */
|
/* Fetch the station record handler from data base for matching handle */
|
||||||
CsrWifiRouterCtrlStaInfo_t * CsrWifiRouterCtrlGetStationRecordFromHandle(unifi_priv_t *priv,
|
CsrWifiRouterCtrlStaInfo_t * CsrWifiRouterCtrlGetStationRecordFromHandle(unifi_priv_t *priv,
|
||||||
CsrUint32 handle,
|
u32 handle,
|
||||||
u16 interfaceTag);
|
u16 interfaceTag);
|
||||||
|
|
||||||
void uf_update_sta_activity(unifi_priv_t *priv, u16 interfaceTag, const u8 *peerMacAddress);
|
void uf_update_sta_activity(unifi_priv_t *priv, u16 interfaceTag, const u8 *peerMacAddress);
|
||||||
|
|
|
@ -648,7 +648,7 @@ int unifi_cfg_wmm_qos_info(unifi_priv_t *priv, unsigned char *arg)
|
||||||
|
|
||||||
int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg)
|
int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg)
|
||||||
{
|
{
|
||||||
CsrUint32 addts_tid;
|
u32 addts_tid;
|
||||||
u8 addts_ie_length;
|
u8 addts_ie_length;
|
||||||
u8 *addts_ie;
|
u8 *addts_ie;
|
||||||
u8 *addts_params;
|
u8 *addts_params;
|
||||||
|
@ -657,12 +657,12 @@ int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg)
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
addts_params = (u8*)(((unifi_cfg_command_t*)arg) + 1);
|
addts_params = (u8*)(((unifi_cfg_command_t*)arg) + 1);
|
||||||
if (get_user(addts_tid, (CsrUint32*)addts_params)) {
|
if (get_user(addts_tid, (u32*)addts_params)) {
|
||||||
unifi_error(priv, "unifi_cfg_wmm_addts: Failed to get the argument\n");
|
unifi_error(priv, "unifi_cfg_wmm_addts: Failed to get the argument\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
addts_params += sizeof(CsrUint32);
|
addts_params += sizeof(u32);
|
||||||
if (get_user(addts_ie_length, (u8*)addts_params)) {
|
if (get_user(addts_ie_length, (u8*)addts_params)) {
|
||||||
unifi_error(priv, "unifi_cfg_wmm_addts: Failed to get the argument\n");
|
unifi_error(priv, "unifi_cfg_wmm_addts: Failed to get the argument\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@ -702,14 +702,14 @@ int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg)
|
||||||
|
|
||||||
int unifi_cfg_wmm_delts(unifi_priv_t *priv, unsigned char *arg)
|
int unifi_cfg_wmm_delts(unifi_priv_t *priv, unsigned char *arg)
|
||||||
{
|
{
|
||||||
CsrUint32 delts_tid;
|
u32 delts_tid;
|
||||||
u8 *delts_params;
|
u8 *delts_params;
|
||||||
CsrWifiSmeDataBlock tspec;
|
CsrWifiSmeDataBlock tspec;
|
||||||
CsrWifiSmeDataBlock tclas;
|
CsrWifiSmeDataBlock tclas;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
delts_params = (u8*)(((unifi_cfg_command_t*)arg) + 1);
|
delts_params = (u8*)(((unifi_cfg_command_t*)arg) + 1);
|
||||||
if (get_user(delts_tid, (CsrUint32*)delts_params)) {
|
if (get_user(delts_tid, (u32*)delts_params)) {
|
||||||
unifi_error(priv, "unifi_cfg_wmm_delts: Failed to get the argument\n");
|
unifi_error(priv, "unifi_cfg_wmm_delts: Failed to get the argument\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
@ -1198,7 +1198,7 @@ void uf_send_pkt_to_encrypt(struct work_struct *work)
|
||||||
u16 interfaceTag = interfacePriv->InterfaceTag;
|
u16 interfaceTag = interfacePriv->InterfaceTag;
|
||||||
unifi_priv_t *priv = interfacePriv->privPtr;
|
unifi_priv_t *priv = interfacePriv->privPtr;
|
||||||
|
|
||||||
CsrUint32 pktBulkDataLength;
|
u32 pktBulkDataLength;
|
||||||
u8 *pktBulkData;
|
u8 *pktBulkData;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ int sme_mgt_sme_config_get(unifi_priv_t *priv, CsrWifiSmeStaConfig *staConfig, C
|
||||||
int sme_mgt_coex_info_get(unifi_priv_t *priv, CsrWifiSmeCoexInfo *coexInfo);
|
int sme_mgt_coex_info_get(unifi_priv_t *priv, CsrWifiSmeCoexInfo *coexInfo);
|
||||||
int sme_mgt_packet_filter_set(unifi_priv_t *priv);
|
int sme_mgt_packet_filter_set(unifi_priv_t *priv);
|
||||||
int sme_mgt_tspec(unifi_priv_t *priv, CsrWifiSmeListAction action,
|
int sme_mgt_tspec(unifi_priv_t *priv, CsrWifiSmeListAction action,
|
||||||
CsrUint32 tid, CsrWifiSmeDataBlock *tspec, CsrWifiSmeDataBlock *tclas);
|
u32 tid, CsrWifiSmeDataBlock *tspec, CsrWifiSmeDataBlock *tclas);
|
||||||
|
|
||||||
#ifdef CSR_SUPPORT_WEXT
|
#ifdef CSR_SUPPORT_WEXT
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue