qcacmn: Add cfg80211 scan start and stop command
Add cfg80211 scan start and scan stop commands. Change-Id: I20b6c7743496ae82cc3a93befb5b68812047ec1a CRs-Fixed: 1095299
这个提交包含在:
@@ -28,10 +28,15 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <qca_vendor.h>
|
||||
#include <wlan_scan_public_structs.h>
|
||||
#include <qdf_list.h>
|
||||
#include <qdf_types.h>
|
||||
#include <wlan_scan_ucfg_api.h>
|
||||
|
||||
|
||||
/* Max number of scans allowed from userspace */
|
||||
#define WLAN_MAX_SCAN_COUNT 8
|
||||
|
||||
#ifdef WLAN_ENABLE_AGEIE_ON_SCAN_RESULTS
|
||||
/* GPS application requirement */
|
||||
#define QCOM_VENDOR_IE_ID 221
|
||||
@@ -40,6 +45,11 @@
|
||||
#define QCOM_OUI3 0xC6
|
||||
#define QCOM_VENDOR_IE_AGE_TYPE 0x100
|
||||
#define QCOM_VENDOR_IE_AGE_LEN (sizeof(qcom_ie_age) - 2)
|
||||
#define SCAN_DONE_EVENT_BUF_SIZE 4096
|
||||
#define INVAL_SCAN_ID 0xFFFFFFFF
|
||||
#define INVAL_VDEV_ID 0xFFFFFFFF
|
||||
#define INVAL_PDEV_ID 0xFFFFFFFF
|
||||
|
||||
|
||||
/**
|
||||
* typedef struct qcom_ie_age - age ie
|
||||
@@ -72,16 +82,55 @@ typedef struct {
|
||||
/**
|
||||
* struct osif_scan_pdev - OS scan private strcutre
|
||||
* scan_req_q: Scan request queue
|
||||
* req_id: Scan request Id
|
||||
*/
|
||||
struct osif_scan_pdev{
|
||||
qdf_list_t scan_req_q;
|
||||
wlan_scan_requester req_id;
|
||||
};
|
||||
|
||||
/*
|
||||
* enum scan_source - scan request source
|
||||
* @NL_SCAN: Scan initiated from NL
|
||||
* @VENDOR_SCAN: Scan intiated from vendor command
|
||||
*/
|
||||
enum scan_source {
|
||||
NL_SCAN,
|
||||
VENDOR_SCAN,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_req - Scan Request entry
|
||||
* @node : List entry element
|
||||
* @scan_request: scan request holder
|
||||
* @scan_id: scan identifier used across host layers which is generated at WMI
|
||||
* @source: scan request originator (NL/Vendor scan)
|
||||
*
|
||||
* Scan request linked list element
|
||||
*/
|
||||
struct scan_req {
|
||||
qdf_list_node_t node;
|
||||
struct cfg80211_scan_request *scan_request;
|
||||
uint32_t scan_id;
|
||||
uint8_t source;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* wlan_cfg80211_scan_priv_init() - API to initialize cfg80211 scan
|
||||
* @pdev: Pointer to net device
|
||||
*
|
||||
* API to initialize cfg80211 scan module.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cfg80211_scan_priv_init(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* wlan_cfg80211_scan() - API to process cfg80211 scan request
|
||||
* @wiphy: Pointer to wiphy
|
||||
* @dev: Pointer to net device
|
||||
* @pdev: Pointer to pdev
|
||||
* @request: Pointer to scan request
|
||||
* @source: source of scan request
|
||||
*
|
||||
* API to trigger scan and update cfg80211 scan database.
|
||||
* scan dump command can be used to fetch scan results
|
||||
@@ -89,11 +138,9 @@ struct osif_scan_pdev{
|
||||
*
|
||||
* 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);
|
||||
int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev,
|
||||
struct cfg80211_scan_request *request,
|
||||
uint8_t source);
|
||||
|
||||
/**
|
||||
* wlan_cfg80211_inform_bss_frame() - API to inform beacon to cfg80211
|
||||
@@ -107,4 +154,44 @@ int wlan_cfg80211_scan(struct wiphy *wiphy,
|
||||
*/
|
||||
void wlan_cfg80211_inform_bss_frame(struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_cache_entry *scan_params);
|
||||
|
||||
/**
|
||||
* wlan_vendor_abort_scan() - API to vendor abort scan
|
||||
* @pdev: Pointer to pdev
|
||||
* @data: pointer to data
|
||||
* @data_len: Data length
|
||||
*
|
||||
* API to abort scan through vendor command
|
||||
*
|
||||
* Return: 0 for success, non zero for failure
|
||||
*/
|
||||
int wlan_vendor_abort_scan(struct wlan_objmgr_pdev *pdev,
|
||||
const void *data, int data_len);
|
||||
|
||||
/**
|
||||
* wlan_cfg80211_abort_scan() - API to abort scan through cfg80211
|
||||
* @pdev: Pointer to pdev
|
||||
*
|
||||
* API to abort scan through cfg80211 request
|
||||
*
|
||||
* Return: 0 for success, non zero for failure
|
||||
*/
|
||||
int wlan_cfg80211_abort_scan(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* wlan_abort_scan() - Generic API to abort scan request
|
||||
* @pdev: Pointer to pdev
|
||||
* @pdev_id: pdev id
|
||||
* @vdev_id: vdev id
|
||||
* @scan_id: scan id
|
||||
*
|
||||
* Generic API to abort scans
|
||||
*
|
||||
* Return: 0 for success, non zero for failure
|
||||
*/
|
||||
QDF_STATUS wlan_abort_scan(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t pdev_id,
|
||||
uint32_t vdev_id,
|
||||
wlan_scan_id scan_id);
|
||||
|
||||
#endif
|
||||
|
在新工单中引用
屏蔽一个用户