qcacld-3.0: Add QDF list API's

Replace CDF list API's with QDF list API's

Change-Id: Id7a3ec93fe6821450ef70e50649af8a4de285eeb
CRs-Fixed: 981188
This commit is contained in:
Anurag Chouhan 2016-02-17 14:33:03 +05:30 • committed by Gerrit - the friendly Code Review server
commit ffb2154eff
20 changed files with 211 additions and 560 deletions

View file

@ -1,113 +0,0 @@
/*
* Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* This file was originally distributed by Qualcomm Atheros, Inc.
* under proprietary terms before Copyright ownership was assigned
* to the Linux Foundation.
*/
#if !defined(__CDF_LIST_H)
#define __CDF_LIST_H
/**
* DOC: cdf_list.h
*
* Connectivity driver framework (CDF) list APIs
*
* Definitions for CDF Linked Lists API
*
* Lists are implemented as a doubly linked list. An item in a list can
* be of any type as long as the datatype contains a field of type
* cdf_link_t.
*
* In general, a list is a doubly linked list of items with a pointer
* to the front of the list and a pointer to the end of the list. The
* list items contain a forward and back link.
*
* CDF linked list APIs are NOT thread safe so make sure to use appropriate
* locking mechanisms to assure operations on the list are thread safe.
*/
/* Include Files */
#include <cdf_types.h>
#include <cdf_status.h>
#include <qdf_status.h>
#include <cdf_trace.h>
#include <linux/list.h>
/* Preprocessor definitions and constants */
/* Type declarations */
typedef struct list_head cdf_list_node_t;
typedef struct cdf_list_s {
cdf_list_node_t anchor;
uint32_t count;
uint32_t max_size;
} cdf_list_t;
/* Function declarations */
CDF_INLINE_FN void cdf_list_init(cdf_list_t *p_list, uint32_t max_size)
{
INIT_LIST_HEAD(&p_list->anchor);
p_list->count = 0;
p_list->max_size = max_size;
}
CDF_INLINE_FN void cdf_list_destroy(cdf_list_t *p_list)
{
if (p_list->count != 0) {
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
"%s: list length not equal to zero", __func__);
CDF_ASSERT(0);
}
}
CDF_INLINE_FN void cdf_list_size(cdf_list_t *p_list, uint32_t *p_size)
{
*p_size = p_list->count;
}
CDF_STATUS cdf_list_insert_front(cdf_list_t *p_list, cdf_list_node_t *p_node);
CDF_STATUS cdf_list_insert_back(cdf_list_t *p_list, cdf_list_node_t *p_node);
CDF_STATUS cdf_list_insert_back_size(cdf_list_t *p_list,
cdf_list_node_t *p_node, uint32_t *p_size);
CDF_STATUS cdf_list_remove_front(cdf_list_t *p_list, cdf_list_node_t **pp_node);
CDF_STATUS cdf_list_remove_back(cdf_list_t *p_list, cdf_list_node_t **pp_node);
CDF_STATUS cdf_list_peek_front(cdf_list_t *p_list, cdf_list_node_t **pp_node);
CDF_STATUS cdf_list_peek_next(cdf_list_t *p_list, cdf_list_node_t *p_node,
cdf_list_node_t **pp_node);
CDF_STATUS cdf_list_remove_node(cdf_list_t *p_list,
cdf_list_node_t *p_node_to_remove);
bool cdf_list_empty(cdf_list_t *list);
#endif /* __CDF_LIST_H */

View file

