qcacmn: Define os private structure in pdev object
-Define OS private memory structure and provide pointer to store the private data of each umac module's os specific data -Initialize pdev's os private structure member 'wiphy'. -Move vendor command definition to common project. Change-Id: I2033bfbf0fe38e82c3a14942ac9f9bfda45e2c6c CRs-Fixed: 2002991
This commit is contained in:
3352
os_if/linux/qca_vendor.h
Normal file
3352
os_if/linux/qca_vendor.h
Normal file
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
Load Diff
98
os_if/linux/scan/inc/wlan_cfg80211_scan.h
Normal file
98
os_if/linux/scan/inc/wlan_cfg80211_scan.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: declares driver functions interfacing with linux kernel
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WLAN_CFG80211_SCAN_H_
|
||||
#define _WLAN_CFG80211_SCAN_H_
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <qca_vendor.h>
|
||||
#include <qdf_list.h>
|
||||
#include <qdf_types.h>
|
||||
|
||||
#ifdef WLAN_ENABLE_AGEIE_ON_SCAN_RESULTS
|
||||
/* GPS application requirement */
|
||||
#define QCOM_VENDOR_IE_ID 221
|
||||
#define QCOM_OUI1 0x00
|
||||
#define QCOM_OUI2 0xA0
|
||||
#define QCOM_OUI3 0xC6
|
||||
#define QCOM_VENDOR_IE_AGE_TYPE 0x100
|
||||
#define QCOM_VENDOR_IE_AGE_LEN (sizeof(qcom_ie_age) - 2)
|
||||
|
||||
/**
|
||||
* typedef struct qcom_ie_age - age ie
|
||||
*
|
||||
* @element_id: Element id
|
||||
* @len: Length
|
||||
* @oui_1: OUI 1
|
||||
* @oui_2: OUI 2
|
||||
* @oui_3: OUI 3
|
||||
* @type: Type
|
||||
* @age: Age
|
||||
* @tsf_delta: tsf delta from FW
|
||||
* @beacon_tsf: original beacon TSF
|
||||
* @seq_ctrl: sequence control field
|
||||
*/
|
||||
typedef struct {
|
||||
u8 element_id;
|
||||
u8 len;
|
||||
u8 oui_1;
|
||||
u8 oui_2;
|
||||
u8 oui_3;
|
||||
u32 type;
|
||||
u32 age;
|
||||
u32 tsf_delta;
|
||||
u64 beacon_tsf;
|
||||
u16 seq_ctrl;
|
||||
} __attribute__ ((packed)) qcom_ie_age;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct osif_scan_pdev - OS scan private strcutre
|
||||
* scan_req_q: Scan request queue
|
||||
*/
|
||||
struct osif_scan_pdev{
|
||||
qdf_list_t scan_req_q;
|
||||
};
|
||||
|
||||
/**
|
||||
* wlan_cfg80211_scan() - API to process cfg80211 scan request
|
||||
* @wiphy: Pointer to wiphy
|
||||
* @dev: Pointer to net device
|
||||
* @request: Pointer to scan request
|
||||
*
|
||||
* API to trigger scan and update cfg80211 scan database.
|
||||
* scan dump command can be used to fetch scan results
|
||||
* on receipt of scan complete event.
|
||||
*
|
||||
* Return: 0 for success, non zero for failure
|
||||
*/
|
||||
int wlan_cfg80211_scan(struct wiphy *wiphy,
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
|
||||
struct net_device *dev,
|
||||
#endif
|
||||
struct cfg80211_scan_request *request);
|
||||
|
||||
|
||||
#endif
|
34
os_if/linux/scan/src/wlan_cfg80211_scan.c
Normal file
34
os_if/linux/scan/src/wlan_cfg80211_scan.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: defines driver functions interfacing with linux kernel
|
||||
*/
|
||||
|
||||
#include <wlan_cfg80211_scan.h>
|
||||
#include <linux/wireless.h>
|
||||
#include <net/cfg80211.h>
|
||||
|
||||
int wlan_cfg80211_scan(struct wiphy *wiphy,
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
|
||||
struct net_device *dev,
|
||||
#endif
|
||||
struct cfg80211_scan_request *request)
|
||||
{
|
||||
return 0;
|
||||
}
|
@@ -19,3 +19,4 @@
|
||||
/**
|
||||
* DOC: defines driver functions interfacing with linux kernel
|
||||
*/
|
||||
#include "wlan_cfg80211.h"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -20,10 +20,14 @@
|
||||
* DOC: declares driver functions interfacing with linux kernel
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WLAN_CFG80211_H_
|
||||
#define _WLAN_CFG80211_H_
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <qca-vendor.h>
|
||||
#include <qca_vendor.h>
|
||||
|
||||
#define COMMON_VENDOR_COMMANDS \
|
||||
{ \
|
||||
@@ -41,22 +45,4 @@
|
||||
.doit = NULL \
|
||||
},
|
||||
|
||||
/**
|
||||
* wlan_cfg80211_scan() - API to process cfg80211 scan request
|
||||
* @wiphy: Pointer to wiphy
|
||||
* @dev: Pointer to net device
|
||||
* @request: Pointer to scan request
|
||||
*
|
||||
* API to trigger scan and update cfg80211 scan database.
|
||||
* scan dump command can be used to fetch scan results
|
||||
* on receipt of scan complete event.
|
||||
*
|
||||
* Return: 0 for success, non zero for failure
|
||||
*/
|
||||
|
||||
int wlan_cfg80211_scan(struct wiphy *wiphy,
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
|
||||
struct net_device *dev,
|
||||
#endif
|
||||
struct cfg80211_scan_request *request);
|
||||
|
||||
|
38
os_if/linux/wlan_osif_priv.h
Normal file
38
os_if/linux/wlan_osif_priv.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WLAN_OSIF_PRIV_H_
|
||||
#define _WLAN_OSIF_PRIV_H_
|
||||
|
||||
struct osif_scan_pdev;
|
||||
|
||||
/**
|
||||
* struct pdev_osif_priv - OS private strcutre
|
||||
* wiphy: wiphy handle
|
||||
* legacy_osif_priv: legacy osif private handle
|
||||
* scan_priv: Scan related data used by cfg80211 scan
|
||||
*/
|
||||
|
||||
struct pdev_osif_priv {
|
||||
struct wiphy *wiphy;
|
||||
void *legacy_osif_priv;
|
||||
struct osif_scan_pdev *osif_scan;
|
||||
};
|
||||
|
||||
#endif
|
@@ -108,6 +108,9 @@
|
||||
/* enable/disable min rssi cli block */
|
||||
#define WLAN_PDEV_OP_MIN_RSSI_ENABLE 0x00010000
|
||||
|
||||
|
||||
struct osif_pdev_priv;
|
||||
|
||||
/**
|
||||
* struct wlan_objmgr_pdev_nif - pdev object nif structure
|
||||
* @pdev_fw_caps: radio specific FW capabilities
|
||||
@@ -118,7 +121,7 @@
|
||||
struct wlan_objmgr_pdev_nif {
|
||||
uint32_t pdev_fw_caps;
|
||||
uint32_t pdev_feature_caps;
|
||||
void *pdev_ospriv;
|
||||
struct pdev_osif_priv *pdev_ospriv;
|
||||
uint8_t notified_ap_vdev;
|
||||
};
|
||||
|
||||
@@ -190,7 +193,7 @@ struct wlan_objmgr_pdev {
|
||||
* Failure)
|
||||
*/
|
||||
struct wlan_objmgr_pdev *wlan_objmgr_pdev_obj_create(
|
||||
struct wlan_objmgr_psoc *psoc, void *scn);
|
||||
struct wlan_objmgr_psoc *psoc, struct pdev_osif_priv *osif_priv);
|
||||
|
||||
/**
|
||||
* wlan_objmgr_pdev_obj_delete() - pdev delete
|
||||
@@ -603,7 +606,7 @@ static inline void wlan_pdev_set_hw_macaddr(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: ospriv - private pointer
|
||||
*/
|
||||
static inline void *wlan_pdev_get_ospriv(struct wlan_objmgr_pdev *pdev)
|
||||
static inline struct pdev_osif_priv *wlan_pdev_get_ospriv(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
/* This API is invoked with lock acquired, do not add log prints */
|
||||
return pdev->pdev_nif.pdev_ospriv;
|
||||
|
@@ -79,7 +79,8 @@ static QDF_STATUS wlan_objmgr_pdev_obj_free(struct wlan_objmgr_pdev *pdev)
|
||||
}
|
||||
|
||||
struct wlan_objmgr_pdev *wlan_objmgr_pdev_obj_create(
|
||||
struct wlan_objmgr_psoc *psoc, void *osdev_priv)
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct pdev_osif_priv *osdev_priv)
|
||||
{
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
uint8_t id;
|
||||
|
Reference in New Issue
Block a user