From 59055ca29a3ff59a709597df8d74dd33ce908ae5 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Tue, 18 Feb 2014 16:01:56 -0800 Subject: qcacld: CORE/WDI/WPAL cleanfile Run CORE/WDI/WPAL through kernel/scripts/cleanfile to remove whitespace that is inconsistent with the Linux Kernel coding standard Change-Id: Ib185a6b13a359a69b4b44f1b3113557406a91600 CRs-fixed: 619495 --- CORE/WDI/WPAL/inc/wlan_qct_os_list.h | 366 ++++++++++++++++---------------- CORE/WDI/WPAL/inc/wlan_qct_os_status.h | 30 +-- CORE/WDI/WPAL/inc/wlan_qct_os_sync.h | 8 +- CORE/WDI/WPAL/inc/wlan_qct_os_timer.h | 8 +- CORE/WDI/WPAL/inc/wlan_qct_os_trace.h | 42 ++-- CORE/WDI/WPAL/inc/wlan_qct_os_type.h | 8 +- CORE/WDI/WPAL/inc/wlan_qct_pack_align.h | 48 ++--- CORE/WDI/WPAL/inc/wlan_qct_pal_api.h | 54 ++--- CORE/WDI/WPAL/inc/wlan_qct_pal_device.h | 16 +- CORE/WDI/WPAL/inc/wlan_qct_pal_list.h | 8 +- CORE/WDI/WPAL/inc/wlan_qct_pal_msg.h | 26 +-- CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h | 74 +++---- CORE/WDI/WPAL/inc/wlan_qct_pal_status.h | 44 ++-- CORE/WDI/WPAL/inc/wlan_qct_pal_sync.h | 8 +- CORE/WDI/WPAL/inc/wlan_qct_pal_timer.h | 8 +- CORE/WDI/WPAL/inc/wlan_qct_pal_trace.h | 74 +++---- CORE/WDI/WPAL/inc/wlan_qct_pal_type.h | 12 +- CORE/WDI/WPAL/src/wlan_qct_pal_api.c | 78 +++---- CORE/WDI/WPAL/src/wlan_qct_pal_device.c | 49 +++-- CORE/WDI/WPAL/src/wlan_qct_pal_msg.c | 15 +- CORE/WDI/WPAL/src/wlan_qct_pal_packet.c | 152 ++++++------- CORE/WDI/WPAL/src/wlan_qct_pal_sync.c | 36 ++-- CORE/WDI/WPAL/src/wlan_qct_pal_timer.c | 10 +- CORE/WDI/WPAL/src/wlan_qct_pal_trace.c | 38 ++-- 24 files changed, 604 insertions(+), 608 deletions(-) diff --git a/CORE/WDI/WPAL/inc/wlan_qct_os_list.h b/CORE/WDI/WPAL/inc/wlan_qct_os_list.h index 0b87c6cb3a56..92bee82f95bb 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_os_list.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_os_list.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_OS_LIST_H /**========================================================================= - + \file wlan_qct_pal_list.h - + \brief define linked list PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform dependent. It is with VOSS support. - + ========================================================================*/ #include "wlan_qct_pal_type.h" @@ -55,95 +55,95 @@ typedef vos_list_node_t wpt_list_node; eWLAN_PAL_STATUS_E_BUSY : eWLAN_PAL_STATUS_E_FAILURE) ) /**--------------------------------------------------------------------------- - - \brief wpal_list_init() - initialize a wpt_list Linked List - + + \brief wpal_list_init() - initialize a wpt_list Linked List + The \a wpal_list_init() function initializes the specified linked list - 'object'. Upon successful initialization, the state of the list + 'object'. Upon successful initialization, the state of the list becomes initialized and available for use through the other wpt_list_xxx APIs. - A list must be initialized by calling wpal_list_init() before it - may be used in any other lock functions. - - Attempting to initialize an already initialized list results in + A list must be initialized by calling wpal_list_init() before it + may be used in any other lock functions. + + Attempting to initialize an already initialized list results in a failure. - + \param pList - pointer to the opaque list object to initialize - - \return eWLAN_PAL_STATUS_SUCCESS - list was successfully initialized and + + \return eWLAN_PAL_STATUS_SUCCESS - list was successfully initialized and is ready to be used. - - eWLAN_PAL_STATUS_E_RESOURCES - System resources (other than memory) + + eWLAN_PAL_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the list - eWLAN_PAL_STATUS_E_NOMEM - insufficient memory exists to initialize + eWLAN_PAL_STATUS_E_NOMEM - insufficient memory exists to initialize the list - eWLAN_PAL_STATUS_E_BUSY - The implementation has detected an attempt - to reinitialize the object referenced by list, a previously + eWLAN_PAL_STATUS_E_BUSY - The implementation has detected an attempt + to reinitialize the object referenced by list, a previously initialized, but not yet destroyed, list. - eWLAN_PAL_STATUS_E_FAULT - pList is an invalid pointer. - - \sa - + eWLAN_PAL_STATUS_E_FAULT - pList is an invalid pointer. + + \sa + --------------------------------------------------------------------------*/ #define wpal_list_init(pList) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_init( (vos_list_t *)(pList) ) ) /**------------------------------------------------------------------------- - + \brief wpal_list_destroy() - Destroy a wpt_list List - The \a wpal_list_destroy() function shall destroy the list object + The \a wpal_list_destroy() function shall destroy the list object referenced by pList. After a successful return from \a wpal_list_destroy() the list object becomes, in effect, uninitialized. - - A destroyed lock object can be reinitialized using wpal_list_init(); - the results of otherwise referencing the object after it has been destroyed + + A destroyed lock object can be reinitialized using wpal_list_init(); + the results of otherwise referencing the object after it has been destroyed are undefined. Calls to wpt_list functions to manipulate the list such - will fail if the list or has not been initialized or is destroyed. - Therefore, don't use the list after it has been destroyed until it has + will fail if the list or has not been initialized or is destroyed. + Therefore, don't use the list after it has been destroyed until it has been re-initialized. - + \param pLlist - pointer to the list object to be destroyed. - + \return eWLAN_PAL_STATUS_SUCCESS - list was successfully destroyed. - - eWLAN_PAL_STATUS_E_BUSY - The implementation has detected an attempt + + eWLAN_PAL_STATUS_E_BUSY - The implementation has detected an attempt to destroy the object referenced by pList that is still has - nodes. The list must be empty before it can be destroyed. + nodes. The list must be empty before it can be destroyed. eWLAN_PAL_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - - eWLAN_PAL_STATUS_E_FAULT - pList is an invalid pointer. + + eWLAN_PAL_STATUS_E_FAULT - pList is an invalid pointer. \sa - + ----------------------------------------------------------------------------*/ #define wpal_list_destroy(pList) \ WPAL_LIST_STATUS_BUSY_CHECK( vos_list_destroy( (vos_list_t *)(pList) ) ) /**--------------------------------------------------------------------------- - - \brief wpal_list_insert_front() - insert node at front of a linked list + + \brief wpal_list_insert_front() - insert node at front of a linked list The wpal_list_insert_front() API will insert a node at the front of - a properly initialized wpt_list object. - + a properly initialized wpt_list object. + \param pList - Pointer to list object where the node will be inserted - + \param pNode - Pointer to the list node to be inserted into the list. - - \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully inserted onto + + \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully inserted onto the front of the list. eWLAN_PAL_STATUS_E_FAILURE - Failure. - + \sa - + --------------------------------------------------------------------------*/ //wpt_status wpal_list_insert_front( wpt_list *pList, wpt_list_node *pNode ); #define wpal_list_insert_front(pList, pNode) \ @@ -151,23 +151,23 @@ typedef vos_list_node_t wpt_list_node; /**--------------------------------------------------------------------------- - - \brief wpal_list_insert_back() - insert node at back of a linked list + + \brief wpal_list_insert_back() - insert node at back of a linked list The wpal_list_insert_back() API will insert a node at the back of - a properly initialized wpt_list object. - + a properly initialized wpt_list object. + \param pList - Pointer to list object where the node will be inserted - + \param pNode - Pointer to the list node to be inserted into the list. - - \return eWLAN_PAL__STATUS_SUCCESS - list node was successfully inserted onto + + \return eWLAN_PAL__STATUS_SUCCESS - list node was successfully inserted onto the back of the list. eWLAN_PAL_STATUS_E_FAILURE - Failure. - + \sa - + --------------------------------------------------------------------------*/ //wpt_status wpal_list_insert_back( wpt_list *pList, wpt_list_node *pNode ); #define wpal_list_insert_back(pList, pNode) \ @@ -175,31 +175,31 @@ typedef vos_list_node_t wpt_list_node; /**--------------------------------------------------------------------------- - - \brief wpal_list_remove_front() - remove node at front of a linked list + + \brief wpal_list_remove_front() - remove node at front of a linked list The wpal_list_remove_front() API will remove a node at the front of - a properly initialized wpt_ist object. - + a properly initialized wpt_ist object. + \param pList - Pointer to list object where the node will be removed - - \param ppNode - Pointer to a pointer to the list node to be removed + + \param ppNode - Pointer to a pointer to the list node to be removed from the list. - - \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully removed from + + \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully removed from the front of the list. eWLAN_PAL_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - eWLAN_PAL_STATUS_E_EMPTY - The specified is empty so nodes cannot be + eWLAN_PAL_STATUS_E_EMPTY - The specified is empty so nodes cannot be removed. - + eWLAN_PAL_STATUS_E_FAULT - pList is an invalid pointer or ppNode is an invalid pointer. - - \sa - + + \sa + --------------------------------------------------------------------------*/ //wpt_status wpal_list_remove_front( wpt_list *pList, wpt_list_node **ppNode ); #define wpal_list_remove_front(pList, ppNode) \ @@ -207,239 +207,239 @@ typedef vos_list_node_t wpt_list_node; /**--------------------------------------------------------------------------- - - \brief wpal_list_remove_back() - remove node at back of a linked list + + \brief wpal_list_remove_back() - remove node at back of a linked list The wpal_list_remove_back() API will remove a node at the back of - a properly initialized wpt_list object. - + a properly initialized wpt_list object. + \param pList - Pointer to list object where the node will be removed - - \param ppNode - Pointer to a pointer to the list node to be removed + + \param ppNode - Pointer to a pointer to the list node to be removed from the list. - - \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully removed from + + \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully removed from the back of the list. eWLAN_PAL_STATUS_E_FAILURE - Failure. - - \sa - - --------------------------------------------------------------------------*/ + + \sa + + --------------------------------------------------------------------------*/ //wpt_status wpal_list_remove_back( wpt_list *pList, wpt_list_node **ppNode ); #define wpal_list_remove_back(pList, ppNode) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_remove_back( (vos_list_t *)(pList), (vos_list_node_t **)(ppNode) ) ) /*---------------------------------------------------------------------------- - - \brief wpal_list_size() - return the size of of a linked list - The wpal_list_size() API will return the number of nodes on the - given wpt_list object. - + \brief wpal_list_size() - return the size of of a linked list + + The wpal_list_size() API will return the number of nodes on the + given wpt_list object. + \param pList - Pointer to list object where the node will be counted - - \param pSize - Pointer to a size variable, where the size of the + + \param pSize - Pointer to a size variable, where the size of the list will be returned. - - \return eWLAN_PAL_STATUS_SUCCESS - list size of the properly initialized + + \return eWLAN_PAL_STATUS_SUCCESS - list size of the properly initialized wpt_list object has been returned. eWLAN_PAL_STATUS_E_FAILURE - Failure - + \sa - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ //wpt_status wpal_list_size( wpt_list *pList, wpt_uint32 *pSize ); #define wpal_list_size(pList, pSize) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_size( (vos_list_t *)(pList), (v_SIZE_t *)(pSize) ) ) /**--------------------------------------------------------------------------- - - \brief wpal_list_peek_front() - peek at the node at front of a linked list - The wpal_list_peek_front() API will return a pointer to the node at the + \brief wpal_list_peek_front() - peek at the node at front of a linked list + + The wpal_list_peek_front() API will return a pointer to the node at the front of a properly initialized wpt_list object. The node will *not* be removed from the list. - - \param pList - Pointer to list object of the list to be 'peeked' - + + \param pList - Pointer to list object of the list to be 'peeked' + \param ppNode - Pointer to a pointer to the list node that exists at the front of the list. - - \return eWLAN_PAL_STATUS_SUCCESS - list node at the front of the list was + + \return eWLAN_PAL_STATUS_SUCCESS - list node at the front of the list was successfully returned. eWLAN_PAL_STATUS_E_Failure. - - \sa - - --------------------------------------------------------------------------*/ + + \sa + + --------------------------------------------------------------------------*/ //wpt_status wpal_list_peek_front( wpt_list *pList, wpt_list_node **ppNode ); #define wpal_list_peek_front(pList, ppNode) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_peek_front( (vos_list_t *)(pList), (vos_list_node_t **)(ppNode) ) ) /**--------------------------------------------------------------------------- - - \brief wpal_list_peek_back() - peek at the node at back of a linked list - The wpal_list_peek_back() API will return a pointer to the node at the + \brief wpal_list_peek_back() - peek at the node at back of a linked list + + The wpal_list_peek_back() API will return a pointer to the node at the back of a properly initialized wpt_list object. The node will *not* be removed from the list. - - \param pList - Pointer to list object of the list to be 'peeked' - + + \param pList - Pointer to list object of the list to be 'peeked' + \param ppNode - Pointer to a pointer to the list node that exists at the back of the list. - - \return eWLAN_PAL_STATUS_SUCCESS - list node at the back of the list was + + \return eWLAN_PAL_STATUS_SUCCESS - list node at the back of the list was successfully returned. eWLAN_PAL_STATUS_E_FAILURE - Failure. - - \sa - - --------------------------------------------------------------------------*/ + + \sa + + --------------------------------------------------------------------------*/ //wpt_status wpal_list_peek_back( wpal_list *pList, wpt_list_node **ppNode ); #define wpal_list_peek_back(pList, ppNode) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_peek_back( (vos_list_t *)(pList), (vos_list_node_t **)(ppNode) ) ) /**--------------------------------------------------------------------------- - - \brief wpal_list_peek_next() - peek at the node after the specified node + + \brief wpal_list_peek_next() - peek at the node after the specified node The wpal_list_peek_next() API will return a pointer to the node following the - specified node on a properly initialized wpt_list object. The node will + specified node on a properly initialized wpt_list object. The node will *not* be removed from the list. - - \param pList - Pointer to list object of the list to be 'peeked' - + + \param pList - Pointer to list object of the list to be 'peeked' + \param pNode - Pointer to the node that is being 'peeked' - + \param ppNode - Pointer to a pointer to the list node that follows the pNode node on the list. - - \return eWLAN_PAL_STATUS_SUCCESS - list node following pNode on the properly + + \return eWLAN_PAL_STATUS_SUCCESS - list node following pNode on the properly initialized list is successfully returned. eWLAN_PAL_STATUS_E_FAILURE - Failure. - - \sa - - --------------------------------------------------------------------------*/ -//wpt_status wpal_list_peek_next( wpt_list *pList, wpt_list_node *pNode, + + \sa + + --------------------------------------------------------------------------*/ +//wpt_status wpal_list_peek_next( wpt_list *pList, wpt_list_node *pNode, // wpt_list_node **ppNode ); #define wpal_list_peek_next(pList, pNode, ppNode) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_peek_next( (vos_list_t *)(pList), (vos_list_node_t *)(pNode), (vos_list_node_t **)(ppNode) ) ) /**--------------------------------------------------------------------------- - - \brief wpal_list_peek_prev() - peek at the node before the specified node + + \brief wpal_list_peek_prev() - peek at the node before the specified node The wpal_list_peek_prev() API will return a pointer to the node before the - specified node on a properly initialized wpt_list object. The node will + specified node on a properly initialized wpt_list object. The node will *not* be removed from the list. - - \param pList - Pointer to list object of the list to be 'peeked' - + + \param pList - Pointer to list object of the list to be 'peeked' + \param pNode - Pointer to the node that is being 'peeked' - + \param ppNode - Pointer to a pointer to the list node before the pNode node on the list. - - \return eWLAN_PAL_STATUS_SUCCESS - list node before pNode on the properly + + \return eWLAN_PAL_STATUS_SUCCESS - list node before pNode on the properly initialized list is successfully returned. eWLAN_PAL_STATUS_E_FAILURE - Failure. - - \sa - - --------------------------------------------------------------------------*/ -//wpt_status wpal_list_peek_prev( wpt_list *pList, wpt_list_node *pNode, + + \sa + + --------------------------------------------------------------------------*/ +//wpt_status wpal_list_peek_prev( wpt_list *pList, wpt_list_node *pNode, // wpt_list_node **ppNode ); #define wpal_list_peek_prev(pList, pNode, ppNode) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_peek_prev( (vos_list_t *)(pList), (vos_list_node_t *)(pNode), (vos_list_node_t **)(ppNode) ) ) /**--------------------------------------------------------------------------- - + \brief wpal_list_insert_before() - insert node at front of a specified - list node + list node - The wpal_list_insert_before() API will insert a node onto a properly + The wpal_list_insert_before() API will insert a node onto a properly initialized wpt_list object in front of the specified list node. - + \param pList - Pointer to list object where the node will be inserted - + \param pNodeToInsert - Pointer to the list node to be inserted into the list. - + \param pNode - Pointer to the list node where pNodeToInsert will be inserted in front of. - - \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully inserted onto + + \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully inserted onto the front of the list. eWLAN_PAL_STATUS_FAILURE - Failure. - + \sa - + --------------------------------------------------------------------------*/ -//wpt_status wpal_list_insert_before( wpt_list *pList, -// wpt_list_node *pNodeToInsert, +//wpt_status wpal_list_insert_before( wpt_list *pList, +// wpt_list_node *pNodeToInsert, // wpt_list_node *pNode ); #define wpal_list_insert_before(pList, pNodeToInsert, pNode) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_insert_before( (vos_list_t *)(pList), \ (vos_list_node_t *)(pNodeToInsert), (vos_list_node_t *)(pNode) ) ) /**--------------------------------------------------------------------------- - - \brief wpal_list_insert_after() - insert node behind a specified list node - The wpal_list_insert_after() API will insert a node onto a properly + \brief wpal_list_insert_after() - insert node behind a specified list node + + The wpal_list_insert_after() API will insert a node onto a properly initialized wpt_list object after the specified list node. - + \param pList - Pointer to list object where the node will be inserted - + \param pNodeToInsert - Pointer to the list node to be inserted into the list. - + \param pNode - Pointer to the list node where pNodeToInsert will be inserted after. - - \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully inserted onto + + \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully inserted onto the front of the list. eWLAN_PAL_STATUS_E_FAILURE - Failure - + \sa - - --------------------------------------------------------------------------*/ -//wpt_status wpal_list_insert_after( wpt_list *pList, -// wpt_list_node *pNodeToInsert, -// wpt_list_node *pNode ); + + --------------------------------------------------------------------------*/ +//wpt_status wpal_list_insert_after( wpt_list *pList, +// wpt_list_node *pNodeToInsert, +// wpt_list_node *pNode ); #define wpal_list_insert_after(pList, pNodeToInsert, pNode) \ (WPAL_LIST_STATUS_BASIC_CHECK( vos_list_insert_after((vos_list_t *)(pList), \ (vos_list_node_t *)(pNodeToInsert), (vos_list_node_t *)(pNode) )) /**--------------------------------------------------------------------------- - - \brief wpal_list_remove_node() - remove specified node from wpt_list list - The wpal_list_remove_node() API will remove a specified node from the - properly initialized wpt_list object. - + \brief wpal_list_remove_node() - remove specified node from wpt_list list + + The wpal_list_remove_node() API will remove a specified node from the + properly initialized wpt_list object. + \param pList - Pointer to list object where the node will be removed - + \param ppNode - Pointer to the node to be removed from the list. - - \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully removed from + + \return eWLAN_PAL_STATUS_SUCCESS - list node was successfully removed from the list. eWLAN_PAL_STATUS_E_FAILURE - Failure. - + \sa - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ //wpt_status wpal_list_remove_node( wpt_list *pList, wpt_list_node *pNodeToRemove ); #define wpal_list_remove_node(pList, pNodeToRemove) \ WPAL_LIST_STATUS_BASIC_CHECK( vos_list_remove_node( (vos_list_t *)(pList), \ diff --git a/CORE/WDI/WPAL/inc/wlan_qct_os_status.h b/CORE/WDI/WPAL/inc/wlan_qct_os_status.h index 432ee4e2b52e..8b425532ffb6 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_os_status.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_os_status.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_OS_STATUS_H /**========================================================================= - + \file wlan_qct_os_status.h - + \brief define synchronization objects PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform dependent(Windows XP). - + ========================================================================*/ #include "vos_status.h" @@ -44,17 +44,17 @@ * \brief Macros to derive PAL STATUS from the VOS STATUS */ -#define WPAL_IS_VOS_STATUS_E_RESOURCES(status) ( VOS_STATUS_E_RESOURCES == (status)) -#define WPAL_IS_VOS_STATUS_E_NOMEM(status) ( VOS_STATUS_E_NOMEM == (status)) -#define WPAL_IS_VOS_STATUS_E_INVAL(status) ( VOS_STATUS_E_INVAL == (status)) -#define WPAL_IS_VOS_STATUS_E_FAULT(status) ( VOS_STATUS_E_FAULT == (status)) -#define WPAL_IS_VOS_STATUS_E_BUSY(status) ( VOS_STATUS_E_BUSY == (status)) -#define WPAL_IS_VOS_STATUS_E_CANCELED(status) ( VOS_STATUS_E_CANCELED == (status)) -#define WPAL_IS_VOS_STATUS_E_ABORTED(status) ( VOS_STATUS_E_ABORTED == (status)) -#define WPAL_IS_VOS_STATUS_E_NOSUPPORT(status) ( VOS_STATUS_E_NOSUPPORT == (status)) -#define WPAL_IS_VOS_STATUS_E_EMPTY(status) ( VOS_STATUS_E_EMPTY == (status)) -#define WPAL_IS_VOS_STATUS_E_EXISTS(status) ( VOS_STATUS_E_EXISTS == (status)) -#define WPAL_IS_VOS_STATUS_E_TIMEOUT(status) ( VOS_STATUS_E_TIMEOUT == (status)) +#define WPAL_IS_VOS_STATUS_E_RESOURCES(status) ( VOS_STATUS_E_RESOURCES == (status)) +#define WPAL_IS_VOS_STATUS_E_NOMEM(status) ( VOS_STATUS_E_NOMEM == (status)) +#define WPAL_IS_VOS_STATUS_E_INVAL(status) ( VOS_STATUS_E_INVAL == (status)) +#define WPAL_IS_VOS_STATUS_E_FAULT(status) ( VOS_STATUS_E_FAULT == (status)) +#define WPAL_IS_VOS_STATUS_E_BUSY(status) ( VOS_STATUS_E_BUSY == (status)) +#define WPAL_IS_VOS_STATUS_E_CANCELED(status) ( VOS_STATUS_E_CANCELED == (status)) +#define WPAL_IS_VOS_STATUS_E_ABORTED(status) ( VOS_STATUS_E_ABORTED == (status)) +#define WPAL_IS_VOS_STATUS_E_NOSUPPORT(status) ( VOS_STATUS_E_NOSUPPORT == (status)) +#define WPAL_IS_VOS_STATUS_E_EMPTY(status) ( VOS_STATUS_E_EMPTY == (status)) +#define WPAL_IS_VOS_STATUS_E_EXISTS(status) ( VOS_STATUS_E_EXISTS == (status)) +#define WPAL_IS_VOS_STATUS_E_TIMEOUT(status) ( VOS_STATUS_E_TIMEOUT == (status)) #define WPAL_STATUS_E_TIMEOUT_CHECK(status) ( WPAL_IS_VOS_STATUS_E_TIMEOUT(status)? eWLAN_PAL_STATUS_E_TIMEOUT : eWLAN_PAL_STATUS_E_FAILURE ) diff --git a/CORE/WDI/WPAL/inc/wlan_qct_os_sync.h b/CORE/WDI/WPAL/inc/wlan_qct_os_sync.h index 93c5d8edcbcc..fc80fa258ec3 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_os_sync.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_os_sync.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_OS_SYNC_H /**========================================================================= - + \file wlan_qct_os_sync.h - + \brief define synchronization objects PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform dependent(LA). - + ========================================================================*/ #include "vos_event.h" diff --git a/CORE/WDI/WPAL/inc/wlan_qct_os_timer.h b/CORE/WDI/WPAL/inc/wlan_qct_os_timer.h index b7735cd1b2da..f3e51dea66aa 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_os_timer.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_os_timer.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_OS_TIMER_H /**========================================================================= - + \file wlan_qct_os_timer.h - + \brief define synchronization objects PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform dependent (Linux Android). - + ========================================================================*/ #include "vos_timer.h" diff --git a/CORE/WDI/WPAL/inc/wlan_qct_os_trace.h b/CORE/WDI/WPAL/inc/wlan_qct_os_trace.h index ff82afb84566..2d115dce7903 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_os_trace.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_os_trace.h @@ -37,53 +37,53 @@ #ifdef WLAN_DEBUG /**---------------------------------------------------------------------------- - + \brief WPAL_TRACE() / wpalTrace() - Trace / logging API - - Users wishing to add tracing information to their code should use + + Users wishing to add tracing information to their code should use WPAL_TRACE. WPAL_TRACE() will compile into a call to wpalTrace() when tracing is enabled. - + \param module - module identifier. A member of the wpt_moduleid enumeration that identifies the module issuing the trace message. - - \param level - trace level. A member of the wpt_tracelevel + + \param level - trace level. A member of the wpt_tracelevel enumeration indicating the severity of the condition causing the - trace message to be issued. More severe conditions are more + trace message to be issued. More severe conditions are more likely to be logged. - + \param strFormat - format string. The message to be logged. This format string contains printf-like replacement parameters, which follow - this parameter in the variable argument list. - + this parameter in the variable argument list. + \return nothing - + --------------------------------------------------------------------------*/ void __printf(3,4) wpalTrace( wpt_moduleid module, wpt_tracelevel level, char *strFormat, ... ); /**---------------------------------------------------------------------------- - + \brief WPAL_DUMP() / wpalDump() - Trace / logging API - - Users wishing to add tracing memory dumps to their code should use + + Users wishing to add tracing memory dumps to their code should use WPAL_DUMP. WPAL_DUMP() will compile into a call to wpalDump() when tracing is enabled. - + \param module - module identifier. A member of the wpt_moduleid enumeration that identifies the module performing the dump - - \param level - trace level. A member of the wpt_tracelevel + + \param level - trace level. A member of the wpt_tracelevel enumeration indicating the severity of the condition causing the - memory to be dumped. More severe conditions are more + memory to be dumped. More severe conditions are more likely to be logged. - + \param pMemory - memory. A pointer to the memory to be dumped \param length - length. How many bytes of memory to be dumped - + \return nothing - + --------------------------------------------------------------------------*/ void wpalDump( wpt_moduleid module, wpt_tracelevel level, wpt_uint8 *memory, wpt_uint32 length); diff --git a/CORE/WDI/WPAL/inc/wlan_qct_os_type.h b/CORE/WDI/WPAL/inc/wlan_qct_os_type.h index e61f2aee59d9..bd62d67393db 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_os_type.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_os_type.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_OS_TYPE_H /**========================================================================= - + \file wlan_qct_pal_type.h - + \brief define basi types PAL exports. wpt = (Wlan Pal Type) - + Definitions for platform dependent. This is for Linux/Android - + ========================================================================*/ #include diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pack_align.h b/CORE/WDI/WPAL/inc/wlan_qct_pack_align.h index 30b436c49041..bdb358c54e6b 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pack_align.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pack_align.h @@ -29,52 +29,52 @@ #define __WLAN_QCT_PACK_ALIGN_H /**========================================================================= - + \file wlan_pack_align.h - + \brief pack and align primitives - + Definitions for platform independent means of packing and aligning data structures - + ========================================================================*/ /* - - Place the macro WPT_PACK_START above a structure declaration to pack. We - are not going to allow modifying the pack size because pack size cannot be - specified in AMSS and GNU. Place the macro WPT_PACK_END below a structure + + Place the macro WPT_PACK_START above a structure declaration to pack. We + are not going to allow modifying the pack size because pack size cannot be + specified in AMSS and GNU. Place the macro WPT_PACK_END below a structure declaration to stop the pack. This requirement is necessitated by Windows which need pragma based prolog and epilog. Pack-size > 1-byte is not supported since gcc and arm do not support that. - + Here are some examples - - 1. Pack-size 1-byte foo_t across all platforms - + + 1. Pack-size 1-byte foo_t across all platforms + WPT_PACK_START - typedef WPT_PACK_PRE struct foo_s { ... } WPT_PACK_POST foo_t; + typedef WPT_PACK_PRE struct foo_s { ... } WPT_PACK_POST foo_t; WPT_PACK_END - + 2. 2-byte alignment for foo_t across all platforms - - typedef WPT_ALIGN_PRE(2) struct foo_s { ... } WPT_ALIGN_POST(2) foo_t; + + typedef WPT_ALIGN_PRE(2) struct foo_s { ... } WPT_ALIGN_POST(2) foo_t; 3. Pack-size 1-byte and 2-byte alignment for foo_t across all platforms WPT_PACK_START - typedef WPT_PACK_PRE WPT_ALIGN_PRE(2) struct foo_s { ... } WPT_ALIGN_POST(2) WPT_PACK_POST foo_t; + typedef WPT_PACK_PRE WPT_ALIGN_PRE(2) struct foo_s { ... } WPT_ALIGN_POST(2) WPT_PACK_POST foo_t; WPT_PACK_END - + */ #if defined __GNUC__ - #define WPT_PACK_START - #define WPT_PACK_END + #define WPT_PACK_START + #define WPT_PACK_END - #define WPT_PACK_PRE + #define WPT_PACK_PRE #define WPT_PACK_POST __attribute__((__packed__)) #define WPT_ALIGN_PRE(__value) @@ -82,8 +82,8 @@ #elif defined __arm - #define WPT_PACK_START - #define WPT_PACK_END + #define WPT_PACK_START + #define WPT_PACK_END #define WPT_PACK_PRE __packed #define WPT_PACK_POST @@ -96,7 +96,7 @@ #define WPT_PACK_START __pragma(pack(push,1)) #define WPT_PACK_END __pragma(pack(pop)) - #define WPT_PACK_PRE + #define WPT_PACK_PRE #define WPT_PACK_POST #define WPT_ALIGN_PRE(__value) __declspec(align(__value)) diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h index debe9348f43d..f89e2aee6cf6 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_PAL_API_H /**========================================================================= - + \file wlan_qct_pal_api.h - + \brief define general APIs PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform independent - + ========================================================================*/ #include "wlan_qct_pal_type.h" @@ -48,10 +48,10 @@ /*********************************MACRO**********************/ // macro to get maximum of two values. -#define WPAL_MAX( _x, _y ) ( ( (_x) > (_y) ) ? (_x) : (_y) ) +#define WPAL_MAX( _x, _y ) ( ( (_x) > (_y) ) ? (_x) : (_y) ) // macro to get minimum of two values -#define WPAL_MIN( _x, _y ) ( ( (_x) < (_y) ) ? (_x) : (_y) ) +#define WPAL_MIN( _x, _y ) ( ( (_x) < (_y) ) ? (_x) : (_y) ) // macro to get the ceiling of an integer division operation... #define WPAL_CEIL_DIV( _a, _b ) (( 0 != (_a) % (_b) ) ? ( (_a) / (_b) + 1 ) : ( (_a) / (_b) )) @@ -97,11 +97,11 @@ /*********************************Generic API*******************************/ /*--------------------------------------------------------------------------- wpalOpen - Initialize PAL - Param: + Param: ppPalContext – pointer to a caller allocated pointer. It is opaque to caller. Caller save the returned pointer for future use when calling PAL APIs. If this is NULL, it means that PAL doesn't need it. - pOSContext - Pointer to a context that is OS specific. This is NULL is a + pOSContext - Pointer to a context that is OS specific. This is NULL is a particular PAL doesn't use it for that OS. Return: eWLAN_PAL_STATUS_SUCCESS - success. Otherwise fail. @@ -110,7 +110,7 @@ wpt_status wpalOpen(void **ppPalContext, void *pOSContext); /*--------------------------------------------------------------------------- wpalClose - Release PAL - Param: + Param: pPalContext – pointer returned from wpalOpen. Return: eWLAN_PAL_STATUS_SUCCESS - success. Otherwise fail. @@ -127,17 +127,17 @@ wpt_status wpalClose(void *pPalContext); /*--------------------------------------------------------------------------- wpalMemoryAllocate - Allocate memory - Param: + Param: size – number of bytes to allocate Return: - A pointer to the allocated memory. + A pointer to the allocated memory. NULL – fail to allocate memory ---------------------------------------------------------------------------*/ void *wpalMemoryAllocate(wpt_uint32 size); /*--------------------------------------------------------------------------- wpalMemoryFree - Free allocated memory - Param: + Param: pv – pointer to buffer to be freed Return: None @@ -147,7 +147,7 @@ void wpalMemoryFree(void *pv); /*--------------------------------------------------------------------------- wpalMemoryCopy - copy memory - Param: + Param: dest – address which data is copied to src – address which data is copied from size – number of bytes to copy @@ -160,7 +160,7 @@ wpt_status wpalMemoryCopy(void * dest, void * src, wpt_uint32 size); /*--------------------------------------------------------------------------- wpalMemoryCompare - compare memory - Param: + Param: buf1 – address of buffer1 buf2 – address of buffer2 size – number of bytes to compare @@ -172,7 +172,7 @@ wpt_boolean wpalMemoryCompare(void * buf1, void * buf2, wpt_uint32 size); /*--------------------------------------------------------------------------- wpalMemoryZero - Zero memory - Param: + Param: buf – address of buffer to be zero size – number of bytes to zero Return: @@ -183,7 +183,7 @@ void wpalMemoryZero(void *buf, wpt_uint32 size); /*--------------------------------------------------------------------------- wpalMemoryFill - Fill memory with one pattern - Param: + Param: buf – address of buffer to be zero size – number of bytes to zero bFill - one byte of data to fill in (size) bytes from the start of the buffer @@ -195,19 +195,19 @@ void wpalMemoryFill(void *buf, wpt_uint32 size, wpt_byte bFill); /*--------------------------------------------------------------------------- wpalDmaMemoryAllocate - Allocate memory ready for DMA. Aligned at 4-byte - Param: + Param: pPalContext - PAL context pointer size – number of bytes to allocate ppPhysicalAddr – Physical address of the buffer if allocation succeeds Return: - A pointer to the allocated memory (virtual address). + A pointer to the allocated memory (virtual address). NULL – fail to allocate memory -----------------------------------------------------------------------------*/ void *wpalDmaMemoryAllocate(wpt_uint32 size, void **ppPhysicalAddr); /*--------------------------------------------------------------------------- wpalDmaMemoryFree - Free memory ready for DMA - Param: + Param: pPalContext - PAL context pointer pv – address for the buffer to be freed Return: @@ -219,7 +219,7 @@ void wpalDmaMemoryFree(void *pv); /*--------------------------------------------------------------------------- wpalDbgReadRegister - Read register from the WiFi BB chip - Param: + Param: regAddr - register address pregValue - return value from register if success Return: @@ -236,7 +236,7 @@ wpt_status wpalDbgReadRegister(wpt_uint32 regAddr, wpt_uint32 *pregValue); /*--------------------------------------------------------------------------- wpalDbgWriteRegister - Write a value to the register in the WiFi BB chip - Param: + Param: regAddr - register address regValue - value to be written Return: @@ -254,9 +254,9 @@ wpt_status wpalDbgWriteRegister(wpt_uint32 regAddr, wpt_uint32 regValue); /*--------------------------------------------------------------------------- wpalDbgReadMemory - Read memory from WiFi BB chip space - Param: + Param: memAddr - address of memory - buf - output + buf - output len - length to be read Return: eWLAN_PAL_STATUS_SUCCESS - when everything is OK @@ -273,7 +273,7 @@ wpt_status wpalDbgReadMemory(wpt_uint32 memAddr, wpt_uint8 *buf, wpt_uint32 len) /*--------------------------------------------------------------------------- wpalDbgWriteMemory - Write a value to the memory in the WiFi BB chip space - Param: + Param: memAddr - memory address buf - vlaue to be written len - length of buf @@ -293,10 +293,10 @@ wpt_status wpalDbgWriteMemory(wpt_uint32 memAddr, wpt_uint8 *buf, wpt_uint32 len /*--------------------------------------------------------------------------- wpalDriverShutdown - Shutdown WLAN driver - This API is requied by SSR, call in to 'VOS shutdown' to shutdown WLAN + This API is requied by SSR, call in to 'VOS shutdown' to shutdown WLAN driver when Riva crashes. - Param: + Param: None Return: eWLAN_PAL_STATUS_SUCCESS - when everything is OK @@ -309,7 +309,7 @@ wpt_status wpalDriverShutdown(void); This API is requied by SSR, call in to 'VOS re-init' to re-init WLAN driver. - Param: + Param: None Return: eWLAN_PAL_STATUS_SUCCESS - when everything is OK diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_device.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_device.h index fa2bdc7d37b2..04f44a287233 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_device.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_device.h @@ -65,10 +65,10 @@ #define WPAL_SMSM_WLAN_TX_RINGS_EMPTY 0x00000200 /* ==================================================================================================================== - @ Function Name + @ Function Name wpalIsrType - @ Description + @ Description DXE ISR functio prototype DXE should register ISR function into platform @@ -128,7 +128,7 @@ wpt_status wpalDeviceClose Available. This interface provides the mechanism whereby a client can register to support one of these. It is expected that the core DXE implementation will invoke this API twice, once for each interrupt. - + @param intType: Enumeration of the interrupt type (TX or RX) @param callbackFunction: ISR function pointer @param usrCtxt: User context passed back whenever the @@ -148,7 +148,7 @@ wpt_status wpalRegisterInterrupt to un-register for a given interrupt When DXE stop, remove registered information from PAL - + @param intType: Enumeration of the interrupt type (TX or RX) @return NONE @@ -169,7 +169,7 @@ void wpalUnRegisterInterrupt given interrupt to occur. The expectation is that if a given interrupt is not enabled, if the interrupt occurs then the APPS CPU will not be interrupted. - + @param intType: Enumeration of the interrupt type (TX or RX) @return SUCCESS if the interrupt was enabled @@ -189,7 +189,7 @@ wpt_status wpalEnableInterrupt given interrupt to occur. The expectation is that if a given interrupt is not enabled, if the interrupt occurs then the APPS CPU will not be interrupted. - + @param intType: Enumeration of the interrupt type (TX or RX) @return SUCCESS if the interrupt was disabled @@ -312,11 +312,11 @@ wpt_status wpalWriteDeviceMemory #endif /* #ifdef QCA_WIFI_2_0 */ /** - @brief wpalNotifySmsm provides a mechansim for a client to + @brief wpalNotifySmsm provides a mechansim for a client to notify SMSM to start DXE engine and/or condition of Tx ring buffer - @param clrSt: bit(s) to be cleared on the MASK + @param clrSt: bit(s) to be cleared on the MASK @param setSt: bit(s) to be set on the MASK @return SUCCESS if the operation is successful diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_list.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_list.h index 52b5c06e64c4..716fbd565882 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_list.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_list.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_PAL_LIST_H /**========================================================================= - + \file wlan_qct_pal_list.h - + \brief define linked list PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform independent. - + ========================================================================*/ #include "wlan_qct_os_list.h" diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_msg.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_msg.h index 1ffa2d42e7e5..d69b82a815b5 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_msg.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_msg.h @@ -29,14 +29,14 @@ #define __WLAN_QCT_PAL_MSG_H /**========================================================================= - + \file wlan_qct_pal_msg.h - - \brief define general message APIs PAL exports to support legacy UMAC. + + \brief define general message APIs PAL exports to support legacy UMAC. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform dependent. Only work with legacy UMAC. - + ========================================================================*/ #include "wlan_qct_pal_type.h" @@ -54,15 +54,15 @@ struct swpt_msg wpt_uint32 val; wpal_msg_callback callback; void *pContext; -}; +}; /*--------------------------------------------------------------------------- - wpalPostCtrlMsg – Post a message to control context so it can + wpalPostCtrlMsg – Post a message to control context so it can be processed in that context. - Param: + Param: pPalContext – A PAL context - pMsg – a pointer to called allocated object; Caller retain the ownership + pMsg – a pointer to called allocated object; Caller retain the ownership after this API returns. ---------------------------------------------------------------------------*/ wpt_status wpalPostCtrlMsg(void *pPalContext, wpt_msg *pMsg); @@ -70,18 +70,18 @@ wpt_status wpalPostCtrlMsg(void *pPalContext, wpt_msg *pMsg); /*--------------------------------------------------------------------------- wpalPostTxMsg – Post a message to TX context so it can be processed in that context. - Param: + Param: pPalContext – A PAL context - pMsg – a pointer to called allocated object; Caller retain the ownership + pMsg – a pointer to called allocated object; Caller retain the ownership after this API returns. ---------------------------------------------------------------------------*/ wpt_status wpalPostTxMsg(void *pPalContext, wpt_msg *pMsg); /*--------------------------------------------------------------------------- wpalPostRxMsg – Post a message to RX context so it can be processed in that context. - Param: + Param: pPalContext – A PAL context - pMsg – a pointer to called allocated object; Caller retain the ownership + pMsg – a pointer to called allocated object; Caller retain the ownership after this API returns. ---------------------------------------------------------------------------*/ wpt_status wpalPostRxMsg(void *pPalContext, wpt_msg *pMsg); diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h index 8111ce70b1e6..ed7f5f163848 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_PAL_PACKET_H /**========================================================================= - + \file wlan_qct_pal_packet.h - + \brief define PAL packet. wpt = (Wlan Pal Type) - + Definitions for platform independent. - + ========================================================================*/ #include "wlan_qct_pal_type.h" @@ -70,9 +70,9 @@ // 2346 - 114 = 2232; 2232 / 124 = 18 // So 21 BD/PDUs are required -//The size of AMSDU frame per spec can be a max of 3839 bytes -// in BD/PDUs that means 30 (one BD = 128 bytes) -// we must add the size of the 802.11 header to that +//The size of AMSDU frame per spec can be a max of 3839 bytes +// in BD/PDUs that means 30 (one BD = 128 bytes) +// we must add the size of the 802.11 header to that #define VPKT_SIZE_BUFFER ((30 * 128) + 32) /* Transport channel count to report DIAG */ @@ -103,21 +103,21 @@ typedef struct swpt_packet */ void *pBD; //Physical address for pBD for DMA-able devices - void *pBDPhys; + void *pBDPhys; //OS dependent strucutre used only by OS specific code. - void *pOSStruct; + void *pOSStruct; void *pktMetaInfo; wpt_packet_type pktType; //The number of bytes pBD uses. It MUST be set to 0 for RX packets wpt_uint16 BDLength; //Internal data for PAL packet implementation usage only - void *pInternalData; + void *pInternalData; } wpt_packet; typedef struct swpt_iterator { - void *pNext; + void *pNext; void *pCur; void *pContext; } wpt_iterator; @@ -167,10 +167,10 @@ typedef void ( *wpalPacketLowPacketCB )( wpt_packet *pPacket, void *usrData ); /*--------------------------------------------------------------------------- - wpalPacketInit – Initialize all wpt_packet related objects. Allocate memory for wpt_packet. + wpalPacketInit – Initialize all wpt_packet related objects. Allocate memory for wpt_packet. Allocate memory for TX management frames and RX frames. For our legacy UMAC, it is not needed because vos_packet contains wpt_packet. - Param: + Param: pPalContext – A context PAL uses?? Return: eWLAN_PAL_STATUS_SUCCESS -- success @@ -180,7 +180,7 @@ wpt_status wpalPacketInit(void *pPalContext); /*--------------------------------------------------------------------------- wpalPacketClose – Free all allocated resource by wpalPacketInit. For our legacy UMAC, it is not needed because vos_packet contains pal_packet. - Param: + Param: pPalContext – A context PAL uses?? Return: eWLAN_PAL_STATUS_SUCCESS -- success @@ -190,7 +190,7 @@ wpt_status wpalPacketClose(void *pPalContext); /*--------------------------------------------------------------------------- wpalPacketAlloc – Allocate a wpt_packet from PAL. - Param: + Param: pPalContext – A context PAL uses?? pktType – specify the type of wpt_packet to allocate nPktSize - specify the maximum size of the packet buffer. @@ -203,7 +203,7 @@ wpt_packet * wpalPacketAlloc(wpt_packet_type pktType, wpt_uint32 nPktSize, /*--------------------------------------------------------------------------- wpalPacketFree – Free a wpt_packet chain for one particular type. Packet type is carried in wpt_packet structure. - Param: + Param: pPalContext – A context PAL uses?? pPkt - pointer to a packet to be freed. Return: @@ -213,11 +213,11 @@ wpt_status wpalPacketFree(wpt_packet *pPkt); /*--------------------------------------------------------------------------- wpalPacketGetLength – Get number of bytes in a wpt_packet. - Param: + Param: pPalContext – PAL context returned from PAL open pPkt - pointer to a packet to be freed. Return: - Length of the data include layer-2 headers. For example, if the frame is 802.3, + Length of the data include layer-2 headers. For example, if the frame is 802.3, the length includes the ethernet header. ---------------------------------------------------------------------------*/ wpt_uint32 wpalPacketGetLength(wpt_packet *pPkt); @@ -225,8 +225,8 @@ wpt_uint32 wpalPacketGetLength(wpt_packet *pPkt); /*--------------------------------------------------------------------------- wpalPacketRawTrimHead – Move the starting offset and reduce packet length. The function can only be used with raw packets, - whose buffer is one piece and allocated by WLAN driver. - Param: + whose buffer is one piece and allocated by WLAN driver. + Param: pPkt - pointer to a wpt_packet. size – number of bytes to take off the head. Return: @@ -235,10 +235,10 @@ wpt_uint32 wpalPacketGetLength(wpt_packet *pPkt); wpt_status wpalPacketRawTrimHead(wpt_packet *pPkt, wpt_uint32 size); /*--------------------------------------------------------------------------- - wpalPacketRawTrimTail – reduce the length of the packet. The function can - only be used with raw packets, whose buffer is one piece and + wpalPacketRawTrimTail – reduce the length of the packet. The function can + only be used with raw packets, whose buffer is one piece and allocated by WLAN driver. This also reduce the length of the packet. - Param: + Param: pPkt - pointer to a wpt_packet. size – number of bytes to take of the packet length Return: @@ -250,7 +250,7 @@ wpt_status wpalPacketRawTrimTail(wpt_packet *pPkt, wpt_uint32 size); /*--------------------------------------------------------------------------- wpalPacketGetRawBuf – Return the starting buffer's virtual address for the RAW flat buffer It is inline in hope of faster implementation for certain platform. - Param: + Param: pPkt - pointer to a wpt_packet. Return: NULL - fail. @@ -260,10 +260,10 @@ extern wpt_uint8 *wpalPacketGetRawBuf(wpt_packet *pPkt); /*--------------------------------------------------------------------------- - wpalPacketSetRxLength – Set the valid data length on a RX packet. This function must + wpalPacketSetRxLength – Set the valid data length on a RX packet. This function must be called once per RX packet per receiving. It indicates the available data length from the start of the buffer. - Param: + Param: pPkt - pointer to a wpt_packet. Return: NULL - fail. @@ -274,7 +274,7 @@ extern wpt_status wpalPacketSetRxLength(wpt_packet *pPkt, wpt_uint32 len); /*--------------------------------------------------------------------------- wpalIteratorInit – Initialize an interator by updating pCur to first item. - Param: + Param: pIter – pointer to a caller allocated wpt_iterator pPacket – pointer to a wpt_packet Return: @@ -284,7 +284,7 @@ wpt_status wpalIteratorInit(wpt_iterator *pIter, wpt_packet *pPacket); /*--------------------------------------------------------------------------- wpalIteratorNext – Get the address for the next item - Param: + Param: pIter – pointer to a caller allocated wpt_iterator pPacket – pointer to a wpt_packet ppAddr – Caller allocated pointer to return the address of the item. For DMA-able devices, this is the physical address of the item. @@ -299,10 +299,10 @@ wpt_status wpalIteratorNext(wpt_iterator *pIter, wpt_packet *pPacket, void **ppA wpalLockPacketForTransfer – Packet must be locked before transfer can begin, the lock will ensure that the DMA engine has access to the data packet in a cache coherent manner - - Param: + + Param: pPacket – pointer to a wpt_packet - + Return: eWLAN_PAL_STATUS_SUCCESS - success ---------------------------------------------------------------------------*/ @@ -311,9 +311,9 @@ wpt_status wpalLockPacketForTransfer( wpt_packet *pPacket); /*--------------------------------------------------------------------------- wpalUnlockPacket – Once the transfer has been completed the packet should be unlocked so that normal operation may resume - Param: + Param: pPacket – pointer to a wpt_packet - + Return: eWLAN_PAL_STATUS_SUCCESS - success ---------------------------------------------------------------------------*/ @@ -322,9 +322,9 @@ wpt_status wpalUnlockPacket( wpt_packet *pPacket); /*--------------------------------------------------------------------------- wpalPacketGetFragCount – Get count of memory chains (fragments) in a packet - Param: + Param: pPacket – pointer to a wpt_packet - + Return: memory fragment count in a packet ---------------------------------------------------------------------------*/ @@ -332,9 +332,9 @@ wpt_int32 wpalPacketGetFragCount(wpt_packet *pPkt); /*--------------------------------------------------------------------------- wpalIsPacketLocked – Check whether the Packet is locked for DMA. - Param: + Param: pPacket – pointer to a wpt_packet - + Return: eWLAN_PAL_STATUS_SUCCESS eWLAN_PAL_STATUS_E_FAILURE diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_status.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_status.h index 17b29d344460..43b4e93b88fa 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_status.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_status.h @@ -29,38 +29,38 @@ #define __WLAN_QCT_PAL_STATUS_H /**========================================================================= - + \file wlan_qct_pal_status.h - + \brief define status PAL exports. wpt = (Wlan Pal Type) - + Definitions for platform independent. - + ========================================================================*/ typedef enum { /// Request succeeded! eWLAN_PAL_STATUS_SUCCESS, - - /// Request failed because system resources (other than memory) to - /// fulfill request are not available. + + /// Request failed because system resources (other than memory) to + /// fulfill request are not available. eWLAN_PAL_STATUS_E_RESOURCES, - - /// Request failed because not enough memory is available to + + /// Request failed because not enough memory is available to /// fulfill the request. - eWLAN_PAL_STATUS_E_NOMEM, - - /// Request failed because there of an invalid request. This is + eWLAN_PAL_STATUS_E_NOMEM, + + /// Request failed because there of an invalid request. This is /// typically the result of invalid parameters on the request. eWLAN_PAL_STATUS_E_INVAL, - - /// Request failed because handling the request would cause a - /// system fault. This error is typically returned when an + + /// Request failed because handling the request would cause a + /// system fault. This error is typically returned when an /// invalid pointer to memory is detected. eWLAN_PAL_STATUS_E_FAULT, - /// Request failed because device or resource is busy. + /// Request failed because device or resource is busy. eWLAN_PAL_STATUS_E_BUSY, /// Request did not complete because it was canceled. @@ -68,21 +68,21 @@ typedef enum /// Request did not complete because it was aborted. eWLAN_PAL_STATUS_E_ABORTED, - + /// Request failed because the request is valid, though not supported /// by the entity processing the request. eWLAN_PAL_STATUS_E_NOSUPPORT, - + /// Request failed because of an empty condition eWLAN_PAL_STATUS_E_EMPTY, - + /// Existance failure. Operation could not be completed because - /// something exists or does not exist. + /// something exists or does not exist. eWLAN_PAL_STATUS_E_EXISTS, - + /// Operation timed out eWLAN_PAL_STATUS_E_TIMEOUT, - + /// Request failed for some unknown reason. Note don't use this /// status unless nothing else applies eWLAN_PAL_STATUS_E_FAILURE, diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_sync.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_sync.h index 666e286fe1d9..d0055cc4d0cf 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_sync.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_sync.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_PAL_SYNC_H /**========================================================================= - + \file wlan_pal_sync.h - + \brief define synchronization objects PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform independent. - + ========================================================================*/ #include "wlan_qct_pal_type.h" diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_timer.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_timer.h index f97f8067f31f..1b6964e3750b 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_timer.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_timer.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_PAL_TIMER_H /**========================================================================= - + \file wlan_qct_pal_timer.h - + \brief define synchronization objects PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform independent. - + ========================================================================*/ #include "wlan_qct_pal_type.h" diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_trace.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_trace.h index 3e4175a6ab7a..251030748f70 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_trace.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_trace.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_PAL_TRACE_H /**========================================================================= - + \file wlan_qct_pal_api.h - + \brief define general APIs PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform independent - + ========================================================================*/ #include "wlan_qct_pal_type.h" @@ -43,26 +43,26 @@ typedef enum { - // NONE means NO traces will be logged. This value is in place for the + // NONE means NO traces will be logged. This value is in place for the // vos_trace_setlevel() to allow the user to turn off all traces. eWLAN_PAL_TRACE_LEVEL_NONE = 0, - + // the following trace levels are the ones that 'callers' of VOS_TRACE() // can specify in for the VOS_TRACE_LEVEL parameter. Traces are classified - // by severity (FATAL being more serious than INFO for example). + // by severity (FATAL being more serious than INFO for example). eWLAN_PAL_TRACE_LEVEL_FATAL, - eWLAN_PAL_TRACE_LEVEL_ERROR, - eWLAN_PAL_TRACE_LEVEL_WARN, + eWLAN_PAL_TRACE_LEVEL_ERROR, + eWLAN_PAL_TRACE_LEVEL_WARN, eWLAN_PAL_TRACE_LEVEL_INFO, eWLAN_PAL_TRACE_LEVEL_INFO_HIGH, eWLAN_PAL_TRACE_LEVEL_INFO_MED, eWLAN_PAL_TRACE_LEVEL_INFO_LOW, - - // ALL means all trace levels will be active. This value is in place for the + + // ALL means all trace levels will be active. This value is in place for the // vos_trace_setlevel() to allow the user to turn ON all traces. - eWLAN_PAL_TRACE_LEVEL_ALL, - - // not a real level. Used to identify the maximum number of + eWLAN_PAL_TRACE_LEVEL_ALL, + + // not a real level. Used to identify the maximum number of // VOS_TRACE_LEVELs defined. eWLAN_PAL_TRACE_LEVEL_COUNT } wpt_tracelevel; @@ -70,62 +70,62 @@ typedef enum #include "wlan_qct_os_trace.h" /*---------------------------------------------------------------------------- - + \brief wpalTraceSetLevel() - Set the trace level for a particular module - + This is an external API that allows trace levels to be set for each module. - + \param module - id of the module whos trace level is being modified - \param level - trace level. A member of the wpt_tracelevel + \param level - trace level. A member of the wpt_tracelevel enumeration indicating the severity of the condition causing the - trace message to be issued. More severe conditions are more + trace message to be issued. More severe conditions are more likely to be logged. \param on - boolean to indicate if tracing at the given level should be enabled or disabled. - + \return nothing - + \sa --------------------------------------------------------------------------*/ void wpalTraceSetLevel( wpt_moduleid module, wpt_tracelevel level, wpt_boolean on ); /**---------------------------------------------------------------------------- - - \brief wpalTraceCheckLevel() - - This is an external API that returns a boolean value to signify if a + + \brief wpalTraceCheckLevel() + + This is an external API that returns a boolean value to signify if a particular trace level is set for the specified module. - - \param level - trace level. A member of the wpt_tracelevel enumeration - indicating the severity of the condition causing the trace + + \param level - trace level. A member of the wpt_tracelevel enumeration + indicating the severity of the condition causing the trace message to be issued. - + Note that individual trace levels are the only valid values for this API. eWLAN_PAL_TRACE_LEVEL_NONE and eWLAN_PAL_TRACE_LEVEL_ALL are not valid input and will return FALSE - \return eWLAN_PAL_FALSE - the specified trace level for the specified module is OFF - + \return eWLAN_PAL_FALSE - the specified trace level for the specified module is OFF + eWLAN_PAL_TRUE - the specified trace level for the specified module is ON - - \sa + + \sa --------------------------------------------------------------------------*/ wpt_boolean wpalTraceCheckLevel( wpt_moduleid module, wpt_tracelevel level ); /*---------------------------------------------------------------------------- - + \brief wpalTraceDisplay() - Display current state of trace level for all modules - + This is an external API that allows trace levels to be displayed to an end user - + \param none \return nothing - + \sa --------------------------------------------------------------------------*/ void wpalTraceDisplay(void); diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_type.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_type.h index 536b4a5bfeaa..9864060a0cb1 100644 --- a/CORE/WDI/WPAL/inc/wlan_qct_pal_type.h +++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_type.h @@ -29,13 +29,13 @@ #define __WLAN_QCT_PAL_TYPE_H /**========================================================================= - + \file wlan_qct_pal_type.h - + \brief define basic types PAL exports. wpt = (Wlan Pal Type) - + Definitions for platform independent. - + ========================================================================*/ #include "wlan_qct_os_type.h" @@ -53,7 +53,7 @@ typedef enum eWLAN_MODULE_DAL_CTRL, eWLAN_MODULE_DAL_DATA, eWLAN_MODULE_PAL, - + //Always the last one eWLAN_MODULE_COUNT } wpt_moduleid; @@ -61,7 +61,7 @@ typedef enum typedef struct { - //BIT order is most likely little endian. + //BIT order is most likely little endian. //This structure is for netowkr-order byte array (or big-endian byte order) #ifndef WLAN_PAL_BIG_ENDIAN_BIT wpt_byte protVer :2; diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_api.c b/CORE/WDI/WPAL/src/wlan_qct_pal_api.c index 0cd53e846916..2cc8e435cd01 100644 --- a/CORE/WDI/WPAL/src/wlan_qct_pal_api.c +++ b/CORE/WDI/WPAL/src/wlan_qct_pal_api.c @@ -26,14 +26,14 @@ */ /**========================================================================= - + \file wlan_qct_pal_api.c - + \brief Implementation general APIs PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform Windows. - + ========================================================================*/ #include "wlan_qct_pal_api.h" @@ -64,7 +64,7 @@ typedef struct { wpt_uint32 length; //The offset from beginning of the buffer where it is allocated - wpt_uint32 offset; + wpt_uint32 offset; wpt_uint32 phyAddr; } tPalDmaMemInfo; @@ -77,13 +77,13 @@ typedef struct /** * @brief Initialize PAL * In case of QNP, this does nothing. - * @param ppPalContext pointer to a caller allocated pointer. It + * @param ppPalContext pointer to a caller allocated pointer. It * is opaque to caller. * Caller save the returned pointer for future use when * calling PAL APIs. - * @param pOSContext Pointer to a context that is OS specific. This is NULL is a + * @param pOSContext Pointer to a context that is OS specific. This is NULL is a particular PAL doesn't use it for that OS. - * + * * @return wpt_status eWLAN_PAL_STATUS_SUCCESS - success. Otherwise fail. */ wpt_status wpalOpen(void **ppPalContext, void *pOSContext) @@ -107,7 +107,7 @@ wpt_status wpalOpen(void **ppPalContext, void *pOSContext) * @brief wpalClose - Release PAL * In case of QNP, this does nothing. * @param pPalContext pointer returned from wpalOpen. - * + * * @return wpt_status eWLAN_PAL_STATUS_SUCCESS - success. Otherwise fail. */ wpt_status wpalClose(void *pPalContext) @@ -122,9 +122,9 @@ wpt_status wpalClose(void *pPalContext) /** * @brief wpalMemoryAllocate - Allocate memory * @param size number of bytes to allocate - * + * * @return void* A pointer to the allocated memory. - * NULL - fail to allocate memory + * NULL - fail to allocate memory */ void *wpalMemoryAllocate(wpt_uint32 size) { @@ -145,7 +145,7 @@ void wpalMemoryFree(void *pv) * @param dest address which data is copied to * @param src address which data is copied from * @param size number of bytes to copy - * + * * @return wpt_status * eWLAN_PAL_STATUS_SUCCESS * eWLAN_PAL_STATUS_INVALID_PARAM @@ -162,7 +162,7 @@ wpt_status wpalMemoryCopy(void * dest, void * src, wpt_uint32 size) * @param buf1 address of buffer1 * @param buf2 address of buffer2 * @param size number of bytes to compare - * + * * @return wpt_boolean * eWLAN_PAL_TRUE - if two buffers have same content * eWLAN_PAL_FALSE - not match @@ -175,7 +175,7 @@ wpt_boolean wpalMemoryCompare(void * buf1, void * buf2, wpt_uint32 size) /*--------------------------------------------------------------------------- wpalMemoryZero - Zero memory - Param: + Param: buf - address of buffer to be zero size - number of bytes to zero Return: @@ -190,7 +190,7 @@ void wpalMemoryZero(void *buf, wpt_uint32 size) * @brief wpalMemoryFill - Fill memory with one pattern * @param buf address of buffer to be filled * @param size number of bytes to fill - * @param bFill one byte of data to fill in (size) bytes from the start of the + * @param bFill one byte of data to fill in (size) bytes from the start of the * buffer */ void wpalMemoryFill(void *buf, wpt_uint32 size, wpt_byte bFill) @@ -202,8 +202,8 @@ void wpalMemoryFill(void *buf, wpt_uint32 size, wpt_byte bFill) * @brief wpalDmaMemoryAllocate - Allocate memory ready for DMA. Aligned at 4-byte * @param size number of bytes to allocate * @param ppPhysicalAddr Physical address of the buffer if allocation succeeds - * - * @return void* A pointer to the allocated memory (virtual address). + * + * @return void* A pointer to the allocated memory (virtual address). * NULL - fail to allocate memory */ void *wpalDmaMemoryAllocate(wpt_uint32 size, void **ppPhysicalAddr) @@ -211,16 +211,16 @@ void *wpalDmaMemoryAllocate(wpt_uint32 size, void **ppPhysicalAddr) void *pv = NULL; dma_addr_t PhyAddr; wpt_uint32 uAllocLen = size + sizeof(tPalDmaMemInfo); - + pv = dma_alloc_coherent(NULL, uAllocLen, &PhyAddr, GFP_KERNEL); - if ( NULL == pv ) + if ( NULL == pv ) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "%s Unable to allocate DMA buffer", __func__); return NULL; } - + ((tPalDmaMemInfo *)pv)->length = uAllocLen; ((tPalDmaMemInfo *)pv)->phyAddr = PhyAddr; ((tPalDmaMemInfo *)pv)->offset = sizeof(tPalDmaMemInfo); @@ -241,7 +241,7 @@ void wpalDmaMemoryFree(void *pv) tPalDmaMemInfo *pMemInfo = (tPalDmaMemInfo *)(((wpt_byte *)pv) - sizeof(tPalDmaMemInfo)); if(pv) - { + { pv = (wpt_byte *)pv - pMemInfo->offset; dma_free_coherent(NULL, pMemInfo->length, pv, pMemInfo->phyAddr); } @@ -249,7 +249,7 @@ void wpalDmaMemoryFree(void *pv) }/*wpalDmaMemoryFree*/ /** - * @brief wpalDbgReadRegister - Read register from the WiFi BB + * @brief wpalDbgReadRegister - Read register from the WiFi BB chip * @param regAddr - register address * @param pregValue - return value from register if success @@ -266,7 +266,7 @@ wpt_status wpalDbgReadRegister(wpt_uint32 regAddr, wpt_uint32 *pregValue) return wpalReadRegister(regAddr, pregValue); } -/** +/** * @brief wpalDbgWriteRegister - Write a value to the register * in the WiFi BB chip Param: * @param regAddr - register address @@ -279,11 +279,11 @@ wpt_status wpalDbgWriteRegister(wpt_uint32 regAddr, wpt_uint32 regValue) return wpalWriteRegister(regAddr, regValue); } -/** - * @brief +/** + * @brief wpalDbgReadMemory - Read memory from WiFi BB chip space - * @param memAddr - address of memory - * @param buf - output + * @param memAddr - address of memory + * @param buf - output * @param len - length to be read * @return eWLAN_PAL_STATUS_SUCCESS - when everything is OK @@ -293,10 +293,10 @@ wpt_status wpalDbgReadMemory(wpt_uint32 memAddr, wpt_uint8 *buf, wpt_uint32 len) return wpalReadDeviceMemory(memAddr, buf, len); } -/** - * @brief +/** + * @brief wpalDbgWriteMemory - Write a value to the memory in the WiFi BB chip space - * @param memAddr - memory address + * @param memAddr - memory address * @param buf - vlaue to be written * @param len - length of buf * @return @@ -310,10 +310,10 @@ wpt_status wpalDbgWriteMemory(wpt_uint32 memAddr, wpt_uint8 *buf, wpt_uint32 len /*--------------------------------------------------------------------------- wpalDriverShutdown - Shutdown WLAN driver - This API is requied by SSR, call in to 'VOS shutdown' to shutdown WLAN + This API is requied by SSR, call in to 'VOS shutdown' to shutdown WLAN driver when Riva crashes. - Param: + Param: None Return: eWLAN_PAL_STATUS_SUCCESS - when everything is OK @@ -324,9 +324,9 @@ wpt_status wpalDriverShutdown(void) vosStatus = vos_wlanShutdown(); if (VOS_STATUS_SUCCESS == vosStatus) { - return eWLAN_PAL_STATUS_SUCCESS; + return eWLAN_PAL_STATUS_SUCCESS; } - return eWLAN_PAL_STATUS_E_FAILURE; + return eWLAN_PAL_STATUS_E_FAILURE; } /*--------------------------------------------------------------------------- @@ -335,7 +335,7 @@ wpt_status wpalDriverShutdown(void) This API is requied by SSR, call in to 'VOS re-init' to re-init WLAN driver. - Param: + Param: None Return: eWLAN_PAL_STATUS_SUCCESS - when everything is OK @@ -346,9 +346,9 @@ wpt_status wpalDriverReInit(void) vosStatus = vos_wlanReInit(); if (VOS_STATUS_SUCCESS == vosStatus) { - return eWLAN_PAL_STATUS_SUCCESS; + return eWLAN_PAL_STATUS_SUCCESS; } - return eWLAN_PAL_STATUS_E_FAILURE; + return eWLAN_PAL_STATUS_E_FAILURE; } /*--------------------------------------------------------------------------- @@ -373,7 +373,7 @@ wpt_status wpalRivaSubystemRestart(void) " SSR will be done at the end of unload", __func__); return eWLAN_PAL_STATUS_E_FAILURE; } - if (0 == subsystem_restart("wcnss")) + if (0 == subsystem_restart("wcnss")) { return eWLAN_PAL_STATUS_SUCCESS; } diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_device.c b/CORE/WDI/WPAL/src/wlan_qct_pal_device.c index ed37c549038e..f6e6058f7a28 100644 --- a/CORE/WDI/WPAL/src/wlan_qct_pal_device.c +++ b/CORE/WDI/WPAL/src/wlan_qct_pal_device.c @@ -26,11 +26,11 @@ */ /**========================================================================= - + @file wlan_qct_pal_device.c - - @brief - + + @brief + This file implements the device specific HW access interface required by the WLAN Platform Abstraction Layer (WPAL) ========================================================================*/ @@ -110,12 +110,12 @@ static wcnss_env *gpEnv = NULL; /** @brief wpalTxIsr is the interrupt service routine which handles the DXE TX Complete interrupt - + wpalTxIsr is registered with the Operating System to handle the DXE TX Complete interrupt during system initialization. When a DXE TX Complete interrupt occurs, it is dispatched to the handler which had previously been registered via wpalRegisterInterrupt. - + @param irq: Enumeration of the interrupt that occurred @param dev_id: User-supplied data passed back via the ISR @@ -139,12 +139,12 @@ static irqreturn_t wpalTxIsr /** @brief wpalRxIsr is the interrupt service routine which handles the DXE RX Available interrupt - + wpalRxIsr is registered with the Operating System to handle the DXE RX Available interrupt during system initalization. When a DXE RX Available interrupt occurs, it is dispatched to the handler which had previously been registered via wpalRegisterInterrupt. - + @param irq: Enumeration of the interrupt that occurred @param dev_id: User-supplied data passed back via the ISR @@ -177,7 +177,7 @@ static irqreturn_t wpalRxIsr Available. This interface provides the mechanism whereby a client can register to support one of these. It is expected that the core DXE implementation will invoke this API twice, once for each interrupt. - + @param intType: Enumeration of the interrupt type (TX or RX) @param callbackFunction: ISR function pointer @param usrCtxt: User context passed back whenever the @@ -248,7 +248,7 @@ wpt_status wpalRegisterInterrupt to un-register for a given interrupt When DXE stop, remove registered information from PAL - + @param intType: Enumeration of the interrupt type (TX or RX) @return NONE @@ -310,7 +310,7 @@ void wpalUnRegisterInterrupt given interrupt to occur. The expectation is that if a given interrupt is not enabled, if the interrupt occurs then the APPS CPU will not be interrupted. - + @param intType: Enumeration of the interrupt type (TX or RX) @return SUCCESS if the interrupt was enabled @@ -321,11 +321,11 @@ wpt_status wpalEnableInterrupt ) { int ret; - - switch (intType) + + switch (intType) { case DXE_INTERRUPT_RX_READY: - if (!gpEnv->rx_registered) + if (!gpEnv->rx_registered) { gpEnv->rx_registered = 1; ret = request_irq(gpEnv->rx_irq, wpalRxIsr, IRQF_TRIGGER_HIGH, @@ -336,8 +336,8 @@ wpt_status wpalEnableInterrupt __func__); break; } - - + + ret = enable_irq_wake(gpEnv->rx_irq); if (ret) { WPAL_TRACE(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR, @@ -352,7 +352,7 @@ wpt_status wpalEnableInterrupt } break; case DXE_INTERRUPT_TX_COMPLE: - if (!gpEnv->tx_registered) + if (!gpEnv->tx_registered) { gpEnv->tx_registered = 1; ret = request_irq(gpEnv->tx_irq, wpalTxIsr, IRQF_TRIGGER_HIGH, @@ -363,8 +363,8 @@ wpt_status wpalEnableInterrupt __func__); break; } - - + + ret = enable_irq_wake(gpEnv->tx_irq); if (ret) { WPAL_TRACE(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR, @@ -399,7 +399,7 @@ wpt_status wpalEnableInterrupt given interrupt to occur. The expectation is that if a given interrupt is not enabled, if the interrupt occurs then the APPS CPU will not be interrupted. - + @param intType: Enumeration of the interrupt type (TX or RX) @return SUCCESS if the interrupt was disabled @@ -409,7 +409,7 @@ wpt_status wpalDisableInterrupt wpt_uint32 intType ) { - switch (intType) + switch (intType) { case DXE_INTERRUPT_RX_READY: disable_irq_nosync(gpEnv->rx_irq); @@ -754,11 +754,11 @@ wpt_status wpalDeviceClose } /** - @brief wpalNotifySmsm provides a mechansim for a client to + @brief wpalNotifySmsm provides a mechansim for a client to notify SMSM to start DXE engine and/or condition of Tx ring buffer - @param clrSt: bit(s) to be cleared on the MASK + @param clrSt: bit(s) to be cleared on the MASK @param setSt: bit(s) to be set on the MASK @return SUCCESS if the operation is successful @@ -771,7 +771,7 @@ wpt_status wpalNotifySmsm { int rc; rc = smsm_change_state(SMSM_APPS_STATE, clrSt, setSt); - if(0 != rc) + if(0 != rc) { WPAL_TRACE(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR, "%s: smsm_change_state failed", @@ -780,4 +780,3 @@ wpt_status wpalNotifySmsm } return eWLAN_PAL_STATUS_SUCCESS; } - diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_msg.c b/CORE/WDI/WPAL/src/wlan_qct_pal_msg.c index 65e22a999cdc..a093584a78ee 100644 --- a/CORE/WDI/WPAL/src/wlan_qct_pal_msg.c +++ b/CORE/WDI/WPAL/src/wlan_qct_pal_msg.c @@ -26,13 +26,13 @@ */ /**========================================================================= - + \file wlan_qct_pal_msg.c - + \brief Implementation message APIs PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform with legacy UMAC support. - + ========================================================================*/ #include "wlan_qct_pal_msg.h" @@ -44,7 +44,7 @@ /*--------------------------------------------------------------------------- wpalPostCtrlMsg - Post a message to control context so it can be processed in that context. - Param: + Param: pPalContext - A PAL context pMsg - a pointer to called allocated opaque object; ---------------------------------------------------------------------------*/ @@ -82,7 +82,7 @@ wpt_status wpalPostCtrlMsg(void *pPalContext, wpt_msg *pMsg) /*--------------------------------------------------------------------------- wpalPostTxMsg - Post a message to TX context so it can be processed in that context. - Param: + Param: pPalContext - A PAL context PAL pMsg - a pointer to called allocated opaque object; ---------------------------------------------------------------------------*/ @@ -119,7 +119,7 @@ wpt_status wpalPostTxMsg(void *pPalContext, wpt_msg *pMsg) /*--------------------------------------------------------------------------- wpalPostRxMsg - Post a message to RX context so it can be processed in that context. - Param: + Param: pPalContext - A PAL context pMsg - a pointer to called allocated opaque object; ---------------------------------------------------------------------------*/ @@ -152,4 +152,3 @@ wpt_status wpalPostRxMsg(void *pPalContext, wpt_msg *pMsg) return status; } - diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c b/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c index f84fe4463487..60f2ed948769 100644 --- a/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c +++ b/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c @@ -28,13 +28,13 @@ /**========================================================================= - + \file wlan_qct_pal_packet.c - + \brief Implementation for PAL packet. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform with VOSS packet support and LA. - + ========================================================================*/ #include "wlan_qct_pal_packet.h" @@ -51,7 +51,7 @@ #define WPAL_ETHERNET_PAKCET_HEADER_SIZE 14 /*Per spec definition - not including QOS field*/ -#define WPAL_802_11_PACKET_HEADER_SIZE 24 +#define WPAL_802_11_PACKET_HEADER_SIZE 24 /*p is a pointer to wpt_packet*/ #define WPAL_TO_VOS_PKT(p) ((vos_pkt_t *)(p)) @@ -91,7 +91,7 @@ wpt_status wpalPacketClose(void *pPalContext) /*--------------------------------------------------------------------------- wpalPacketRXLowResourceCB – RX RAW packer CB function - Param: + Param: pPacket – Available RX packet userData - PAL Client Context, DXE Return: @@ -104,7 +104,7 @@ VOS_STATUS wpalPacketRXLowResourceCB(vos_pkt_t *pPacket, v_VOID_t *userData) if (NULL == pPacket) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "Get new RX PAL packet fail"); return VOS_STATUS_E_FAILURE; } @@ -112,14 +112,14 @@ VOS_STATUS wpalPacketRXLowResourceCB(vos_pkt_t *pPacket, v_VOID_t *userData) VPKT_SIZE_BUFFER ); if(VOS_STATUS_SUCCESS != vosStatus) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "Prepare RX packet for DXE fail"); return VOS_STATUS_E_FAILURE; } if((NULL == wpalPacketAvailableCB) || (NULL == userData)) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "Invalid ARG for new RX packet"); return VOS_STATUS_E_FAILURE; } @@ -133,7 +133,7 @@ VOS_STATUS wpalPacketRXLowResourceCB(vos_pkt_t *pPacket, v_VOID_t *userData) /*--------------------------------------------------------------------------- wpalPacketAlloc – Allocate a wpt_packet from PAL. - Param: + Param: pktType – specify the type of wpt_packet to allocate nPktSize - packet size Return: @@ -153,20 +153,20 @@ wpt_packet * wpalPacketAlloc(wpt_packet_type pktType, wpt_uint32 nPktSize, { case eWLAN_PAL_PKT_TYPE_TX_802_11_MGMT: vosStatus = vos_pkt_get_packet(&pVosPkt, VOS_PKT_TYPE_TX_802_11_MGMT, - nPktSize, 1, VOS_FALSE, + nPktSize, 1, VOS_FALSE, NULL, NULL /*no callback*/); break; case eWLAN_PAL_PKT_TYPE_RX_RAW: vosStatus = vos_pkt_get_packet(&pVosPkt, VOS_PKT_TYPE_RX_RAW, - nPktSize, 1, VOS_FALSE, + nPktSize, 1, VOS_FALSE, wpalPacketRXLowResourceCB, usrData); #ifndef FEATURE_R33D /* Reserve the entire raw rx buffer for DXE */ if( vosStatus == VOS_STATUS_SUCCESS ) { - vosStatus = vos_pkt_reserve_head_fast( pVosPkt, &pData, nPktSize ); + vosStatus = vos_pkt_reserve_head_fast( pVosPkt, &pData, nPktSize ); } else { @@ -187,7 +187,7 @@ wpt_packet * wpalPacketAlloc(wpt_packet_type pktType, wpt_uint32 nPktSize, break; default: - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, " try to allocate unsupported packet type (%d)", pktType); break; } @@ -206,7 +206,7 @@ wpt_packet * wpalPacketAlloc(wpt_packet_type pktType, wpt_uint32 nPktSize, /*--------------------------------------------------------------------------- wpalPacketFree – Free a wpt_packet chain for one particular type. For our legacy UMAC, it is not needed because vos_packet contains pal_packet. - Param: + Param: pPkt – pointer to a wpt_packet Return: eWLAN_PAL_STATUS_SUCCESS - success @@ -227,9 +227,9 @@ wpt_status wpalPacketFree(wpt_packet *pPkt) /*--------------------------------------------------------------------------- - wpalPacketGetLength – Get number of bytes in a wpt_packet. It include the + wpalPacketGetLength – Get number of bytes in a wpt_packet. It include the bytes in a BD if it exist. - Param: + Param: pPkt - pointer to a packet to be freed. Return: Length of the data include layer-2 headers. For example, if the frame @@ -271,7 +271,7 @@ wpt_uint32 wpalPacketGetLength(wpt_packet *pPkt) before the moving. The function can only be used with raw packets, whose buffer is one piece and allocated by WLAN driver. This also reduce the length of the packet. - Param: + Param: pPkt - pointer to a wpt_packet. size – number of bytes to take off the head. Return: @@ -304,7 +304,7 @@ wpt_status wpalPacketRawTrimHead(wpt_packet *pPkt, wpt_uint32 size) /*--------------------------------------------------------------------------- wpalPacketRawTrimTail – reduce the length of the packet. - Param: + Param: pPkt - pointer to a wpt_packet. size – number of bytes to take of the packet length Return: @@ -337,9 +337,9 @@ wpt_status wpalPacketRawTrimTail(wpt_packet *pPkt, wpt_uint32 size) /*--------------------------------------------------------------------------- wpalPacketGetRawBuf – Return the starting buffer virtual address for the RAW flat buffer - It is inline in hope of faster implementation for certain platform. For Winxp, it + It is inline in hope of faster implementation for certain platform. For Winxp, it will be slow. - Param: + Param: pPkt - pointer to a wpt_packet. Return: NULL - fail. @@ -363,17 +363,17 @@ wpt_uint8 *wpalPacketGetRawBuf(wpt_packet *pPkt) { vos_pkt_peek_data(WPAL_TO_VOS_PKT(pPkt), 0, (v_VOID_t**)&pRet, 1); WPAL_ASSERT(NULL != pRet); - } + } return pRet; }/*wpalPacketGetRawBuf*/ /*--------------------------------------------------------------------------- - wpalPacketSetRxLength – Set the valid data length on a RX packet. This function must + wpalPacketSetRxLength – Set the valid data length on a RX packet. This function must be called once per RX packet per receiving. It indicates the available data length from the start of the buffer. - Param: + Param: pPkt - pointer to a wpt_packet. Return: NULL - fail. @@ -392,7 +392,7 @@ wpt_status wpalPacketSetRxLength(wpt_packet *pPkt, wpt_uint32 len) /*Only allowed for RX Raw packets */ if( (eWLAN_PAL_PKT_TYPE_RX_RAW != WPAL_PACKET_GET_TYPE(pPkt))) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "%s Invalid packet type(%d)", __func__, WPAL_PACKET_GET_TYPE(pPkt)); return eWLAN_PAL_STATUS_E_INVAL; @@ -419,14 +419,14 @@ WPT_STATIC WPT_INLINE void* itGetOSPktAddrForDevice( wpt_packet *pPacket ) { struct sk_buff *skb; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - if ( VOS_STATUS_SUCCESS != + if ( VOS_STATUS_SUCCESS != vos_pkt_get_os_packet(WPAL_TO_VOS_PKT(pPacket), (void**)&skb, VOS_FALSE )) { return NULL; } else { - /*Map skb data into dma-able memory + /*Map skb data into dma-able memory (changes will be commited from cache) */ return (void*)dma_map_single( NULL, skb->data, skb->len, DMA_TO_DEVICE ); } @@ -437,14 +437,14 @@ WPT_STATIC WPT_INLINE void* itGetOSPktAddrFromDevice( wpt_packet *pPacket ) struct sk_buff *skb; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - if ( VOS_STATUS_SUCCESS != + if ( VOS_STATUS_SUCCESS != vos_pkt_get_os_packet(WPAL_TO_VOS_PKT(pPacket), (void**)&skb, VOS_FALSE )) { return NULL; } else { - /*Map skb data into dma-able memory + /*Map skb data into dma-able memory (changes will be commited from cache) */ return (void*)dma_map_single( NULL, skb->data, skb->len, DMA_FROM_DEVICE ); } @@ -456,20 +456,20 @@ WPT_STATIC WPT_INLINE void* itGetOSPktAddrFromDevice( wpt_packet *pPacket ) */ WPT_STATIC WPT_INLINE void itReturnOSPktAddrForDevice( wpt_packet *pPacket, void* addr, wpt_uint32 size ) { - + dma_unmap_single( NULL, (dma_addr_t)addr, size, DMA_TO_DEVICE ); } WPT_STATIC WPT_INLINE void itReturnOSPktAddrFromDevice( wpt_packet *pPacket, void* addr, wpt_uint32 size ) { - dma_unmap_single( NULL, (dma_addr_t)addr, size, DMA_FROM_DEVICE ); + dma_unmap_single( NULL, (dma_addr_t)addr, size, DMA_FROM_DEVICE ); } /*--------------------------------------------------------------------------- wpalIteratorInit – Initialize an interator by updating pCur to first item. - Param: + Param: pIter – pointer to a caller allocated wpt_iterator pPacket – pointer to a wpt_packet Return: @@ -522,9 +522,9 @@ wpt_status wpalIteratorInit(wpt_iterator *pIter, wpt_packet *pPacket) pCurInfo->uLen = WPAL_PACKET_GET_BD_LENGTH(pPacket); pNextInfo = pPktInfo; - } + } - pIter->pCur = (void*)pCurInfo; + pIter->pCur = (void*)pCurInfo; pIter->pNext = (void*)pNextInfo; pIter->pContext = NULL; @@ -533,7 +533,7 @@ wpt_status wpalIteratorInit(wpt_iterator *pIter, wpt_packet *pPacket) /*--------------------------------------------------------------------------- wpalIteratorNext – Get the address for the next item - Param: + Param: pIter – pointer to a caller allocated wpt_iterator pPacket – pointer to a wpt_packet ppAddr – Caller allocated pointer to return the address of the item. @@ -546,50 +546,50 @@ wpt_status wpalIteratorNext(wpt_iterator *pIter, wpt_packet *pPacket, void **ppA { wpt_iterator_info* pCurInfo = NULL; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ - + /*------------------------------------------------------------------------- Sanity check -------------------------------------------------------------------------*/ - if (unlikely(( NULL == pIter )||( NULL == pPacket ) || + if (unlikely(( NULL == pIter )||( NULL == pPacket ) || ( NULL == ppAddr ) || ( NULL == pLen ))) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "%s Invalid input parameters", __func__ ); return eWLAN_PAL_STATUS_E_INVAL; } - pCurInfo = (wpt_iterator_info*)pIter->pCur; + pCurInfo = (wpt_iterator_info*)pIter->pCur; /*------------------------------------------------------------------------- If current pointer is NULL - there is no data in the packet - return -------------------------------------------------------------------------*/ if( pIter->pCur == NULL ) { - *ppAddr = NULL; + *ppAddr = NULL; *pLen = 0; return eWLAN_PAL_STATUS_SUCCESS; } /*Address and length are kept in the current field*/ - *ppAddr = pCurInfo->pPhyAddr; + *ppAddr = pCurInfo->pPhyAddr; *pLen = pCurInfo->uLen; - + if( NULL == pIter->pNext ) { /*Save the iterator for cleanup*/ - pPacket->pInternalData = pIter->pCur; - pIter->pCur = NULL; + pPacket->pInternalData = pIter->pCur; + pIter->pCur = NULL; } else { /*Release the memory saved for storing the BD information*/ - wpalMemoryFree(pCurInfo); - - /*For LA - the packet is represented by maximum 2 fields of data + wpalMemoryFree(pCurInfo); + + /*For LA - the packet is represented by maximum 2 fields of data - BD and actual data from sk buff */ pIter->pCur = pIter->pNext; pIter->pNext = NULL; } - + return eWLAN_PAL_STATUS_SUCCESS; } @@ -597,10 +597,10 @@ wpt_status wpalIteratorNext(wpt_iterator *pIter, wpt_packet *pPacket, void **ppA wpalLockPacketForTransfer – Map the data buffer from dma so that the data is commited from cache and the cpu relinquishes ownership of the buffer - - Param: + + Param: pPacket – pointer to a wpt_packet - + Return: eWLAN_PAL_STATUS_SUCCESS - success ---------------------------------------------------------------------------*/ @@ -624,9 +624,9 @@ wpt_status wpalLockPacketForTransfer( wpt_packet *pPacket) rest of the frame is also in raw buffer */ case eWLAN_PAL_PKT_TYPE_TX_802_11_MGMT: { - /*TX Packets need to be DMA-ed to the device, perform DMA mapping + /*TX Packets need to be DMA-ed to the device, perform DMA mapping accordingly */ - pPhyData = (void*)itGetOSPktAddrForDevice( pPacket ); + pPhyData = (void*)itGetOSPktAddrForDevice( pPacket ); } break; /* Data packets - BD (allocated by WDI), header (in VOSS header), @@ -634,7 +634,7 @@ wpt_status wpalLockPacketForTransfer( wpt_packet *pPacket) case eWLAN_PAL_PKT_TYPE_TX_802_11_DATA: case eWLAN_PAL_PKT_TYPE_TX_802_3_DATA: { - /*TX Packets need to be DMA-ed to the device, perform DMA mapping + /*TX Packets need to be DMA-ed to the device, perform DMA mapping accordingly */ pPhyData = (void*)itGetOSPktAddrForDevice( pPacket ); } @@ -644,7 +644,7 @@ wpt_status wpalLockPacketForTransfer( wpt_packet *pPacket) buffer */ case eWLAN_PAL_PKT_TYPE_RX_RAW: { - /*RX Packets need to be DMA-ed from the device, perform DMA mapping + /*RX Packets need to be DMA-ed from the device, perform DMA mapping accordingly */ pPhyData = (void*)itGetOSPktAddrFromDevice( pPacket ); } @@ -652,10 +652,10 @@ wpt_status wpalLockPacketForTransfer( wpt_packet *pPacket) default: { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - " WLAN_PAL: %s: Invalid packet type %d!", __func__, - WPAL_PACKET_GET_TYPE(pPacket) ); - WPAL_ASSERT(0); + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + " WLAN_PAL: %s: Invalid packet type %d!", __func__, + WPAL_PACKET_GET_TYPE(pPacket) ); + WPAL_ASSERT(0); return eWLAN_PAL_STATUS_E_FAILURE; } } @@ -684,9 +684,9 @@ wpt_status wpalLockPacketForTransfer( wpt_packet *pPacket) /*--------------------------------------------------------------------------- wpalUnlockPacket – Unmap the data buffer from dma so that cpu can regain ownership on it - Param: + Param: pPacket – pointer to a wpt_packet - + Return: eWLAN_PAL_STATUS_SUCCESS - success ---------------------------------------------------------------------------*/ @@ -719,9 +719,9 @@ wpt_status wpalUnlockPacket( wpt_packet *pPacket) rest of the frame is also in raw buffer */ case eWLAN_PAL_PKT_TYPE_TX_802_11_MGMT: { - /*TX Packets need to be DMA-ed to the device, perform DMA mapping + /*TX Packets need to be DMA-ed to the device, perform DMA mapping accordingly */ - itReturnOSPktAddrForDevice(pPacket, pInfo->pPhyAddr, pInfo->uLen); + itReturnOSPktAddrForDevice(pPacket, pInfo->pPhyAddr, pInfo->uLen); } break; /* Data packets - BD (allocated by WDI), header (in VOSS header), @@ -729,9 +729,9 @@ wpt_status wpalUnlockPacket( wpt_packet *pPacket) case eWLAN_PAL_PKT_TYPE_TX_802_11_DATA: case eWLAN_PAL_PKT_TYPE_TX_802_3_DATA: { - /*TX Packets need to be DMA-ed to the device, perform DMA mapping + /*TX Packets need to be DMA-ed to the device, perform DMA mapping accordingly */ - itReturnOSPktAddrForDevice(pPacket, pInfo->pPhyAddr, pInfo->uLen); + itReturnOSPktAddrForDevice(pPacket, pInfo->pPhyAddr, pInfo->uLen); } break; @@ -739,26 +739,26 @@ wpt_status wpalUnlockPacket( wpt_packet *pPacket) buffer */ case eWLAN_PAL_PKT_TYPE_RX_RAW: { - /*RX Packets need to be DMA-ed from the device, perform DMA mapping + /*RX Packets need to be DMA-ed from the device, perform DMA mapping accordingly */ if(NULL == pInfo->pPhyAddr) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - " WLAN_PAL: %s: RX frame was not locked properly", __func__); + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + " WLAN_PAL: %s: RX frame was not locked properly", __func__); } else { - itReturnOSPktAddrFromDevice(pPacket, pInfo->pPhyAddr, pInfo->uLen); + itReturnOSPktAddrFromDevice(pPacket, pInfo->pPhyAddr, pInfo->uLen); } } break; default: { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - " WLAN_PAL: %s: Invalid packet type %d!", __func__, - WPAL_PACKET_GET_TYPE(pPacket) ); - WPAL_ASSERT(0); + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + " WLAN_PAL: %s: Invalid packet type %d!", __func__, + WPAL_PACKET_GET_TYPE(pPacket) ); + WPAL_ASSERT(0); return eWLAN_PAL_STATUS_E_FAILURE; } } @@ -770,9 +770,9 @@ wpt_status wpalUnlockPacket( wpt_packet *pPacket) /*--------------------------------------------------------------------------- wpalIsPacketLocked – Check whether the Packet is locked for DMA. - Param: + Param: pPacket – pointer to a wpt_packet - + Return: eWLAN_PAL_STATUS_SUCCESS eWLAN_PAL_STATUS_E_FAILURE @@ -793,7 +793,7 @@ wpt_status wpalIsPacketLocked( wpt_packet *pPacket) /* Validate pInternalData */ pInfo = (wpt_iterator_info*)pPacket->pInternalData; - return (NULL == pInfo)? eWLAN_PAL_STATUS_E_FAILURE : + return (NULL == pInfo)? eWLAN_PAL_STATUS_E_FAILURE : eWLAN_PAL_STATUS_SUCCESS; }/*wpalIsPacketLocked*/ diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_sync.c b/CORE/WDI/WPAL/src/wlan_qct_pal_sync.c index d7aa22d67df9..0615d49a0e8d 100644 --- a/CORE/WDI/WPAL/src/wlan_qct_pal_sync.c +++ b/CORE/WDI/WPAL/src/wlan_qct_pal_sync.c @@ -28,13 +28,13 @@ /**========================================================================= - + \file wlan_qct_pal_sync.c - + \brief Implementation trace/logging APIs PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform Windows and with legacy UMAC. - + ========================================================================*/ #include "wlan_qct_pal_sync.h" @@ -59,7 +59,7 @@ wpt_status wpalMutexInit(wpt_mutex *pMutex) if( vos_lock_init( (vos_lock_t*)pMutex ) != VOS_STATUS_SUCCESS ) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, " mutex init fail"); return eWLAN_PAL_STATUS_E_FAILURE; } @@ -80,7 +80,7 @@ wpt_status wpalMutexDelete(wpt_mutex *pMutex) if( vos_lock_destroy( (vos_lock_t*)pMutex ) != VOS_STATUS_SUCCESS ) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, " mutex delete fail"); return eWLAN_PAL_STATUS_E_FAILURE; } @@ -101,7 +101,7 @@ wpt_status wpalMutexAcquire(wpt_mutex *pMutex) if( vos_lock_acquire( (vos_lock_t*)pMutex ) != VOS_STATUS_SUCCESS ) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, " mutex acquire fail"); return eWLAN_PAL_STATUS_E_FAILURE; } @@ -122,7 +122,7 @@ wpt_status wpalMutexRelease(wpt_mutex *pMutex) if( vos_lock_release( (vos_lock_t*)pMutex ) != VOS_STATUS_SUCCESS ) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, " mutex release"); return eWLAN_PAL_STATUS_E_FAILURE; } @@ -143,7 +143,7 @@ wpt_status wpalEventInit(wpt_event *pEvent) if( vos_event_init( (vos_event_t*)pEvent ) != VOS_STATUS_SUCCESS ) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, " create event fail"); return eWLAN_PAL_STATUS_E_FAILURE; } @@ -165,7 +165,7 @@ wpt_status wpalEventDelete(wpt_event *pEvent) if( vos_event_destroy( (vos_event_t*)pEvent ) != VOS_STATUS_SUCCESS ) { - WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, + WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, " delete event fail"); return eWLAN_PAL_STATUS_E_FAILURE; } @@ -178,25 +178,25 @@ wpt_status wpalEventDelete(wpt_event *pEvent) \param pEvent – a pointer to caller allocated object of wpt_event - timeout - timeout value at unit of milli-seconds. + timeout - timeout value at unit of milli-seconds. 0xffffffff means infinite wait \return eWLAN_PAL_STATUS_SUCCESS - the wait was satisifed by one of the events - in the event array being set. The index into the event arry + in the event array being set. The index into the event arry that satisfied the wait can be found at *pEventIndex. - - eWLAN_PALSTATUS_E_TIMEOUT - the timeout interval elapsed before any of + + eWLAN_PALSTATUS_E_TIMEOUT - the timeout interval elapsed before any of the events were set. - + eWLAN_PAL_STATUS_E_INVAL - At least one of the values specified in the event array refers to an uninitialized event object. The invalid event is identified by the index in *pEventIndex. Note that only the first uninitialized event is detected when this error is returned. - + eWLAN_PAL_STATUS_E_EMPTY - the events array is empty. This condition is detected by numEvents being 0 on input. - + eWLAN_PAL_STATUS_E_FAULT - event or pEventIndex is an invalid pointer. ---------------------------------------------------------------------------*/ wpt_status wpalEventWait(wpt_event *pEvent, wpt_uint32 timeout) @@ -243,5 +243,3 @@ wpt_status wpalEventReset(wpt_event *pEvent) return ( WPAL_VOS_TO_WPAL_STATUS(vos_event_reset( (vos_event_t*)pEvent )) ); } - - diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_timer.c b/CORE/WDI/WPAL/src/wlan_qct_pal_timer.c index c29b7a2a7b6a..503d41a504a5 100644 --- a/CORE/WDI/WPAL/src/wlan_qct_pal_timer.c +++ b/CORE/WDI/WPAL/src/wlan_qct_pal_timer.c @@ -26,13 +26,13 @@ */ /**========================================================================= - + \file wlan_qct_pal_timer.c - + \brief Implementation trace/logging APIs PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for platform Windows. - + ========================================================================*/ #include "wlan_qct_pal_timer.h" @@ -83,7 +83,7 @@ wpt_status wpalTimerInit(wpt_timer * pTimer, wpal_timer_callback callback, void return eWLAN_PAL_STATUS_E_INVAL; } - if ( vos_timer_init( &pTimer->timer.timerObj, VOS_TIMER_TYPE_SW, + if ( vos_timer_init( &pTimer->timer.timerObj, VOS_TIMER_TYPE_SW, wpalTimerCback, (void*)pTimer ) == VOS_STATUS_SUCCESS ) { pTimer->callback = callback; diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c b/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c index fcabbdf9130c..35f8b16ecb4b 100644 --- a/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c +++ b/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c @@ -28,13 +28,13 @@ /**========================================================================= - + \file wlan_qct_pal_trace.c - + \brief Implementation trace/logging APIs PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) - + Definitions for Linux/Android platform - + ========================================================================*/ #include "wlan_qct_pal_trace.h" @@ -75,10 +75,10 @@ typedef struct // the 3 character 'name' of the module for marking the trace logs. moduleTraceInfo gTraceInfo[ eWLAN_MODULE_COUNT ] = { - { (1<