qcacmn: scan convergence - initial set of files
Add initial set of scan files, structure definitions and API proto type. Change-Id: Ibfaef8bb09d51e12bde773fcea69e273eff3bb41 CRs-Fixed: 1095299
Bu işleme şunda yer alıyor:

işlemeyi yapan:
qcabuildsw

ebeveyn
e815fc5b97
işleme
7e3f45da3c
1173
umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h
Normal dosya
1173
umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h
Normal dosya
Dosya farkı çok büyük olduğundan ihmal edildi
Fark Yükle
@@ -22,6 +22,8 @@
|
||||
#ifndef _WLAN_CMN_H_
|
||||
#define _WLAN_CMN_H_
|
||||
|
||||
#include <qdf_types.h>
|
||||
|
||||
/* Max no of UMAC components */
|
||||
#define WLAN_UMAC_MAX_COMPONENTS 25
|
||||
/* Max no. of radios, a pSoc/Device can support */
|
||||
@@ -75,9 +77,11 @@
|
||||
/**
|
||||
* enum wlan_umac_comp_id - UMAC component id
|
||||
* @WLAN_UMAC_COMP_MLME: MLME
|
||||
* @WLAN_UMAC_COMP_SCAN: SCAN MGR
|
||||
* @WLAN_UMAC_COMP_MGMT_TXRX: MGMT Tx/Rx
|
||||
* @WLAN_UMAC_COMP_SERIALIZATION: Serialization
|
||||
* @WLAN_UMAC_COMP_SCAN: SCAN - as scan module uses services provided by
|
||||
* MLME, MGMT_TXRX and SERIALIZATION, SCAN module
|
||||
* must be initializes after above modules.
|
||||
* @WLAN_UMAC_COMP_PMO: PMO component
|
||||
* @WLAN_UMAC_COMP_P2P: P2P
|
||||
* @WLAN_UMAC_COMP_ID_MAX: Maximum components in UMAC
|
||||
@@ -87,9 +91,9 @@
|
||||
*/
|
||||
enum wlan_umac_comp_id {
|
||||
WLAN_UMAC_COMP_MLME = 0,
|
||||
WLAN_UMAC_COMP_SCAN = 1,
|
||||
WLAN_UMAC_COMP_MGMT_TXRX = 2,
|
||||
WLAN_UMAC_COMP_SERIALIZATION = 3,
|
||||
WLAN_UMAC_COMP_MGMT_TXRX = 1,
|
||||
WLAN_UMAC_COMP_SERIALIZATION = 2,
|
||||
WLAN_UMAC_COMP_SCAN = 3,
|
||||
WLAN_UMAC_COMP_PMO = 4,
|
||||
WLAN_UMAC_COMP_P2P = 5,
|
||||
WLAN_UMAC_COMP_ID_MAX,
|
||||
@@ -173,6 +177,126 @@ enum wlan_peer_type {
|
||||
WLAN_PEER_IBSS = 7,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wlan_band - specifies operating channel band
|
||||
* @WLAN_BAND_ALL: Any band
|
||||
* @WLAN_BAND_2_4_GHZ: 2.4 GHz band
|
||||
* @WLAN_BAND_5_GHZ: 5 GHz band
|
||||
* @WLAN_BAND_4_9_GHZ: 4.9 GHz band
|
||||
*/
|
||||
enum wlan_band {
|
||||
WLAN_BAND_ALL,
|
||||
WLAN_BAND_2_4_GHZ,
|
||||
WLAN_BAND_5_GHZ,
|
||||
WLAN_BAND_4_9_GHZ,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wlan_bss_type - type of network
|
||||
* @WLAN_TYPE_ANY: Default value
|
||||
* @WLAN_TYPE_BSS: Type BSS
|
||||
* @WLAN_TYPE_IBSS: Type IBSS
|
||||
*/
|
||||
enum wlan_bss_type {
|
||||
WLAN_TYPE_ANY,
|
||||
WLAN_TYPE_BSS,
|
||||
WLAN_TYPE_IBSS,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wlan_pmf_cap: pmf capability
|
||||
* @PMF_DISABLED: PMF is disabled
|
||||
* @PMF_CAPABLE: PMF is supported
|
||||
* @PMF_REQUIRED: PMF is mandatory
|
||||
*/
|
||||
enum wlan_pmf_cap {
|
||||
WLAN_PMF_DISABLED,
|
||||
WLAN_PMF_CAPABLE,
|
||||
WLAN_PMF_REQUIRED,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wlan_auth_type - Enumeration of the various Auth types
|
||||
* @WLAN_AUTH_TYPE_OPEN_SYSTEM: Open auth type
|
||||
* @WLAN_AUTH_TYPE_SHARED_KEY: Shared Key Auth type
|
||||
* @WLAN_AUTH_TYPE_AUTOSWITCH: Auto switch Open/Shared
|
||||
* @WLAN_AUTH_TYPE_WPA: WPA Enterprise
|
||||
* @WLAN_AUTH_TYPE_WPA_PSK: WPA PSK
|
||||
* @WLAN_AUTH_TYPE_WPA_NONE: WPA None
|
||||
* @WLAN_AUTH_TYPE_RSN: RSN Enterprise
|
||||
* @WLAN_AUTH_TYPE_RSN_PSK: RSN PSK
|
||||
* @WLAN_AUTH_TYPE_FT_RSN: FT RSN Enterprise
|
||||
* @WLAN_AUTH_TYPE_FT_RSN_PSK: FT RSN PSK
|
||||
* @WLAN_AUTH_TYPE_WAPI_WAI_CERTIFICATE: WAPI certificate
|
||||
* @WLAN_AUTH_TYPE_WAPI_WAI_PSK: WAPI PSK
|
||||
* @WLAN_AUTH_TYPE_CCKM_WPA: CCKM WPA
|
||||
* @WLAN_AUTH_TYPE_CCKM_RSN: CCKM RSN
|
||||
* @WLAN_AUTH_TYPE_RSN_PSK_SHA256: SHA256 PSK
|
||||
* @WLAN_AUTH_TYPE_RSN_8021X_SHA256: SHA256 Enterprise
|
||||
* @WLAN_NUM_OF_SUPPORT_AUTH_TYPE: Max no of Auth type
|
||||
*/
|
||||
enum wlan_auth_type {
|
||||
WLAN_AUTH_TYPE_OPEN_SYSTEM,
|
||||
WLAN_AUTH_TYPE_SHARED_KEY,
|
||||
WLAN_AUTH_TYPE_AUTOSWITCH,
|
||||
WLAN_AUTH_TYPE_WPA,
|
||||
WLAN_AUTH_TYPE_WPA_PSK,
|
||||
WLAN_AUTH_TYPE_WPA_NONE,
|
||||
WLAN_AUTH_TYPE_RSN,
|
||||
WLAN_AUTH_TYPE_RSN_PSK,
|
||||
WLAN_AUTH_TYPE_FT_RSN,
|
||||
WLAN_AUTH_TYPE_FT_RSN_PSK,
|
||||
WLAN_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
|
||||
WLAN_AUTH_TYPE_WAPI_WAI_PSK,
|
||||
WLAN_AUTH_TYPE_CCKM_WPA,
|
||||
WLAN_AUTH_TYPE_CCKM_RSN,
|
||||
WLAN_AUTH_TYPE_RSN_PSK_SHA256,
|
||||
WLAN_AUTH_TYPE_RSN_8021X_SHA256,
|
||||
WLAN_NUM_OF_SUPPORT_AUTH_TYPE,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wlan_enc_type - Enumeration of the various Enc types
|
||||
* @WLAN_ENCRYPT_TYPE_NONE: No encryption
|
||||
* @WLAN_ENCRYPT_TYPE_WEP40_STATICKEY: WEP 40 Static key
|
||||
* @WLAN_ENCRYPT_TYPE_WEP104_STATICKEY: WEP 104 Static key
|
||||
* @WLAN_ENCRYPT_TYPE_WEP40: WEP 40
|
||||
* @WLAN_ENCRYPT_TYPE_WEP104: WEP 104
|
||||
* @WLAN_ENCRYPT_TYPE_TKIP: TKIP
|
||||
* @WLAN_ENCRYPT_TYPE_AES: AES
|
||||
* @WLAN_ENCRYPT_TYPE_WPI: WAPI
|
||||
* @WLAN_ENCRYPT_TYPE_KRK: KRK
|
||||
* @WLAN_ENCRYPT_TYPE_BTK: BTK
|
||||
* @WLAN_ENCRYPT_TYPE_AES_CMAC: 11W BIP
|
||||
* @WLAN_ENCRYPT_TYPE_ANY: Any
|
||||
* @WLAN_NUM_OF_ENCRYPT_TYPE: Max value
|
||||
*/
|
||||
enum wlan_enc_type {
|
||||
WLAN_ENCRYPT_TYPE_NONE,
|
||||
WLAN_ENCRYPT_TYPE_WEP40_STATICKEY,
|
||||
WLAN_ENCRYPT_TYPE_WEP104_STATICKEY,
|
||||
WLAN_ENCRYPT_TYPE_WEP40,
|
||||
WLAN_ENCRYPT_TYPE_WEP104,
|
||||
WLAN_ENCRYPT_TYPE_TKIP,
|
||||
WLAN_ENCRYPT_TYPE_AES,
|
||||
WLAN_ENCRYPT_TYPE_WPI,
|
||||
WLAN_ENCRYPT_TYPE_KRK,
|
||||
WLAN_ENCRYPT_TYPE_BTK,
|
||||
WLAN_ENCRYPT_TYPE_AES_CMAC,
|
||||
WLAN_ENCRYPT_TYPE_ANY,
|
||||
WLAN_NUM_OF_ENCRYPT_TYPE = WLAN_ENCRYPT_TYPE_ANY,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_ssid - SSID info
|
||||
* @length: ssid length of bss excluding null
|
||||
* @ssid: ssid character array potentially non null terminated
|
||||
*/
|
||||
struct wlan_ssid {
|
||||
uint8_t length;
|
||||
uint8_t ssid[WLAN_SSID_MAX_LEN];
|
||||
};
|
||||
|
||||
/* MAC address length */
|
||||
#define WLAN_MACADDR_LEN 6
|
||||
/* Util API to copy the MAC address */
|
||||
|
@@ -721,4 +721,20 @@ QDF_STATUS wlan_objmgr_pdev_try_get_ref(struct wlan_objmgr_pdev *pdev,
|
||||
void wlan_objmgr_pdev_release_ref(struct wlan_objmgr_pdev *pdev,
|
||||
wlan_objmgr_ref_dbgid id);
|
||||
|
||||
/**
|
||||
* wlan_objmgr_pdev_get_pdev_id() - get pdev id
|
||||
* @pdev: PDEV object
|
||||
*
|
||||
* API to get pdev id from pdev object
|
||||
*
|
||||
* Caller need to acquire lock with wlan_pdev_obj_lock()
|
||||
*
|
||||
* Return: @pdev id
|
||||
*/
|
||||
static inline
|
||||
uint8_t wlan_objmgr_pdev_get_pdev_id(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
/* This API is invoked with lock acquired, do not add log prints */
|
||||
return pdev->pdev_objmgr.wlan_pdev_id;
|
||||
}
|
||||
#endif /* _WLAN_OBJMGR_PDEV_H_*/
|
||||
|
22
umac/scan/core/src/wlan_scan_cache_db.c
Normal dosya
22
umac/scan/core/src/wlan_scan_cache_db.c
Normal dosya
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* 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: contains scan cache api and functionality
|
||||
*/
|
||||
|
184
umac/scan/core/src/wlan_scan_cache_db.h
Normal dosya
184
umac/scan/core/src/wlan_scan_cache_db.h
Normal dosya
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* 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: contains scan cache entry api
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_SCAN_CACHE_DB_H_
|
||||
#define _WLAN_SCAN_CACHE_DB_H_
|
||||
|
||||
#include <scheduler_api.h>
|
||||
#include <wlan_scan_public_structs.h>
|
||||
|
||||
#define SCAN_HASH_SIZE 64
|
||||
#define SCAN_GET_HASH(addr) \
|
||||
(((const uint8_t *)(addr))[QDF_MAC_ADDR_SIZE - 1] % SCAN_HASH_SIZE)
|
||||
#define MAX_SCAN_CACHE_SIZE 300
|
||||
/* Hidden ssid age time in millisec */
|
||||
#define HIDDEN_SSID_TIME (1*60*1000)
|
||||
|
||||
/**
|
||||
* struct scan_dbs - scan cache data base definition
|
||||
* @num_entries: number of scan entries
|
||||
* @scan_hash_tbl: link list of bssid hashed scan cache entries for a pdev
|
||||
*/
|
||||
struct scan_dbs {
|
||||
uint32_t num_entries;
|
||||
qdf_spinlock_t scan_db_lock;
|
||||
qdf_list_t scan_hash_tbl[SCAN_HASH_SIZE];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_bcn_probe_event - beacon/probe info
|
||||
* @frm_type: frame type
|
||||
* @rx_data: mgmt rx data
|
||||
* @psoc: psoc pointer
|
||||
* @buf: rx frame
|
||||
*/
|
||||
struct scan_bcn_probe_event {
|
||||
uint32_t frm_type;
|
||||
struct mgmt_rx_event_params *rx_data;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
qdf_nbuf_t buf;
|
||||
};
|
||||
|
||||
/**
|
||||
* scm_handle_bcn_probe() - Process beacon and probe rsp
|
||||
* @bcn: beacon info;
|
||||
*
|
||||
* API to handle the beacon/probe resp
|
||||
*
|
||||
* Return: QDF status.
|
||||
*/
|
||||
QDF_STATUS scm_handle_bcn_probe(struct scheduler_msg *msg);
|
||||
|
||||
/**
|
||||
* scm_flush_scan_entry() - API to flush the scan entry
|
||||
* @scan_db: scan database
|
||||
* @scan_entry:entry scan_node
|
||||
*
|
||||
* API to flush the scan entry
|
||||
*
|
||||
* Return: QDF status.
|
||||
*/
|
||||
QDF_STATUS scm_flush_scan_entry(struct scan_dbs *scan_db,
|
||||
struct scan_cache_node *scan_node);
|
||||
|
||||
/**
|
||||
* scm_get_scan_result() - fetches scan result
|
||||
* @pdev: pdev info
|
||||
* @filter: Filters
|
||||
*
|
||||
* This function fetches scan result
|
||||
*
|
||||
* Return: scan list
|
||||
*/
|
||||
qdf_list_t *scm_get_scan_result(struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_filter *filter);
|
||||
|
||||
/**
|
||||
* scm_purge_scan_results() - purge the scan list
|
||||
* @scan_result: scan list to be purged
|
||||
*
|
||||
* This function purge the temp scan list
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scm_purge_scan_results(qdf_list_t *scan_result);
|
||||
|
||||
/**
|
||||
* scm_update_scan_mlme_info() - updates scan entry with mlme data
|
||||
* @mlme_info: mlme info to be updated in scan db
|
||||
*
|
||||
* This function updates scan db with mlme data
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scm_update_scan_mlme_info(struct mlme_update_info *mlme_info);
|
||||
|
||||
/**
|
||||
* scm_flush_results() - flush scan entries matching the filter
|
||||
* @pdev: vdev object
|
||||
* @filter: filter to flush the scan entries
|
||||
*
|
||||
* Flush scan entries matching the filter.
|
||||
*
|
||||
* Return: QDF status.
|
||||
*/
|
||||
QDF_STATUS scm_flush_results(struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_filter *filter);
|
||||
|
||||
/**
|
||||
* scm_filter_valid_channel() - The Public API to filter scan result
|
||||
* based on valid channel list
|
||||
* @pdev: pdev object
|
||||
* @chan_list: valid channel list
|
||||
* @num_chan: number of valid channels
|
||||
*
|
||||
* The Public API to to filter scan result
|
||||
* based on valid channel list.
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
void scm_filter_valid_channel(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *chan_list, uint32_t num_chan);
|
||||
|
||||
/**
|
||||
* scm_iterate_scan_db() - function to iterate scan table
|
||||
* @pdev: pdev object
|
||||
* @func: iterator function pointer
|
||||
* @arg: argument to be passed to func()
|
||||
*
|
||||
* API, this API iterates scan table and invokes func
|
||||
* on each scan enetry by passing scan entry and arg.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
scm_iterate_scan_db(struct wlan_objmgr_pdev *pdev,
|
||||
scan_iterator_func func, void *arg);
|
||||
|
||||
/**
|
||||
* scm_scan_register_bcn_cb() - API to register api to indicate bcn/probe
|
||||
* as soon as they are received
|
||||
* @pdev: psoc
|
||||
* @cb: callback to be registered
|
||||
* @type: Type of callback to be registered
|
||||
*
|
||||
* Return: enum scm_scan_status
|
||||
*/
|
||||
QDF_STATUS scm_scan_register_bcn_cb(struct wlan_objmgr_psoc *psoc,
|
||||
update_beacon_cb cb, enum scan_cb_type type);
|
||||
|
||||
/**
|
||||
* scm_db_init() - API to init scan db
|
||||
* @psoc: psoc
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scm_db_init(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* scm_db_deinit() - API to deinit scan db
|
||||
* @psoc: psoc
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scm_db_deinit(struct wlan_objmgr_psoc *psoc);
|
||||
#endif
|
70
umac/scan/core/src/wlan_scan_cache_db_i.h
Normal dosya
70
umac/scan/core/src/wlan_scan_cache_db_i.h
Normal dosya
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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: contains scan cache internal api
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_SCAN_CACHE_DB_I_H_
|
||||
#define _WLAN_SCAN_CACHE_DB_I_H_
|
||||
|
||||
/**
|
||||
* wlan_pdevid_get_scan_db() - private API to get scan db from pdev id
|
||||
* @psoc: psoc object
|
||||
* @pdev_id: Pdev_id
|
||||
* Return: scan db for the pdev id
|
||||
*/
|
||||
static inline struct scan_dbs *
|
||||
wlan_pdevid_get_scan_db(struct wlan_objmgr_psoc *psoc, uint8_t pdev_id)
|
||||
{
|
||||
struct wlan_scan_obj *scan_obj = NULL;
|
||||
|
||||
if (pdev_id > WLAN_UMAC_MAX_PDEVS) {
|
||||
scm_err("invalid pdev_id %d", pdev_id);
|
||||
return NULL;
|
||||
}
|
||||
scan_obj = wlan_psoc_get_scan_obj(psoc);
|
||||
|
||||
if (!scan_obj)
|
||||
return NULL;
|
||||
|
||||
return &(scan_obj->scan_db[pdev_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_pdev_get_scan_db() - private API to get scan db from pdev
|
||||
* @psoc: psoc object
|
||||
* @pdev: Pdev
|
||||
*
|
||||
* Return: scan db for the pdev
|
||||
*/
|
||||
static inline struct scan_dbs *
|
||||
wlan_pdev_get_scan_db(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
uint8_t pdev_id;
|
||||
|
||||
if (!pdev) {
|
||||
scm_err("pdev is NULL");
|
||||
return NULL;
|
||||
}
|
||||
pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
|
||||
|
||||
return wlan_pdevid_get_scan_db(psoc, pdev_id);
|
||||
}
|
||||
#endif
|
20
umac/scan/core/src/wlan_scan_cache_db_ops.c
Normal dosya
20
umac/scan/core/src/wlan_scan_cache_db_ops.c
Normal dosya
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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: contains scan cache operations
|
||||
*/
|
22
umac/scan/core/src/wlan_scan_main.c
Normal dosya
22
umac/scan/core/src/wlan_scan_main.c
Normal dosya
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* 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: contains core scan function definitions
|
||||
*/
|
||||
|
407
umac/scan/core/src/wlan_scan_main.h
Normal dosya
407
umac/scan/core/src/wlan_scan_main.h
Normal dosya
@@ -0,0 +1,407 @@
|
||||
/*
|
||||
* 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: contains scan init/deinit public api
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_SCAN_MAIN_API_H_
|
||||
#define _WLAN_SCAN_MAIN_API_H_
|
||||
|
||||
#include <qdf_atomic.h>
|
||||
#include <wlan_scan_structs.h>
|
||||
#include "wlan_scan_cache_db.h"
|
||||
|
||||
#define scm_log(level, args...) \
|
||||
QDF_TRACE(QDF_MODULE_ID_SCAN, level, ## args)
|
||||
#define scm_logfl(level, format, args...) \
|
||||
scm_log(level, FL(format), ## args)
|
||||
#define scm_alert(format, args...) \
|
||||
scm_logfl(QDF_TRACE_LEVEL_FATAL, format, ## args)
|
||||
#define scm_err(format, args...) \
|
||||
scm_logfl(QDF_TRACE_LEVEL_ERROR, format, ## args)
|
||||
#define scm_warn(format, args...) \
|
||||
scm_logfl(QDF_TRACE_LEVEL_WARN, format, ## args)
|
||||
#define scm_notice(format, args...) \
|
||||
scm_logfl(QDF_TRACE_LEVEL_INFO, format, ## args)
|
||||
#define scm_info(format, args...) \
|
||||
scm_logfl(QDF_TRACE_LEVEL_INFO_HIGH, format, ## args)
|
||||
#define scm_debug(format, args...) \
|
||||
scm_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args)
|
||||
|
||||
#define MAX_SCAN_EVENT_HANDLERS_PER_PDEV 100
|
||||
#define WLAN_MAX_MODULE_NAME 40
|
||||
#define WLAN_MAX_REQUESTORS 200
|
||||
#define WLAN_SCAN_ID_MASK 0x00000FFF
|
||||
#define WLAN_HOST_SCAN_REQ_ID_PREFIX 0x0000A000
|
||||
#define WLAN_SCAN_REQUESTER_ID_PREFIX 0x0000A000
|
||||
|
||||
#ifdef CONFIG_MCL
|
||||
#define SCAN_ACTIVE_DWELL_TIME 20
|
||||
#define SCAN_PASSIVE_DWELL_TIME 100
|
||||
#define SCAN_MAX_REST_TIME 20
|
||||
#define SCAN_MIN_REST_TIME 0
|
||||
#define SCAN_BURST_DURATION 20
|
||||
#define SCAN_CONC_ACTIVE_DWELL_TIME 20
|
||||
#define SCAN_CONC_PASSIVE_DWELL_TIME 100
|
||||
#define SCAN_CONC_IDLE_TIME 25
|
||||
#define SCAN_CONC_MAX_REST_TIME 20
|
||||
#define SCAN_CONC_MIN_REST_TIME 10
|
||||
#define SCAN_REPEAT_PROBE_TIME 11
|
||||
#define SCAN_PROBE_SPACING_TIME 0
|
||||
#define SCAN_PROBE_DELAY 0
|
||||
#define SCAN_MAX_SCAN_TIME 30000
|
||||
#define SCAN_NUM_PROBES 3
|
||||
#define SCAN_NETWORK_IDLE_TIMEOUT 0
|
||||
#else
|
||||
#define SCAN_ACTIVE_DWELL_TIME 105
|
||||
#define SCAN_PASSIVE_DWELL_TIME 300
|
||||
#define SCAN_MAX_REST_TIME 0
|
||||
#define SCAN_MIN_REST_TIME 50
|
||||
#define SCAN_BURST_DURATION 0
|
||||
#define SCAN_CONC_ACTIVE_DWELL_TIME 0
|
||||
#define SCAN_CONC_PASSIVE_DWELL_TIME 0
|
||||
#define SCAN_CONC_IDLE_TIME 0
|
||||
#define SCAN_CONC_MAX_REST_TIME 0
|
||||
#define SCAN_CONC_MIN_REST_TIME 0
|
||||
#define SCAN_REPEAT_PROBE_TIME 50
|
||||
#define SCAN_PROBE_SPACING_TIME 0
|
||||
#define SCAN_PROBE_DELAY 0
|
||||
#define SCAN_MAX_SCAN_TIME 50000
|
||||
#define SCAN_NUM_PROBES 0
|
||||
#define SCAN_NETWORK_IDLE_TIMEOUT 200
|
||||
#endif
|
||||
|
||||
#define SCAN_TIMEOUT_GRACE_PERIOD 10
|
||||
/* scan age time in millisec */
|
||||
#define SCAN_CACHE_AGING_TIME (300*1000)
|
||||
#define SCAN_MAX_BSS_PDEV 100
|
||||
#define SCAN_MAX_NUM_SCAN_ALLOWED 8
|
||||
#define SCAN_PRIORITY SCAN_PRIORITY_LOW
|
||||
|
||||
/**
|
||||
* struct cb_handler - defines scan event handler
|
||||
* call back function and arguments
|
||||
* @func: handler function pointer
|
||||
* @arg: argument to handler function
|
||||
*/
|
||||
struct cb_handler {
|
||||
scan_event_handler func;
|
||||
void *arg;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pdev_scan_ev_handler - pdev scan event handlers
|
||||
* @cb_handler: array of registered scan handlers
|
||||
*/
|
||||
struct pdev_scan_ev_handler {
|
||||
uint32_t handler_cnt;
|
||||
struct cb_handler cb_handlers[MAX_SCAN_EVENT_HANDLERS_PER_PDEV];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct global_scan_ev_handlers - per pdev registered scan event handlers
|
||||
* @pdev_scan_ev_handler: per pdev registered scan event handlers
|
||||
*/
|
||||
struct global_scan_ev_handlers {
|
||||
struct pdev_scan_ev_handler pdev_ev_handlers[WLAN_UMAC_MAX_PDEVS];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_requester_info - defines scan requester id
|
||||
* and event handler mapping
|
||||
* @requester: requester ID allocated
|
||||
* @module: module name of requester
|
||||
* @ev_handler: event handlerto be invoked
|
||||
*/
|
||||
struct scan_requester_info {
|
||||
wlan_scan_requester requester;
|
||||
uint8_t module[WLAN_MAX_MODULE_NAME];
|
||||
struct cb_handler ev_handler;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pdev_scan_info - defines per pdev scan info
|
||||
* @last_scan_time: time of last scan start on this pdev
|
||||
*/
|
||||
|
||||
struct pdev_scan_info {
|
||||
qdf_time_t last_scan_time;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_default_params - default scan parameters to be used
|
||||
* @active_dwell: default active dwell time
|
||||
* @passive_dwell:default passive dwell time
|
||||
* @max_rest_time: default max rest time
|
||||
* @min_rest_time: default min rest time
|
||||
* @idle_time: default idle time
|
||||
* @conc_active_dwell: default concurrent active dwell time
|
||||
* @conc_passive_dwell: default concurrent passive dwell time
|
||||
* @conc_max_rest_time: default concurrent max rest time
|
||||
* @conc_min_rest_time: default concurrent min rest time
|
||||
* @conc_idle_time: default concurrent idle time
|
||||
* @repeat_probe_time: default repeat probe time
|
||||
* @probe_spacing_time: default probe spacing time
|
||||
* @probe_delay: default probe delay
|
||||
* @burst_duration: default burst duration
|
||||
* @max_scan_time: default max scan time
|
||||
* @num_probes: default maximum number of probes to sent
|
||||
* @cache_aging_time: default scan cache aging time
|
||||
* @max_bss_per_pdev: maximum number of bss entries to be maintained per pdev
|
||||
* @max_num_scan_allowed: maximum number of parallel scan allowed per psoc
|
||||
* @scan_priority: default scan priority
|
||||
* @scan_f_passive: passively scan all channels including active channels
|
||||
* @scan_f_bcast_probe: add wild card ssid prbreq even if ssid_list is specified
|
||||
* @scan_f_cck_rates: add cck rates to rates/xrates ie in prb req
|
||||
* @scan_f_ofdm_rates: add ofdm rates to rates/xrates ie in prb req
|
||||
* @scan_f_chan_stat_evnt: enable indication of chan load and noise floor
|
||||
* @scan_f_filter_prb_req: filter Probe request frames
|
||||
* @scan_f_bypass_dfs_chn: when set, do not scan DFS channels
|
||||
* @scan_f_continue_on_err:continue scan even if few certain erros have occurred
|
||||
* @scan_f_offchan_mgmt_tx: allow mgmt transmission during off channel scan
|
||||
* @scan_f_offchan_data_tx: allow data transmission during off channel scan
|
||||
* @scan_f_promisc_mode: scan with promiscuous mode
|
||||
* @scan_f_capture_phy_err: enable capture ppdu with phy errrors
|
||||
* @scan_f_strict_passive_pch: do passive scan on passive channels
|
||||
* @scan_f_half_rate: enable HALF (10MHz) rate support
|
||||
* @scan_f_quarter_rate: set Quarter (5MHz) rate support
|
||||
* @scan_f_force_active_dfs_chn: allow to send probe req on DFS channel
|
||||
* @scan_f_add_tpc_ie_in_probe: add TPC ie in probe req frame
|
||||
* @scan_f_add_ds_ie_in_probe: add DS ie in probe req frame
|
||||
* @scan_f_add_spoofed_mac_in_probe: use random mac address for TA in probe
|
||||
* @scan_f_add_rand_seq_in_probe: use random sequence number in probe
|
||||
* @scan_f_en_ie_whitelist_in_probe: enable ie whitelist in probe
|
||||
* @scan_flags: variable to read and set scan_f_* flags in one shot
|
||||
* can be used to dump all scan_f_* flags for debug
|
||||
* @scan_ev_started: notify scan started event
|
||||
* @scan_ev_completed: notify scan completed event
|
||||
* @scan_ev_bss_chan: notify bss chan event
|
||||
* @scan_ev_foreign_chan: notify foreign chan event
|
||||
* @scan_ev_dequeued: notify scan request dequed event
|
||||
* @scan_ev_preempted: notify scan preempted event
|
||||
* @scan_ev_start_failed: notify scan start failed event
|
||||
* @scan_ev_restarted: notify scan restarted event
|
||||
* @scan_ev_foreign_chn_exit: notify foreign chan exit event
|
||||
* @scan_ev_invalid: notify invalid scan request event
|
||||
* @scan_ev_gpio_timeout: notify gpio timeout event
|
||||
* @scan_ev_suspended: notify scan suspend event
|
||||
* @scan_ev_resumed: notify scan resumed event
|
||||
* @scan_events: variable to read and set scan_ev_* flags in one shot
|
||||
* can be used to dump all scan_ev_* flags for debug
|
||||
*/
|
||||
struct scan_default_params {
|
||||
uint32_t active_dwell;
|
||||
uint32_t passive_dwell;
|
||||
uint32_t max_rest_time;
|
||||
uint32_t min_rest_time;
|
||||
uint32_t idle_time;
|
||||
uint32_t conc_active_dwell;
|
||||
uint32_t conc_passive_dwell;
|
||||
uint32_t conc_max_rest_time;
|
||||
uint32_t conc_min_rest_time;
|
||||
uint32_t conc_idle_time;
|
||||
uint32_t repeat_probe_time;
|
||||
uint32_t probe_spacing_time;
|
||||
uint32_t probe_delay;
|
||||
uint32_t burst_duration;
|
||||
uint32_t max_scan_time;
|
||||
uint32_t num_probes;
|
||||
uint32_t scan_cache_aging_time;
|
||||
uint16_t max_bss_per_pdev;
|
||||
uint8_t max_num_scan_allowed;
|
||||
enum scan_priority scan_priority;
|
||||
union {
|
||||
struct {
|
||||
uint32_t scan_f_passive:1,
|
||||
scan_f_bcast_probe:1,
|
||||
scan_f_cck_rates:1,
|
||||
scan_f_ofdm_rates:1,
|
||||
scan_f_chan_stat_evnt:1,
|
||||
scan_f_filter_prb_req:1,
|
||||
scan_f_bypass_dfs_chn:1,
|
||||
scan_f_continue_on_err:1,
|
||||
scan_f_offchan_mgmt_tx:1,
|
||||
scan_f_offchan_data_tx:1,
|
||||
scan_f_promisc_mode:1,
|
||||
scan_f_capture_phy_err:1,
|
||||
scan_f_strict_passive_pch:1,
|
||||
scan_f_half_rate:1,
|
||||
scan_f_quarter_rate:1,
|
||||
scan_f_force_active_dfs_chn:1,
|
||||
scan_f_add_tpc_ie_in_probe:1,
|
||||
scan_f_add_ds_ie_in_probe:1,
|
||||
scan_f_add_spoofed_mac_in_probe:1,
|
||||
scan_f_add_rand_seq_in_probe:1,
|
||||
scan_f_en_ie_whitelist_in_probe:1,
|
||||
scan_f_forced:1,
|
||||
scan_f_2ghz:1,
|
||||
scan_f_5ghz:1,
|
||||
scan_f_80mhz:1;
|
||||
};
|
||||
uint32_t scan_flags;
|
||||
};
|
||||
union {
|
||||
struct {
|
||||
uint32_t scan_ev_started:1,
|
||||
scan_ev_completed:1,
|
||||
scan_ev_bss_chan:1,
|
||||
scan_ev_foreign_chan:1,
|
||||
scan_ev_dequeued:1,
|
||||
scan_ev_preempted:1,
|
||||
scan_ev_start_failed:1,
|
||||
scan_ev_restarted:1,
|
||||
scan_ev_foreign_chn_exit:1,
|
||||
scan_ev_invalid:1,
|
||||
scan_ev_gpio_timeout:1,
|
||||
scan_ev_suspended:1,
|
||||
scan_ev_resumed:1;
|
||||
};
|
||||
uint32_t scan_events;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_cb - nif/sif function callbacks
|
||||
* @inform_beacon: cb to indicate frame to OS
|
||||
* @update_beacon: cb to indicate frame to MLME
|
||||
*/
|
||||
struct scan_cb {
|
||||
update_beacon_cb inform_beacon;
|
||||
update_beacon_cb update_beacon;
|
||||
/* Define nif/sif function callbacks here */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_scan_obj - scan object definition
|
||||
* @scan_db: scan cache data base
|
||||
* @lock: spin lock
|
||||
* @scan_def: default scan parameters
|
||||
* @cb: nif/sif function callbacks
|
||||
* @requesters: requester allocation pool
|
||||
* @scan_ids: last allocated scan id
|
||||
* @global_evhandlers: registered scan event handlers
|
||||
*/
|
||||
struct wlan_scan_obj {
|
||||
qdf_spinlock_t lock;
|
||||
qdf_atomic_t scan_ids;
|
||||
struct scan_dbs scan_db[WLAN_UMAC_MAX_PDEVS];
|
||||
struct scan_default_params scan_def;
|
||||
struct scan_cb cb;
|
||||
struct scan_requester_info requesters[WLAN_MAX_REQUESTORS];
|
||||
struct global_scan_ev_handlers global_evhandlers;
|
||||
struct pdev_scan_info pdev_info[WLAN_UMAC_MAX_PDEVS];
|
||||
};
|
||||
|
||||
/**
|
||||
* wlan_vdev_get_scan_obj() - private API to get scan object from vdev
|
||||
* @psoc: vdev object
|
||||
*
|
||||
* Return: scan object
|
||||
*/
|
||||
static inline struct wlan_scan_obj *
|
||||
wlan_vdev_get_scan_obj(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc =
|
||||
wlan_pdev_get_psoc(wlan_vdev_get_pdev(vdev));
|
||||
|
||||
return (struct wlan_scan_obj *)
|
||||
wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||
WLAN_UMAC_COMP_SCAN);
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_psoc_get_scan_obj() - private API to get scan object from psoc
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: scan object
|
||||
*/
|
||||
static inline struct wlan_scan_obj *
|
||||
wlan_psoc_get_scan_obj(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return (struct wlan_scan_obj *)
|
||||
wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||
WLAN_UMAC_COMP_SCAN);
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_scan_vdev_get_pdev_id)() - private API to get pdev id from vdev object
|
||||
* @vdev: vdev object
|
||||
*
|
||||
* Return: parent pdev id
|
||||
*/
|
||||
static inline uint8_t
|
||||
wlan_scan_vdev_get_pdev_id(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev);
|
||||
|
||||
return wlan_objmgr_pdev_get_pdev_id(pdev);
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_vdev_get_pdev_scan_ev_handlers() - private API to get
|
||||
* pdev scan event handlers
|
||||
* @vdev: vdev object
|
||||
*
|
||||
* Return: pdev_scan_ev_handler object
|
||||
*/
|
||||
static inline struct pdev_scan_ev_handler*
|
||||
wlan_vdev_get_pdev_scan_ev_handlers(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
uint8_t pdevid = wlan_scan_vdev_get_pdev_id(vdev);
|
||||
struct wlan_scan_obj *scan = wlan_vdev_get_scan_obj(vdev);
|
||||
struct pdev_scan_ev_handler *pdev_ev_handler =
|
||||
&scan->global_evhandlers.pdev_ev_handlers[pdevid];
|
||||
|
||||
return pdev_ev_handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_vdev_get_def_scan_params() - private API to get scan defaults
|
||||
* @psoc: vdev object
|
||||
*
|
||||
* Return: scan defaults
|
||||
*/
|
||||
static inline struct scan_default_params*
|
||||
wlan_vdev_get_def_scan_params(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_scan_obj *scan = wlan_vdev_get_scan_obj(vdev);
|
||||
|
||||
return &scan->scan_def;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_scan_psoc_created_notification() - scan psoc create handler
|
||||
* @psoc: psoc object
|
||||
* @arg_list: Argument list
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_scan_psoc_created_notification(struct wlan_objmgr_psoc *psoc,
|
||||
void *arg_list);
|
||||
|
||||
/**
|
||||
* wlan_scan_psoc_deleted_notification() - scan psoc delete handler
|
||||
* @psoc: psoc object
|
||||
* @arg_list: Argument list
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_scan_psoc_deleted_notification(struct wlan_objmgr_psoc *psoc,
|
||||
void *arg_list);
|
||||
#endif
|
21
umac/scan/core/src/wlan_scan_manager.c
Normal dosya
21
umac/scan/core/src/wlan_scan_manager.c
Normal dosya
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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: contains scan manager functionality
|
||||
*/
|
79
umac/scan/core/src/wlan_scan_manager.h
Normal dosya
79
umac/scan/core/src/wlan_scan_manager.h
Normal dosya
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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 internal scan manager api
|
||||
* Core routines which deal with starting a scan,
|
||||
* serializing scan requests, scan cancellation, scan completion,
|
||||
* scan event processing.
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_SCAN_MANAGER_API_H_
|
||||
#define _WLAN_SCAN_MANAGER_API_H_
|
||||
|
||||
#include "wlan_scan_main.h"
|
||||
|
||||
/*
|
||||
* Maximum numbers of callback functions that may be invoked
|
||||
* for a particular scan event.
|
||||
*/
|
||||
#define MAX_SCAN_EVENT_LISTENERS (MAX_SCAN_EVENT_HANDLERS_PER_PDEV + 1)
|
||||
|
||||
/**
|
||||
* struct scan_event_listners - listeners interested in a particular scan event
|
||||
* @count: number of listners
|
||||
* @cb: callback handler
|
||||
*/
|
||||
struct scan_event_listeners {
|
||||
uint32_t count;
|
||||
struct cb_handler cb[MAX_SCAN_EVENT_LISTENERS];
|
||||
};
|
||||
|
||||
/**
|
||||
* scm_scan_start_req() - scan start req core api
|
||||
* @msg: scheduler message object containing start scan req params
|
||||
* @req: start scan req params
|
||||
*
|
||||
* The API to start a scan
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scm_scan_start_req(struct scheduler_msg *msg);
|
||||
|
||||
/**
|
||||
* scm_scan_cancel_req() - scan cancel req core api
|
||||
* @msg: scheduler message object containing stop scan params
|
||||
* @req: stop scan params
|
||||
*
|
||||
* The API to cancel a scan
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scm_scan_cancel_req(struct scheduler_msg *msg);
|
||||
|
||||
|
||||
/**
|
||||
* scm_scan_event_handler() - core scan event handler from tgt interface
|
||||
* @msg: scheduler message object containing scan event
|
||||
*
|
||||
* This function calls registered event handlers of various modules
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scm_scan_event_handler(struct scheduler_msg *msg);
|
||||
#endif
|
791
umac/scan/dispatcher/inc/wlan_scan_public_structs.h
Normal dosya
791
umac/scan/dispatcher/inc/wlan_scan_public_structs.h
Normal dosya
@@ -0,0 +1,791 @@
|
||||
/*
|
||||
* 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: contains scan structure definations
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_SCAN_STRUCTS_H_
|
||||
#define _WLAN_SCAN_STRUCTS_H_
|
||||
#include <wlan_cmn.h>
|
||||
#include <qdf_time.h>
|
||||
#include <qdf_list.h>
|
||||
#include <wlan_cmn_ieee80211.h>
|
||||
|
||||
typedef uint16_t wlan_scan_requester;
|
||||
typedef uint32_t wlan_scan_id;
|
||||
|
||||
#define WLAN_SCAN_MAX_NUM_SSID 10
|
||||
#define WLAN_SCAN_MAX_NUM_BSSID 10
|
||||
#define WLAN_SCAN_MAX_NUM_CHANNELS 40
|
||||
|
||||
#define SCM_PCL_ADVANTAGE 30
|
||||
#define SCM_PCL_RSSI_THRESHOLD -75
|
||||
#define SCM_NUM_RSSI_CAT 15
|
||||
|
||||
#define SCM_BSS_CAP_VALUE_NONE 0/* not much value */
|
||||
#define SCM_BSS_CAP_VALUE_HT 1
|
||||
#define SCM_BSS_CAP_VALUE_VHT 2
|
||||
#define SCM_BSS_CAP_VALUE_WMM 1
|
||||
#define SCM_BSS_CAP_VALUE_UAPSD 1
|
||||
#define SCM_BSS_CAP_VALUE_5GHZ 2
|
||||
|
||||
/**
|
||||
* struct channel_info - BSS channel information
|
||||
* @chan_idx: current operating channel index
|
||||
* @cfreq0: channel frequency index0
|
||||
* @cfreq1: channel frequency index1
|
||||
* @priv: channel private information
|
||||
*/
|
||||
struct channel_info {
|
||||
uint8_t chan_idx;
|
||||
uint8_t cfreq0;
|
||||
uint8_t cfreq1;
|
||||
void *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct element_info - defines length of a memory block and memory block
|
||||
* @len: length of memory block
|
||||
* @ptr: memory block pointer
|
||||
*/
|
||||
struct element_info {
|
||||
uint32_t len;
|
||||
uint8_t *ptr;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ie_list - pointers to various IEs
|
||||
* @tim: pointer to tim ie
|
||||
* @country: pointer to country ie
|
||||
* @ssid: pointer to ssid ie
|
||||
* @rates: pointer to supported rates ie
|
||||
* @xrates: pointer to extended supported rate ie
|
||||
* @csa: pointer to csa ie
|
||||
* @xcsa: pointer to extended csa ie
|
||||
* @wpa: pointer to wpa ie
|
||||
* @wcn: pointer to wcn ie
|
||||
* @rsn: pointer to rsn ie
|
||||
* @wps: pointer to wps ie
|
||||
* @wmeinfo: pointer to wmeinfo ie
|
||||
* @wmeparam: pointer to wmeparam ie
|
||||
* @quiet: pointer to quiet ie
|
||||
* @htcap: pointer to htcap ie
|
||||
* @htinfo: pointer to htinfo ie
|
||||
* @athcaps: pointer to athcaps ie
|
||||
* @athextcaps: pointer to extended athcaps ie
|
||||
* @sfa: pointer to sfa ie
|
||||
* @vendor: pointer to vendor ie
|
||||
* @qbssload: pointer to qbssload ie
|
||||
* @wapi: pointer to wapi ie
|
||||
* @p2p: pointer to p2p ie
|
||||
* @alt_wcn: pointer to alternate wcn ie
|
||||
* @extcaps: pointer to extended caps ie
|
||||
* @ibssdfs: pointer to ibssdfs ie
|
||||
* @sonadv: pointer to wifi son ie
|
||||
* @vhtcap: pointer to vhtcap ie
|
||||
* @vhtop: pointer to vhtop ie
|
||||
* @opmode: pointer to opmode ie
|
||||
* @cswrp: pointer to channel switch announcement wrapper ie
|
||||
* @widebw: pointer to wide band channel switch sub ie
|
||||
* @txpwrenvlp: pointer to tx power envelop sub ie
|
||||
*/
|
||||
struct ie_list {
|
||||
uint8_t *tim;
|
||||
uint8_t *country;
|
||||
uint8_t *ssid;
|
||||
uint8_t *rates;
|
||||
uint8_t *xrates;
|
||||
uint8_t *csa;
|
||||
uint8_t *xcsa;
|
||||
uint8_t *wpa;
|
||||
uint8_t *wcn;
|
||||
uint8_t *rsn;
|
||||
uint8_t *wps;
|
||||
uint8_t *wmeinfo;
|
||||
uint8_t *wmeparam;
|
||||
uint8_t *quiet;
|
||||
uint8_t *htcap;
|
||||
uint8_t *htinfo;
|
||||
uint8_t *athcaps;
|
||||
uint8_t *athextcaps;
|
||||
uint8_t *sfa;
|
||||
uint8_t *vendor;
|
||||
uint8_t *qbssload;
|
||||
uint8_t *wapi;
|
||||
uint8_t *p2p;
|
||||
uint8_t *alt_wcn;
|
||||
uint8_t *extcaps;
|
||||
uint8_t *ibssdfs;
|
||||
uint8_t *sonadv;
|
||||
uint8_t *vhtcap;
|
||||
uint8_t *vhtop;
|
||||
uint8_t *opmode;
|
||||
uint8_t *cswrp;
|
||||
uint8_t *widebw;
|
||||
uint8_t *txpwrenvlp;
|
||||
uint8_t *bwnss_map;
|
||||
uint8_t *secchanoff;
|
||||
uint8_t *mdie;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mlme_info - mlme specific info
|
||||
* temporarily maintained in scan cache for backward compatibility.
|
||||
* must be removed as part of umac convergence.
|
||||
* @bad_ap_time: time when this ap was marked bad
|
||||
* @status: status
|
||||
* @rank: rank
|
||||
* @utility: utility
|
||||
* @assoc_state: association state
|
||||
* @chanload: channel load
|
||||
*/
|
||||
struct mlme_info {
|
||||
qdf_time_t bad_ap_time;
|
||||
uint32_t status;
|
||||
uint32_t rank;
|
||||
uint32_t utility;
|
||||
uint32_t assoc_state;
|
||||
uint32_t chanload;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct bss_info - information required to uniquely define a bss
|
||||
* @chan: bss operating primary channel index
|
||||
* @ssid: ssid of bss
|
||||
* @bssid: bssid of bss
|
||||
*/
|
||||
struct bss_info {
|
||||
uint8_t chan;
|
||||
struct wlan_ssid ssid;
|
||||
struct qdf_mac_addr bssid;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_cache_node - Scan cache entry node
|
||||
* @node: node pointers
|
||||
* @entry: scan entry pointer
|
||||
*/
|
||||
struct scan_cache_node {
|
||||
qdf_list_node_t node; /* MUST be first element */
|
||||
struct scan_cache_entry *entry;
|
||||
};
|
||||
|
||||
struct security_info {
|
||||
enum wlan_enc_type uc_enc;
|
||||
enum wlan_enc_type mc_enc;
|
||||
enum wlan_auth_type auth_type;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_cache_entry: structure containing scan entry
|
||||
* @frm_subtype: updated from beacon/probe
|
||||
* @bssid: bssid
|
||||
* @mac_addr: mac address
|
||||
* @ssid: ssid
|
||||
* @seq_num: sequence number
|
||||
* @phy_mode: Phy mode of the AP
|
||||
* @avg_rssi: Average RSSI fof the AP
|
||||
* @rssi_raw: The rssi of the last beacon/probe received
|
||||
* @bcn_int: Beacon interval of the AP
|
||||
* @cap_info: Capability of the AP
|
||||
* @tsf_info: TSF info
|
||||
* @erp: erp info
|
||||
* @dtim_period: dtime period
|
||||
* @is_p2p_ssid: is P2P entry
|
||||
* @scan_entry_time: boottime in microsec when last beacon/probe is received
|
||||
* @rssi_timestamp: boottime in microsec when RSSI was updated
|
||||
* @hidden_ssid_timestamp: boottime in microsec when hidden
|
||||
* ssid was received
|
||||
* @channel: channel info on which AP is present
|
||||
* @channel_mismatch: if channel received in metadata
|
||||
* doesnot match the one in beacon
|
||||
* @tsf_delta: TSF delta
|
||||
* @prefer_value: Preffer value calulated for the AP
|
||||
* @cap_value: Capability value calculated for the AP
|
||||
* @neg_sec_info: negotiated security info
|
||||
* @rrm_parent_tsf: RRM parent tsf
|
||||
* @mlme_info: Mlme info, this will be updated by MLME for the scan entry
|
||||
* @alt_wcn_ie: alternate WCN IE
|
||||
* @ie_list: IE list pointers
|
||||
* @raw_frame: contain raw frame and the length of the raw frame
|
||||
*/
|
||||
struct scan_cache_entry {
|
||||
uint8_t frm_subtype;
|
||||
struct qdf_mac_addr bssid;
|
||||
struct qdf_mac_addr mac_addr;
|
||||
struct wlan_ssid ssid;
|
||||
uint16_t seq_num;
|
||||
enum wlan_phymode phy_mode;
|
||||
int8_t avg_rssi;
|
||||
int8_t rssi_raw;
|
||||
uint16_t bcn_int;
|
||||
union wlan_capability cap_info;
|
||||
union {
|
||||
uint8_t data[8];
|
||||
uint64_t tsf;
|
||||
} tsf_info;
|
||||
uint8_t erp;
|
||||
uint8_t dtim_period;
|
||||
bool is_p2p;
|
||||
qdf_time_t scan_entry_time;
|
||||
qdf_time_t rssi_timestamp;
|
||||
qdf_time_t hidden_ssid_timestamp;
|
||||
struct channel_info channel;
|
||||
bool channel_mismatch;
|
||||
struct mlme_info mlme_info;
|
||||
uint32_t tsf_delta;
|
||||
uint32_t prefer_value;
|
||||
uint32_t cap_val;
|
||||
struct security_info neg_sec_info;
|
||||
uint32_t rrm_parent_tsf;
|
||||
struct element_info alt_wcn_ie;
|
||||
struct ie_list ie_list;
|
||||
struct element_info raw_frame;
|
||||
};
|
||||
|
||||
#define MAX_FAVORED_BSSID 16
|
||||
#define MAX_AVOID_LIST_BSSID 16
|
||||
#define MAX_ALLOWED_SSID_LIST 4
|
||||
|
||||
/**
|
||||
* struct roam_filter_params - Structure holding roaming parameters
|
||||
* @num_bssid_avoid_list: The number of BSSID's that we should
|
||||
* avoid connecting to. It is like a
|
||||
* blacklist of BSSID's.
|
||||
* also for roaming apart from the connected one's
|
||||
* @num_bssid_favored: Number of BSSID's which have a preference over
|
||||
* others
|
||||
* @raise_rssi_thresh_5g: The RSSI threshold below which the
|
||||
* raise_factor_5g (boost factor) should be
|
||||
* applied.
|
||||
* @drop_rssi_thresh_5g: The RSSI threshold beyond which the
|
||||
* drop_factor_5g (penalty factor) should be
|
||||
* applied
|
||||
* @raise_factor_5g: Boost factor
|
||||
* @drop_factor_5g: Penalty factor
|
||||
* @max_raise_rssi_5g: Maximum amount of Boost that can added
|
||||
* @max_drop_rssi_5g: Maximum amount of penalty that can be subtracted
|
||||
* @is_5g_pref_enabled: 5GHz BSSID preference feature enable/disable.
|
||||
* @bssid_avoid_list: Blacklist SSID's
|
||||
* @bssid_favored: Favorable BSSID's
|
||||
* @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
|
||||
*
|
||||
* This structure holds all the key parameters related to
|
||||
* initial connection and also roaming connections.
|
||||
*/
|
||||
struct roam_filter_params {
|
||||
uint32_t num_bssid_avoid_list;
|
||||
uint32_t num_bssid_favored;
|
||||
int raise_rssi_thresh_5g;
|
||||
int drop_rssi_thresh_5g;
|
||||
uint32_t raise_factor_5g;
|
||||
uint32_t drop_factor_5g;
|
||||
int max_raise_rssi_5g;
|
||||
int max_drop_rssi_5g;
|
||||
uint32_t is_5g_pref_enabled;
|
||||
/* Variable params list */
|
||||
struct qdf_mac_addr bssid_avoid_list[MAX_AVOID_LIST_BSSID];
|
||||
struct qdf_mac_addr bssid_favored[MAX_FAVORED_BSSID];
|
||||
uint8_t bssid_favored_factor[MAX_FAVORED_BSSID];
|
||||
};
|
||||
|
||||
#define WLAN_SCAN_FILTER_NUM_SSID 5
|
||||
#define WLAN_SCAN_FILTER_NUM_BSSID 5
|
||||
|
||||
/**
|
||||
* @age_threshold: If set return entry which are newer than the age_threshold
|
||||
* @p2p_results: If only p2p entries is required
|
||||
* @rrm_measurement_filter: For measurement reports.if set, only SSID, BSSID
|
||||
* and channel is considered for filtering.
|
||||
* @num_of_bssid: number of bssid passed
|
||||
* @num_of_ssid: number of ssid
|
||||
* @num_of_channels: number of channels
|
||||
* @num_of_auth: number of auth types
|
||||
* @num_of_enc_type: number of unicast enc type
|
||||
* @num_of_mc_enc_type: number of multicast enc type
|
||||
* @pmf_cap: Pmf capability
|
||||
* @num_of_pcl_channels: number of pcl channels
|
||||
* @bss_prefer_val: bss prefer value for the RSSI category
|
||||
* @rssi_cat: RSSI category
|
||||
* @strict_sel_5g: only 5G AP
|
||||
* @bss_type: bss type BSS/IBSS etc
|
||||
* @country[3]: Ap with specific country code
|
||||
* @dot11_mode: operating modes 0 mean any
|
||||
* 11a , 11g, 11n , 11ac , 11b etc
|
||||
* @band: to get specific band 2.4G, 5G or 4.9 G
|
||||
* @rssi_threshold: AP having RSSI greater than
|
||||
* rssi threasholed (ignored if set 0)
|
||||
* @only_wmm_ap: If only Qos AP is needed
|
||||
* @ignore_auth_enc_type: Ignore enc type if
|
||||
* this is set (For WPS/OSEN connection)
|
||||
* @mobility_domain: Mobility domain for 11r
|
||||
* @roam_params: roam related params
|
||||
* @bssid_list: bssid list
|
||||
* @ssid_list: ssid list
|
||||
* @channel_list: channel list
|
||||
* @auth_type_list: auth type list
|
||||
* @enc_type_list: unicast enc type list
|
||||
* @mc_enc_type_list: multicast cast enc type list
|
||||
* @pcl_channel_list: PCL channel list
|
||||
*/
|
||||
struct scan_filter {
|
||||
uint32_t age_threshold;
|
||||
uint32_t p2p_results;
|
||||
uint32_t rrm_measurement_filter;
|
||||
uint32_t num_of_bssid;
|
||||
uint32_t num_of_ssid;
|
||||
uint32_t num_of_channels;
|
||||
uint32_t num_of_auth;
|
||||
uint32_t num_of_enc_type;
|
||||
uint32_t num_of_mc_enc_type;
|
||||
enum wlan_pmf_cap pmf_cap;
|
||||
uint32_t num_of_pcl_channels;
|
||||
/* each RSSI category has one value */
|
||||
uint32_t bss_prefer_val[SCM_NUM_RSSI_CAT];
|
||||
int rssi_cat[SCM_NUM_RSSI_CAT];
|
||||
uint32_t strict_sel_5g;
|
||||
enum wlan_bss_type bss_type;
|
||||
enum wlan_phymode dot11_mode;
|
||||
enum wlan_band band;
|
||||
uint32_t rssi_threshold;
|
||||
uint32_t only_wmm_ap;
|
||||
uint32_t ignore_auth_enc_type;
|
||||
uint32_t mobility_domain;
|
||||
/* Variable params list */
|
||||
uint8_t country[3];
|
||||
struct roam_filter_params roam_params;
|
||||
struct qdf_mac_addr bssid_list[WLAN_SCAN_FILTER_NUM_BSSID];
|
||||
struct wlan_ssid ssid_list[WLAN_SCAN_FILTER_NUM_SSID];
|
||||
uint8_t channel_list[QDF_MAX_NUM_CHAN];
|
||||
enum wlan_auth_type auth_type[WLAN_NUM_OF_SUPPORT_AUTH_TYPE];
|
||||
enum wlan_enc_type enc_type[WLAN_NUM_OF_ENCRYPT_TYPE];
|
||||
enum wlan_enc_type mc_enc_type[WLAN_NUM_OF_ENCRYPT_TYPE];
|
||||
uint8_t pcl_channel_list[QDF_MAX_NUM_CHAN];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* enum scan_priority - scan priority definitions
|
||||
* @SCAN_PRIORITY_VERY_LOW: very low priority
|
||||
* @SCAN_PRIORITY_LOW: low scan priority
|
||||
* @SCAN_PRIORITY_MEDIUM: medium priority
|
||||
* @SCAN_PRIORITY_HIGH: high priority
|
||||
* @SCAN_PRIORITY_VERY_HIGH: very high priority
|
||||
* @SCAN_PRIORITY_COUNT: number of priorities supported
|
||||
*/
|
||||
enum scan_priority {
|
||||
SCAN_PRIORITY_VERY_LOW,
|
||||
SCAN_PRIORITY_LOW,
|
||||
SCAN_PRIORITY_MEDIUM,
|
||||
SCAN_PRIORITY_HIGH,
|
||||
SCAN_PRIORITY_VERY_HIGH,
|
||||
SCAN_PRIORITY_COUNT,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* enum scan_type - type of scan
|
||||
* @SCAN_TYPE_BACKGROUND: background scan
|
||||
* @SCAN_TYPE_FOREGROUND: foregrounc scan
|
||||
* @SCAN_TYPE_SPECTRAL: spectral scan
|
||||
* @SCAN_TYPE_REPEATER_BACKGROUND: background scan in repeater
|
||||
* @SCAN_TYPE_REPEATER_EXT_BACKGROUND: background scan in extended repeater
|
||||
* @SCAN_TYPE_RADIO_MEASUREMENTS: redio measurement
|
||||
* @SCAN_TYPE_COUNT: number of scan types supported
|
||||
*/
|
||||
enum scan_type {
|
||||
SCAN_TYPE_BACKGROUND,
|
||||
SCAN_TYPE_FOREGROUND,
|
||||
SCAN_TYPE_SPECTRAL,
|
||||
SCAN_TYPE_REPEATER_BACKGROUND,
|
||||
SCAN_TYPE_REPEATER_EXT_BACKGROUND,
|
||||
SCAN_TYPE_RADIO_MEASUREMENTS,
|
||||
SCAN_TYPE_COUNT,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_extra_params_legacy
|
||||
* extra parameters required for legacy DA scan module
|
||||
* @scan_type: type of scan
|
||||
* @min_dwell_active: min active dwell time
|
||||
* @min_dwell_passive: min passive dwell time
|
||||
* @init_rest_time: init rest time for enhanced independent repeater
|
||||
*/
|
||||
struct scan_extra_params_legacy {
|
||||
enum scan_type scan_type;
|
||||
uint32_t min_dwell_active;
|
||||
uint32_t min_dwell_passive;
|
||||
uint32_t init_rest_time;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct scan_req_params - start scan request parameter
|
||||
* @scan_id: scan id
|
||||
* @scan_req_id: scan requester id
|
||||
* @vdev_id: vdev id where scan was originated
|
||||
* @scan_priority: scan priority
|
||||
* @scan_ev_started: notify scan started event
|
||||
* @scan_ev_completed: notify scan completed event
|
||||
* @scan_ev_bss_chan: notify bss chan event
|
||||
* @scan_ev_foreign_chan: notify foreign chan event
|
||||
* @scan_ev_dequeued: notify scan request dequed event
|
||||
* @scan_ev_preempted: notify scan preempted event
|
||||
* @scan_ev_start_failed: notify scan start failed event
|
||||
* @scan_ev_restarted: notify scan restarted event
|
||||
* @scan_ev_foreign_chn_exit: notify foreign chan exit event
|
||||
* @scan_ev_invalid: notify invalid scan request event
|
||||
* @scan_ev_gpio_timeout: notify gpio timeout event
|
||||
* @scan_ev_suspended: notify scan suspend event
|
||||
* @scan_ev_resumed: notify scan resumed event
|
||||
* @scan_events: variable to read and set scan_ev_* flags in one shot
|
||||
* can be used to dump all scan_ev_* flags for debug
|
||||
* @dwell_time_active: active dwell time
|
||||
* @dwell_time_passive: passive dwell time
|
||||
* @min_rest_time: min rest time
|
||||
* @max_rest_time: max rest time
|
||||
* @repeat_probe_time: repeat probe time
|
||||
* @probe_spacing_time: probe spacing time
|
||||
* @idle_time: idle time
|
||||
* @max_scan_time: max scan time
|
||||
* @probe_delay: probe delay
|
||||
* @scan_f_passive: passively scan all channels including active channels
|
||||
* @scan_f_bcast_probe: add wild card ssid prbreq even if ssid_list is specified
|
||||
* @scan_f_cck_rates: add cck rates to rates/xrates ie in prb req
|
||||
* @scan_f_ofdm_rates: add ofdm rates to rates/xrates ie in prb req
|
||||
* @scan_f_chan_stat_evnt: enable indication of chan load and noise floor
|
||||
* @scan_f_filter_prb_req: filter Probe request frames
|
||||
* @scan_f_bypass_dfs_chn: when set, do not scan DFS channels
|
||||
* @scan_f_continue_on_err:continue scan even if few certain erros have occurred
|
||||
* @scan_f_offchan_mgmt_tx: allow mgmt transmission during off channel scan
|
||||
* @scan_f_offchan_data_tx: allow data transmission during off channel scan
|
||||
* @scan_f_promisc_mode: scan with promiscuous mode
|
||||
* @scan_f_capture_phy_err: enable capture ppdu with phy errrors
|
||||
* @scan_f_strict_passive_pch: do passive scan on passive channels
|
||||
* @scan_f_half_rate: enable HALF (10MHz) rate support
|
||||
* @scan_f_quarter_rate: set Quarter (5MHz) rate support
|
||||
* @scan_f_force_active_dfs_chn: allow to send probe req on DFS channel
|
||||
* @scan_f_add_tpc_ie_in_probe: add TPC ie in probe req frame
|
||||
* @scan_f_add_ds_ie_in_probe: add DS ie in probe req frame
|
||||
* @scan_f_add_spoofed_mac_in_probe: use random mac address for TA in probe
|
||||
* @scan_f_add_rand_seq_in_probe: use random sequence number in probe
|
||||
* @scan_f_en_ie_whitelist_in_probe: enable ie whitelist in probe
|
||||
* @scan_f_forced: force scan even in presence of data traffic
|
||||
* @scan_f_2ghz: scan 2.4 GHz channels
|
||||
* @scan_f_5ghz: scan 5 GHz channels
|
||||
* @scan_f_80mhz: scan in 80 MHz channel width mode
|
||||
* @scan_flags: variable to read and set scan_f_* flags in one shot
|
||||
* can be used to dump all scan_f_* flags for debug
|
||||
* @burst_duration: burst duration
|
||||
* @num_chan: no of channel
|
||||
* @num_bssid: no of bssid
|
||||
* @num_ssids: no of ssid
|
||||
* @n_probes: no of probe
|
||||
* @chan_list: channel list
|
||||
* @ssid: ssid list
|
||||
* @bssid_list: Lisst of bssid to scan
|
||||
* @extraie: list of optional/vendor specific ie's to be added in probe requests
|
||||
* @htcap: htcap ie
|
||||
* @vhtcap: vhtcap ie
|
||||
*/
|
||||
|
||||
struct scan_req_params {
|
||||
uint32_t scan_id;
|
||||
uint32_t scan_req_id;
|
||||
uint32_t vdev_id;
|
||||
enum scan_priority scan_priority;
|
||||
union {
|
||||
struct {
|
||||
uint32_t scan_ev_started:1,
|
||||
scan_ev_completed:1,
|
||||
scan_ev_bss_chan:1,
|
||||
scan_ev_foreign_chan:1,
|
||||
scan_ev_dequeued:1,
|
||||
scan_ev_preempted:1,
|
||||
scan_ev_start_failed:1,
|
||||
scan_ev_restarted:1,
|
||||
scan_ev_foreign_chn_exit:1,
|
||||
scan_ev_invalid:1,
|
||||
scan_ev_gpio_timeout:1,
|
||||
scan_ev_suspended:1,
|
||||
scan_ev_resumed:1;
|
||||
};
|
||||
uint32_t scan_events;
|
||||
};
|
||||
uint32_t dwell_time_active;
|
||||
uint32_t dwell_time_passive;
|
||||
uint32_t min_rest_time;
|
||||
uint32_t max_rest_time;
|
||||
uint32_t repeat_probe_time;
|
||||
uint32_t probe_spacing_time;
|
||||
uint32_t idle_time;
|
||||
uint32_t max_scan_time;
|
||||
uint32_t probe_delay;
|
||||
union {
|
||||
struct {
|
||||
uint32_t scan_f_passive:1,
|
||||
scan_f_bcast_probe:1,
|
||||
scan_f_cck_rates:1,
|
||||
scan_f_ofdm_rates:1,
|
||||
scan_f_chan_stat_evnt:1,
|
||||
scan_f_filter_prb_req:1,
|
||||
scan_f_bypass_dfs_chn:1,
|
||||
scan_f_continue_on_err:1,
|
||||
scan_f_offchan_mgmt_tx:1,
|
||||
scan_f_offchan_data_tx:1,
|
||||
scan_f_promisc_mode:1,
|
||||
scan_f_capture_phy_err:1,
|
||||
scan_f_strict_passive_pch:1,
|
||||
scan_f_half_rate:1,
|
||||
scan_f_quarter_rate:1,
|
||||
scan_f_force_active_dfs_chn:1,
|
||||
scan_f_add_tpc_ie_in_probe:1,
|
||||
scan_f_add_ds_ie_in_probe:1,
|
||||
scan_f_add_spoofed_mac_in_probe:1,
|
||||
scan_f_add_rand_seq_in_probe:1,
|
||||
scan_f_en_ie_whitelist_in_probe:1,
|
||||
scan_f_forced:1,
|
||||
scan_f_2ghz:1,
|
||||
scan_f_5ghz:1,
|
||||
scan_f_80mhz:1;
|
||||
};
|
||||
uint32_t scan_flags;
|
||||
};
|
||||
uint32_t burst_duration;
|
||||
uint32_t num_chan;
|
||||
uint32_t num_bssid;
|
||||
uint32_t num_ssids;
|
||||
uint32_t n_probes;
|
||||
uint32_t chan_list[WLAN_SCAN_MAX_NUM_CHANNELS];
|
||||
struct wlan_ssid ssid[WLAN_SCAN_MAX_NUM_SSID];
|
||||
struct qdf_mac_addr bssid_list[WLAN_SCAN_MAX_NUM_BSSID];
|
||||
struct element_info extraie;
|
||||
struct element_info htcap;
|
||||
struct element_info vhtcap;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_start_request - scan request config
|
||||
* @vdev: vdev
|
||||
* @legacy_params: extra parameters required for legacy DA arch
|
||||
* @scan_req: common scan start request parameters
|
||||
*/
|
||||
struct scan_start_request {
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct scan_extra_params_legacy legacy_params;
|
||||
struct scan_req_params scan_req;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum scan_cancel_type - type specifiers for cancel scan request
|
||||
* @WLAN_SCAN_CANCEL_SINGLE: cancel particular scan specified by scan_id
|
||||
* @WLAN_SCAN_CANCEL_VAP_ALL: cancel all scans running on a particular vdevid
|
||||
* WLAN_SCAN_CANCEL_PDEV_ALL: cancel all scans running on parent pdev of vdevid
|
||||
*/
|
||||
enum scan_cancel_req_type {
|
||||
WLAN_SCAN_CANCEL_SINGLE = 1,
|
||||
WLAN_SCAN_CANCEL_VDEV_ALL,
|
||||
WLAN_SCAN_CANCEL_PDEV_ALL,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_cancel_param - stop scan cmd parameter
|
||||
* @requester: scan requester
|
||||
* @scan_id: scan id
|
||||
* @req_type: scan request type
|
||||
* @vdev_id: vdev id
|
||||
*/
|
||||
struct scan_cancel_param {
|
||||
uint32_t requester;
|
||||
uint32_t scan_id;
|
||||
enum scan_cancel_req_type req_type;
|
||||
uint32_t vdev_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_cancel_request - stop scan cmd
|
||||
* @vdev: vdev object
|
||||
* @cancel_req: stop scan cmd parameter
|
||||
*/
|
||||
struct scan_cancel_request {
|
||||
/* Extra parameters consumed by scan module or serialization */
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
/* Actual scan cancel request parameters */
|
||||
struct scan_cancel_param cancel_req;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mlme_update_info - meta information required to
|
||||
* update mlme info in scan entry
|
||||
* @vdev: vdev object
|
||||
* @bss: bss identifier
|
||||
* @mlme_info: mlme info to update
|
||||
*/
|
||||
struct mlme_update_info {
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct bss_info bss;
|
||||
struct mlme_info mlme_info;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum scan_event_type - scan event types
|
||||
* @SCAN_EVENT_TYPE_STARTED: scan started
|
||||
* @SCAN_EVENT_TYPE_COMPLETED: scan completed
|
||||
* @SCAN_EVENT_TYPE_BSS_CHANNEL: HW came back to home channel
|
||||
* @SCAN_EVENT_TYPE_FOREIGN_CHANNEL: HW moved to foreign channel
|
||||
* @SCAN_EVENT_TYPE_DEQUEUED: scan request dequeued
|
||||
* @SCAN_EVENT_TYPE_PREEMPTED: scan got preempted
|
||||
* @SCAN_EVENT_TYPE_START_FAILED: couldn't start scan
|
||||
* @SCAN_EVENT_TYPE_RESTARTED: scan restarted
|
||||
* @SCAN_EVENT_TYPE_FOREIGN_CHANNEL_EXIT: HW exited foreign channel
|
||||
* @SCAN_EVENT_TYPE_SUSPENDED: scan got suspended
|
||||
* @SCAN_EVENT_TYPE_RESUMED: scan resumed
|
||||
* @SCAN_EVENT_TYPE_NLO_COMPLETE: NLO completed
|
||||
* @SCAN_EVENT_TYPE_INVALID: invalid request
|
||||
* @SCAN_EVENT_TYPE_GPIO_TIMEOUT: gpio timeout
|
||||
* @SCAN_EVENT_TYPE_RADIO_MEASUREMENT_START: radio measurement start
|
||||
* @SCAN_EVENT_TYPE_RADIO_MEASUREMENT_END: radio measurement end
|
||||
* @SCAN_EVENT_TYPE_BSSID_MATCH: bssid match found
|
||||
* @SCAN_EVENT_TYPE_FOREIGN_CHANNEL_GET_NF: foreign channel noise floor
|
||||
* @SCAN_EVENT_TYPE_MAX: marker for invalid event
|
||||
*/
|
||||
enum scan_event_type {
|
||||
SCAN_EVENT_TYPE_STARTED,
|
||||
SCAN_EVENT_TYPE_COMPLETED,
|
||||
SCAN_EVENT_TYPE_BSS_CHANNEL,
|
||||
SCAN_EVENT_TYPE_FOREIGN_CHANNEL,
|
||||
SCAN_EVENT_TYPE_DEQUEUED,
|
||||
SCAN_EVENT_TYPE_PREEMPTED,
|
||||
SCAN_EVENT_TYPE_START_FAILED,
|
||||
SCAN_EVENT_TYPE_RESTARTED,
|
||||
SCAN_EVENT_TYPE_FOREIGN_CHANNEL_EXIT,
|
||||
SCAN_EVENT_TYPE_SUSPENDED,
|
||||
SCAN_EVENT_TYPE_RESUMED,
|
||||
SCAN_EVENT_TYPE_NLO_COMPLETE,
|
||||
SCAN_EVENT_TYPE_INVALID,
|
||||
SCAN_EVENT_TYPE_GPIO_TIMEOUT,
|
||||
SCAN_EVENT_TYPE_RADIO_MEASUREMENT_START,
|
||||
SCAN_EVENT_TYPE_RADIO_MEASUREMENT_END,
|
||||
SCAN_EVENT_TYPE_BSSID_MATCH,
|
||||
SCAN_EVENT_TYPE_FOREIGN_CHANNEL_GET_NF,
|
||||
SCAN_EVENT_TYPE_MAX,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum scan_completion_reason - scan completion reason
|
||||
* @SCAN_REASON_NONE: un specified reason
|
||||
* @SCAN_REASON_COMPLETED: scan successfully completed
|
||||
* @SCAN_REASON_CANCELLED: scan got cancelled
|
||||
* @SCAN_REASON_PREEMPTED: scan got preempted
|
||||
* @SCAN_REASON_TIMEDOUT: couldnt complete within specified time
|
||||
* @SCAN_REASON_INTERNAL_FAILURE: cancelled because of some failure
|
||||
* @SCAN_REASON_SUSPENDED: scan suspended
|
||||
* @SCAN_REASON_RUN_FAILED: run failed
|
||||
* @SCAN_REASON_TERMINATION_FUNCTION: termination function
|
||||
* @SCAN_REASON_MAX_OFFCHAN_RETRIES: max retries exceeded thresold
|
||||
* @SCAN_REASON_MAX: invalid completion reason marker
|
||||
*/
|
||||
enum scan_completion_reason {
|
||||
SCAN_REASON_NONE,
|
||||
SCAN_REASON_COMPLETED,
|
||||
SCAN_REASON_CANCELLED,
|
||||
SCAN_REASON_PREEMPTED,
|
||||
SCAN_REASON_TIMEDOUT,
|
||||
SCAN_REASON_INTERNAL_FAILURE,
|
||||
SCAN_REASON_SUSPENDED,
|
||||
SCAN_REASON_RUN_FAILED,
|
||||
SCAN_REASON_TERMINATION_FUNCTION,
|
||||
SCAN_REASON_MAX_OFFCHAN_RETRIES,
|
||||
SCAN_REASON_MAX,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct scan_event - scan event definition
|
||||
* @vdev_id: vdev where scan was run
|
||||
* @type: type of scan event
|
||||
* @reason: completion reason
|
||||
* @chan_freq: channel centre frequency
|
||||
* @requester: requester id
|
||||
* @scan_id: scan id
|
||||
*/
|
||||
struct scan_event {
|
||||
uint32_t vdev_id;
|
||||
enum scan_event_type type;
|
||||
enum scan_completion_reason reason;
|
||||
uint32_t chan_freq;
|
||||
uint32_t requester;
|
||||
uint32_t scan_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_event_info - scan event information
|
||||
* @vdev: vdev object
|
||||
* @event: scan event
|
||||
*/
|
||||
struct scan_event_info {
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct scan_event event;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum scm_scan_status - scan status
|
||||
* @SCAN_NOT_IN_PROGRESS: Neither active nor pending scan in progress
|
||||
* @SCAN_IS_ACTIVE: scan request is present only in active list
|
||||
* @SCAN_IS_PENDING: scan request is present only in pending list
|
||||
* @SCAN_IS_ACTIVE_AND_PENDING: scan request is present in active
|
||||
* and pending both lists
|
||||
*/
|
||||
enum scm_scan_status {
|
||||
SCAN_NOT_IN_PROGRESS = 0, /* Must be 0 */
|
||||
SCAN_IS_ACTIVE,
|
||||
SCAN_IS_PENDING,
|
||||
SCAN_IS_ACTIVE_AND_PENDING,
|
||||
};
|
||||
|
||||
/**
|
||||
* scan_event_handler() - function prototype of scan event handlers
|
||||
* @vdev: vdev object
|
||||
* @event: scan event
|
||||
* @arg: argument
|
||||
*
|
||||
* PROTO TYPE, scan event handler call back function prototype
|
||||
*
|
||||
* @Return: void
|
||||
*/
|
||||
typedef void (*scan_event_handler) (struct wlan_objmgr_vdev *vdev,
|
||||
struct scan_event *event, void *arg);
|
||||
|
||||
/**
|
||||
* enum scan_cb_type - update beacon cb type
|
||||
* @SCAN_CB_TYPE_INFORM_BCN: Calback to indicate beacon to OS
|
||||
* @SCAN_CB_TYPE_UPDATE_BCN: Calback to indicate beacon
|
||||
* to MLME and update MLME info
|
||||
*
|
||||
*/
|
||||
enum scan_cb_type {
|
||||
SCAN_CB_TYPE_INFORM_BCN,
|
||||
SCAN_CB_TYPE_UPDATE_BCN,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pno_scan_req_params - forward declaration
|
||||
*/
|
||||
struct pno_scan_req_params;
|
||||
#endif
|
139
umac/scan/dispatcher/inc/wlan_scan_tgt_api.h
Normal dosya
139
umac/scan/dispatcher/inc/wlan_scan_tgt_api.h
Normal dosya
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* 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: contains scan south bound interface definitions
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_SCAN_TGT_API_H_
|
||||
#define _WLAN_SCAN_TGT_API_H_
|
||||
|
||||
#include <wlan_scan_structs.h>
|
||||
#include <wlan_objmgr_psoc_obj.h>
|
||||
#include <wlan_objmgr_pdev_obj.h>
|
||||
#include <wlan_objmgr_vdev_obj.h>
|
||||
#include <wlan_objmgr_peer_obj.h>
|
||||
#include <wlan_mgmt_txrx_utils_api.h>
|
||||
|
||||
/**
|
||||
* tgt_scan_bcn_probe_rx_callback() - The callbeack registered to tx/rx module
|
||||
* @psoc: psoc context
|
||||
* @peer: peer
|
||||
* @buf: frame buf
|
||||
* @params: rx event params
|
||||
* @frm_type: frame type
|
||||
*
|
||||
* The callbeack registered to tx/rx module and is called when beacon
|
||||
* or probe resp is recived. This will post a msg to target_if queue.
|
||||
*
|
||||
* Return: success or error code.
|
||||
*/
|
||||
QDF_STATUS tgt_scan_bcn_probe_rx_callback(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_peer *peer, qdf_nbuf_t buf,
|
||||
struct mgmt_rx_event_params *rx_param, uint32_t frm_type);
|
||||
|
||||
/**
|
||||
* tgt_scan_nlo_complete_evt_handler() - The callbeack registered
|
||||
* to WMI for PNO complete
|
||||
* @handle: psoc handle
|
||||
* @event: event handler
|
||||
* @len: length of data
|
||||
*
|
||||
* This function handles NLO scan completion event.
|
||||
*
|
||||
* Return: 0 for success or error code.
|
||||
*/
|
||||
|
||||
QDF_STATUS
|
||||
tgt_scan_nlo_complete_evt_handler(void *handle, uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* tgt_nlo_match_evt_handler() - nlo match event handler
|
||||
* @handle: psoc handle
|
||||
* @event: event data
|
||||
* @len: data length
|
||||
*
|
||||
* Record NLO match event comes from FW. It's a indication that
|
||||
* one of the profile is matched.
|
||||
*
|
||||
* Return: 0 for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
tgt_nlo_match_evt_handler(void *handle, uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* tgt_scan_event_handler() - The callbeack registered to WMI for scan events
|
||||
* @psoc: psoc handle
|
||||
* @event_info: event info
|
||||
*
|
||||
* The callbeack registered to WMI for scan events and is called
|
||||
* event for scan is received. This will post a msg to target_if queue.
|
||||
*
|
||||
* Return: 0 for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
tgt_scan_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
struct scan_event_info *event_info);
|
||||
|
||||
/**
|
||||
* tgt_scan_start() - invoke lmac scan start
|
||||
* @req: scan request object
|
||||
*
|
||||
* This API invokes lmac API function to start scan
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
tgt_scan_start(struct scan_start_request *req);
|
||||
|
||||
|
||||
/**
|
||||
* tgt_scan_cancel() - invoke lmac scan cancel
|
||||
* @req: scan request object
|
||||
*
|
||||
* This API invokes lmac API function to cancel scan
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
tgt_scan_cancel(struct scan_cancel_request *req);
|
||||
|
||||
/**
|
||||
* tgt_scan_register_ev_handler() - invoke lmac register scan event handler
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* This API invokes lmac API function to register for scan events
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
tgt_scan_register_ev_handler(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* tgt_scan_unregister_ev_handler() - invoke lmac unregister scan event handler
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* This API invokes lmac API function to unregister for scan events
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
tgt_scan_unregister_ev_handler(struct wlan_objmgr_psoc *psoc);
|
||||
#endif
|
376
umac/scan/dispatcher/inc/wlan_scan_ucfg_api.h
Normal dosya
376
umac/scan/dispatcher/inc/wlan_scan_ucfg_api.h
Normal dosya
@@ -0,0 +1,376 @@
|
||||
/*
|
||||
* 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: contains scan north bound interface api
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_SCAN_UCFG_API_H_
|
||||
#define _WLAN_SCAN_UCFG_API_H_
|
||||
|
||||
#include <scheduler_api.h>
|
||||
#include <wlan_scan_public_structs.h>
|
||||
#include <wlan_objmgr_psoc_obj.h>
|
||||
#include <wlan_objmgr_pdev_obj.h>
|
||||
#include <wlan_objmgr_vdev_obj.h>
|
||||
|
||||
/**
|
||||
* ucfg_scan_register_requester() - assigns requester ID to caller and
|
||||
* registers scan event call back handler
|
||||
* @psoc: psoc object
|
||||
* @module_name:name of requester module
|
||||
* @event_cb: event callback function pointer
|
||||
* @arg: argument to @event_cb
|
||||
*
|
||||
* API, allows other components to allocate requester id
|
||||
* Normally used by modules at init time to register their callback
|
||||
* and get one requester id. @event_cb will be invoked for
|
||||
* all scan events whose requester id matches with @requester.
|
||||
*
|
||||
* Return: assigned non zero requester id for success
|
||||
* zero (0) for failure
|
||||
*/
|
||||
wlan_scan_requester
|
||||
ucfg_scan_register_requester(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *module_name, scan_event_handler event_cb, void *arg);
|
||||
|
||||
/**
|
||||
* ucfg_scan_unregister_requester() -reclaims previously allocated requester ID
|
||||
* @psoc: psoc object
|
||||
* @requester: requester ID to reclaim.
|
||||
*
|
||||
* API, reclaims previously allocated requester id by
|
||||
* ucfg_scan_get_req_id_reg_cb()
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void ucfg_scan_unregister_requester(struct wlan_objmgr_psoc *psoc,
|
||||
wlan_scan_requester requester);
|
||||
|
||||
|
||||
/**
|
||||
* ucfg_get_scan_requester_name()- returns module name of requester ID owner
|
||||
* @psoc: psoc object
|
||||
* @requester: requester ID
|
||||
*
|
||||
* API, returns module name of requester id owner
|
||||
*
|
||||
* Return: pointer to module name or "unknown" if requester id not found.
|
||||
*/
|
||||
uint8_t *ucfg_get_scan_requester_name(struct wlan_objmgr_psoc *psoc,
|
||||
wlan_scan_requester requester);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ucfg_scan_get_scan_id() - allocates scan ID
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* API, allocates a new scan id for caller
|
||||
*
|
||||
* Return: newly allocated scan ID
|
||||
*/
|
||||
wlan_scan_id
|
||||
ucfg_scan_get_scan_id(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
|
||||
/**
|
||||
* ucfg_scan_start() - Public API to start a scan
|
||||
* @req: start scan req params
|
||||
*
|
||||
* The Public API to start a scan. Post a msg to target_if queue
|
||||
*
|
||||
* Return: 0 for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_scan_start(struct scan_start_request *req);
|
||||
|
||||
/**
|
||||
* ucfg_scan_cancel() - Public API to stop a scan
|
||||
* @req: stop scan request params
|
||||
*
|
||||
* The Public API to stop a scan. Post a msg to target_if queue
|
||||
*
|
||||
* Return: 0 for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_scan_cancel(struct scan_cancel_request *req);
|
||||
|
||||
/**
|
||||
* ucfg_scan_get_result() - The Public API to get scan results
|
||||
* @pdev: pdev info
|
||||
* @filter: Filters
|
||||
*
|
||||
* This function fetches scan result
|
||||
*
|
||||
* Return: scan list pointer
|
||||
*/
|
||||
qdf_list_t *ucfg_scan_get_result(struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_filter *filter);
|
||||
|
||||
/**
|
||||
* ucfg_scan_purge_results() - purge the scan list
|
||||
* @scan_list: scan list to be purged
|
||||
*
|
||||
* This function purge the temp scan list
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_purge_results(qdf_list_t *scan_list);
|
||||
|
||||
/**
|
||||
* ucfg_scan_flush_results() - The Public API to flush scan result
|
||||
* @pdev: pdev object
|
||||
* @filter: filter to flush the scan entries
|
||||
*
|
||||
* The Public API to flush scan result.
|
||||
*
|
||||
* Return: 0 for success or error code.
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_flush_results(struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_filter *filter);
|
||||
|
||||
/**
|
||||
* ucfg_scan_filter_valid_channel() - The Public API to filter scan result
|
||||
* based on valid channel list
|
||||
* @pdev: pdev object
|
||||
* @chan_list: valid channel list
|
||||
* @num_chan: number of valid channels
|
||||
*
|
||||
* The Public API to to filter scan result
|
||||
* based on valid channel list.
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
void ucfg_scan_filter_valid_channel(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *chan_list, uint32_t num_chan);
|
||||
|
||||
/**
|
||||
* scan_iterator_func() - function prototype of scan iterator function
|
||||
* @scan_entry: scan entry object
|
||||
* @arg: extra argument
|
||||
*
|
||||
* PROTO TYPE, scan iterator function prototype
|
||||
*
|
||||
* @Return: QDF_STATUS
|
||||
*/
|
||||
typedef QDF_STATUS (*scan_iterator_func) (void *arg,
|
||||
struct scan_cache_entry *scan_entry);
|
||||
|
||||
/**
|
||||
* ucfg_scan_db_iterate() - function to iterate scan table
|
||||
* @pdev: pdev object
|
||||
* @func: iterator function pointer
|
||||
* @arg: argument to be passed to func()
|
||||
*
|
||||
* API, this API iterates scan table and invokes func
|
||||
* on each scan enetry by passing scan entry and arg.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_scan_db_iterate(struct wlan_objmgr_pdev *pdev,
|
||||
scan_iterator_func func, void *arg);
|
||||
|
||||
/**
|
||||
* ucfg_scan_update_mlme_info() - The Public API to update mlme
|
||||
* info in the scan entry
|
||||
* @vdev: vdev object
|
||||
* @bss: bss info to find the matching scan entry
|
||||
* @mlme_info: mlme info to be updated.
|
||||
*
|
||||
* The Public API to update mlme info in the scan entry.
|
||||
* Post a msg to target_if queue
|
||||
*
|
||||
* Return: 0 for success or error code.
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_scan_update_mlme_info(struct wlan_objmgr_vdev *vdev, struct bss_info *bss,
|
||||
struct mlme_info *mlme_info);
|
||||
|
||||
/**
|
||||
* ucfg_scan_register_event_handler() - The Public API to register
|
||||
* an event cb handler
|
||||
* @vdev: vdev object
|
||||
* @event_cb: callback function to register
|
||||
* @arg: component specific priv argument to @event_cb callback function
|
||||
*
|
||||
* The Public API to register a event cb handler. This cb is called whenever
|
||||
* any scan event is received.
|
||||
*
|
||||
* Return: 0 for success or error code.
|
||||
*/
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_scan_register_event_handler(struct wlan_objmgr_vdev *vdev,
|
||||
scan_event_handler event_cb, void *arg);
|
||||
|
||||
/**
|
||||
* ucfg_scan_unregister_event_handler() - Public API to unregister
|
||||
* event cb handler
|
||||
* @vdev: vdev object
|
||||
* @event_cb: callback function to unregister
|
||||
* @arg: component specific priv argument to @event_cb callback function
|
||||
*
|
||||
* Unregister a event cb handler. cb and arg will be used to
|
||||
* find the calback.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
|
||||
void
|
||||
ucfg_scan_unregister_event_handler(struct wlan_objmgr_vdev *vdev,
|
||||
scan_event_handler event_cb, void *arg);
|
||||
|
||||
/**
|
||||
* ucfg_scan_init_default_params() - get the defaults scan params
|
||||
* @vdev: vdev object
|
||||
* @req: scan request object
|
||||
*
|
||||
* get the defaults scan params
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or error code
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_scan_init_default_params(struct wlan_objmgr_vdev *vdev,
|
||||
struct scan_start_request *req);
|
||||
|
||||
/**
|
||||
* ucfg_scan_init_ssid_params() - initialize scan request ssid list
|
||||
*
|
||||
* @scan_req: scan request object
|
||||
* @num_ssid: number of ssid's in ssid list
|
||||
* @ssid_list: ssid list
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_scan_init_ssid_params(struct scan_start_request *scan_req,
|
||||
uint32_t num_ssid, struct wlan_ssid *ssid_list);
|
||||
|
||||
/**
|
||||
* ucfg_scan_init_bssid_params() - initialize scan request bssid list
|
||||
* @scan_req: scan request object
|
||||
* @num_ssid: number of bssid's in bssid list
|
||||
* @bssid_list: bssid list
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_scan_init_bssid_params(struct scan_start_request *scan_req,
|
||||
uint32_t num_ssid, struct qdf_mac_addr *bssid_list);
|
||||
|
||||
/**
|
||||
* ucfg_scan_init_chanlist_params() - initialize scan request channel list
|
||||
* @scan_req: scan request object
|
||||
* @num_ssid: number of channels in channel list
|
||||
* @bssid_list: channel list
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_scan_init_chanlist_params(struct scan_start_request *scan_req,
|
||||
uint32_t num_chans, uint32_t *chan_list);
|
||||
|
||||
/**
|
||||
* ucfg_scan_get_vdev_status() - API to check vdev scan status
|
||||
* @vdev: vdev object
|
||||
*
|
||||
* Return: enum scm_scan_status
|
||||
*/
|
||||
enum scm_scan_status
|
||||
ucfg_scan_get_vdev_status(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* ucfg_scan_get_pdev_status() - API to check pdev scan status
|
||||
* @pdev: vdev object
|
||||
*
|
||||
* Return: enum scm_scan_status
|
||||
*/
|
||||
enum scm_scan_status
|
||||
ucfg_scan_get_pdev_status(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* update_beacon_cb() - cb to inform/update beacon
|
||||
* @psoc: psoc pointer
|
||||
* @scan_params: scan entry to inform/update
|
||||
*
|
||||
* @Return: void
|
||||
*/
|
||||
typedef void (*update_beacon_cb) (struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_cache_entry *scan_entry);
|
||||
|
||||
/**
|
||||
* ucfg_scan_register_bcn_cb() - API to register api
|
||||
* to inform/update bcn/probe as soon as they are received
|
||||
* @pdev: psoc
|
||||
* @cb: callback to be registered
|
||||
* @type: Type of callback to be registered
|
||||
*
|
||||
* Return: enum scm_scan_status
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_register_bcn_cb(struct wlan_objmgr_psoc *psoc,
|
||||
update_beacon_cb cb, enum scan_cb_type type);
|
||||
|
||||
/*
|
||||
* ucfg_scan_init() - Scan module initialization API
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_init(void);
|
||||
|
||||
/**
|
||||
* ucfg_scan_deinit() - Scan module deinitilization API
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_deinit(void);
|
||||
|
||||
/**
|
||||
* ucfg_scan_psoc_enable() - Scan module enable API
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_psoc_enable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_scan_psoc_enable() - Scan module disable API
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_psoc_disable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_scan_psoc_open() - Scan module psoc open API
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_psoc_open(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_scan_psoc_close() - Scan module psoc close API
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_scan_psoc_close(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#endif
|
1254
umac/scan/dispatcher/inc/wlan_scan_utils_api.h
Normal dosya
1254
umac/scan/dispatcher/inc/wlan_scan_utils_api.h
Normal dosya
Dosya farkı çok büyük olduğundan ihmal edildi
Fark Yükle
21
umac/scan/dispatcher/src/wlan_scan_tgt_api.c
Normal dosya
21
umac/scan/dispatcher/src/wlan_scan_tgt_api.c
Normal dosya
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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: contains scan south bound interface definitions
|
||||
*/
|
21
umac/scan/dispatcher/src/wlan_scan_ucfg_api.c
Normal dosya
21
umac/scan/dispatcher/src/wlan_scan_ucfg_api.c
Normal dosya
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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: contains scan north bound interface definitions
|
||||
*/
|
21
umac/scan/dispatcher/src/wlan_scan_utils_api.c
Normal dosya
21
umac/scan/dispatcher/src/wlan_scan_utils_api.c
Normal dosya
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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 scan utility functions
|
||||
*/
|
Yeni konuda referans
Bir kullanıcı engelle