qcacld-3.0: Initialize os private structure in pdev object

-Initialize and free os private structure in pdev object
-Move vendor command definition to common project.

Change-Id: I9b8501d042afe1c967bfbfef81c01c0382a67531
CRs-Fixed: 2002991
This commit is contained in:
Sandeep Puligilla 2017-02-02 18:43:46 -08:00 • committed by qcabuildsw
commit fdd201e5b5
15 changed files with 48 additions and 3357 deletions

4
Kbuild
View file

@ -753,6 +753,9 @@ ifeq ($(CONFIG_WLAN_DEBUGFS), y)
QDF_OBJS += $(QDF_OBJ_DIR)/qdf_debugfs.o
endif
OS_IF_INC := -I$(WLAN_COMMON_INC)/os_if/linux \
-I$(WLAN_COMMON_INC)/os_if/linux/scan/inc
############ UMAC_DISP ############
UMAC_DISP_DIR := umac/global_umac_dispatcher/lmac_if
UMAC_DISP_INC_DIR := $(UMAC_DISP_DIR)/inc
@ -1164,6 +1167,7 @@ INCS := $(HDD_INC) \
$(CDS_INC) \
$(DFS_INC) \
$(TARGET_IF_INC) \
$(OS_IF_INC) \
$(GLOBAL_LMAC_IF_INC)
INCS += $(WMA_INC) \

View file

@ -78,6 +78,7 @@
#include "wlan_cfg80211.h"
#endif
#include <cdp_txrx_handle.h>
#include <wlan_cfg80211_scan.h>
#ifdef FEATURE_WLAN_EXTSCAN
#include "wlan_hdd_ext_scan.h"
@ -102,6 +103,8 @@
#include <cdp_txrx_cmn.h>
#include <cdp_txrx_misc.h>
#include <qca_vendor.h>
#define g_mode_rates_size (12)
#define a_mode_rates_size (8)

File diff suppressed because it is too large Load diff

View file

@ -26,6 +26,7 @@
#include "wlan_hdd_disa.h"
#include "wlan_hdd_request_manager.h"
#include "sme_api.h"
#include <qca_vendor.h>
#define WLAN_WAIT_TIME_ENCRYPT_DECRYPT 1000

View file

@ -32,6 +32,7 @@
#include "wlan_hdd_regulatory.h"
#include "cds_utils.h"
#include "cds_sched.h"
#include <qca_vendor.h>
/* amount of time to wait for a synchronous request/response operation */
#define WLAN_WAIT_TIME_EXTSCAN 1000

View file

@ -78,6 +78,8 @@
#include <cdp_txrx_misc.h>
#include "wlan_hdd_power.h"
#include "wlan_hdd_object_manager.h"
#include <qca_vendor.h>
#define IS_UP(_dev) \
(((_dev)->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP))

View file

@ -110,6 +110,7 @@
#include "wlan_hdd_object_manager.h"
#include "cds_utils.h"
#include <cdp_txrx_handle.h>
#include <qca_vendor.h>
#ifdef MODULE
#define WLAN_MODULE_NAME module_name(THIS_MODULE)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -34,6 +34,7 @@
#include "nan_api.h"
#include "wlan_hdd_main.h"
#include "wlan_hdd_nan.h"
#include <qca_vendor.h>
/**
* __wlan_hdd_cfg80211_nan_request() - cfg80211 NAN request handler

View file

@ -34,6 +34,7 @@
#include "wlan_hdd_assoc.h"
#include "sme_nan_datapath.h"
#include "wlan_hdd_object_manager.h"
#include <qca_vendor.h>
/* NLA policy */
static const struct nla_policy

View file

@ -31,6 +31,14 @@
*/
#include <wlan_hdd_object_manager.h>
#include <wlan_osif_priv.h>
static void hdd_init_os_priv(hdd_context_t *hdd_ctx,
struct pdev_osif_priv *os_priv)
{
/* Initialize the OS private structure*/
os_priv->wiphy = hdd_ctx->wiphy;
}
int hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id)
{
@ -62,13 +70,22 @@ int hdd_create_and_store_pdev(hdd_context_t *hdd_ctx)
{
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
struct wlan_objmgr_pdev *pdev;
struct pdev_osif_priv *priv;
if (!psoc) {
hdd_err("Psoc NULL");
return -EINVAL;
}
pdev = wlan_objmgr_pdev_obj_create(psoc, NULL);
priv = qdf_mem_malloc(sizeof(*priv));
if (priv == NULL) {
hdd_err("pdev os obj create failed");
return -ENOMEM;
}
hdd_init_os_priv(hdd_ctx, priv);
pdev = wlan_objmgr_pdev_obj_create(psoc, priv);
if (!pdev) {
hdd_err("pdev obj create failed");
return -ENOMEM;
@ -81,11 +98,16 @@ int hdd_create_and_store_pdev(hdd_context_t *hdd_ctx)
int hdd_release_and_destroy_pdev(hdd_context_t *hdd_ctx)
{
struct wlan_objmgr_pdev *pdev = hdd_ctx->hdd_pdev;
struct pdev_osif_priv *osif_priv;
hdd_ctx->hdd_pdev = NULL;
if (!pdev)
return -EINVAL;
osif_priv = pdev->pdev_nif.pdev_ospriv;
pdev->pdev_nif.pdev_ospriv = NULL;
qdf_mem_free(osif_priv);
return qdf_status_to_os_return(wlan_objmgr_pdev_obj_delete(pdev));
}

View file

@ -50,6 +50,7 @@
#ifdef WLAN_UMAC_CONVERGENCE
#include "wlan_cfg80211.h"
#endif
#include <qca_vendor.h>
#define MAX_RATES 12
#define HDD_WAKE_LOCK_SCAN_DURATION (5 * 1000) /* in msec */

View file

@ -32,6 +32,7 @@
#include "wlan_hdd_trace.h"
#include "wlan_hdd_lpass.h"
#include "hif.h"
#include <qca_vendor.h>
#ifdef WLAN_FEATURE_LINK_LAYER_STATS

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -33,6 +33,7 @@
#include "sme_api.h"
#include "wlan_hdd_main.h"
#include "wlan_hdd_subnet_detect.h"
#include <qca_vendor.h>
/*
* define short names for the global vendor params

View file

@ -46,6 +46,7 @@
#include "cds_sched.h"
#include "wma_types.h"
#include "cds_concurrency.h"
#include <qca_vendor.h>
static int32_t wlan_hdd_tdls_peer_reset_discovery_processed(tdlsCtx_t *

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -32,6 +32,7 @@
#include "wlan_hdd_main.h"
#include "wlan_hdd_tsf.h"
#include "wma_api.h"
#include <qca_vendor.h>
static struct completion tsf_sync_get_completion_evt;
#define WLAN_TSF_SYNC_GET_TIMEOUT 2000