qcacmn: Enable converged scan component
Update WMI layer to adopt to converged scan module and enable converged scan component init/deinit Change-Id: I4f9da95f90f737ac8bdcaa54f9eb4e154f37d3de CRs-Fixed: 1095299
This commit is contained in:

committed by
Sandeep Puligilla

parent
ac2819788b
commit
89db19b5b7
@@ -21,6 +21,7 @@
|
||||
#include <qdf_threads.h>
|
||||
#include <dispatcher_init_deinit.h>
|
||||
#include <scheduler_api.h>
|
||||
#include <wlan_scan_ucfg_api.h>
|
||||
#include <wlan_mgmt_txrx_utils_api.h>
|
||||
#include <wlan_serialization_api.h>
|
||||
#ifdef WLAN_PMO_ENABLE
|
||||
@@ -52,16 +53,6 @@
|
||||
* thier actual handlers are ready
|
||||
*/
|
||||
|
||||
static QDF_STATUS scm_init(void)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS scm_deinit(void)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS p2p_init(void)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -83,16 +74,6 @@ static QDF_STATUS tdls_deinit(void)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS scm_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS scm_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS p2p_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -113,17 +94,6 @@ static QDF_STATUS tdls_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS scm_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS scm_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static QDF_STATUS p2p_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -390,8 +360,8 @@ QDF_STATUS dispatcher_init(void)
|
||||
if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_init())
|
||||
goto mgmt_txrx_init_fail;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != scm_init())
|
||||
goto scm_init_fail;
|
||||
if (QDF_STATUS_SUCCESS != ucfg_scan_init())
|
||||
goto ucfg_scan_init_fail;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != p2p_init())
|
||||
goto p2p_init_fail;
|
||||
@@ -444,8 +414,8 @@ serialization_init_fail:
|
||||
tdls_init_fail:
|
||||
p2p_deinit();
|
||||
p2p_init_fail:
|
||||
scm_deinit();
|
||||
scm_init_fail:
|
||||
ucfg_scan_deinit();
|
||||
ucfg_scan_init_fail:
|
||||
wlan_mgmt_txrx_deinit();
|
||||
mgmt_txrx_init_fail:
|
||||
wlan_objmgr_global_obj_deinit();
|
||||
@@ -477,7 +447,7 @@ QDF_STATUS dispatcher_deinit(void)
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == p2p_deinit());
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == scm_deinit());
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_deinit());
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_deinit());
|
||||
|
||||
@@ -489,7 +459,7 @@ EXPORT_SYMBOL(dispatcher_deinit);
|
||||
|
||||
QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
if (QDF_STATUS_SUCCESS != scm_psoc_open(psoc))
|
||||
if (QDF_STATUS_SUCCESS != ucfg_scan_psoc_open(psoc))
|
||||
goto out;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != p2p_psoc_open(psoc))
|
||||
@@ -513,7 +483,7 @@ serialization_psoc_open_fail:
|
||||
tdls_psoc_open_fail:
|
||||
p2p_psoc_close(psoc);
|
||||
p2p_psoc_open_fail:
|
||||
scm_psoc_close(psoc);
|
||||
ucfg_scan_psoc_close(psoc);
|
||||
|
||||
out:
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -530,7 +500,7 @@ QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_close(psoc));
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == scm_psoc_close(psoc));
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_psoc_close(psoc));
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -538,7 +508,7 @@ EXPORT_SYMBOL(dispatcher_psoc_close);
|
||||
|
||||
QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
if (QDF_STATUS_SUCCESS != scm_psoc_enable(psoc))
|
||||
if (QDF_STATUS_SUCCESS != ucfg_scan_psoc_enable(psoc))
|
||||
goto out;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != p2p_psoc_enable(psoc))
|
||||
@@ -572,7 +542,7 @@ policy_mgr_psoc_enable_fail:
|
||||
tdls_psoc_enable_fail:
|
||||
p2p_psoc_disable(psoc);
|
||||
p2p_psoc_enable_fail:
|
||||
scm_psoc_disable(psoc);
|
||||
ucfg_scan_psoc_disable(psoc);
|
||||
|
||||
out:
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -594,7 +564,7 @@ QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_disable(psoc));
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == scm_psoc_disable(psoc));
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_psoc_disable(psoc));
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "target_if_atf.h"
|
||||
#endif
|
||||
#include <target_if_reg.h>
|
||||
#include <target_if_scan.h>
|
||||
|
||||
#ifdef CONVERGED_P2P_ENABLE
|
||||
#include "target_if_p2p.h"
|
||||
@@ -141,6 +142,9 @@ QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
/* call umac callback to register legacy tx ops */
|
||||
wlan_lmac_if_umac_tx_ops_register(tx_ops);
|
||||
|
||||
/* Register scan tx ops */
|
||||
target_if_register_scan_tx_ops(&tx_ops->scan);
|
||||
|
||||
target_if_atf_tx_ops_register(tx_ops);
|
||||
|
||||
target_if_wifi_pos_tx_ops_register(tx_ops);
|
||||
@@ -183,6 +187,7 @@ QDF_STATUS target_if_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
/* Converged UMAC components to register their TX-ops */
|
||||
target_if_register_umac_tx_ops(tx_ops);
|
||||
|
||||
/* Components parallel to UMAC to register their TX-ops here */
|
||||
target_if_pmo_register_tx_ops_req(tx_ops);
|
||||
|
||||
|
@@ -73,10 +73,17 @@ target_if_scan_event_handler(ol_scn_t scn, uint8_t *data, uint32_t datalen)
|
||||
event_info = qdf_mem_malloc(sizeof(*event_info));
|
||||
|
||||
if (!event_info) {
|
||||
target_if_err("%s: unable to allocate scan_event\n", __func__);
|
||||
target_if_err("unable to allocate scan_event");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (wmi_extract_vdev_scan_ev_param(wmi_handle, data,
|
||||
&(event_info->event))) {
|
||||
target_if_err("Failed to extract wmi scan event");
|
||||
qdf_mem_free(event_info);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MCL
|
||||
/* temp change for p2p ROC*/
|
||||
#define ROC_SCAN_REQUESTOR_ID 0xB000
|
||||
@@ -124,14 +131,15 @@ QDF_STATUS
|
||||
target_if_scan_start(struct wlan_objmgr_psoc *psoc,
|
||||
struct scan_start_request *req)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
return wmi_unified_scan_start_cmd_send(psoc->tgt_if_handle,
|
||||
&req->scan_req);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
target_if_scan_cancel(struct wlan_objmgr_psoc *psoc,
|
||||
struct scan_cancel_param *req)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
return wmi_unified_scan_stop_cmd_send(psoc->tgt_if_handle, req);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
|
@@ -428,6 +428,7 @@ ucfg_scan_unregister_event_handler(struct wlan_objmgr_vdev *vdev,
|
||||
if (!handler_cnt) {
|
||||
qdf_spin_unlock_bh(&scan->lock);
|
||||
scm_info("No event handlers registered");
|
||||
return;
|
||||
}
|
||||
|
||||
for (idx = 0; idx < MAX_SCAN_EVENT_HANDLERS_PER_PDEV;
|
||||
|
@@ -49,6 +49,7 @@
|
||||
#ifdef CONVERGED_P2P_ENABLE
|
||||
#include "wlan_p2p_public_struct.h"
|
||||
#endif
|
||||
#include "wlan_scan_public_structs.h"
|
||||
|
||||
typedef qdf_nbuf_t wmi_buf_t;
|
||||
#define wmi_buf_data(_buf) qdf_nbuf_data(_buf)
|
||||
@@ -445,10 +446,10 @@ QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
|
||||
struct ap_ps_params *param);
|
||||
|
||||
QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
|
||||
struct scan_start_params *param);
|
||||
struct scan_req_params *param);
|
||||
|
||||
QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
|
||||
struct scan_stop_params *param);
|
||||
struct scan_cancel_param *param);
|
||||
|
||||
QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
|
||||
struct scan_chan_list_params *param);
|
||||
@@ -1204,7 +1205,7 @@ QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
|
||||
wmi_host_roam_event *ev);
|
||||
|
||||
QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
|
||||
wmi_host_scan_event *param);
|
||||
struct scan_event *param);
|
||||
|
||||
QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
|
||||
wmi_host_mu_report_event *param);
|
||||
|
@@ -33,6 +33,8 @@
|
||||
#ifndef _WMI_UNIFIED_PARAM_H_
|
||||
#define _WMI_UNIFIED_PARAM_H_
|
||||
|
||||
#include <wlan_scan_public_structs.h>
|
||||
|
||||
#define MAC_MAX_KEY_LENGTH 32
|
||||
#define MAC_PN_LENGTH 8
|
||||
#define MAX_MAC_HEADER_LEN 32
|
||||
@@ -1137,120 +1139,6 @@ struct ap_ps_params {
|
||||
#define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16
|
||||
#define WMI_HOST_SCAN_CHAN_MODE_MASK 0xff
|
||||
|
||||
/**
|
||||
* struct scan_start_params - start scan cmd parameter
|
||||
* @scan_id: scan id
|
||||
* @scan_req_id: requeted scan id
|
||||
* @vdev_id: vdev id
|
||||
* @scan_priority: scan priority
|
||||
* @notify_scan_events: flag to indicate if scan to be notified
|
||||
* @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_ctrl_flags: scan control flag
|
||||
* @burst_duration: burst duration
|
||||
* @num_chan: no of channel
|
||||
* @num_bssid: no of bssid
|
||||
* @num_ssids: no of ssid
|
||||
* @ie_len: ie length
|
||||
* @n_probes: no of probe
|
||||
* @chan_list: channel list
|
||||
* @ie_len_with_pad: ie length with padding
|
||||
* @num_ssid: no of ssid
|
||||
* @sid: pointer to mac_ssid structure
|
||||
* @uie_fieldOffset: ie field offset
|
||||
* @mac_add_bytes: mac address bytes
|
||||
* @is_strict_pscan_en: Is this a strict passive scan
|
||||
* @is_promiscous_mode: Is promiscous mode
|
||||
* @is_phy_error: is Phy error
|
||||
* @add_cck_rates: Add cck rates
|
||||
* @chan_stat_enable: channel stats enabled
|
||||
* @offchan_tx_mgmt: Offchan tx scan
|
||||
* @offchan_tx_data: offchan tx data
|
||||
* @add_bcast_probe_reqd: Add bcast probe request
|
||||
* @bssid_list: Lisst of bssid to scan
|
||||
* @ie_data: IE data buffer pointer
|
||||
* @passive_flag: Is this passive scan
|
||||
*/
|
||||
struct scan_start_params {
|
||||
uint32_t scan_id;
|
||||
uint32_t scan_req_id;
|
||||
uint32_t vdev_id;
|
||||
uint32_t scan_priority;
|
||||
uint32_t notify_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;
|
||||
uint32_t scan_ctrl_flags;
|
||||
uint32_t burst_duration;
|
||||
uint32_t num_chan;
|
||||
uint32_t num_bssid;
|
||||
uint32_t num_ssids;
|
||||
uint32_t ie_len;
|
||||
uint32_t n_probes;
|
||||
uint32_t *chan_list;
|
||||
uint32_t ie_len_with_pad;
|
||||
struct mac_ssid ssid[WMI_SCAN_MAX_NUM_SSID];
|
||||
uint8_t *ie_base;
|
||||
uint16_t uie_fieldOffset;
|
||||
uint8_t mac_add_bytes[IEEE80211_ADDR_LEN];
|
||||
#ifndef CONFIG_MCL
|
||||
bool half_rate;
|
||||
bool quarter_rate;
|
||||
bool is_strict_pscan_en;
|
||||
bool is_promiscous_mode;
|
||||
bool is_phy_error;
|
||||
bool add_cck_rates;
|
||||
bool chan_stat_enable;
|
||||
bool offchan_tx_mgmt;
|
||||
bool offchan_tx_data;
|
||||
bool add_bcast_probe_reqd;
|
||||
uint8_t bssid_list[WMI_SCAN_MAX_NUM_BSSID][IEEE80211_ADDR_LEN];
|
||||
uint8_t *ie_data;
|
||||
int passive_flag;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_stop_params - stop scan cmd parameter
|
||||
* @requestor: scan requestor
|
||||
* @scan_id: scan id
|
||||
* @req_type: scan request type
|
||||
* @vdev_id: vdev id
|
||||
* @pdev_id: pdev_id
|
||||
* @all_scans: Stop all scans
|
||||
* @vap_scans: stop vap scans
|
||||
* @specific_scan: specific scan
|
||||
* @flags: scan flags
|
||||
* @ss_scan_id: ss scan id
|
||||
*/
|
||||
struct scan_stop_params {
|
||||
uint32_t requestor;
|
||||
uint32_t scan_id;
|
||||
uint32_t req_type;
|
||||
uint32_t vdev_id;
|
||||
uint32_t pdev_id;
|
||||
#ifndef CONFIG_MCL
|
||||
bool all_scans;
|
||||
bool vap_scans;
|
||||
bool specific_scan;
|
||||
uint32_t flags;
|
||||
uint32_t ss_scan_id;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scan_chan_list_params - scan channel list cmd parameter
|
||||
* @num_scan_chans: no of scan channels
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <osdep.h>
|
||||
#include "a_types.h"
|
||||
#include "wmi_unified_param.h"
|
||||
#include "wlan_scan_ucfg_api.h"
|
||||
#include "qdf_atomic.h"
|
||||
#include "wlan_objmgr_psoc_service_ready_api.h"
|
||||
|
||||
@@ -279,10 +280,10 @@ QDF_STATUS (*send_peer_assoc_cmd)(wmi_unified_t wmi_handle,
|
||||
struct peer_assoc_params *param);
|
||||
|
||||
QDF_STATUS (*send_scan_start_cmd)(wmi_unified_t wmi_handle,
|
||||
struct scan_start_params *param);
|
||||
struct scan_req_params *param);
|
||||
|
||||
QDF_STATUS (*send_scan_stop_cmd)(wmi_unified_t wmi_handle,
|
||||
struct scan_stop_params *param);
|
||||
struct scan_cancel_param *param);
|
||||
|
||||
QDF_STATUS (*send_scan_chan_list_cmd)(wmi_unified_t wmi_handle,
|
||||
struct scan_chan_list_params *param);
|
||||
@@ -1055,7 +1056,7 @@ QDF_STATUS (*extract_vdev_roam_param)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
wmi_host_roam_event *param);
|
||||
|
||||
QDF_STATUS (*extract_vdev_scan_ev_param)(wmi_unified_t wmi_handle,
|
||||
void *evt_buf, wmi_host_scan_event *param);
|
||||
void *evt_buf, struct scan_event *param);
|
||||
|
||||
QDF_STATUS (*extract_mu_ev_param)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
wmi_host_mu_report_event *param);
|
||||
|
@@ -745,7 +745,7 @@ QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
|
||||
struct scan_start_params *param)
|
||||
struct scan_req_params *param)
|
||||
{
|
||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||
|
||||
@@ -765,7 +765,7 @@ QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
|
||||
struct scan_stop_params *param)
|
||||
struct scan_cancel_param *param)
|
||||
{
|
||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||
|
||||
@@ -5158,7 +5158,7 @@ QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
|
||||
wmi_host_scan_event *param)
|
||||
struct scan_event *param)
|
||||
{
|
||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||
|
||||
|
@@ -1825,7 +1825,7 @@ static QDF_STATUS send_peer_assoc_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
* @return QDF_STATUS_SUCCESS on success and -ve on failure.
|
||||
*/
|
||||
static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
struct scan_start_params *param)
|
||||
struct scan_req_params *param)
|
||||
{
|
||||
wmi_start_scan_cmd *cmd;
|
||||
wmi_buf_t buf;
|
||||
@@ -1852,11 +1852,11 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
len += sizeof(wmi_bssid_list) + (param->num_bssid - 1)
|
||||
* sizeof(wmi_mac_addr);
|
||||
}
|
||||
if (param->ie_len) {
|
||||
i = param->ie_len % sizeof(A_UINT32);
|
||||
if (param->extraie.len) {
|
||||
i = param->extraie.len % sizeof(A_UINT32);
|
||||
if (i)
|
||||
len += sizeof(A_UINT32) - i;
|
||||
len += 2 * sizeof(A_UINT32) + param->ie_len;
|
||||
len += 2 * sizeof(A_UINT32) + param->extraie.len;
|
||||
}
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf) {
|
||||
@@ -1869,16 +1869,30 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
cmd->scan_priority = param->scan_priority;
|
||||
cmd->scan_id = param->scan_id;
|
||||
cmd->scan_req_id = param->scan_req_id;
|
||||
/** Scan events subscription */
|
||||
cmd->notify_scan_events = WMI_SCAN_EVENT_STARTED |
|
||||
WMI_SCAN_EVENT_COMPLETED |
|
||||
WMI_SCAN_EVENT_BSS_CHANNEL |
|
||||
WMI_SCAN_EVENT_FOREIGN_CHANNEL |
|
||||
WMI_SCAN_EVENT_DEQUEUED
|
||||
#if QCA_LTEU_SUPPORT
|
||||
| WMI_SCAN_EVENT_GPIO_TIMEOUT;
|
||||
#endif
|
||||
;
|
||||
|
||||
/* Scan events subscription */
|
||||
if (param->scan_ev_started)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_STARTED;
|
||||
if (param->scan_ev_completed)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_COMPLETED;
|
||||
if (param->scan_ev_bss_chan)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_BSS_CHANNEL;
|
||||
if (param->scan_ev_foreign_chan)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_FOREIGN_CHANNEL;
|
||||
if (param->scan_ev_dequeued)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_DEQUEUED;
|
||||
if (param->scan_ev_preempted)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_PREEMPTED;
|
||||
if (param->scan_ev_start_failed)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_START_FAILED;
|
||||
if (param->scan_ev_restarted)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_RESTARTED;
|
||||
if (param->scan_ev_foreign_chn_exit)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT;
|
||||
if (param->scan_ev_invalid)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_INVALID;
|
||||
if (param->scan_ev_gpio_timeout)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_GPIO_TIMEOUT;
|
||||
|
||||
/** Max. active channel dwell time */
|
||||
cmd->dwell_time_active = param->dwell_time_active;
|
||||
@@ -1886,24 +1900,31 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
cmd->dwell_time_passive = param->dwell_time_passive;
|
||||
|
||||
/** Scan control flags */
|
||||
cmd->scan_ctrl_flags = (param->passive_flag) ?
|
||||
WMI_SCAN_FLAG_PASSIVE : 0;
|
||||
|
||||
if (param->is_strict_pscan_en) {
|
||||
cmd->scan_ctrl_flags = 0;
|
||||
if (param->scan_f_passive)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_PASSIVE;
|
||||
if (param->scan_f_strict_passive_pch)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN;
|
||||
}
|
||||
|
||||
if (param->is_promiscous_mode)
|
||||
if (param->scan_f_promisc_mode)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_PROMISCOUS_MODE;
|
||||
|
||||
if (param->is_phy_error)
|
||||
if (param->scan_f_capture_phy_err)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_CAPTURE_PHY_ERROR;
|
||||
|
||||
if (param->half_rate)
|
||||
if (param->scan_f_half_rate)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_HALF_RATE_SUPPORT;
|
||||
|
||||
if (param->quarter_rate)
|
||||
if (param->scan_f_quarter_rate)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT;
|
||||
if (param->scan_f_cck_rates)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_CCK_RATES;
|
||||
if (param->scan_f_chan_stat_evnt)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_CHAN_STAT_EVENT;
|
||||
if (param->scan_f_bcast_probe)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_BCAST_PROBE_REQ;
|
||||
if (param->scan_f_offchan_mgmt_tx)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_OFFCHAN_MGMT_TX;
|
||||
if (param->scan_f_offchan_data_tx)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_OFFCHAN_DATA_TX;
|
||||
/* Always enable ofdm rates */
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_OFDM_RATES;
|
||||
|
||||
/** send multiple braodcast probe req with this delay in between */
|
||||
cmd->repeat_probe_time = param->repeat_probe_time;
|
||||
@@ -1925,20 +1946,6 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
#else
|
||||
cmd->max_scan_time = param->max_scan_time;
|
||||
#endif
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_OFDM_RATES;
|
||||
/* add cck rates if required */
|
||||
if (param->add_cck_rates)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_CCK_RATES;
|
||||
/** It enables the Channel stat event indication to host */
|
||||
if (param->chan_stat_enable)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_CHAN_STAT_EVENT;
|
||||
if (param->add_bcast_probe_reqd)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_BCAST_PROBE_REQ;
|
||||
/* off channel TX control */
|
||||
if (param->offchan_tx_mgmt)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_OFFCHAN_MGMT_TX;
|
||||
if (param->offchan_tx_data)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_OFFCHAN_DATA_TX;
|
||||
tmp_ptr = (A_UINT32 *) (cmd + 1);
|
||||
#ifdef TEST_CODE
|
||||
#define DEFAULT_TIME 150
|
||||
@@ -1972,7 +1979,7 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
ssid_list->ssids[i].ssid_len = param->ssid[i].length;
|
||||
WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(
|
||||
ssid_list->ssids[i].ssid,
|
||||
param->ssid[i].mac_ssid,
|
||||
param->ssid[i].ssid,
|
||||
param->ssid[i].length);
|
||||
}
|
||||
tmp_ptr += (2 + (sizeof(wmi_ssid) *
|
||||
@@ -1983,18 +1990,19 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
bssid_list->tag = WMI_BSSID_LIST_TAG;
|
||||
bssid_list->num_bssid = param->num_bssid;
|
||||
for (i = 0; i < param->num_bssid; ++i) {
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(&(param->bssid_list[i][0]),
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(
|
||||
&(param->bssid_list[i].bytes[0]),
|
||||
&bssid_list->bssid_list[i]);
|
||||
}
|
||||
tmp_ptr += (2 + (sizeof(wmi_mac_addr) *
|
||||
param->num_bssid)/sizeof(A_UINT32));
|
||||
}
|
||||
if (param->ie_len) {
|
||||
if (param->extraie.len) {
|
||||
ie_data = (wmi_ie_data *) tmp_ptr;
|
||||
ie_data->tag = WMI_IE_TAG;
|
||||
ie_data->ie_len = param->ie_len;
|
||||
ie_data->ie_len = param->extraie.len;
|
||||
WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(ie_data->ie_data,
|
||||
param->ie_data, param->ie_len);
|
||||
param->extraie.ptr, param->extraie.len);
|
||||
}
|
||||
qdf_print("Sending SCAN START cmd\n");
|
||||
return wmi_unified_cmd_send(wmi_handle, buf, len, WMI_START_SCAN_CMDID);
|
||||
@@ -2008,12 +2016,11 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
* @return QDF_STATUS_SUCCESS on success and -ve on failure.
|
||||
*/
|
||||
static QDF_STATUS send_scan_stop_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
struct scan_stop_params *param)
|
||||
struct scan_cancel_param *param)
|
||||
{
|
||||
wmi_stop_scan_cmd *cmd = NULL;
|
||||
wmi_buf_t buf;
|
||||
u_int32_t len = sizeof(wmi_stop_scan_cmd);
|
||||
wmi_scan_event wmi_scn_event;
|
||||
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf) {
|
||||
@@ -2024,19 +2031,19 @@ static QDF_STATUS send_scan_stop_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
OS_MEMZERO(cmd, len);
|
||||
/* scan scheduler is not supportd yet */
|
||||
cmd->scan_id = param->scan_id;
|
||||
cmd->requestor = param->requestor;
|
||||
cmd->requestor = param->requester;
|
||||
cmd->vdev_id = param->vdev_id;
|
||||
|
||||
if (param->all_scans) {
|
||||
if (param->req_type == WLAN_SCAN_CANCEL_PDEV_ALL) {
|
||||
/* Cancelling all scans - always match scan id */
|
||||
cmd->req_type = WMI_SCAN_STOP_ALL;
|
||||
} else if (param->vap_scans) {
|
||||
} else if (param->req_type == WLAN_SCAN_CANCEL_VDEV_ALL) {
|
||||
/*-
|
||||
* Cancelling VAP scans - report a match if scan was requested
|
||||
* by the same VAP trying to cancel it.
|
||||
*/
|
||||
cmd->req_type = WMI_SCN_STOP_VAP_ALL;
|
||||
} else if (param->specific_scan) {
|
||||
} else if (param->req_type == WLAN_SCAN_CANCEL_SINGLE) {
|
||||
/*-
|
||||
* Cancelling specific scan - report a match if specified scan
|
||||
* id matches the request's scan id.
|
||||
@@ -2045,14 +2052,7 @@ static QDF_STATUS send_scan_stop_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
}
|
||||
|
||||
wmi_unified_cmd_send(wmi_handle, buf, len, WMI_STOP_SCAN_CMDID);
|
||||
/* send a synchronous cancel command */
|
||||
if (param->flags) {
|
||||
OS_MEMZERO(&wmi_scn_event, sizeof(wmi_scn_event));
|
||||
wmi_scn_event.event = WMI_SCAN_EVENT_COMPLETED;
|
||||
wmi_scn_event.reason = WMI_SCAN_REASON_CANCELLED;
|
||||
wmi_scn_event.requestor = param->requestor;
|
||||
wmi_scn_event.scan_id = param->ss_scan_id;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -5983,75 +5983,75 @@ static QDF_STATUS extract_vdev_roam_param_non_tlv(wmi_unified_t wmi_handle,
|
||||
*/
|
||||
static QDF_STATUS extract_vdev_scan_ev_param_non_tlv(wmi_unified_t wmi_handle,
|
||||
void *evt_buf,
|
||||
wmi_host_scan_event *param)
|
||||
struct scan_event *param)
|
||||
{
|
||||
wmi_scan_event *evt = (wmi_scan_event *)evt_buf;
|
||||
|
||||
qdf_mem_zero(param, sizeof(*param));
|
||||
switch (evt->event) {
|
||||
case WMI_SCAN_EVENT_STARTED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_STARTED;
|
||||
param->type = SCAN_EVENT_TYPE_STARTED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_COMPLETED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_COMPLETED;
|
||||
param->type = SCAN_EVENT_TYPE_COMPLETED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_BSS_CHANNEL:
|
||||
param->event = WMI_HOST_SCAN_EVENT_BSS_CHANNEL;
|
||||
param->type = SCAN_EVENT_TYPE_BSS_CHANNEL;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_FOREIGN_CHANNEL:
|
||||
param->event = WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL;
|
||||
param->type = SCAN_EVENT_TYPE_FOREIGN_CHANNEL;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_DEQUEUED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_DEQUEUED;
|
||||
param->type = SCAN_EVENT_TYPE_DEQUEUED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_PREEMPTED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_PREEMPTED;
|
||||
param->type = SCAN_EVENT_TYPE_PREEMPTED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_START_FAILED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_START_FAILED;
|
||||
param->type = SCAN_EVENT_TYPE_START_FAILED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_RESTARTED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_RESTARTED;
|
||||
param->type = SCAN_EVENT_TYPE_RESTARTED;
|
||||
break;
|
||||
case WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT:
|
||||
param->event = WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT;
|
||||
param->type = SCAN_EVENT_TYPE_FOREIGN_CHANNEL_EXIT;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_INVALID:
|
||||
param->event = WMI_HOST_SCAN_EVENT_INVALID;
|
||||
param->type = SCAN_EVENT_TYPE_INVALID;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_MAX:
|
||||
default:
|
||||
param->event = WMI_HOST_SCAN_EVENT_MAX;
|
||||
param->type = SCAN_EVENT_TYPE_MAX;
|
||||
break;
|
||||
};
|
||||
|
||||
switch (evt->reason) {
|
||||
case WMI_SCAN_REASON_NONE:
|
||||
param->reason = WMI_HOST_SCAN_REASON_NONE;
|
||||
param->reason = SCAN_REASON_NONE;
|
||||
break;
|
||||
case WMI_SCAN_REASON_COMPLETED:
|
||||
param->reason = WMI_HOST_SCAN_REASON_COMPLETED;
|
||||
param->reason = SCAN_REASON_COMPLETED;
|
||||
break;
|
||||
case WMI_SCAN_REASON_CANCELLED:
|
||||
param->reason = WMI_HOST_SCAN_REASON_CANCELLED;
|
||||
param->reason = SCAN_REASON_CANCELLED;
|
||||
break;
|
||||
case WMI_SCAN_REASON_PREEMPTED:
|
||||
param->reason = WMI_HOST_SCAN_REASON_PREEMPTED;
|
||||
param->reason = SCAN_REASON_PREEMPTED;
|
||||
break;
|
||||
case WMI_SCAN_REASON_TIMEDOUT:
|
||||
param->reason = WMI_HOST_SCAN_REASON_TIMEDOUT;
|
||||
param->reason = SCAN_REASON_TIMEDOUT;
|
||||
break;
|
||||
case WMI_SCAN_REASON_INTERNAL_FAILURE:
|
||||
param->reason = WMI_HOST_SCAN_REASON_INTERNAL_FAILURE;
|
||||
param->reason = SCAN_REASON_INTERNAL_FAILURE;
|
||||
break;
|
||||
case WMI_SCAN_REASON_MAX:
|
||||
default:
|
||||
param->reason = WMI_HOST_SCAN_REASON_MAX;
|
||||
param->reason = SCAN_REASON_MAX;
|
||||
break;
|
||||
};
|
||||
|
||||
param->channel_freq = evt->channel_freq;
|
||||
param->requestor = evt->requestor;
|
||||
param->chan_freq = evt->channel_freq;
|
||||
param->requester = evt->requestor;
|
||||
param->scan_id = evt->scan_id;
|
||||
param->vdev_id = evt->vdev_id;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
@@ -1946,78 +1946,88 @@ static QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
|
||||
/* copy_scan_notify_events() - Helper routine to copy scan notify events
|
||||
*/
|
||||
#ifdef CONFIG_MCL
|
||||
static inline void copy_scan_notify_ev_flags(
|
||||
static inline void copy_scan_event_cntrl_flags(
|
||||
wmi_start_scan_cmd_fixed_param * cmd,
|
||||
struct scan_start_params *params)
|
||||
struct scan_req_params *param)
|
||||
{
|
||||
cmd->notify_scan_events = params->notify_scan_events;
|
||||
cmd->scan_ctrl_flags = params->scan_ctrl_flags;
|
||||
}
|
||||
#else
|
||||
static inline void copy_scan_notify_ev_flags(
|
||||
wmi_start_scan_cmd_fixed_param * cmd,
|
||||
struct scan_start_params *params)
|
||||
{
|
||||
cmd->notify_scan_events = WMI_SCAN_EVENT_STARTED |
|
||||
WMI_SCAN_EVENT_COMPLETED |
|
||||
WMI_SCAN_EVENT_BSS_CHANNEL |
|
||||
WMI_SCAN_EVENT_FOREIGN_CHANNEL |
|
||||
WMI_SCAN_EVENT_DEQUEUED
|
||||
;
|
||||
|
||||
cmd->scan_ctrl_flags = (params->passive_flag) ?
|
||||
WMI_SCAN_FLAG_PASSIVE : 0;
|
||||
/* Scan events subscription */
|
||||
if (param->scan_ev_started)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_STARTED;
|
||||
if (param->scan_ev_completed)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_COMPLETED;
|
||||
if (param->scan_ev_bss_chan)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_BSS_CHANNEL;
|
||||
if (param->scan_ev_foreign_chan)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_FOREIGN_CHANNEL;
|
||||
if (param->scan_ev_dequeued)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_DEQUEUED;
|
||||
if (param->scan_ev_preempted)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_PREEMPTED;
|
||||
if (param->scan_ev_start_failed)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_START_FAILED;
|
||||
if (param->scan_ev_restarted)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_RESTARTED;
|
||||
if (param->scan_ev_foreign_chn_exit)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT;
|
||||
if (param->scan_ev_suspended)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_SUSPENDED;
|
||||
if (param->scan_ev_resumed)
|
||||
cmd->notify_scan_events |= WMI_SCAN_EVENT_RESUMED;
|
||||
|
||||
if (params->is_strict_pscan_en)
|
||||
/** Set scan control flags */
|
||||
cmd->scan_ctrl_flags = 0;
|
||||
if (param->scan_f_passive)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_PASSIVE;
|
||||
if (param->scan_f_strict_passive_pch)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN;
|
||||
|
||||
if (params->is_phy_error)
|
||||
if (param->scan_f_promisc_mode)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FILTER_PROMISCOUS;
|
||||
if (param->scan_f_capture_phy_err)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_CAPTURE_PHY_ERROR;
|
||||
|
||||
if (params->half_rate)
|
||||
if (param->scan_f_half_rate)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_HALF_RATE_SUPPORT;
|
||||
|
||||
if (params->quarter_rate)
|
||||
if (param->scan_f_quarter_rate)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT;
|
||||
|
||||
if (params->is_phy_error)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_CAPTURE_PHY_ERROR;
|
||||
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_OFDM_RATES;
|
||||
/* add cck rates if required */
|
||||
if (params->add_cck_rates)
|
||||
if (param->scan_f_cck_rates)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_CCK_RATES;
|
||||
/** It enables the Channel stat event indication to host */
|
||||
if (params->chan_stat_enable)
|
||||
if (param->scan_f_ofdm_rates)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_OFDM_RATES;
|
||||
if (param->scan_f_chan_stat_evnt)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_CHAN_STAT_EVENT;
|
||||
if (params->add_bcast_probe_reqd)
|
||||
if (param->scan_f_filter_prb_req)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FILTER_PROBE_REQ;
|
||||
if (param->scan_f_bcast_probe)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_BCAST_PROBE_REQ;
|
||||
/* off channel TX control */
|
||||
if (params->offchan_tx_mgmt)
|
||||
if (param->scan_f_offchan_mgmt_tx)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_OFFCHAN_MGMT_TX;
|
||||
if (params->offchan_tx_data)
|
||||
if (param->scan_f_offchan_data_tx)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_OFFCHAN_DATA_TX;
|
||||
}
|
||||
#endif
|
||||
if (param->scan_f_force_active_dfs_chn)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS;
|
||||
if (param->scan_f_add_tpc_ie_in_probe)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ;
|
||||
if (param->scan_f_add_ds_ie_in_probe)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ;
|
||||
if (param->scan_f_add_spoofed_mac_in_probe)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ;
|
||||
if (param->scan_f_add_rand_seq_in_probe)
|
||||
cmd->scan_ctrl_flags |= WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ;
|
||||
if (param->scan_f_en_ie_whitelist_in_probe)
|
||||
cmd->scan_ctrl_flags |=
|
||||
WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ;
|
||||
|
||||
/* for adaptive scan mode using 3 bits (21 - 23 bits) */
|
||||
WMI_SCAN_SET_DWELL_MODE(cmd->scan_ctrl_flags,
|
||||
param->adaptive_dwell_time_mode);
|
||||
}
|
||||
|
||||
/* scan_copy_ie_buffer() - Copy scan ie_data */
|
||||
#ifndef CONFIG_MCL
|
||||
static inline void scan_copy_ie_buffer(uint8_t *buf_ptr,
|
||||
struct scan_start_params *params)
|
||||
struct scan_req_params *params)
|
||||
{
|
||||
qdf_mem_copy(buf_ptr, params->ie_data, params->ie_len);
|
||||
qdf_mem_copy(buf_ptr, params->extraie.ptr, params->extraie.len);
|
||||
}
|
||||
#else
|
||||
static inline void scan_copy_ie_buffer(uint8_t *buf_ptr,
|
||||
struct scan_start_params *params)
|
||||
{
|
||||
qdf_mem_copy(buf_ptr,
|
||||
(uint8_t *) params->ie_base +
|
||||
(params->uie_fieldOffset), params->ie_len);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* send_scan_start_cmd_tlv() - WMI scan start function
|
||||
@@ -2027,7 +2037,7 @@ static inline void scan_copy_ie_buffer(uint8_t *buf_ptr,
|
||||
* Return: 0 on success and -ve on failure.
|
||||
*/
|
||||
static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
struct scan_start_params *params)
|
||||
struct scan_req_params *params)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
int32_t i;
|
||||
@@ -2038,6 +2048,7 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
wmi_ssid *ssid = NULL;
|
||||
wmi_mac_addr *bssid;
|
||||
int len = sizeof(*cmd);
|
||||
uint8_t extraie_len_with_pad = 0;
|
||||
|
||||
/* Length TLV placeholder for array of uint32_t */
|
||||
len += WMI_TLV_HDR_SIZE;
|
||||
@@ -2057,8 +2068,10 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
|
||||
/* Length TLV placeholder for array of bytes */
|
||||
len += WMI_TLV_HDR_SIZE;
|
||||
if (params->ie_len)
|
||||
len += roundup(params->ie_len, sizeof(uint32_t));
|
||||
if (params->extraie.len)
|
||||
extraie_len_with_pad =
|
||||
roundup(params->extraie.len, sizeof(uint32_t));
|
||||
len += extraie_len_with_pad;
|
||||
|
||||
/* Allocate the memory */
|
||||
wmi_buf = wmi_buf_alloc(wmi_handle, len);
|
||||
@@ -2078,7 +2091,9 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
cmd->scan_req_id = params->scan_req_id;
|
||||
cmd->vdev_id = params->vdev_id;
|
||||
cmd->scan_priority = params->scan_priority;
|
||||
copy_scan_notify_ev_flags(cmd, params);
|
||||
|
||||
copy_scan_event_cntrl_flags(cmd, params);
|
||||
|
||||
cmd->dwell_time_active = params->dwell_time_active;
|
||||
cmd->dwell_time_passive = params->dwell_time_passive;
|
||||
cmd->min_rest_time = params->min_rest_time;
|
||||
@@ -2092,7 +2107,7 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
cmd->num_chan = params->num_chan;
|
||||
cmd->num_bssid = params->num_bssid;
|
||||
cmd->num_ssids = params->num_ssids;
|
||||
cmd->ie_len = params->ie_len;
|
||||
cmd->ie_len = params->extraie.len;
|
||||
cmd->n_probes = params->n_probes;
|
||||
buf_ptr += sizeof(*cmd);
|
||||
tmp_ptr = (uint32_t *) (buf_ptr + WMI_TLV_HDR_SIZE);
|
||||
@@ -2115,7 +2130,7 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
ssid = (wmi_ssid *) (buf_ptr + WMI_TLV_HDR_SIZE);
|
||||
for (i = 0; i < params->num_ssids; ++i) {
|
||||
ssid->ssid_len = params->ssid[i].length;
|
||||
qdf_mem_copy(ssid->ssid, params->ssid[i].mac_ssid,
|
||||
qdf_mem_copy(ssid->ssid, params->ssid[i].ssid,
|
||||
params->ssid[i].length);
|
||||
ssid++;
|
||||
}
|
||||
@@ -2125,25 +2140,24 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_FIXED_STRUC,
|
||||
(params->num_bssid * sizeof(wmi_mac_addr)));
|
||||
bssid = (wmi_mac_addr *) (buf_ptr + WMI_TLV_HDR_SIZE);
|
||||
#if CONFIG_MCL
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(params->mac_add_bytes, bssid);
|
||||
#else
|
||||
|
||||
if (params->num_bssid) {
|
||||
for (i = 0; i < params->num_bssid; ++i) {
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(params->bssid_list[i],
|
||||
bssid);
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(
|
||||
¶ms->bssid_list[i].bytes[0], bssid);
|
||||
bssid++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
buf_ptr += WMI_TLV_HDR_SIZE + (params->num_bssid * sizeof(wmi_mac_addr));
|
||||
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
|
||||
roundup(params->ie_len, sizeof(uint32_t)));
|
||||
if (params->ie_len) {
|
||||
scan_copy_ie_buffer(buf_ptr + WMI_TLV_HDR_SIZE, params);
|
||||
}
|
||||
buf_ptr += WMI_TLV_HDR_SIZE + roundup(params->ie_len, sizeof(uint32_t));
|
||||
buf_ptr += WMI_TLV_HDR_SIZE +
|
||||
(params->num_bssid * sizeof(wmi_mac_addr));
|
||||
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, extraie_len_with_pad);
|
||||
if (params->extraie.len)
|
||||
scan_copy_ie_buffer(buf_ptr + WMI_TLV_HDR_SIZE,
|
||||
params);
|
||||
|
||||
buf_ptr += WMI_TLV_HDR_SIZE + extraie_len_with_pad;
|
||||
|
||||
ret = wmi_unified_cmd_send(wmi_handle, wmi_buf,
|
||||
len, WMI_START_SCAN_CMDID);
|
||||
@@ -2160,12 +2174,12 @@ error:
|
||||
/**
|
||||
* send_scan_stop_cmd_tlv() - WMI scan start function
|
||||
* @param wmi_handle : handle to WMI.
|
||||
* @param param : pointer to hold scan start cmd parameter
|
||||
* @param param : pointer to hold scan cancel cmd parameter
|
||||
*
|
||||
* Return: 0 on success and -ve on failure.
|
||||
*/
|
||||
static QDF_STATUS send_scan_stop_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
struct scan_stop_params *param)
|
||||
struct scan_cancel_param *param)
|
||||
{
|
||||
wmi_stop_scan_cmd_fixed_param *cmd;
|
||||
int ret;
|
||||
@@ -2186,11 +2200,21 @@ static QDF_STATUS send_scan_stop_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN(wmi_stop_scan_cmd_fixed_param));
|
||||
cmd->vdev_id = param->vdev_id;
|
||||
cmd->requestor = param->requestor;
|
||||
cmd->requestor = param->requester;
|
||||
cmd->scan_id = param->scan_id;
|
||||
cmd->pdev_id = param->pdev_id;
|
||||
/* stop the scan with the corresponding scan_id */
|
||||
cmd->req_type = param->req_type;
|
||||
if (param->req_type == WLAN_SCAN_CANCEL_PDEV_ALL) {
|
||||
/* Cancelling all scans */
|
||||
cmd->req_type = WMI_SCAN_STOP_ALL;
|
||||
} else if (param->req_type == WLAN_SCAN_CANCEL_VDEV_ALL) {
|
||||
/* Cancelling VAP scans */
|
||||
cmd->req_type = WMI_SCN_STOP_VAP_ALL;
|
||||
} else if (param->req_type == WLAN_SCAN_CANCEL_SINGLE) {
|
||||
/* Cancelling specific scan */
|
||||
cmd->req_type = WMI_SCAN_STOP_ONE;
|
||||
}
|
||||
|
||||
ret = wmi_unified_cmd_send(wmi_handle, wmi_buf,
|
||||
len, WMI_STOP_SCAN_CMDID);
|
||||
if (ret) {
|
||||
@@ -14557,7 +14581,7 @@ static QDF_STATUS extract_vdev_roam_param_tlv(wmi_unified_t wmi_handle,
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
static QDF_STATUS extract_vdev_scan_ev_param_tlv(wmi_unified_t wmi_handle,
|
||||
void *evt_buf, wmi_host_scan_event *param)
|
||||
void *evt_buf, struct scan_event *param)
|
||||
{
|
||||
WMI_SCAN_EVENTID_param_tlvs *param_buf = NULL;
|
||||
wmi_scan_event_fixed_param *evt = NULL;
|
||||
@@ -14568,65 +14592,65 @@ static QDF_STATUS extract_vdev_scan_ev_param_tlv(wmi_unified_t wmi_handle,
|
||||
qdf_mem_zero(param, sizeof(*param));
|
||||
switch (evt->event) {
|
||||
case WMI_SCAN_EVENT_STARTED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_STARTED;
|
||||
param->type = SCAN_EVENT_TYPE_STARTED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_COMPLETED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_COMPLETED;
|
||||
param->type = SCAN_EVENT_TYPE_COMPLETED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_BSS_CHANNEL:
|
||||
param->event = WMI_HOST_SCAN_EVENT_BSS_CHANNEL;
|
||||
param->type = SCAN_EVENT_TYPE_BSS_CHANNEL;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_FOREIGN_CHANNEL:
|
||||
param->event = WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL;
|
||||
param->type = SCAN_EVENT_TYPE_FOREIGN_CHANNEL;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_DEQUEUED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_DEQUEUED;
|
||||
param->type = SCAN_EVENT_TYPE_DEQUEUED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_PREEMPTED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_PREEMPTED;
|
||||
param->type = SCAN_EVENT_TYPE_PREEMPTED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_START_FAILED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_START_FAILED;
|
||||
param->type = SCAN_EVENT_TYPE_START_FAILED;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_RESTARTED:
|
||||
param->event = WMI_HOST_SCAN_EVENT_RESTARTED;
|
||||
param->type = SCAN_EVENT_TYPE_RESTARTED;
|
||||
break;
|
||||
case WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT:
|
||||
param->event = WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT;
|
||||
param->type = SCAN_EVENT_TYPE_FOREIGN_CHANNEL_EXIT;
|
||||
break;
|
||||
case WMI_SCAN_EVENT_MAX:
|
||||
default:
|
||||
param->event = WMI_HOST_SCAN_EVENT_MAX;
|
||||
param->type = SCAN_EVENT_TYPE_MAX;
|
||||
break;
|
||||
};
|
||||
|
||||
switch (evt->reason) {
|
||||
case WMI_SCAN_REASON_NONE:
|
||||
param->reason = WMI_HOST_SCAN_REASON_NONE;
|
||||
param->reason = SCAN_REASON_NONE;
|
||||
break;
|
||||
case WMI_SCAN_REASON_COMPLETED:
|
||||
param->reason = WMI_HOST_SCAN_REASON_COMPLETED;
|
||||
param->reason = SCAN_REASON_COMPLETED;
|
||||
break;
|
||||
case WMI_SCAN_REASON_CANCELLED:
|
||||
param->reason = WMI_HOST_SCAN_REASON_CANCELLED;
|
||||
param->reason = SCAN_REASON_CANCELLED;
|
||||
break;
|
||||
case WMI_SCAN_REASON_PREEMPTED:
|
||||
param->reason = WMI_HOST_SCAN_REASON_PREEMPTED;
|
||||
param->reason = SCAN_REASON_PREEMPTED;
|
||||
break;
|
||||
case WMI_SCAN_REASON_TIMEDOUT:
|
||||
param->reason = WMI_HOST_SCAN_REASON_TIMEDOUT;
|
||||
param->reason = SCAN_REASON_TIMEDOUT;
|
||||
break;
|
||||
case WMI_SCAN_REASON_INTERNAL_FAILURE:
|
||||
param->reason = WMI_HOST_SCAN_REASON_INTERNAL_FAILURE;
|
||||
param->reason = SCAN_REASON_INTERNAL_FAILURE;
|
||||
break;
|
||||
case WMI_SCAN_REASON_MAX:
|
||||
default:
|
||||
param->reason = WMI_HOST_SCAN_REASON_MAX;
|
||||
param->reason = SCAN_REASON_MAX;
|
||||
break;
|
||||
};
|
||||
|
||||
param->channel_freq = evt->channel_freq;
|
||||
param->requestor = evt->requestor;
|
||||
param->chan_freq = evt->channel_freq;
|
||||
param->requester = evt->requestor;
|
||||
param->scan_id = evt->scan_id;
|
||||
param->vdev_id = evt->vdev_id;
|
||||
|
||||
|
Reference in New Issue
Block a user