@ -42,7 +42,7 @@
#include <i_cdf_mc_timer.h>
#ifdef TIMER_MANAGER
#include <cdf_list.h>
#include <qdf_list.h>
#endif
/* Preprocessor definitions and constants */
@ -65,7 +65,7 @@ typedef enum {
#ifdef TIMER_MANAGER
struct cdf_mc_timer_s;
typedef struct cdf_mc_timer_node_s {
cdf_list_node_t pNode;
qdf_list_node_t pNode;
char *fileName;
unsigned int lineNum;
struct cdf_mc_timer_s *cdf_timer;

View file

@ -1,236 +0,0 @@
/*
* Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* This file was originally distributed by Qualcomm Atheros, Inc.
* under proprietary terms before Copyright ownership was assigned
* to the Linux Foundation.
*/
/**
* DOC: cdf_list.c
*
* Connectivity driver framework list manipulation APIs. CDF linked list
* APIs are NOT thread safe so make sure to use appropriate locking mechanisms
* to assure operations on the list are thread safe.
*/
/* Include files */
#include <cdf_list.h>
#include <cdf_trace.h>
/* Preprocessor definitions and constants */
/* Type declarations */
/* Function declarations and documenation */
/**
* cdf_list_insert_front() - insert input node at front of the list
* @pList: Pointer to list
* @pNode: Pointer to input node
*
* Return: CDF status
*/
CDF_STATUS cdf_list_insert_front(cdf_list_t *pList, cdf_list_node_t *pNode)
{
list_add(pNode, &pList->anchor);
pList->count++;
return CDF_STATUS_SUCCESS;
}
/**
* cdf_list_insert_back() - insert input node at back of the list
* @pList: Pointer to list
* @pNode: Pointer to input node
*
* Return: CDF status
*/
CDF_STATUS cdf_list_insert_back(cdf_list_t *pList, cdf_list_node_t *pNode)
{
list_add_tail(pNode, &pList->anchor);
pList->count++;
return CDF_STATUS_SUCCESS;
}
/**
* cdf_list_insert_back_size() - insert input node at back of list and save
* list size
* @pList: Pointer to list
* @pNode: Pointer to input node
* @pSize: Pointer to store list size
*
* Return: CDF status
*/
CDF_STATUS cdf_list_insert_back_size(cdf_list_t *pList,
cdf_list_node_t *pNode, uint32_t *pSize)
{
list_add_tail(pNode, &pList->anchor);
pList->count++;
*pSize = pList->count;
return CDF_STATUS_SUCCESS;
}
/**
* cdf_list_remove_front() - remove node from front of the list
* @pList: Pointer to list
* @ppNode: Double pointer to store the node which is removed from list
*
* Return: CDF status
*/
CDF_STATUS cdf_list_remove_front(cdf_list_t *pList, cdf_list_node_t **ppNode)
{
struct list_head *listptr;
if (list_empty(&pList->anchor))
return CDF_STATUS_E_EMPTY;
listptr = pList->anchor.next;
*ppNode = listptr;
list_del(pList->anchor.next);
pList->count--;
return CDF_STATUS_SUCCESS;
}
/**
* cdf_list_remove_back() - remove node from end of the list
* @pList: Pointer to list
* @ppNode: Double pointer to store node which is removed from list
*
* Return: CDF status
*/
CDF_STATUS cdf_list_remove_back(cdf_list_t *pList, cdf_list_node_t **ppNode)
{
struct list_head *listptr;
if (list_empty(&pList->anchor))
return CDF_STATUS_E_EMPTY;
listptr = pList->anchor.prev;
*ppNode = listptr;
list_del(pList->anchor.prev);
pList->count--;
return CDF_STATUS_SUCCESS;
}
/**
* cdf_list_remove_node() - remove input node from list
* @pList: Pointer to list
* @pNodeToRemove: Pointer to node which needs to be removed
*
* Return: CDF status
*/
CDF_STATUS cdf_list_remove_node(cdf_list_t *pList,
cdf_list_node_t *pNodeToRemove)
{
cdf_list_node_t *tmp;
int found = 0;
if (list_empty(&pList->anchor))
return CDF_STATUS_E_EMPTY;
/* verify that pNodeToRemove is indeed part of list pList */
list_for_each(tmp, &pList->anchor) {
if (tmp == pNodeToRemove) {
found = 1;
break;
}
}
if (found == 0)
return CDF_STATUS_E_INVAL;
list_del(pNodeToRemove);
pList->count--;
return CDF_STATUS_SUCCESS;
}
/**
* cdf_list_peek_front() - peek front node from list
* @pList: Pointer to list
* @ppNode: Double pointer to store peeked node pointer
*
* Return: CDF status
*/
CDF_STATUS cdf_list_peek_front(cdf_list_t *pList, cdf_list_node_t **ppNode)
{
struct list_head *listptr;
if (list_empty(&pList->anchor))
return CDF_STATUS_E_EMPTY;
listptr = pList->anchor.next;
*ppNode = listptr;
return CDF_STATUS_SUCCESS;
}
/**
* cdf_list_peek_next() - peek next node of input node in the list
* @pList: Pointer to list
* @pNode: Pointer to input node
* @ppNode: Double pointer to store peeked node pointer
*
* Return: CDF status
*/
CDF_STATUS cdf_list_peek_next(cdf_list_t *pList, cdf_list_node_t *pNode,
cdf_list_node_t **ppNode)
{
struct list_head *listptr;
int found = 0;
cdf_list_node_t *tmp;
if ((pList == NULL) || (pNode == NULL) || (ppNode == NULL))
return CDF_STATUS_E_FAULT;
if (list_empty(&pList->anchor))
return CDF_STATUS_E_EMPTY;
/* verify that pNode is indeed part of list pList */
list_for_each(tmp, &pList->anchor) {
if (tmp == pNode) {
found = 1;
break;
}
}
if (found == 0)
return CDF_STATUS_E_INVAL;
listptr = pNode->next;
if (listptr == &pList->anchor)
return CDF_STATUS_E_EMPTY;
*ppNode = listptr;
return CDF_STATUS_SUCCESS;
}
/**
* cdf_list_empty() - check if the list is empty
* @list: pointer to the list
*
* Return: true if the list is empty and false otherwise.
*/
bool cdf_list_empty(cdf_list_t *list)
{
return list_empty(&list->anchor);
}

View file

@ -233,7 +233,7 @@ void cdf_timer_module_init(void)
#ifdef TIMER_MANAGER
cdf_list_t cdf_timer_list;
qdf_list_t cdf_timer_list;
cdf_spinlock_t cdf_timer_list_lock;
static void cdf_timer_clean(void);
@ -247,7 +247,7 @@ static void cdf_timer_clean(void);
*/
void cdf_mc_timer_manager_init(void)
{
cdf_list_init(&cdf_timer_list, 1000);
qdf_list_create(&cdf_timer_list, 1000);
cdf_spinlock_init(&cdf_timer_list_lock);
return;
}
@ -264,11 +264,11 @@ static void cdf_timer_clean(void)
{
uint32_t listSize;
cdf_list_size(&cdf_timer_list, &listSize);
listSize = qdf_list_size(&cdf_timer_list);
if (listSize) {
cdf_list_node_t *pNode;
CDF_STATUS cdf_status;
qdf_list_node_t *pNode;
QDF_STATUS qdf_status;
cdf_mc_timer_node_t *ptimerNode;
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
@ -277,10 +277,10 @@ static void cdf_timer_clean(void)
do {
cdf_spin_lock_irqsave(&cdf_timer_list_lock);
cdf_status =
cdf_list_remove_front(&cdf_timer_list, &pNode);
qdf_status =
qdf_list_remove_front(&cdf_timer_list, &pNode);
cdf_spin_unlock_irqrestore(&cdf_timer_list_lock);
if (CDF_STATUS_SUCCESS == cdf_status) {
if (QDF_STATUS_SUCCESS == qdf_status) {
ptimerNode = (cdf_mc_timer_node_t *) pNode;
CDF_TRACE(CDF_MODULE_ID_CDF,
CDF_TRACE_LEVEL_FATAL,
@ -289,7 +289,7 @@ static void cdf_timer_clean(void)
(int)ptimerNode->lineNum);
cdf_mem_free(ptimerNode);
}
} while (cdf_status == CDF_STATUS_SUCCESS);
} while (qdf_status == QDF_STATUS_SUCCESS);
}
}
@ -303,7 +303,7 @@ static void cdf_timer_clean(void)
void cdf_mc_timer_exit(void)
{
cdf_timer_clean();
cdf_list_destroy(&cdf_timer_list);
qdf_list_destroy(&cdf_timer_list);
}
#endif
@ -345,7 +345,7 @@ CDF_STATUS cdf_mc_timer_init_debug(cdf_mc_timer_t *timer,
void *userData, char *fileName,
uint32_t lineNum)
{
CDF_STATUS cdf_status;
QDF_STATUS qdf_status;
/* check for invalid pointer */
if ((timer == NULL) || (callback == NULL)) {
@ -372,13 +372,13 @@ CDF_STATUS cdf_mc_timer_init_debug(cdf_mc_timer_t *timer,
timer->ptimerNode->cdf_timer = timer;
cdf_spin_lock_irqsave(&cdf_timer_list_lock);
cdf_status = cdf_list_insert_front(&cdf_timer_list,
qdf_status = qdf_list_insert_front(&cdf_timer_list,
&timer->ptimerNode->pNode);
cdf_spin_unlock_irqrestore(&cdf_timer_list_lock);
if (CDF_STATUS_SUCCESS != cdf_status) {
if (QDF_STATUS_SUCCESS != qdf_status) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: Unable to insert node into List cdf_status %d",
__func__, cdf_status);
__func__, qdf_status);
}
/* set the various members of the timer structure
@ -458,7 +458,7 @@ CDF_STATUS cdf_mc_timer_init(cdf_mc_timer_t *timer, CDF_TIMER_TYPE timerType,
#ifdef TIMER_MANAGER
CDF_STATUS cdf_mc_timer_destroy(cdf_mc_timer_t *timer)
{
CDF_STATUS vStatus = CDF_STATUS_SUCCESS;
QDF_STATUS status = QDF_STATUS_SUCCESS;
unsigned long flags;
/* check for invalid pointer */
@ -478,12 +478,12 @@ CDF_STATUS cdf_mc_timer_destroy(cdf_mc_timer_t *timer)
}
cdf_spin_lock_irqsave(&cdf_timer_list_lock);
vStatus = cdf_list_remove_node(&cdf_timer_list,
status = qdf_list_remove_node(&cdf_timer_list,
&timer->ptimerNode->pNode);
cdf_spin_unlock_irqrestore(&cdf_timer_list_lock);
if (vStatus != CDF_STATUS_SUCCESS) {
if (status != QDF_STATUS_SUCCESS) {
CDF_ASSERT(0);
return CDF_STATUS_E_INVAL;
return QDF_STATUS_E_INVAL;
}
cdf_mem_free(timer->ptimerNode);
@ -492,32 +492,32 @@ CDF_STATUS cdf_mc_timer_destroy(cdf_mc_timer_t *timer)
switch (timer->state) {
case CDF_TIMER_STATE_STARTING:
vStatus = CDF_STATUS_E_BUSY;
status = QDF_STATUS_E_BUSY;
break;
case CDF_TIMER_STATE_RUNNING:
/* Stop the timer first */
del_timer(&(timer->platformInfo.Timer));
vStatus = CDF_STATUS_SUCCESS;
status = QDF_STATUS_SUCCESS;
break;
case CDF_TIMER_STATE_STOPPED:
vStatus = CDF_STATUS_SUCCESS;
status = QDF_STATUS_SUCCESS;
break;
case CDF_TIMER_STATE_UNUSED:
vStatus = CDF_STATUS_E_ALREADY;
status = QDF_STATUS_E_ALREADY;
break;
default:
vStatus = CDF_STATUS_E_FAULT;
status = QDF_STATUS_E_FAULT;
break;
}
if (CDF_STATUS_SUCCESS == vStatus) {
if (QDF_STATUS_SUCCESS == status) {
timer->platformInfo.cookie = LINUX_INVALID_TIMER_COOKIE;
timer->state = CDF_TIMER_STATE_UNUSED;
spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags);
return vStatus;
return status;
}
spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags);
@ -527,7 +527,7 @@ CDF_STATUS cdf_mc_timer_destroy(cdf_mc_timer_t *timer)
timer->state);
CDF_ASSERT(0);
return vStatus;
return status;
}
#else

View file

@ -47,10 +47,10 @@
#endif
#ifdef MEMORY_DEBUG
#include <cdf_list.h>
#include <qdf_list.h>
#include <linux/stacktrace.h>
cdf_list_t cdf_mem_list;
qdf_list_t cdf_mem_list;
cdf_spinlock_t cdf_mem_list_lock;
static uint8_t WLAN_MEM_HEADER[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
@ -61,7 +61,7 @@ static uint8_t WLAN_MEM_TAIL[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85,
#define CDF_MEM_MAX_STACK_TRACE 16
struct s_cdf_mem_struct {
cdf_list_node_t pNode;
qdf_list_node_t pNode;
char *fileName;
unsigned int lineNum;
unsigned int size;
@ -136,7 +136,7 @@ static inline void cdf_mem_print_stack_trace(struct s_cdf_mem_struct
void cdf_mem_init(void)
{
/* Initalizing the list with maximum size of 60000 */
cdf_list_init(&cdf_mem_list, 60000);
qdf_list_create(&cdf_mem_list, 60000);
cdf_spinlock_init(&cdf_mem_list_lock);
cdf_net_buf_debug_init();
return;
@ -150,13 +150,13 @@ void cdf_mem_init(void)
void cdf_mem_clean(void)
{
uint32_t listSize;
cdf_list_size(&cdf_mem_list, &listSize);
listSize = qdf_list_size(&cdf_mem_list);
cdf_net_buf_debug_clean();
if (listSize) {
cdf_list_node_t *pNode;
CDF_STATUS cdf_status;
qdf_list_node_t *pNode;
QDF_STATUS qdf_status;
struct s_cdf_mem_struct *memStruct;
char *prev_mleak_file = "";
@ -170,10 +170,10 @@ void cdf_mem_clean(void)
do {
cdf_spin_lock(&cdf_mem_list_lock);
cdf_status =
cdf_list_remove_front(&cdf_mem_list, &pNode);
qdf_status =
qdf_list_remove_front(&cdf_mem_list, &pNode);
cdf_spin_unlock(&cdf_mem_list_lock);
if (CDF_STATUS_SUCCESS == cdf_status) {
if (QDF_STATUS_SUCCESS == qdf_status) {
memStruct = (struct s_cdf_mem_struct *)pNode;
/* Take care to log only once multiple memory
leaks from the same place */
@ -199,7 +199,7 @@ void cdf_mem_clean(void)
cdf_mem_print_stack_trace(memStruct);
kfree((void *)memStruct);
}
} while (cdf_status == CDF_STATUS_SUCCESS);
} while (qdf_status == QDF_STATUS_SUCCESS);
/* Print last memory leak from the module */
if (mleak_cnt) {
@ -223,7 +223,7 @@ void cdf_mem_exit(void)
{
cdf_net_buf_debug_exit();
cdf_mem_clean();
cdf_list_destroy(&cdf_mem_list);
qdf_list_destroy(&cdf_mem_list);
}
/**
@ -288,7 +288,7 @@ void *cdf_mem_malloc_debug(size_t size, char *fileName, uint32_t lineNum)
size, (void *)_RET_IP_, lineNum);
if (memStruct != NULL) {
CDF_STATUS cdf_status;
QDF_STATUS qdf_status;
memStruct->fileName = fileName;
memStruct->lineNum = lineNum;
@ -302,13 +302,13 @@ void *cdf_mem_malloc_debug(size_t size, char *fileName, uint32_t lineNum)
&WLAN_MEM_TAIL[0], sizeof(WLAN_MEM_TAIL));
cdf_spin_lock_irqsave(&cdf_mem_list_lock);
cdf_status = cdf_list_insert_front(&cdf_mem_list,
qdf_status = qdf_list_insert_front(&cdf_mem_list,
&memStruct->pNode);
cdf_spin_unlock_irqrestore(&cdf_mem_list_lock);
if (CDF_STATUS_SUCCESS != cdf_status) {
if (QDF_STATUS_SUCCESS != qdf_status) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: Unable to insert node into List cdf_status %d",
__func__, cdf_status);
__func__, qdf_status);
}
memPtr = (void *)(memStruct + 1);
@ -329,7 +329,7 @@ void *cdf_mem_malloc_debug(size_t size, char *fileName, uint32_t lineNum)
void cdf_mem_free(void *ptr)
{
if (ptr != NULL) {
CDF_STATUS cdf_status;
QDF_STATUS qdf_status;
struct s_cdf_mem_struct *memStruct =
((struct s_cdf_mem_struct *)ptr) - 1;
@ -339,11 +339,11 @@ void cdf_mem_free(void *ptr)
#endif
cdf_spin_lock_irqsave(&cdf_mem_list_lock);
cdf_status =
cdf_list_remove_node(&cdf_mem_list, &memStruct->pNode);
qdf_status =
qdf_list_remove_node(&cdf_mem_list, &memStruct->pNode);
cdf_spin_unlock_irqrestore(&cdf_mem_list_lock);
if (CDF_STATUS_SUCCESS == cdf_status) {
if (QDF_STATUS_SUCCESS == qdf_status) {
if (0 == cdf_mem_compare(memStruct->header,
&WLAN_MEM_HEADER[0],
sizeof(WLAN_MEM_HEADER))) {

View file

@ -38,7 +38,7 @@
#include <cdf_status.h>
#include <qdf_status.h>
#include <cdf_memory.h>
#include <cdf_list.h>
#include <qdf_list.h>
#include <cdf_trace.h>
#include <qdf_event.h>
#include <cdf_lock.h>

View file

@ -38,7 +38,7 @@
#include <cdf_status.h>
#include <qdf_status.h>
#include <cdf_memory.h>
#include <cdf_list.h>
#include <qdf_list.h>
#include <cdf_trace.h>
#include <qdf_event.h>
#include <cdf_lock.h>

View file

@ -42,7 +42,7 @@
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <net/cfg80211.h>
#include <cdf_list.h>
#include <qdf_list.h>
#include <cdf_types.h>
#include "sir_mac_prot_def.h"
#include "csr_api.h"
@ -578,7 +578,7 @@ typedef struct hdd_remain_on_chan_ctx {
/* RoC Request entry */
typedef struct hdd_roc_req {
cdf_list_node_t node; /* MUST be first element */
qdf_list_node_t node; /* MUST be first element */
hdd_adapter_t *pAdapter;
hdd_remain_on_chan_ctx_t *pRemainChanCtx;
} hdd_roc_req_t;
@ -596,7 +596,7 @@ typedef struct hdd_roc_req {
* Scan request linked list element
*/
struct hdd_scan_req {
cdf_list_node_t node;
qdf_list_node_t node;
hdd_adapter_t *adapter;
struct cfg80211_scan_request *scan_request;
uint32_t scan_id;
@ -1049,7 +1049,7 @@ struct hdd_adapter_s {
#define HDD_RESET_MCC_P2P_QUOTA 50
typedef struct hdd_adapter_list_node {
cdf_list_node_t node; /* MUST be first element */
qdf_list_node_t node; /* MUST be first element */
hdd_adapter_t *pAdapter;
} hdd_adapter_list_node_t;
@ -1106,7 +1106,7 @@ struct hdd_context_s {
/* TODO Remove this from here. */
cdf_spinlock_t hdd_adapter_lock;
cdf_list_t hddAdapters; /* List of adapters */
qdf_list_t hddAdapters; /* List of adapters */
/* One per STA: 1 for BCMC_STA_ID, 1 for each SAP_SELF_STA_ID, 1 for WDS_STAID */
hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + CDF_MAX_NO_OF_SAP_MODE + 2]; /* One per sta. For quick reference. */
@ -1290,9 +1290,9 @@ struct hdd_context_s {
/* RoC request queue and work */
struct delayed_work roc_req_work;
cdf_spinlock_t hdd_roc_req_q_lock;
cdf_list_t hdd_roc_req_q;
qdf_list_t hdd_roc_req_q;
cdf_spinlock_t hdd_scan_req_q_lock;
cdf_list_t hdd_scan_req_q;
qdf_list_t hdd_scan_req_q;
uint8_t miracast_value;
#ifdef WLAN_NS_OFFLOAD
/* IPv6 notifier callback for handling NS offload on change in IP */

View file

@ -38,7 +38,7 @@
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <cdf_list.h>
#include <qdf_list.h>
#include <cdf_types.h>
#include <wlan_hdd_main.h>

View file

@ -318,7 +318,7 @@ struct ipa_uc_fw_stats {
};
struct ipa_uc_pending_event {
cdf_list_node_t node;
qdf_list_node_t node;
hdd_adapter_t *adapter;
enum ipa_wlan_event type;
uint8_t sta_id;
@ -422,7 +422,7 @@ struct hdd_ipa_priv {
bool resource_unloading;
bool pending_cons_req;
struct ipa_uc_stas_map assoc_stas_map[WLAN_MAX_STA_COUNT];
cdf_list_t pending_event;
qdf_list_t pending_event;
cdf_mutex_t event_lock;
bool ipa_pipes_down;
uint32_t ipa_tx_packets_diff;
@ -1316,7 +1316,7 @@ static void hdd_ipa_uc_proc_pending_event(struct hdd_ipa_priv *hdd_ipa)
unsigned int pending_event_count;
struct ipa_uc_pending_event *pending_event = NULL;
cdf_list_size(&hdd_ipa->pending_event, &pending_event_count);
pending_event_count = qdf_list_size(&hdd_ipa->pending_event);
HDD_IPA_LOG(CDF_TRACE_LEVEL_INFO,
"%s, Pending Event Count %d", __func__, pending_event_count);
if (!pending_event_count) {
@ -1325,8 +1325,8 @@ static void hdd_ipa_uc_proc_pending_event(struct hdd_ipa_priv *hdd_ipa)
return;
}
cdf_list_remove_front(&hdd_ipa->pending_event,
(cdf_list_node_t **)&pending_event);
qdf_list_remove_front(&hdd_ipa->pending_event,
(qdf_list_node_t **)&pending_event);
while (pending_event != NULL) {
hdd_ipa_wlan_evt(pending_event->adapter,
pending_event->type,
@ -1334,8 +1334,8 @@ static void hdd_ipa_uc_proc_pending_event(struct hdd_ipa_priv *hdd_ipa)
pending_event->mac_addr);
cdf_mem_free(pending_event);
pending_event = NULL;
cdf_list_remove_front(&hdd_ipa->pending_event,
(cdf_list_node_t **)&pending_event);
qdf_list_remove_front(&hdd_ipa->pending_event,
(qdf_list_node_t **)&pending_event);
}
}
@ -1788,7 +1788,7 @@ static CDF_STATUS hdd_ipa_uc_ol_init(hdd_context_t *hdd_ctx)
cdf_mem_zero(&pipe_in, sizeof(struct ipa_wdi_in_params));
cdf_mem_zero(&pipe_out, sizeof(struct ipa_wdi_out_params));
cdf_list_init(&ipa_ctxt->pending_event, 1000);
qdf_list_create(&ipa_ctxt->pending_event, 1000);
cdf_mutex_init(&ipa_ctxt->event_lock);
cdf_mutex_init(&ipa_ctxt->ipa_lock);
@ -3653,11 +3653,11 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
cdf_mutex_acquire(&hdd_ipa->event_lock);
cdf_list_size(&hdd_ipa->pending_event, &pending_event_count);
pending_event_count = qdf_list_size(&hdd_ipa->pending_event);
if (pending_event_count >= HDD_IPA_MAX_PENDING_EVENT_COUNT) {
hdd_notice("Reached max pending event count");
cdf_list_remove_front(&hdd_ipa->pending_event,
(cdf_list_node_t **)&pending_event);
qdf_list_remove_front(&hdd_ipa->pending_event,
(qdf_list_node_t **)&pending_event);
} else {
pending_event =
(struct ipa_uc_pending_event *)cdf_mem_malloc(
@ -3676,7 +3676,7 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
cdf_mem_copy(pending_event->mac_addr,
mac_addr,
CDF_MAC_ADDR_SIZE);
cdf_list_insert_back(&hdd_ipa->pending_event,
qdf_list_insert_back(&hdd_ipa->pending_event,
&pending_event->node);
cdf_mutex_release(&hdd_ipa->event_lock);
@ -4121,12 +4121,12 @@ void hdd_ipa_cleanup_pending_event(struct hdd_ipa_priv *hdd_ipa)
{
struct ipa_uc_pending_event *pending_event = NULL;
while (cdf_list_remove_front(&hdd_ipa->pending_event,
(cdf_list_node_t **)&pending_event) == CDF_STATUS_SUCCESS) {
while (qdf_list_remove_front(&hdd_ipa->pending_event,
(qdf_list_node_t **)&pending_event) == QDF_STATUS_SUCCESS) {
cdf_mem_free(pending_event);
}
cdf_list_destroy(&hdd_ipa->pending_event);
qdf_list_destroy(&hdd_ipa->pending_event);
}
/**

View file

@ -3148,10 +3148,10 @@ CDF_STATUS hdd_start_all_adapters(hdd_context_t *hdd_ctx)
CDF_STATUS hdd_get_front_adapter(hdd_context_t *hdd_ctx,
hdd_adapter_list_node_t **padapterNode)
{
CDF_STATUS status;
QDF_STATUS status;
cdf_spin_lock(&hdd_ctx->hdd_adapter_lock);
status = cdf_list_peek_front(&hdd_ctx->hddAdapters,
(cdf_list_node_t **) padapterNode);
status = qdf_list_peek_front(&hdd_ctx->hddAdapters,
(qdf_list_node_t **) padapterNode);
cdf_spin_unlock(&hdd_ctx->hdd_adapter_lock);
return status;
}
@ -3160,11 +3160,11 @@ CDF_STATUS hdd_get_next_adapter(hdd_context_t *hdd_ctx,
hdd_adapter_list_node_t *adapterNode,
hdd_adapter_list_node_t **pNextAdapterNode)
{
CDF_STATUS status;
QDF_STATUS status;
cdf_spin_lock(&hdd_ctx->hdd_adapter_lock);
status = cdf_list_peek_next(&hdd_ctx->hddAdapters,
(cdf_list_node_t *) adapterNode,
(cdf_list_node_t **) pNextAdapterNode);
status = qdf_list_peek_next(&hdd_ctx->hddAdapters,
(qdf_list_node_t *) adapterNode,
(qdf_list_node_t **) pNextAdapterNode);
cdf_spin_unlock(&hdd_ctx->hdd_adapter_lock);
return status;
@ -3173,9 +3173,9 @@ CDF_STATUS hdd_get_next_adapter(hdd_context_t *hdd_ctx,
CDF_STATUS hdd_remove_adapter(hdd_context_t *hdd_ctx,
hdd_adapter_list_node_t *adapterNode)
{
CDF_STATUS status;
QDF_STATUS status;
cdf_spin_lock(&hdd_ctx->hdd_adapter_lock);
status = cdf_list_remove_node(&hdd_ctx->hddAdapters,
status = qdf_list_remove_node(&hdd_ctx->hddAdapters,
&adapterNode->node);
cdf_spin_unlock(&hdd_ctx->hdd_adapter_lock);
return status;
@ -3184,10 +3184,10 @@ CDF_STATUS hdd_remove_adapter(hdd_context_t *hdd_ctx,
CDF_STATUS hdd_remove_front_adapter(hdd_context_t *hdd_ctx,
hdd_adapter_list_node_t **padapterNode)
{
CDF_STATUS status;
QDF_STATUS status;
cdf_spin_lock(&hdd_ctx->hdd_adapter_lock);
status = cdf_list_remove_front(&hdd_ctx->hddAdapters,
(cdf_list_node_t **) padapterNode);
status = qdf_list_remove_front(&hdd_ctx->hddAdapters,
(qdf_list_node_t **) padapterNode);
cdf_spin_unlock(&hdd_ctx->hdd_adapter_lock);
return status;
}
@ -3195,10 +3195,10 @@ CDF_STATUS hdd_remove_front_adapter(hdd_context_t *hdd_ctx,
CDF_STATUS hdd_add_adapter_back(hdd_context_t *hdd_ctx,
hdd_adapter_list_node_t *adapterNode)
{
CDF_STATUS status;
QDF_STATUS status;
cdf_spin_lock(&hdd_ctx->hdd_adapter_lock);
status = cdf_list_insert_back(&hdd_ctx->hddAdapters,
(cdf_list_node_t *) adapterNode);
status = qdf_list_insert_back(&hdd_ctx->hddAdapters,
(qdf_list_node_t *) adapterNode);
cdf_spin_unlock(&hdd_ctx->hdd_adapter_lock);
return status;
}
@ -3208,8 +3208,8 @@ CDF_STATUS hdd_add_adapter_front(hdd_context_t *hdd_ctx,
{
CDF_STATUS status;
cdf_spin_lock(&hdd_ctx->hdd_adapter_lock);
status = cdf_list_insert_front(&hdd_ctx->hddAdapters,
(cdf_list_node_t *) adapterNode);
status = qdf_list_insert_front(&hdd_ctx->hddAdapters,
(qdf_list_node_t *) adapterNode);
cdf_spin_unlock(&hdd_ctx->hdd_adapter_lock);
return status;
}
@ -3802,8 +3802,8 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx)
/* Free up RoC request queue and flush workqueue */
cds_flush_work(&hdd_ctx->roc_req_work);
cdf_list_destroy(&hdd_ctx->hdd_roc_req_q);
cdf_list_destroy(&hdd_ctx->hdd_scan_req_q);
qdf_list_destroy(&hdd_ctx->hdd_roc_req_q);
qdf_list_destroy(&hdd_ctx->hdd_scan_req_q);
if (!CDF_IS_STATUS_SUCCESS(cds_deinit_policy_mgr())) {
hdd_err("Failed to deinit policy manager");
@ -5123,7 +5123,7 @@ hdd_context_t *hdd_init_context(struct device *dev, void *hif_sc)
cdf_spinlock_init(&hdd_ctx->sched_scan_lock);
cdf_spinlock_init(&hdd_ctx->hdd_adapter_lock);
cdf_list_init(&hdd_ctx->hddAdapters, MAX_NUMBER_OF_ADAPTERS);
qdf_list_create(&hdd_ctx->hddAdapters, MAX_NUMBER_OF_ADAPTERS);
wlan_hdd_cfg80211_extscan_init(hdd_ctx);
@ -5747,9 +5747,9 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
hdd_ctx->target_hw_name);
cdf_spinlock_init(&hdd_ctx->hdd_roc_req_q_lock);
cdf_list_init((&hdd_ctx->hdd_roc_req_q), MAX_ROC_REQ_QUEUE_ENTRY);
qdf_list_create((&hdd_ctx->hdd_roc_req_q), MAX_ROC_REQ_QUEUE_ENTRY);
cdf_spinlock_init(&hdd_ctx->hdd_scan_req_q_lock);
cdf_list_init((&hdd_ctx->hdd_scan_req_q), CFG_MAX_SCAN_COUNT_MAX);
qdf_list_create((&hdd_ctx->hdd_scan_req_q), CFG_MAX_SCAN_COUNT_MAX);
#ifdef CONFIG_CNSS
cnss_init_delayed_work(&hdd_ctx->roc_req_work,
wlan_hdd_roc_request_dequeue);

View file

@ -282,7 +282,7 @@ void wlan_hdd_cancel_existing_remain_on_channel(hdd_adapter_t *pAdapter)
hddLog(LOGE, "Cancel Existing Remain on Channel");
if (CDF_TIMER_STATE_RUNNING == cdf_mc_timer_get_current_state(
&cfgState->remain_on_chan_ctx->hdd_remain_on_chan_timer))
&cfgState->remain_on_chan_ctx->hdd_remain_on_chan_timer))
cdf_mc_timer_stop(&cfgState->remain_on_chan_ctx->
hdd_remain_on_chan_timer);
@ -702,7 +702,7 @@ static int wlan_hdd_roc_request_enqueue(hdd_adapter_t *adapter,
{
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
hdd_roc_req_t *hdd_roc_req;
CDF_STATUS status;
QDF_STATUS status;
/*
* "Driver is busy" OR "there is already RoC request inside the queue"
@ -721,11 +721,11 @@ static int wlan_hdd_roc_request_enqueue(hdd_adapter_t *adapter,
/* Enqueue this RoC request */
cdf_spin_lock(&hdd_ctx->hdd_roc_req_q_lock);
status = cdf_list_insert_back(&hdd_ctx->hdd_roc_req_q,
status = qdf_list_insert_back(&hdd_ctx->hdd_roc_req_q,
&hdd_roc_req->node);
cdf_spin_unlock(&hdd_ctx->hdd_roc_req_q_lock);
if (CDF_STATUS_SUCCESS != status) {
if (QDF_STATUS_SUCCESS != status) {
hddLog(LOGP, FL("Not able to enqueue RoC Req context"));
cdf_mem_free(hdd_roc_req);
return -EINVAL;
@ -773,7 +773,7 @@ void wlan_hdd_indicate_roc_drop(hdd_adapter_t *adapter,
*/
void wlan_hdd_roc_request_dequeue(struct work_struct *work)
{
CDF_STATUS status;
QDF_STATUS status;
int ret = 0;
hdd_roc_req_t *hdd_roc_req;
hdd_context_t *hdd_ctx =
@ -796,10 +796,10 @@ void wlan_hdd_roc_request_dequeue(struct work_struct *work)
hdd_debug("list is empty");
return;
}
status = cdf_list_remove_front(&hdd_ctx->hdd_roc_req_q,
(cdf_list_node_t **) &hdd_roc_req);
status = qdf_list_remove_front(&hdd_ctx->hdd_roc_req_q,
(qdf_list_node_t **) &hdd_roc_req);
cdf_spin_unlock(&hdd_ctx->hdd_roc_req_q_lock);
if (CDF_STATUS_SUCCESS != status) {
if (QDF_STATUS_SUCCESS != status) {
hdd_debug("unable to remove roc element from list");
return;
}
@ -871,10 +871,10 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
pRemainChanCtx->hdd_remain_on_chan_cancel_in_progress = false;
if (REMAIN_ON_CHANNEL_REQUEST == request_type) {
sta_adapter = hdd_get_adapter(pHddCtx, WLAN_HDD_INFRA_STATION);
if ((NULL != sta_adapter)&&
if ((NULL != sta_adapter) &&
hdd_conn_is_connected(
WLAN_HDD_GET_STATION_CTX_PTR(sta_adapter))) {
if (pAdapter->last_roc_ts !=0 &&
if (pAdapter->last_roc_ts != 0 &&
((cdf_mc_timer_get_system_time() -
pAdapter->last_roc_ts) <
pHddCtx->config->p2p_listen_defer_interval)) {
@ -895,7 +895,7 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
}
cdf_spin_lock(&pHddCtx->hdd_roc_req_q_lock);
cdf_list_size(&(pHddCtx->hdd_roc_req_q), &size);
size = qdf_list_size(&(pHddCtx->hdd_roc_req_q));
cdf_spin_unlock(&pHddCtx->hdd_roc_req_q_lock);
if ((isBusy == false) && (!size)) {
status = wlan_hdd_execute_remain_on_channel(pAdapter,
@ -1087,8 +1087,9 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
hdd_remain_on_chan_ctx_t *pRemainChanCtx;
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
int status;
int qdf_status;
unsigned long rc;
cdf_list_node_t *tmp, *q;
qdf_list_node_t *tmp, *q;
hdd_roc_req_t *curr_roc_req;
ENTER();
@ -1106,11 +1107,11 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
list_for_each_safe(tmp, q, &pHddCtx->hdd_roc_req_q.anchor) {
curr_roc_req = list_entry(tmp, hdd_roc_req_t, node);
if ((uintptr_t) curr_roc_req->pRemainChanCtx == cookie) {
status = cdf_list_remove_node(&pHddCtx->hdd_roc_req_q,
(cdf_list_node_t *)
qdf_status = qdf_list_remove_node(&pHddCtx->hdd_roc_req_q,
(qdf_list_node_t *)
curr_roc_req);
cdf_spin_unlock(&pHddCtx->hdd_roc_req_q_lock);
if (status == CDF_STATUS_SUCCESS) {
if (qdf_status == QDF_STATUS_SUCCESS) {
cdf_mem_free(curr_roc_req->pRemainChanCtx);
cdf_mem_free(curr_roc_req);
}

View file

@ -523,7 +523,7 @@ static int wlan_hdd_scan_request_enqueue(hdd_adapter_t *adapter,
{
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_scan_req *hdd_scan_req;
CDF_STATUS status;
QDF_STATUS status;
ENTER();
hdd_scan_req = cdf_mem_malloc(sizeof(*hdd_scan_req));
@ -539,11 +539,11 @@ static int wlan_hdd_scan_request_enqueue(hdd_adapter_t *adapter,
hdd_scan_req->timestamp = timestamp;
cdf_spin_lock(&hdd_ctx->hdd_scan_req_q_lock);
status = cdf_list_insert_back(&hdd_ctx->hdd_scan_req_q,
status = qdf_list_insert_back(&hdd_ctx->hdd_scan_req_q,
&hdd_scan_req->node);
cdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
if (CDF_STATUS_SUCCESS != status) {
if (QDF_STATUS_SUCCESS != status) {
hdd_err("Failed to enqueue Scan Req");
cdf_mem_free(hdd_scan_req);
return -EINVAL;
@ -566,36 +566,36 @@ CDF_STATUS wlan_hdd_scan_request_dequeue(hdd_context_t *hdd_ctx,
uint32_t scan_id, struct cfg80211_scan_request **req, uint8_t *source,
uint32_t *timestamp)
{
CDF_STATUS status = CDF_STATUS_E_FAILURE;
QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct hdd_scan_req *hdd_scan_req;
cdf_list_node_t *pNode = NULL, *ppNode = NULL;
qdf_list_node_t *pNode = NULL, *ppNode = NULL;
hdd_info("Dequeue Scan id: %d", scan_id);
if ((source == NULL) && (timestamp == NULL) && (req == NULL))
return CDF_STATUS_E_NULL_VALUE;
return QDF_STATUS_E_NULL_VALUE;
cdf_spin_lock(&hdd_ctx->hdd_scan_req_q_lock);
if (list_empty(&hdd_ctx->hdd_scan_req_q.anchor)) {
cdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
return CDF_STATUS_E_FAILURE;
return QDF_STATUS_E_FAILURE;
}
if (CDF_STATUS_SUCCESS !=
cdf_list_peek_front(&hdd_ctx->hdd_scan_req_q, &ppNode)) {
if (QDF_STATUS_SUCCESS !=
qdf_list_peek_front(&hdd_ctx->hdd_scan_req_q, &ppNode)) {
cdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
hdd_err("Failed to remove Scan Req from queue");
return CDF_STATUS_E_FAILURE;
return QDF_STATUS_E_FAILURE;
}
do {
pNode = ppNode;
hdd_scan_req = (struct hdd_scan_req *)pNode;
if (hdd_scan_req->scan_id == scan_id) {
status = cdf_list_remove_node(&hdd_ctx->hdd_scan_req_q,
status = qdf_list_remove_node(&hdd_ctx->hdd_scan_req_q,
pNode);
if (status == CDF_STATUS_SUCCESS) {
if (status == QDF_STATUS_SUCCESS) {
*req = hdd_scan_req->scan_request;
*source = hdd_scan_req->source;
*timestamp = hdd_scan_req->timestamp;
@ -603,7 +603,7 @@ CDF_STATUS wlan_hdd_scan_request_dequeue(hdd_context_t *hdd_ctx,
cdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
hdd_info("removed Scan id: %d, req = %p",
scan_id, req);
return CDF_STATUS_SUCCESS;
return QDF_STATUS_SUCCESS;
} else {
cdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
hdd_err("Failed to remove node scan id %d",
@ -611,8 +611,8 @@ CDF_STATUS wlan_hdd_scan_request_dequeue(hdd_context_t *hdd_ctx,
return status;
}
}
} while (CDF_STATUS_SUCCESS ==
cdf_list_peek_next(&hdd_ctx->hdd_scan_req_q, pNode, &ppNode));
} while (QDF_STATUS_SUCCESS ==
qdf_list_peek_next(&hdd_ctx->hdd_scan_req_q, pNode, &ppNode));
cdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
hdd_err("Failed to find scan id %d", scan_id);
@ -674,7 +674,7 @@ hdd_scan_request_callback(tHalHandle halHandle, void *pContext,
scanId);
cdf_spin_lock(&hddctx->hdd_scan_req_q_lock);
cdf_list_size(&(hddctx->hdd_scan_req_q), &size);
size = qdf_list_size(&(hddctx->hdd_scan_req_q));
if (!size)
/* Scan is no longer pending */
pAdapter->scan_info.mScanPending = false;
@ -1142,7 +1142,7 @@ static CDF_STATUS hdd_cfg80211_scan_done_callback(tHalHandle halHandle,
}
cdf_spin_lock(&hddctx->hdd_scan_req_q_lock);
cdf_list_size(&(hddctx->hdd_scan_req_q), &size);
size = qdf_list_size(&(hddctx->hdd_scan_req_q));
if (!size) {
/* Scan is no longer pending */
pScanInfo->mScanPending = false;

View file

@ -826,7 +826,7 @@ typedef struct sAniSirLim {
tSirRemainOnChnReq *gpLimRemainOnChanReq; /* hold remain on chan request in this buf */
cdf_mutex_t lim_frame_register_lock;
cdf_list_t gLimMgmtFrameRegistratinQueue;
qdf_list_t gLimMgmtFrameRegistratinQueue;
uint32_t mgmtFrameSessionId;
tpPESession pSessionEntry;
@ -850,7 +850,7 @@ typedef struct sAniSirLim {
} tAniSirLim, *tpAniSirLim;
struct mgmt_frm_reg_info {
cdf_list_node_t node; /* MUST be first element */
qdf_list_node_t node; /* MUST be first element */
uint16_t frameType;
uint16_t matchLen;
uint16_t sessionId;

View file

@ -607,7 +607,7 @@ tSirRetStatus lim_initialize(tpAniSirGlobal pMac)
#endif
cdf_mutex_init(&pMac->lim.lim_frame_register_lock);
cdf_list_init(&pMac->lim.gLimMgmtFrameRegistratinQueue, 0);
qdf_list_create(&pMac->lim.gLimMgmtFrameRegistratinQueue, 0);
/* Initialize the configurations needed by PE */
if (eSIR_FAILURE == __lim_init_config(pMac)) {
@ -657,16 +657,16 @@ void lim_cleanup(tpAniSirGlobal pMac)
if (CDF_GLOBAL_FTM_MODE != cds_get_conparam()) {
cdf_mutex_acquire(&pMac->lim.lim_frame_register_lock);
while (cdf_list_remove_front(
while (qdf_list_remove_front(
&pMac->lim.gLimMgmtFrameRegistratinQueue,
(cdf_list_node_t **) &pLimMgmtRegistration) ==
CDF_STATUS_SUCCESS) {
(qdf_list_node_t **) &pLimMgmtRegistration) ==
QDF_STATUS_SUCCESS) {
CDF_TRACE(CDF_MODULE_ID_PE, CDF_TRACE_LEVEL_INFO,
FL("Fixing leak! Deallocating pLimMgmtRegistration node"));
cdf_mem_free(pLimMgmtRegistration);
}
cdf_mutex_release(&pMac->lim.lim_frame_register_lock);
cdf_list_destroy(&pMac->lim.gLimMgmtFrameRegistratinQueue);
qdf_list_destroy(&pMac->lim.gLimMgmtFrameRegistratinQueue);
}
lim_cleanup_mlm(pMac);

View file

@ -514,7 +514,7 @@ __lim_handle_beacon(tpAniSirGlobal pMac, tpSirMsgQ pMsg,
/* checking for global SME state... */
uint8_t *pRxPacketInfo;
lim_get_b_dfrom_rx_packet(pMac, pMsg->bodyptr,
(uint32_t * *) &pRxPacketInfo);
(uint32_t **) &pRxPacketInfo);
/* This function should not be called if beacon is received in scan state. */
/* So not doing any checks for the global state. */
@ -644,7 +644,7 @@ lim_check_mgmt_registered_frames(tpAniSirGlobal mac_ctx, uint8_t *buff_desc,
uint16_t frm_len;
uint8_t type, sub_type;
bool match = false;
CDF_STATUS cdf_status;
QDF_STATUS qdf_status;
hdr = WMA_GET_RX_MAC_HEADER(buff_desc);
fc = hdr->fc;
@ -653,8 +653,8 @@ lim_check_mgmt_registered_frames(tpAniSirGlobal mac_ctx, uint8_t *buff_desc,
frm_len = WMA_GET_RX_PAYLOAD_LEN(buff_desc);
cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
cdf_list_peek_front(&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
(cdf_list_node_t **) &mgmt_frame);
qdf_list_peek_front(&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
(qdf_list_node_t **) &mgmt_frame);
cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
while (mgmt_frame != NULL) {
@ -684,11 +684,11 @@ lim_check_mgmt_registered_frames(tpAniSirGlobal mac_ctx, uint8_t *buff_desc,
}
cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
cdf_status =
cdf_list_peek_next(
qdf_status =
qdf_list_peek_next(
&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
(cdf_list_node_t *) mgmt_frame,
(cdf_list_node_t **) &next_frm);
(qdf_list_node_t *) mgmt_frame,
(qdf_list_node_t **) &next_frm);
cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
mgmt_frame = next_frm;
next_frm = NULL;
@ -750,7 +750,7 @@ lim_handle80211_frames(tpAniSirGlobal pMac, tpSirMsgQ limMsg, uint8_t *pDeferMsg
*pDeferMsg = false;
lim_get_b_dfrom_rx_packet(pMac, limMsg->bodyptr,
(uint32_t * *) &pRxPacketInfo);
(uint32_t **) &pRxPacketInfo);
pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo);
isFrmFt = WMA_GET_RX_FT_DONE(pRxPacketInfo);
@ -810,9 +810,9 @@ lim_handle80211_frames(tpAniSirGlobal pMac, tpSirMsgQ limMsg, uint8_t *pDeferMsg
goto end;
}
/* Added For BT-AMP Support */
if ((psessionEntry =
pe_find_session_by_bssid(pMac, pHdr->bssId,
&sessionId)) == NULL) {
psessionEntry = pe_find_session_by_bssid(pMac, pHdr->bssId,
&sessionId);
if (psessionEntry == NULL) {
#ifdef WLAN_FEATURE_VOWIFI_11R
if (fc.subType == SIR_MAC_MGMT_AUTH) {
lim_log(pMac, LOG1,
@ -1269,13 +1269,13 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
break;
}
if (WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr))
lim_log(mac_ctx, LOG1, FL("roamCandidateInd %d"),
WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr));
if (WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr))
lim_log(mac_ctx, LOG1, FL("roamCandidateInd %d"),
WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr));
if (WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr))
lim_log(mac_ctx, LOG1, FL("offloadScanLearn %d"),
WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr));
if (WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr))
lim_log(mac_ctx, LOG1, FL("offloadScanLearn %d"),
WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr));
lim_handle80211_frames(mac_ctx, &new_msg, &defer_msg);

View file

@ -1427,8 +1427,7 @@ static void __lim_process_sme_scan_req(tpAniSirGlobal mac_ctx,
scan_req->scan_id);
return;
}
}
else {
} else {
/* In all other cases return 'cached' scan results */
if (mac_ctx->lim.gLimRspReqd) {
mac_ctx->lim.gLimRspReqd = false;
@ -4492,7 +4491,7 @@ lim_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower,
static void __lim_process_sme_register_mgmt_frame_req(tpAniSirGlobal mac_ctx,
uint32_t *msg_buf)
{
CDF_STATUS cdf_status;
QDF_STATUS qdf_status;
tpSirRegisterMgmtFrame sme_req = (tpSirRegisterMgmtFrame)msg_buf;
struct mgmt_frm_reg_info *lim_mgmt_regn = NULL;
struct mgmt_frm_reg_info *next = NULL;
@ -4504,8 +4503,8 @@ static void __lim_process_sme_register_mgmt_frame_req(tpAniSirGlobal mac_ctx,
sme_req->matchLen);
/* First check whether entry exists already */
cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
cdf_list_peek_front(&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
(cdf_list_node_t **) &lim_mgmt_regn);
qdf_list_peek_front(&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
(qdf_list_node_t **) &lim_mgmt_regn);
cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
while (lim_mgmt_regn != NULL) {
@ -4527,19 +4526,19 @@ static void __lim_process_sme_register_mgmt_frame_req(tpAniSirGlobal mac_ctx,
}
skip_match:
cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
cdf_status = cdf_list_peek_next(
qdf_status = qdf_list_peek_next(
&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
(cdf_list_node_t *)lim_mgmt_regn,
(cdf_list_node_t **)&next);
(qdf_list_node_t *)lim_mgmt_regn,
(qdf_list_node_t **)&next);
cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
lim_mgmt_regn = next;
next = NULL;
}
if (match) {
cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
cdf_list_remove_node(
qdf_list_remove_node(
&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
(cdf_list_node_t *)lim_mgmt_regn);
(qdf_list_node_t *)lim_mgmt_regn);
cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
cdf_mem_free(lim_mgmt_regn);
}
@ -4562,7 +4561,7 @@ skip_match:
}
cdf_mutex_acquire(
&mac_ctx->lim.lim_frame_register_lock);
cdf_list_insert_front(&mac_ctx->lim.
qdf_list_insert_front(&mac_ctx->lim.
gLimMgmtFrameRegistratinQueue,
&lim_mgmt_regn->node);
cdf_mutex_release(

View file

@ -1227,9 +1227,9 @@ typedef struct {
uint32_t scan_id;
struct wma_txrx_node *interfaces;
pdev_cli_config_t pdevconfig;
cdf_list_t vdev_resp_queue;
qdf_list_t vdev_resp_queue;
cdf_spinlock_t vdev_respq_lock;
cdf_list_t wma_hold_req_queue;
qdf_list_t wma_hold_req_queue;
cdf_spinlock_t wma_hold_req_q_lock;
uint32_t ht_cap_info;
#ifdef WLAN_FEATURE_11AC
@ -1459,7 +1459,7 @@ struct wma_tx_ack_work_ctx {
*/
struct wma_target_req {
cdf_mc_timer_t event_timeout;
cdf_list_node_t node;
qdf_list_node_t node;
void *user_data;
uint32_t msg_type;
uint8_t vdev_id;

View file

@ -307,11 +307,11 @@ static struct wma_target_req *wma_find_req(tp_wma_handle wma,
{
struct wma_target_req *req_msg = NULL;
bool found = false;
cdf_list_node_t *node1 = NULL, *node2 = NULL;
CDF_STATUS status;
qdf_list_node_t *node1 = NULL, *node2 = NULL;
QDF_STATUS status;
cdf_spin_lock_bh(&wma->wma_hold_req_q_lock);
if (CDF_STATUS_SUCCESS != cdf_list_peek_front(&wma->wma_hold_req_queue,
if (QDF_STATUS_SUCCESS != qdf_list_peek_front(&wma->wma_hold_req_queue,
&node2)) {
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
WMA_LOGE(FL("unable to get msg node from request queue"));
@ -327,16 +327,16 @@ static struct wma_target_req *wma_find_req(tp_wma_handle wma,
continue;
found = true;
status = cdf_list_remove_node(&wma->wma_hold_req_queue, node1);
if (CDF_STATUS_SUCCESS != status) {
status = qdf_list_remove_node(&wma->wma_hold_req_queue, node1);
if (QDF_STATUS_SUCCESS != status) {
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
WMA_LOGD(FL("Failed to remove request for vdev_id %d type %d"),
vdev_id, type);
return NULL;
}
break;
} while (CDF_STATUS_SUCCESS ==
cdf_list_peek_next(&wma->wma_hold_req_queue, node1,
} while (QDF_STATUS_SUCCESS ==
qdf_list_peek_next(&wma->wma_hold_req_queue, node1,
&node2));
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
@ -368,11 +368,11 @@ static struct wma_target_req *wma_find_remove_req_msgtype(tp_wma_handle wma,
{
struct wma_target_req *req_msg = NULL;
bool found = false;
cdf_list_node_t *node1 = NULL, *node2 = NULL;
CDF_STATUS status;
qdf_list_node_t *node1 = NULL, *node2 = NULL;
QDF_STATUS status;
cdf_spin_lock_bh(&wma->wma_hold_req_q_lock);
if (CDF_STATUS_SUCCESS != cdf_list_peek_front(&wma->wma_hold_req_queue,
if (QDF_STATUS_SUCCESS != qdf_list_peek_front(&wma->wma_hold_req_queue,
&node2)) {
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
WMA_LOGE(FL("unable to get msg node from request queue"));
@ -388,16 +388,16 @@ static struct wma_target_req *wma_find_remove_req_msgtype(tp_wma_handle wma,
continue;
found = true;
status = cdf_list_remove_node(&wma->wma_hold_req_queue, node1);
if (CDF_STATUS_SUCCESS != status) {
status = qdf_list_remove_node(&wma->wma_hold_req_queue, node1);
if (QDF_STATUS_SUCCESS != status) {
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
WMA_LOGD(FL("Failed to remove request. vdev_id %d type %d"),
vdev_id, msg_type);
return NULL;
}
break;
} while (CDF_STATUS_SUCCESS ==
cdf_list_peek_next(&wma->wma_hold_req_queue, node1,
} while (QDF_STATUS_SUCCESS ==
qdf_list_peek_next(&wma->wma_hold_req_queue, node1,
&node2));
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
@ -427,11 +427,11 @@ static struct wma_target_req *wma_find_vdev_req(tp_wma_handle wma,
{
struct wma_target_req *req_msg = NULL;
bool found = false;
cdf_list_node_t *node1 = NULL, *node2 = NULL;
CDF_STATUS status;
qdf_list_node_t *node1 = NULL, *node2 = NULL;
QDF_STATUS status;
cdf_spin_lock_bh(&wma->vdev_respq_lock);
if (CDF_STATUS_SUCCESS != cdf_list_peek_front(&wma->vdev_resp_queue,
if (QDF_STATUS_SUCCESS != qdf_list_peek_front(&wma->vdev_resp_queue,
&node2)) {
cdf_spin_unlock_bh(&wma->vdev_respq_lock);
WMA_LOGE(FL("unable to get target req from vdev resp queue"));
@ -447,16 +447,16 @@ static struct wma_target_req *wma_find_vdev_req(tp_wma_handle wma,
continue;
found = true;
status = cdf_list_remove_node(&wma->vdev_resp_queue, node1);
if (CDF_STATUS_SUCCESS != status) {
status = qdf_list_remove_node(&wma->vdev_resp_queue, node1);
if (QDF_STATUS_SUCCESS != status) {
cdf_spin_unlock_bh(&wma->vdev_respq_lock);
WMA_LOGD(FL("Failed to target req for vdev_id %d type %d"),
vdev_id, type);
return NULL;
}
break;
} while (CDF_STATUS_SUCCESS ==
cdf_list_peek_next(&wma->vdev_resp_queue,
} while (QDF_STATUS_SUCCESS ==
qdf_list_peek_next(&wma->vdev_resp_queue,
node1, &node2));
cdf_spin_unlock_bh(&wma->vdev_respq_lock);
@ -2615,7 +2615,7 @@ struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma,
void *params, uint32_t timeout)
{
struct wma_target_req *req;
CDF_STATUS status;
QDF_STATUS status;
req = cdf_mem_malloc(sizeof(*req));
if (!req) {
@ -2634,8 +2634,8 @@ struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma,
wma_hold_req_timer, req);
cdf_mc_timer_start(&req->event_timeout, timeout);
cdf_spin_lock_bh(&wma->wma_hold_req_q_lock);
status = cdf_list_insert_back(&wma->wma_hold_req_queue, &req->node);
if (CDF_STATUS_SUCCESS != status) {
status = qdf_list_insert_back(&wma->wma_hold_req_queue, &req->node);
if (QDF_STATUS_SUCCESS != status) {
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
WMA_LOGE(FL("Failed add request in queue"));
cdf_mem_free(req);
@ -2924,7 +2924,7 @@ struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma,
void *params, uint32_t timeout)
{
struct wma_target_req *req;
CDF_STATUS status;
QDF_STATUS status;
req = cdf_mem_malloc(sizeof(*req));
if (!req) {
@ -2942,8 +2942,8 @@ struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma,
wma_vdev_resp_timer, req);
cdf_mc_timer_start(&req->event_timeout, timeout);
cdf_spin_lock_bh(&wma->vdev_respq_lock);
status = cdf_list_insert_back(&wma->vdev_resp_queue, &req->node);
if (CDF_STATUS_SUCCESS != status) {
status = qdf_list_insert_back(&wma->vdev_resp_queue, &req->node);
if (QDF_STATUS_SUCCESS != status) {
cdf_spin_unlock_bh(&wma->vdev_respq_lock);
WMA_LOGE(FL("Failed add request in queue for vdev_id %d type %d"),
vdev_id, type);

View file

@ -1416,7 +1416,7 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
if (cfg_set_int(pMac,
WNI_CFG_CURRENT_TX_POWER_LEVEL,
privcmd->param_value) !=
eSIR_SUCCESS)
eSIR_SUCCESS)
WMA_LOGE("could not set WNI_CFG_CURRENT_TX_POWER_LEVEL");
} else {
@ -1432,7 +1432,7 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
if (cfg_set_int(pMac,
WNI_CFG_CURRENT_TX_POWER_LEVEL,
privcmd->param_value) !=
eSIR_SUCCESS)
eSIR_SUCCESS)
WMA_LOGE("could not set WNI_CFG_CURRENT_TX_POWER_LEVEL");
} else {
@ -1723,7 +1723,7 @@ CDF_STATUS wma_open(void *cds_context,
WMA_MAXNUM_PERIODIC_TX_PTRNS;
/* The current firmware implementation requires the number of
* offload peers should be (number of vdevs + 1).
* offload peers should be (number of vdevs + 1).
*/
wma_handle->wlan_resource_config.num_offload_peers =
mac_params->apMaxOffloadPeers + 1;
@ -1833,10 +1833,10 @@ CDF_STATUS wma_open(void *cds_context,
goto err_event_init;
}
cdf_list_init(&wma_handle->vdev_resp_queue,
qdf_list_create(&wma_handle->vdev_resp_queue,
MAX_ENTRY_VDEV_RESP_QUEUE);
cdf_spinlock_init(&wma_handle->vdev_respq_lock);
cdf_list_init(&wma_handle->wma_hold_req_queue,
qdf_list_create(&wma_handle->wma_hold_req_queue,
MAX_ENTRY_HOLD_REQ_QUEUE);
cdf_spinlock_init(&wma_handle->wma_hold_req_q_lock);
cdf_atomic_init(&wma_handle->is_wow_bus_suspended);
@ -2914,21 +2914,21 @@ end:
static void wma_cleanup_hold_req(tp_wma_handle wma)
{
struct wma_target_req *req_msg = NULL;
cdf_list_node_t *node1 = NULL;
CDF_STATUS status;
qdf_list_node_t *node1 = NULL;
QDF_STATUS status;
cdf_spin_lock_bh(&wma->wma_hold_req_q_lock);
if (cdf_list_empty(&wma->wma_hold_req_queue)) {
if (!qdf_list_size(&wma->wma_hold_req_queue)) {
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
WMA_LOGI(FL("request queue is empty"));
return;
}
while (CDF_STATUS_SUCCESS !=
cdf_list_peek_front(&wma->wma_hold_req_queue, &node1)) {
while (QDF_STATUS_SUCCESS !=
qdf_list_peek_front(&wma->wma_hold_req_queue, &node1)) {
req_msg = cdf_container_of(node1, struct wma_target_req, node);
status = cdf_list_remove_node(&wma->wma_hold_req_queue, node1);
if (CDF_STATUS_SUCCESS != status) {
status = qdf_list_remove_node(&wma->wma_hold_req_queue, node1);
if (QDF_STATUS_SUCCESS != status) {
cdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
WMA_LOGE(FL("Failed to remove request for vdev_id %d type %d"),
req_msg->vdev_id, req_msg->type);
@ -2949,21 +2949,21 @@ static void wma_cleanup_hold_req(tp_wma_handle wma)
static void wma_cleanup_vdev_resp(tp_wma_handle wma)
{
struct wma_target_req *req_msg = NULL;
cdf_list_node_t *node1 = NULL;
CDF_STATUS status;
qdf_list_node_t *node1 = NULL;
QDF_STATUS status;
cdf_spin_lock_bh(&wma->vdev_respq_lock);
if (cdf_list_empty(&wma->vdev_resp_queue)) {
if (!qdf_list_size(&wma->vdev_resp_queue)) {
cdf_spin_unlock_bh(&wma->vdev_respq_lock);
WMA_LOGI(FL("request queue maybe empty"));
return;
}
while (CDF_STATUS_SUCCESS != cdf_list_peek_front(&wma->vdev_resp_queue,
while (QDF_STATUS_SUCCESS != qdf_list_peek_front(&wma->vdev_resp_queue,
&node1)) {
req_msg = cdf_container_of(node1, struct wma_target_req, node);
status = cdf_list_remove_node(&wma->vdev_resp_queue, node1);
if (CDF_STATUS_SUCCESS != status) {
status = qdf_list_remove_node(&wma->vdev_resp_queue, node1);
if (QDF_STATUS_SUCCESS != status) {
cdf_spin_unlock_bh(&wma->vdev_respq_lock);
WMA_LOGE(FL("Failed to remove request for vdev_id %d type %d"),
req_msg->vdev_id, req_msg->type);