qcacld-3.0: Support roam invoke request in connection manager
Add change to support roam invoke request in connection manager Change-Id: I87bd39263c7c210fa87250aca59ef5f2f89d4c67 CRs-Fixed: 2869211
This commit is contained in:

committed by
snandini

parent
c478f447ff
commit
e4df806aa6
@@ -3079,4 +3079,13 @@ mlme_is_twt_enabled(struct wlan_objmgr_psoc *psoc)
|
||||
*/
|
||||
bool wlan_mlme_is_local_tpe_pref(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* wlan_mlme_is_data_stall_recovery_fw_supported() - Check if data stall
|
||||
* recovery is supported by fw
|
||||
* @psoc: pointer to psoc object
|
||||
*
|
||||
* Return: True if supported
|
||||
*/
|
||||
bool
|
||||
wlan_mlme_is_data_stall_recovery_fw_supported(struct wlan_objmgr_psoc *psoc);
|
||||
#endif /* _WLAN_MLME_API_H_ */
|
||||
|
@@ -468,6 +468,20 @@ QDF_STATUS wlan_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool
|
||||
wlan_mlme_is_data_stall_recovery_fw_supported(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
mlme_err("MLME obj is NULL");
|
||||
return false;
|
||||
}
|
||||
|
||||
return mlme_obj->cfg.gen.data_stall_recovery_fw_support;
|
||||
}
|
||||
|
||||
void
|
||||
wlan_mlme_update_cfg_with_tgt_caps(struct wlan_objmgr_psoc *psoc,
|
||||
struct mlme_tgt_caps *tgt_caps)
|
||||
|
@@ -74,10 +74,35 @@ target_if_cm_roam_send_vdev_set_pcl_cmd(struct wlan_objmgr_vdev *vdev,
|
||||
return wmi_unified_vdev_set_pcl_cmd(wmi_handle, ¶ms);
|
||||
}
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* target_if_cm_roam_send_roam_invoke_cmd - Send roam invoke command to wmi.
|
||||
* @vdev: VDEV object pointer
|
||||
* @req: Pointer to the roam invoke request msg
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS
|
||||
target_if_cm_roam_send_roam_invoke_cmd(struct wlan_objmgr_vdev *vdev,
|
||||
struct roam_invoke_req *req)
|
||||
{
|
||||
wmi_unified_t wmi_handle;
|
||||
|
||||
wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev);
|
||||
if (!wmi_handle)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return wmi_unified_roam_invoke_cmd(wmi_handle, req);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
|
||||
{
|
||||
tx_ops->send_vdev_set_pcl_cmd = target_if_cm_roam_send_vdev_set_pcl_cmd;
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
tx_ops->send_roam_invoke_cmd = target_if_cm_roam_send_roam_invoke_cmd;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
|
@@ -36,6 +36,12 @@
|
||||
#include "wlan_p2p_cfg_api.h"
|
||||
#include "wlan_cm_vdev_api.h"
|
||||
#include "cfg_nan_api.h"
|
||||
#include "wlan_mlme_api.h"
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
#include "connection_mgr/core/src/wlan_cm_roam.h"
|
||||
#include "connection_mgr/core/src/wlan_cm_main.h"
|
||||
#include "connection_mgr/core/src/wlan_cm_sm.h"
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_SAE
|
||||
#define CM_IS_FW_FT_SAE_SUPPORTED(fw_akm_bitmap) \
|
||||
@@ -3617,3 +3623,243 @@ void cm_roam_start_init_on_connect(struct wlan_objmgr_pdev *pdev,
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_CM_ENABLE)
|
||||
static QDF_STATUS
|
||||
cm_find_roam_candidate(struct wlan_objmgr_pdev *pdev,
|
||||
struct cnx_mgr *cm_ctx,
|
||||
struct cm_roam_req *roam_req,
|
||||
struct roam_invoke_req *roam_invoke_req)
|
||||
{
|
||||
struct scan_filter *filter;
|
||||
qdf_list_t *candidate_list;
|
||||
uint32_t num_bss = 0;
|
||||
qdf_list_node_t *cur_node = NULL;
|
||||
struct scan_cache_node *candidate = NULL;
|
||||
|
||||
if (!roam_invoke_req)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (qdf_is_macaddr_zero(&roam_invoke_req->target_bssid) ||
|
||||
!roam_invoke_req->ch_freq)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
filter = qdf_mem_malloc(sizeof(*filter));
|
||||
if (!filter)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
filter->num_of_bssid = 1;
|
||||
qdf_copy_macaddr(&filter->bssid_list[0],
|
||||
&roam_invoke_req->target_bssid);
|
||||
filter->num_of_channels = 1;
|
||||
filter->chan_freq_list[0] = roam_invoke_req->ch_freq;
|
||||
|
||||
candidate_list = wlan_scan_get_result(pdev, filter);
|
||||
if (candidate_list) {
|
||||
num_bss = qdf_list_size(candidate_list);
|
||||
mlme_debug(CM_PREFIX_FMT "num_entries found %d",
|
||||
CM_PREFIX_REF(roam_req->req.vdev_id,
|
||||
roam_req->cm_id),
|
||||
num_bss);
|
||||
}
|
||||
qdf_mem_free(filter);
|
||||
|
||||
if (!candidate_list || !qdf_list_size(candidate_list)) {
|
||||
if (candidate_list)
|
||||
wlan_scan_purge_results(candidate_list);
|
||||
mlme_info(CM_PREFIX_FMT "no valid candidate found, num_bss %d",
|
||||
CM_PREFIX_REF(roam_req->req.vdev_id,
|
||||
roam_req->cm_id),
|
||||
num_bss);
|
||||
|
||||
return QDF_STATUS_E_EMPTY;
|
||||
}
|
||||
|
||||
qdf_list_peek_front(candidate_list, &cur_node);
|
||||
candidate = qdf_container_of(cur_node,
|
||||
struct scan_cache_node,
|
||||
node);
|
||||
|
||||
roam_invoke_req->frame_len = candidate->entry->raw_frame.len;
|
||||
|
||||
if (!roam_invoke_req->frame_len)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
roam_invoke_req->frame_buf = qdf_mem_malloc(roam_invoke_req->frame_len);
|
||||
|
||||
if (!roam_invoke_req->frame_buf) {
|
||||
roam_invoke_req->frame_len = 0;
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
qdf_mem_copy(roam_invoke_req->frame_buf,
|
||||
candidate->entry->raw_frame.ptr,
|
||||
roam_invoke_req->frame_len);
|
||||
|
||||
wlan_scan_purge_results(candidate_list);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS cm_start_roam_invoke(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr *bssid,
|
||||
qdf_freq_t chan_freq)
|
||||
{
|
||||
struct cm_req *cm_req;
|
||||
QDF_STATUS status;
|
||||
uint8_t roam_control_bitmap;
|
||||
uint8_t vdev_id = vdev->vdev_objmgr.vdev_id;
|
||||
|
||||
roam_control_bitmap = mlme_get_operations_bitmap(psoc, vdev_id);
|
||||
if (roam_control_bitmap ||
|
||||
!MLME_IS_ROAM_INITIALIZED(psoc, vdev_id)) {
|
||||
mlme_debug("ROAM: RSO Disabled internaly: vdev[%d] bitmap[0x%x]",
|
||||
vdev_id, roam_control_bitmap);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
cm_req = qdf_mem_malloc(sizeof(*cm_req));
|
||||
if (!cm_req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
if (qdf_is_macaddr_zero(bssid)) {
|
||||
if (!wlan_mlme_is_data_stall_recovery_fw_supported(psoc)) {
|
||||
mlme_debug("FW does not support data stall recovery, aborting roam invoke");
|
||||
qdf_mem_free(cm_req);
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
cm_req->roam_req.req.forced_roaming = true;
|
||||
goto send_evt;
|
||||
}
|
||||
|
||||
if (!chan_freq || qdf_is_macaddr_zero(bssid)) {
|
||||
mlme_debug("bssid " QDF_MAC_ADDR_FMT " chan_freq %d",
|
||||
QDF_MAC_ADDR_REF(bssid->bytes), chan_freq);
|
||||
qdf_mem_free(cm_req);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
qdf_copy_macaddr(&cm_req->roam_req.req.bssid, bssid);
|
||||
cm_req->roam_req.req.chan_freq = chan_freq;
|
||||
|
||||
send_evt:
|
||||
if (cm_req->roam_req.req.forced_roaming)
|
||||
cm_req->roam_req.req.source = CM_ROAMING_NUD_FAILURE;
|
||||
else
|
||||
cm_req->roam_req.req.source = CM_ROAMING_HOST;
|
||||
|
||||
cm_req->roam_req.req.vdev_id = vdev_id;
|
||||
status = cm_sm_deliver_event(vdev, WLAN_CM_SM_EV_ROAM_INVOKE,
|
||||
sizeof(*cm_req), cm_req);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
qdf_mem_free(cm_req);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
cm_send_roam_invoke_req(struct cnx_mgr *cm_ctx, struct cm_req *req)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct qdf_mac_addr connected_bssid;
|
||||
struct cm_roam_req *roam_req;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct roam_invoke_req *roam_invoke_req = NULL;
|
||||
|
||||
if (!req)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
roam_req = &req->roam_req;
|
||||
|
||||
pdev = wlan_vdev_get_pdev(cm_ctx->vdev);
|
||||
if (!pdev) {
|
||||
mlme_err(CM_PREFIX_FMT "Failed to find pdev",
|
||||
CM_PREFIX_REF(roam_req->req.vdev_id, roam_req->cm_id));
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto roam_err;
|
||||
}
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
if (!psoc) {
|
||||
mlme_err(CM_PREFIX_FMT "Failed to find psoc",
|
||||
CM_PREFIX_REF(roam_req->req.vdev_id, roam_req->cm_id));
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto roam_err;
|
||||
}
|
||||
|
||||
wlan_vdev_get_bss_peer_mac(cm_ctx->vdev, &connected_bssid);
|
||||
|
||||
roam_invoke_req = qdf_mem_malloc(sizeof(*roam_invoke_req));
|
||||
if (!roam_invoke_req) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto roam_err;
|
||||
}
|
||||
|
||||
roam_invoke_req->vdev_id = roam_req->req.vdev_id;
|
||||
if (roam_req->req.forced_roaming) {
|
||||
roam_invoke_req->forced_roaming = true;
|
||||
goto send_cmd;
|
||||
}
|
||||
|
||||
if (qdf_is_macaddr_equal(&roam_req->req.bssid, &connected_bssid))
|
||||
roam_invoke_req->is_same_bssid = true;
|
||||
|
||||
qdf_copy_macaddr(&roam_invoke_req->target_bssid, &roam_req->req.bssid);
|
||||
roam_invoke_req->ch_freq = roam_req->req.chan_freq;
|
||||
|
||||
status = cm_find_roam_candidate(pdev, cm_ctx, roam_req,
|
||||
roam_invoke_req);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
mlme_err(CM_PREFIX_FMT "No Candidate found",
|
||||
CM_PREFIX_REF(roam_req->req.vdev_id, roam_req->cm_id));
|
||||
goto roam_err;
|
||||
}
|
||||
|
||||
if (wlan_cm_get_ese_assoc(pdev, roam_req->req.vdev_id)) {
|
||||
mlme_debug(CM_PREFIX_FMT "Beacon is not required for ESE",
|
||||
CM_PREFIX_REF(roam_req->req.vdev_id,
|
||||
roam_req->cm_id));
|
||||
if (roam_invoke_req->frame_len) {
|
||||
qdf_mem_free(roam_invoke_req->frame_buf);
|
||||
roam_invoke_req->frame_buf = NULL;
|
||||
roam_invoke_req->frame_len = 0;
|
||||
}
|
||||
}
|
||||
send_cmd:
|
||||
status = wlan_cm_tgt_send_roam_invoke_req(psoc, roam_invoke_req);
|
||||
|
||||
roam_err:
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
mlme_debug(CM_PREFIX_FMT "fail to send roam invoke req",
|
||||
CM_PREFIX_REF(roam_req->req.vdev_id,
|
||||
roam_req->cm_id));
|
||||
status = cm_sm_deliver_event_sync(cm_ctx,
|
||||
WLAN_CM_SM_EV_ROAM_INVOKE_FAIL,
|
||||
sizeof(wlan_cm_id),
|
||||
&roam_req->cm_id);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
cm_remove_cmd(cm_ctx, &roam_req->cm_id);
|
||||
}
|
||||
|
||||
if (roam_invoke_req) {
|
||||
if (roam_invoke_req->frame_len)
|
||||
qdf_mem_free(roam_invoke_req->frame_buf);
|
||||
qdf_mem_free(roam_invoke_req);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
bool cm_roam_offload_enabled(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
bool val;
|
||||
|
||||
wlan_mlme_get_roaming_offload(psoc, &val);
|
||||
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
|
@@ -108,6 +108,32 @@ cm_roam_fill_rssi_change_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
* Return: void
|
||||
*/
|
||||
void cm_dump_freq_list(struct rso_chan_info *chan_info);
|
||||
|
||||
#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_CM_ENABLE)
|
||||
/**
|
||||
* cm_start_roam_invoke() - Validate and send Roam invoke req to CM
|
||||
* @pdev: Pdev pointer
|
||||
* @vdev: vdev
|
||||
* @bssid: Target bssid
|
||||
* @chan_freq: channel frequency on which reassoc should be send
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
cm_start_roam_invoke(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr *bssid,
|
||||
uint32_t chan_freq);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
cm_start_roam_invoke(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr *bssid,
|
||||
uint32_t chan_freq)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -615,6 +615,19 @@ bool wlan_cm_is_auth_type_11r(struct wlan_mlme_psoc_ext_obj *mlme_obj,
|
||||
*/
|
||||
void cm_roam_start_init_on_connect(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id);
|
||||
/**
|
||||
* wlan_cm_roam_invoke() - Validate and send Roam invoke req to CM
|
||||
* @pdev: Pdev pointer
|
||||
* @vdev_id: vdev_id
|
||||
* @bssid: Target bssid
|
||||
* @chan_freq: channel frequency on which reassoc should be send
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_cm_roam_invoke(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
struct qdf_mac_addr *bssid, qdf_freq_t chan_freq);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
|
@@ -1605,6 +1605,26 @@ struct set_pcl_req {
|
||||
struct wmi_pcl_chan_weights chan_weights;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct roam_invoke_req - roam invoke request
|
||||
* @vdev_id: vdev for which the roaming has to be enabled/disabled
|
||||
* @target_bssid: target mac address
|
||||
* @ch_freq: channel frequency
|
||||
* @frame_len: frame length, includs mac header, fixed params and ies
|
||||
* @frame_buf: buffer contaning probe response or beacon
|
||||
* @is_same_bssid: flag to indicate if roaming is requested for same bssid
|
||||
* @forced_roaming: Roam to any bssid in any ch (here bssid & ch is not given)
|
||||
*/
|
||||
struct roam_invoke_req {
|
||||
uint8_t vdev_id;
|
||||
struct qdf_mac_addr target_bssid;
|
||||
uint32_t ch_freq;
|
||||
uint32_t frame_len;
|
||||
uint8_t *frame_buf;
|
||||
uint8_t is_same_bssid;
|
||||
bool forced_roaming;
|
||||
};
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_tx_ops - structure of tx function pointers for
|
||||
* roaming related commands
|
||||
@@ -1640,6 +1660,10 @@ struct wlan_cm_roam_tx_ops {
|
||||
struct wlan_roam_triggers *req);
|
||||
QDF_STATUS (*send_roam_disable_config)(struct wlan_objmgr_vdev *vdev,
|
||||
struct roam_disable_cfg *req);
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
QDF_STATUS (*send_roam_invoke_cmd)(struct wlan_objmgr_vdev *vdev,
|
||||
struct roam_invoke_req *req);
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -88,6 +88,19 @@ ucfg_cm_update_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* ucfg_wlan_cm_roam_invoke() - Invokes Roam request
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
* @bssid: Pointer to bssid to look for in scan cache
|
||||
* @ch_freq: channel on which reassoc should be send
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_wlan_cm_roam_invoke(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
struct qdf_mac_addr *bssid, qdf_freq_t ch_freq);
|
||||
|
||||
#ifdef WLAN_FEATURE_FILS_SK
|
||||
QDF_STATUS
|
||||
ucfg_cm_update_fils_config(struct wlan_objmgr_psoc *psoc,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2020-2021, 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
|
||||
@@ -127,6 +127,19 @@ QDF_STATUS wlan_cm_tgt_send_roam_per_config(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS wlan_cm_tgt_send_roam_triggers(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_roam_triggers *req);
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* wlan_cm_tgt_send_roam_triggers() - Send roam trigger command to FW
|
||||
* @psoc: psoc pointer
|
||||
* @roam_invoke_req: roam invoke parameter
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_cm_tgt_send_roam_invoke_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct roam_invoke_req *roam_invoke_req);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -28,6 +28,9 @@
|
||||
#include <../../core/src/wlan_cm_vdev_api.h>
|
||||
#include "wlan_crypto_global_api.h"
|
||||
#include <wlan_cm_api.h>
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
#include "connection_mgr/core/src/wlan_cm_roam.h"
|
||||
#endif
|
||||
|
||||
/* Support for "Fast roaming" (i.e., ESE, LFR, or 802.11r.) */
|
||||
#define BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
|
||||
@@ -1306,6 +1309,40 @@ QDF_STATUS cm_roam_release_lock(struct wlan_objmgr_vdev *vdev)
|
||||
|
||||
return qdf_mutex_release(&rso_cfg->cm_rso_lock);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_cm_roam_invoke(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
struct qdf_mac_addr *bssid, qdf_freq_t chan_freq)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
if (!psoc) {
|
||||
mlme_err("Invalid psoc");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||
WLAN_MLME_NB_ID);
|
||||
if (!vdev) {
|
||||
mlme_err("vdev object is NULL");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
if (cm_roam_offload_enabled(psoc)) {
|
||||
status = cm_start_roam_invoke(psoc, vdev, bssid, chan_freq);
|
||||
} else {
|
||||
/* Add host roam support (LFR2) */
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
#else
|
||||
struct rso_config *wlan_cm_get_rso_config_fl(struct wlan_objmgr_vdev *vdev,
|
||||
const char *func, uint32_t line)
|
||||
|
@@ -148,3 +148,13 @@ ucfg_cm_update_fils_config(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
QDF_STATUS
|
||||
ucfg_wlan_cm_roam_invoke(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
struct qdf_mac_addr *bssid, qdf_freq_t ch_freq)
|
||||
{
|
||||
return wlan_cm_roam_invoke(pdev, vdev_id, bssid, ch_freq);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2020-2021, 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
|
||||
@@ -416,3 +416,38 @@ QDF_STATUS wlan_cm_tgt_send_roam_disable_config(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
QDF_STATUS
|
||||
wlan_cm_tgt_send_roam_invoke_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct roam_invoke_req *roam_invoke_req)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct wlan_cm_roam_tx_ops *roam_tx_ops;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc,
|
||||
roam_invoke_req->vdev_id,
|
||||
WLAN_MLME_NB_ID);
|
||||
if (!vdev)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
roam_tx_ops = wlan_cm_roam_get_tx_ops_from_vdev(vdev);
|
||||
|
||||
if (!roam_tx_ops || !roam_tx_ops->send_roam_invoke_cmd) {
|
||||
mlme_err("CM_RSO: vdev %d send_roam_invoke_cmd is NULL",
|
||||
roam_invoke_req->vdev_id);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = roam_tx_ops->send_roam_invoke_cmd(vdev, roam_invoke_req);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
mlme_debug("CM_RSO: vdev %d fail to send roam invoke cmd",
|
||||
roam_invoke_req->vdev_id);
|
||||
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2021, 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
|
||||
@@ -169,7 +169,6 @@ QDF_STATUS wmi_unified_roam_synch_complete_cmd(wmi_unified_t wmi_handle,
|
||||
* wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
|
||||
* @wmi_handle: wmi handle
|
||||
* @roaminvoke: roam invoke command
|
||||
* @ch_hz: channel
|
||||
*
|
||||
* Send roam invoke command to fw for fastreassoc.
|
||||
*
|
||||
@@ -177,8 +176,7 @@ QDF_STATUS wmi_unified_roam_synch_complete_cmd(wmi_unified_t wmi_handle,
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_unified_roam_invoke_cmd(wmi_unified_t wmi_handle,
|
||||
struct wmi_roam_invoke_cmd *roaminvoke,
|
||||
uint32_t ch_hz);
|
||||
struct roam_invoke_req *roaminvoke);
|
||||
|
||||
/**
|
||||
* wmi_unified_set_roam_triggers() - send roam trigger bitmap
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2021, 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
|
||||
@@ -107,26 +107,6 @@ struct plm_req_params {
|
||||
bool enable;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wmi_roam_invoke_cmd - roam invoke command
|
||||
* @vdev_id: vdev id
|
||||
* @bssid: mac address
|
||||
* @channel: channel
|
||||
* @frame_len: frame length, includs mac header, fixed params and ies
|
||||
* @frame_buf: buffer contaning probe response or beacon
|
||||
* @is_same_bssid: flag to indicate if roaming is requested for same bssid
|
||||
* @forced_roaming: Roam to any bssid in any ch (here bssid & ch is not given)
|
||||
*/
|
||||
struct wmi_roam_invoke_cmd {
|
||||
uint32_t vdev_id;
|
||||
uint8_t bssid[QDF_MAC_ADDR_SIZE];
|
||||
uint32_t channel;
|
||||
uint32_t frame_len;
|
||||
uint8_t *frame_buf;
|
||||
uint8_t is_same_bssid;
|
||||
bool forced_roaming;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wmi_limit_off_chan_param - limit off channel parameters
|
||||
* @vdev_id: vdev id
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2021, 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
|
||||
@@ -133,13 +133,11 @@ QDF_STATUS wmi_unified_roam_synch_complete_cmd(wmi_unified_t wmi_handle,
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_unified_roam_invoke_cmd(wmi_unified_t wmi_handle,
|
||||
struct wmi_roam_invoke_cmd *roaminvoke,
|
||||
uint32_t ch_hz)
|
||||
struct roam_invoke_req *roaminvoke)
|
||||
{
|
||||
if (wmi_handle->ops->send_roam_invoke_cmd)
|
||||
return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
|
||||
roaminvoke,
|
||||
ch_hz);
|
||||
roaminvoke);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
@@ -912,8 +912,7 @@ send_process_roam_synch_complete_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
* Return: CDF STATUS
|
||||
*/
|
||||
static QDF_STATUS send_roam_invoke_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
struct wmi_roam_invoke_cmd *roaminvoke,
|
||||
uint32_t ch_hz)
|
||||
struct roam_invoke_req *roaminvoke)
|
||||
{
|
||||
wmi_roam_invoke_cmd_fixed_param *cmd;
|
||||
wmi_buf_t wmi_buf;
|
||||
@@ -970,12 +969,12 @@ static QDF_STATUS send_roam_invoke_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32,
|
||||
(sizeof(u_int32_t)));
|
||||
channel_list = (uint32_t *)(buf_ptr + WMI_TLV_HDR_SIZE);
|
||||
*channel_list = ch_hz;
|
||||
*channel_list = roaminvoke->ch_freq;
|
||||
buf_ptr += sizeof(uint32_t) + WMI_TLV_HDR_SIZE;
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_FIXED_STRUC,
|
||||
(sizeof(wmi_mac_addr)));
|
||||
bssid_list = (wmi_mac_addr *)(buf_ptr + WMI_TLV_HDR_SIZE);
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(roaminvoke->bssid, bssid_list);
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(roaminvoke->target_bssid.bytes, bssid_list);
|
||||
|
||||
/* move to next tlv i.e. bcn_prb_buf_list */
|
||||
buf_ptr += WMI_TLV_HDR_SIZE + sizeof(wmi_mac_addr);
|
||||
@@ -999,10 +998,10 @@ static QDF_STATUS send_roam_invoke_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
roaminvoke->frame_buf,
|
||||
roaminvoke->frame_len);
|
||||
|
||||
wmi_debug("flag:%d, MODE:%d, ap:%d, dly:%d, n_ch:%d, n_bssid:%d, ch:%d, is_same_bss:%d",
|
||||
wmi_debug("flag:%d, MODE:%d, ap:%d, dly:%d, n_ch:%d, n_bssid:%d, ch_freq:%d, is_same_bss:%d",
|
||||
cmd->flags, cmd->roam_scan_mode,
|
||||
cmd->roam_ap_sel_mode, cmd->roam_delay,
|
||||
cmd->num_chan, cmd->num_bssid, ch_hz,
|
||||
cmd->num_chan, cmd->num_bssid, roaminvoke->ch_freq,
|
||||
roaminvoke->is_same_bssid);
|
||||
|
||||
wmi_mtrace(WMI_ROAM_INVOKE_CMDID, cmd->vdev_id, 0);
|
||||
|
@@ -383,12 +383,12 @@ bool hdd_save_peer(struct hdd_station_ctx *sta_ctx,
|
||||
void hdd_delete_peer(struct hdd_station_ctx *sta_ctx,
|
||||
struct qdf_mac_addr *peer_mac_addr);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
QDF_STATUS
|
||||
hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
|
||||
const tSirMacAddr bssid, uint32_t ch_freq);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* hdd_save_gtk_params() - Save GTK offload params
|
||||
* @adapter: HDD adapter
|
||||
@@ -399,18 +399,12 @@ hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
|
||||
*/
|
||||
void hdd_save_gtk_params(struct hdd_adapter *adapter,
|
||||
struct csr_roam_info *csr_roam_info, bool is_reassoc);
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
static inline void hdd_save_gtk_params(struct hdd_adapter *adapter,
|
||||
struct csr_roam_info *csr_roam_info,
|
||||
bool is_reassoc)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline QDF_STATUS
|
||||
hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
|
||||
const tSirMacAddr bssid, uint32_t ch_freq)
|
||||
@@ -418,6 +412,7 @@ hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_copy_ht_caps()- copy ht caps info from roam ht caps
|
||||
|
@@ -3777,6 +3777,7 @@ QDF_STATUS hdd_sme_open_session_callback(uint8_t vdev_id,
|
||||
QDF_STATUS qdf_status);
|
||||
QDF_STATUS hdd_sme_close_session_callback(uint8_t vdev_id);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* hdd_reassoc() - perform a userspace-directed reassoc
|
||||
* @adapter: Adapter upon which the command was received
|
||||
@@ -3790,6 +3791,7 @@ QDF_STATUS hdd_sme_close_session_callback(uint8_t vdev_id);
|
||||
*/
|
||||
int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
|
||||
uint32_t ch_freq, const handoff_src src);
|
||||
#endif
|
||||
|
||||
int hdd_register_cb(struct hdd_context *hdd_ctx);
|
||||
void hdd_deregister_cb(struct hdd_context *hdd_ctx);
|
||||
|
@@ -522,6 +522,7 @@ static int hdd_parse_reassoc_command_v1_data(const uint8_t *command,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
QDF_STATUS hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
|
||||
const tSirMacAddr bssid,
|
||||
@@ -540,7 +541,6 @@ QDF_STATUS hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
|
||||
adapter->vdev_id, connected_bssid);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
|
||||
/**
|
||||
* hdd_is_fast_reassoc_allowed - check if roaming offload init is
|
||||
@@ -599,14 +599,18 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
|
||||
* So check both the HDD state and SME state here.
|
||||
* If not associated, no need to proceed with reassoc
|
||||
*/
|
||||
if (!hdd_cm_is_vdev_associated(adapter) ||
|
||||
(!sme_is_conn_state_connected(hdd_ctx->mac_handle,
|
||||
adapter->vdev_id))) {
|
||||
if (!hdd_cm_is_vdev_associated(adapter)) {
|
||||
hdd_warn("Not associated");
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!sme_is_conn_state_connected(hdd_ctx->mac_handle,
|
||||
adapter->vdev_id)) {
|
||||
hdd_warn("Not in connected state");
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
/*
|
||||
* if the target bssid is same as currently associated AP,
|
||||
* use the current connections's channel.
|
||||
@@ -641,7 +645,6 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
|
||||
ret = -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
status = hdd_wma_send_fastreassoc_cmd(adapter, bssid, ch_freq);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
hdd_err("Failed to send fast reassoc cmd");
|
||||
@@ -659,6 +662,7 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
#endif /* FEATURE_CM_ENABLE */
|
||||
|
||||
/**
|
||||
* hdd_parse_reassoc_v1() - parse version 1 of the REASSOC command
|
||||
@@ -683,14 +687,30 @@ static int hdd_parse_reassoc_v1(struct hdd_adapter *adapter, const char *command
|
||||
qdf_freq_t freq = 0;
|
||||
tSirMacAddr bssid;
|
||||
int ret;
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
struct qdf_mac_addr target_bssid;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
QDF_STATUS status;
|
||||
#endif
|
||||
|
||||
|
||||
ret = hdd_parse_reassoc_command_v1_data(command, bssid, &freq);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
hdd_err("Failed to parse reassoc command data");
|
||||
else
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
qdf_mem_copy(target_bssid.bytes, bssid, sizeof(tSirMacAddr));
|
||||
status = ucfg_wlan_cm_roam_invoke(hdd_ctx->pdev,
|
||||
adapter->vdev_id,
|
||||
&target_bssid, freq);
|
||||
return qdf_status_to_os_return(status);
|
||||
#else
|
||||
ret = hdd_reassoc(adapter, bssid, freq, REASSOC);
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -714,6 +734,12 @@ static int hdd_parse_reassoc_v2(struct hdd_adapter *adapter,
|
||||
tSirMacAddr bssid;
|
||||
qdf_freq_t freq = 0;
|
||||
int ret;
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
struct qdf_mac_addr target_bssid;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
QDF_STATUS status;
|
||||
#endif
|
||||
|
||||
|
||||
if (total_len < sizeof(params) + 8) {
|
||||
hdd_err("Invalid command length");
|
||||
@@ -736,7 +762,15 @@ static int hdd_parse_reassoc_v2(struct hdd_adapter *adapter,
|
||||
if (!hdd_check_and_fill_freq(params.channel, &freq))
|
||||
return -EINVAL;
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
qdf_mem_copy(target_bssid.bytes, bssid, sizeof(tSirMacAddr));
|
||||
status = ucfg_wlan_cm_roam_invoke(hdd_ctx->pdev,
|
||||
adapter->vdev_id,
|
||||
&target_bssid, freq);
|
||||
ret = qdf_status_to_os_return(status);
|
||||
#else
|
||||
ret = hdd_reassoc(adapter, bssid, freq, REASSOC);
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -4548,11 +4582,16 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter,
|
||||
uint8_t *value = command;
|
||||
qdf_freq_t freq = 0;
|
||||
tSirMacAddr bssid;
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
struct qdf_mac_addr target_bssid;
|
||||
#else
|
||||
uint32_t roam_id = INVALID_ROAM_ID;
|
||||
tCsrRoamModifyProfileFields mod_fields;
|
||||
tCsrHandoffRequest req;
|
||||
struct hdd_station_ctx *sta_ctx;
|
||||
mac_handle_t mac_handle;
|
||||
qdf_freq_t chan_freq;
|
||||
struct qdf_mac_addr connected_bssid;
|
||||
#endif
|
||||
|
||||
if (QDF_STA_MODE != adapter->device_mode) {
|
||||
hdd_warn("Unsupported in mode %s(%d)",
|
||||
@@ -4561,7 +4600,6 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
|
||||
/* if not associated, no need to proceed with reassoc */
|
||||
@@ -4578,17 +4616,25 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
qdf_mem_copy(target_bssid.bytes, bssid, sizeof(tSirMacAddr));
|
||||
ucfg_wlan_cm_roam_invoke(hdd_ctx->pdev, adapter->vdev_id,
|
||||
&target_bssid, freq);
|
||||
#else
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
chan_freq = wlan_get_operation_chan_freq(adapter->vdev);
|
||||
wlan_mlme_get_bssid_vdev_id(hdd_ctx->pdev, adapter->vdev_id,
|
||||
&connected_bssid);
|
||||
/*
|
||||
* if the target bssid is same as currently associated AP,
|
||||
* issue reassoc to same AP
|
||||
*/
|
||||
if (!qdf_mem_cmp(bssid, sta_ctx->conn_info.bssid.bytes,
|
||||
if (!qdf_mem_cmp(bssid, connected_bssid.bytes,
|
||||
QDF_MAC_ADDR_SIZE)) {
|
||||
hdd_warn("Reassoc BSSID is same as currently associated AP bssid");
|
||||
if (roaming_offload_enabled(hdd_ctx)) {
|
||||
hdd_wma_send_fastreassoc_cmd(
|
||||
adapter, bssid, sta_ctx->conn_info.chan_freq);
|
||||
adapter, bssid, chan_freq);
|
||||
} else {
|
||||
sme_get_modify_profile_fields(mac_handle,
|
||||
adapter->vdev_id,
|
||||
@@ -4615,6 +4661,7 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter,
|
||||
req.src = FASTREASSOC;
|
||||
qdf_mem_copy(req.bssid.bytes, bssid, sizeof(tSirMacAddr));
|
||||
sme_handoff_request(mac_handle, adapter->vdev_id, &req);
|
||||
#endif
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "wlan_blm_ucfg_api.h"
|
||||
#include "hdd_dp_cfg.h"
|
||||
#include <cdp_txrx_misc.h>
|
||||
#include "wlan_cm_roam_ucfg_api.h"
|
||||
|
||||
void hdd_nud_set_gateway_addr(struct hdd_adapter *adapter,
|
||||
struct qdf_mac_addr gw_mac_addr)
|
||||
@@ -234,6 +235,9 @@ hdd_handle_nud_fail_sta(struct hdd_context *hdd_ctx,
|
||||
{
|
||||
struct reject_ap_info ap_info;
|
||||
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
struct qdf_mac_addr bssid;
|
||||
#endif
|
||||
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
@@ -259,9 +263,17 @@ hdd_handle_nud_fail_sta(struct hdd_context *hdd_ctx,
|
||||
ap_info.source = ADDED_BY_DRIVER;
|
||||
ucfg_blm_add_bssid_to_reject_list(hdd_ctx->pdev, &ap_info);
|
||||
|
||||
if (roaming_offload_enabled(hdd_ctx))
|
||||
if (roaming_offload_enabled(hdd_ctx)) {
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
sme_roam_invoke_nud_fail(hdd_ctx->mac_handle,
|
||||
adapter->vdev_id);
|
||||
#else
|
||||
qdf_zero_macaddr(&bssid);
|
||||
ucfg_wlan_cm_roam_invoke(hdd_ctx->pdev,
|
||||
adapter->vdev_id,
|
||||
&bssid, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2020-2021 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
|
||||
@@ -25,19 +25,23 @@
|
||||
#include <wlan_hdd_includes.h>
|
||||
#include "osif_vdev_sync.h"
|
||||
#include "wlan_hdd_sysfs_reassoc.h"
|
||||
#include "wlan_cm_roam_ucfg_api.h"
|
||||
|
||||
static ssize_t
|
||||
__wlan_hdd_store_reassoc_sysfs(struct net_device *net_dev, char const *buf,
|
||||
size_t count)
|
||||
{
|
||||
struct hdd_adapter *adapter = netdev_priv(net_dev);
|
||||
tCsrRoamModifyProfileFields mod_fields;
|
||||
uint32_t roam_id = INVALID_ROAM_ID;
|
||||
struct hdd_context *hdd_ctx;
|
||||
mac_handle_t mac_handle;
|
||||
uint32_t operating_ch;
|
||||
tSirMacAddr bssid;
|
||||
int ret;
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
tCsrRoamModifyProfileFields mod_fields;
|
||||
uint32_t roam_id = INVALID_ROAM_ID;
|
||||
tSirMacAddr bssid;
|
||||
#endif
|
||||
struct qdf_mac_addr target_bssid;
|
||||
|
||||
if (hdd_validate_adapter(adapter))
|
||||
return -EINVAL;
|
||||
@@ -51,17 +55,21 @@ __wlan_hdd_store_reassoc_sysfs(struct net_device *net_dev, char const *buf,
|
||||
return -EINVAL;
|
||||
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
operating_ch = wlan_reg_freq_to_chan(hdd_ctx->pdev,
|
||||
adapter->session.station.conn_info.chan_freq);
|
||||
|
||||
operating_ch = wlan_get_operation_chan_freq(adapter->vdev);
|
||||
wlan_mlme_get_bssid_vdev_id(hdd_ctx->pdev, adapter->vdev_id,
|
||||
&target_bssid);
|
||||
hdd_debug("reassoc: net_devname %s", net_dev->name);
|
||||
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
ucfg_wlan_cm_roam_invoke(hdd_ctx->pdev, adapter->vdev_id,
|
||||
&target_bssid, operating_ch);
|
||||
#else
|
||||
sme_get_modify_profile_fields(mac_handle, adapter->vdev_id,
|
||||
&mod_fields);
|
||||
|
||||
if (roaming_offload_enabled(hdd_ctx)) {
|
||||
qdf_mem_copy(bssid,
|
||||
&adapter->session.station.conn_info.bssid,
|
||||
&target_bssid,
|
||||
sizeof(bssid));
|
||||
hdd_wma_send_fastreassoc_cmd(adapter,
|
||||
bssid, operating_ch);
|
||||
@@ -69,6 +77,7 @@ __wlan_hdd_store_reassoc_sysfs(struct net_device *net_dev, char const *buf,
|
||||
sme_roam_reassoc(mac_handle, adapter->vdev_id,
|
||||
NULL, mod_fields, &roam_id, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return count;
|
||||
}
|
||||
|
@@ -113,6 +113,7 @@
|
||||
#include "wlan_fwol_ucfg_api.h"
|
||||
#include "wlan_hdd_unit_test.h"
|
||||
#include "wlan_hdd_thermal.h"
|
||||
#include "wlan_cm_roam_ucfg_api.h"
|
||||
|
||||
/* Private ioctls and their sub-ioctls */
|
||||
#define WLAN_PRIV_SET_INT_GET_NONE (SIOCIWFIRSTPRIV + 0)
|
||||
@@ -6619,19 +6620,27 @@ static int __iw_setnone_getnone(struct net_device *dev,
|
||||
case WE_SET_REASSOC_TRIGGER:
|
||||
{
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
tSirMacAddr bssid;
|
||||
uint32_t roam_id = INVALID_ROAM_ID;
|
||||
uint8_t operating_ch =
|
||||
wlan_reg_freq_to_chan(
|
||||
hdd_ctx->pdev,
|
||||
adapter->session.station.conn_info.chan_freq);
|
||||
tCsrRoamModifyProfileFields mod_fields;
|
||||
uint32_t roam_id = INVALID_ROAM_ID;
|
||||
#endif
|
||||
uint8_t operating_ch =
|
||||
wlan_get_operation_chan_freq(adapter->vdev);
|
||||
struct qdf_mac_addr target_bssid;
|
||||
|
||||
wlan_mlme_get_bssid_vdev_id(hdd_ctx->pdev, adapter->vdev_id,
|
||||
&target_bssid);
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
ucfg_wlan_cm_roam_invoke(hdd_ctx->pdev, adapter->vdev_id,
|
||||
&target_bssid, operating_ch);
|
||||
#else
|
||||
|
||||
sme_get_modify_profile_fields(mac_handle, adapter->vdev_id,
|
||||
&mod_fields);
|
||||
if (roaming_offload_enabled(hdd_ctx)) {
|
||||
qdf_mem_copy(bssid,
|
||||
&adapter->session.station.conn_info.bssid,
|
||||
&target_bssid,
|
||||
sizeof(bssid));
|
||||
hdd_wma_send_fastreassoc_cmd(adapter,
|
||||
bssid, operating_ch);
|
||||
@@ -6639,6 +6648,7 @@ static int __iw_setnone_getnone(struct net_device *dev,
|
||||
sme_roam_reassoc(mac_handle, adapter->vdev_id,
|
||||
NULL, mod_fields, &roam_id, 1);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -871,9 +871,11 @@ static inline QDF_STATUS csr_roam_offload_scan_rsp_hdlr(
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS csr_handoff_request(struct mac_context *mac, uint8_t sessionId,
|
||||
tCsrHandoffRequest
|
||||
*pHandoffInfo);
|
||||
#endif
|
||||
bool csr_roam_is_sta_mode(struct mac_context *mac, uint8_t vdev_id);
|
||||
|
||||
/* Post Channel Change Indication */
|
||||
|
@@ -316,6 +316,8 @@ tSirScanType csr_get_scan_type(struct mac_context *mac, uint8_t chnId);
|
||||
QDF_STATUS csr_get_phy_mode_from_bss(struct mac_context *mac,
|
||||
struct bss_description *pBSSDescription,
|
||||
eCsrPhyMode *pPhyMode, tDot11fBeaconIEs *pIes);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/*
|
||||
* fForce -- force reassoc regardless of whether there is any change.
|
||||
* The reason is that for UAPSD-bypass, the code underneath this call determine
|
||||
@@ -326,6 +328,7 @@ QDF_STATUS csr_get_phy_mode_from_bss(struct mac_context *mac,
|
||||
QDF_STATUS csr_reassoc(struct mac_context *mac, uint32_t sessionId,
|
||||
tCsrRoamModifyProfileFields *pModProfileFields,
|
||||
uint32_t *pRoamId, bool fForce);
|
||||
#endif
|
||||
|
||||
bool csr_is_profile11r(struct mac_context *mac, struct csr_roam_profile *pProfile);
|
||||
bool csr_is_auth_type11r(struct mac_context *mac, enum csr_akm_type AuthType,
|
||||
|
@@ -557,11 +557,12 @@ tCsrScanResultInfo *sme_scan_result_get_next(mac_handle_t,
|
||||
QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult);
|
||||
QDF_STATUS sme_roam_connect(mac_handle_t mac_handle, uint8_t sessionId,
|
||||
struct csr_roam_profile *pProfile, uint32_t *pRoamId);
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS sme_roam_reassoc(mac_handle_t mac_handle, uint8_t sessionId,
|
||||
struct csr_roam_profile *pProfile,
|
||||
tCsrRoamModifyProfileFields modProfileFields,
|
||||
uint32_t *pRoamId, bool fForce);
|
||||
|
||||
#endif
|
||||
/**
|
||||
* sme_roam_disconnect() - API to request CSR to disconnect
|
||||
* @mac_handle: Opaque handle to the global MAC context
|
||||
@@ -703,10 +704,12 @@ QDF_STATUS sme_set_plm_request(mac_handle_t mac_handle,
|
||||
struct plm_req_params *req);
|
||||
#endif /*FEATURE_WLAN_ESE */
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS sme_get_modify_profile_fields(mac_handle_t mac_handle,
|
||||
uint8_t sessionId,
|
||||
tCsrRoamModifyProfileFields *
|
||||
pModifyProfileFields);
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
QDF_STATUS sme_register_oem_data_rsp_callback(mac_handle_t mac_handle,
|
||||
@@ -1190,9 +1193,11 @@ bool sme_is_feature_supported_by_fw(enum cap_bitmap feature);
|
||||
|
||||
QDF_STATUS sme_set_phy_mode(mac_handle_t mac_handle, eCsrPhyMode phyMode);
|
||||
eCsrPhyMode sme_get_phy_mode(mac_handle_t mac_handle);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS sme_handoff_request(mac_handle_t mac_handle, uint8_t sessionId,
|
||||
tCsrHandoffRequest *pHandoffInfo);
|
||||
|
||||
#endif
|
||||
QDF_STATUS sme_add_periodic_tx_ptrn(mac_handle_t mac_handle,
|
||||
tSirAddPeriodicTxPtrn *addPeriodicTxPtrnParams);
|
||||
QDF_STATUS sme_del_periodic_tx_ptrn(mac_handle_t mac_handle,
|
||||
@@ -2451,7 +2456,7 @@ QDF_STATUS sme_get_beacon_frm(mac_handle_t mac_handle,
|
||||
const tSirMacAddr bssid,
|
||||
uint8_t **frame_buf, uint32_t *frame_len,
|
||||
uint32_t *ch_freq, uint8_t vdev_id);
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
/**
|
||||
* sme_fast_reassoc() - invokes FAST REASSOC command
|
||||
@@ -2477,7 +2482,6 @@ QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id);
|
||||
|
||||
#else
|
||||
static inline
|
||||
QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
||||
@@ -2493,9 +2497,8 @@ QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/**
|
||||
* sme_register_tx_queue_cb(): Register tx queue callback
|
||||
* @mac_handle: Opaque handle for MAC context
|
||||
|
@@ -74,6 +74,7 @@
|
||||
#include "parser_api.h"
|
||||
#include <../../core/src/wlan_cm_vdev_api.h>
|
||||
#include <wlan_mlme_twt_api.h>
|
||||
#include "wlan_cm_roam_ucfg_api.h"
|
||||
|
||||
static QDF_STATUS init_sme_cmd_list(struct mac_context *mac);
|
||||
|
||||
@@ -3141,6 +3142,7 @@ QDF_STATUS sme_set_phy_mode(mac_handle_t mac_handle, eCsrPhyMode phyMode)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/*
|
||||
* sme_roam_reassoc() -
|
||||
* A wrapper function to request CSR to inititiate a re-association
|
||||
@@ -3183,6 +3185,7 @@ QDF_STATUS sme_roam_reassoc(mac_handle_t mac_handle, uint8_t sessionId,
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS sme_roam_disconnect(mac_handle_t mac_handle, uint8_t session_id,
|
||||
eCsrRoamDisconnectReason reason,
|
||||
@@ -3497,6 +3500,7 @@ uint32_t sme_get_vht_ch_width(void)
|
||||
return wma_get_vht_ch_width();
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/*
|
||||
* sme_get_modify_profile_fields() -
|
||||
* HDD or SME - QOS calls this function to get the current values of
|
||||
@@ -3534,6 +3538,7 @@ QDF_STATUS sme_get_modify_profile_fields(mac_handle_t mac_handle,
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
/**
|
||||
@@ -7443,6 +7448,7 @@ void sme_set_curr_device_mode(mac_handle_t mac_handle,
|
||||
mac->sme.curr_device_mode = curr_device_mode;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/*
|
||||
* sme_handoff_request() - a wrapper function to Request a handoff from CSR.
|
||||
* This is a synchronous call
|
||||
@@ -7472,6 +7478,7 @@ QDF_STATUS sme_handoff_request(mac_handle_t mac_handle,
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* sme_add_periodic_tx_ptrn() - Add Periodic TX Pattern
|
||||
@@ -13400,10 +13407,11 @@ exit:
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id)
|
||||
{
|
||||
struct wma_roam_invoke_cmd *roam_invoke_params;
|
||||
struct roam_invoke_req *roam_invoke_params;
|
||||
struct scheduler_msg msg = {0};
|
||||
QDF_STATUS status;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
@@ -13490,7 +13498,6 @@ QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
||||
struct csr_roam_profile *profile,
|
||||
const tSirMacAddr bssid, uint32_t ch_freq,
|
||||
@@ -13511,17 +13518,15 @@ QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
||||
if (QDF_IS_STATUS_ERROR(sme_acquire_global_lock(&mac->sme)))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
status = csr_fast_reassoc(mac_handle, profile, bssid, ch_freq, vdev_id,
|
||||
connected_bssid);
|
||||
#endif
|
||||
|
||||
sme_release_global_lock(&mac->sme);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
void sme_clear_sae_single_pmk_info(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t session_id,
|
||||
tPmkidCacheInfo *pmk_cache_info)
|
||||
|
@@ -6913,6 +6913,8 @@ QDF_STATUS csr_roam_issue_connect(struct mac_context *mac, uint32_t sessionId,
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
|
||||
QDF_STATUS csr_roam_issue_reassoc(struct mac_context *mac, uint32_t sessionId,
|
||||
struct csr_roam_profile *pProfile,
|
||||
tCsrRoamModifyProfileFields
|
||||
@@ -6970,6 +6972,7 @@ QDF_STATUS csr_roam_issue_reassoc(struct mac_context *mac, uint32_t sessionId,
|
||||
}
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS csr_dequeue_roam_command(struct mac_context *mac,
|
||||
enum csr_roam_reason reason,
|
||||
@@ -7337,7 +7340,7 @@ error:
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* csr_roam_reassoc() - process reassoc command
|
||||
* @mac_ctx: mac global context
|
||||
@@ -7357,9 +7360,8 @@ csr_roam_reassoc(struct mac_context *mac_ctx, uint32_t session_id,
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
bool fCallCallback = true;
|
||||
uint32_t roamId = 0;
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
|
||||
#endif
|
||||
|
||||
if (!profile) {
|
||||
sme_err("No profile specified");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -7373,7 +7375,6 @@ csr_roam_reassoc(struct mac_context *mac_ctx, uint32_t session_id,
|
||||
csr_scan_abort_mac_scan(mac_ctx, session_id, INVAL_SCAN_ID);
|
||||
csr_roam_remove_duplicate_command(mac_ctx, session_id, NULL,
|
||||
eCsrHddIssuedReassocToSameAP);
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
if (csr_is_conn_state_connected(mac_ctx, session_id)) {
|
||||
if (profile) {
|
||||
if (profile->SSIDs.numOfSSIDs &&
|
||||
@@ -7403,7 +7404,7 @@ csr_roam_reassoc(struct mac_context *mac_ctx, uint32_t session_id,
|
||||
} else {
|
||||
sme_debug("Not connected! No need to reassoc");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!fCallCallback) {
|
||||
roamId = GET_NEXT_ROAM_ID(&mac_ctx->roam);
|
||||
if (roam_id)
|
||||
@@ -7419,6 +7420,7 @@ csr_roam_reassoc(struct mac_context *mac_ctx, uint32_t session_id,
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool cm_csr_is_wait_for_key_n_change_state(uint8_t vdev_id)
|
||||
{
|
||||
@@ -14717,6 +14719,7 @@ QDF_STATUS csr_send_mb_stop_bss_req_msg(struct mac_context *mac,
|
||||
return umac_send_mb_message_to_mac(pMsg);
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS csr_reassoc(struct mac_context *mac, uint32_t sessionId,
|
||||
tCsrRoamModifyProfileFields *pModProfileFields,
|
||||
uint32_t *pRoamId, bool fForce)
|
||||
@@ -14742,6 +14745,7 @@ QDF_STATUS csr_reassoc(struct mac_context *mac, uint32_t sessionId,
|
||||
}
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* csr_store_oce_cfg_flags_in_vdev() - fill OCE flags from ini
|
||||
@@ -16056,6 +16060,7 @@ bool csr_roam_is_sta_mode(struct mac_context *mac, uint8_t vdev_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS csr_handoff_request(struct mac_context *mac,
|
||||
uint8_t sessionId,
|
||||
tCsrHandoffRequest *pHandoffInfo)
|
||||
@@ -16087,6 +16092,7 @@ QDF_STATUS csr_handoff_request(struct mac_context *mac,
|
||||
}
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* csr_roam_channel_change_req() - Post channel change request to LIM
|
||||
@@ -17130,7 +17136,7 @@ QDF_STATUS csr_fast_reassoc(mac_handle_t mac_handle,
|
||||
uint8_t vdev_id, const tSirMacAddr connected_bssid)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct wma_roam_invoke_cmd *fastreassoc;
|
||||
struct roam_invoke_req *fastreassoc;
|
||||
struct scheduler_msg msg = {0};
|
||||
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
struct csr_roam_session *session;
|
||||
@@ -17191,12 +17197,12 @@ QDF_STATUS csr_fast_reassoc(mac_handle_t mac_handle,
|
||||
fastreassoc->is_same_bssid = true;
|
||||
|
||||
fastreassoc->vdev_id = vdev_id;
|
||||
fastreassoc->bssid[0] = bssid[0];
|
||||
fastreassoc->bssid[1] = bssid[1];
|
||||
fastreassoc->bssid[2] = bssid[2];
|
||||
fastreassoc->bssid[3] = bssid[3];
|
||||
fastreassoc->bssid[4] = bssid[4];
|
||||
fastreassoc->bssid[5] = bssid[5];
|
||||
fastreassoc->target_bssid.bytes[0] = bssid[0];
|
||||
fastreassoc->target_bssid.bytes[1] = bssid[1];
|
||||
fastreassoc->target_bssid.bytes[2] = bssid[2];
|
||||
fastreassoc->target_bssid.bytes[3] = bssid[3];
|
||||
fastreassoc->target_bssid.bytes[4] = bssid[4];
|
||||
fastreassoc->target_bssid.bytes[5] = bssid[5];
|
||||
|
||||
status = sme_get_beacon_frm(mac_handle, profile, bssid,
|
||||
&fastreassoc->frame_buf,
|
||||
|
@@ -192,11 +192,13 @@ QDF_STATUS csr_roam_issue_connect(struct mac_context *mac, uint32_t sessionId,
|
||||
tScanResultHandle hBSSList,
|
||||
enum csr_roam_reason reason, uint32_t roamId,
|
||||
bool fImediate, bool fClearScan);
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS csr_roam_issue_reassoc(struct mac_context *mac, uint32_t sessionId,
|
||||
struct csr_roam_profile *pProfile,
|
||||
tCsrRoamModifyProfileFields *pModProfileFields,
|
||||
enum csr_roam_reason reason, uint32_t roamId,
|
||||
bool fImediate);
|
||||
#endif
|
||||
void csr_roam_complete(struct mac_context *mac, enum csr_roamcomplete_result Result,
|
||||
void *Context, uint8_t session_id);
|
||||
|
||||
@@ -637,17 +639,6 @@ csr_connect_security_valid_for_6ghz(struct wlan_objmgr_psoc *psoc,
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* csr_roam_connect() -
|
||||
* To inititiate an association
|
||||
* pProfile - can be NULL to join to any open ones
|
||||
* pRoamId - to get back the request ID
|
||||
* Return QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t sessionId,
|
||||
struct csr_roam_profile *pProfile,
|
||||
uint32_t *pRoamId);
|
||||
|
||||
/*
|
||||
* csr_roam_reassoc() -
|
||||
@@ -665,6 +656,18 @@ QDF_STATUS csr_roam_reassoc(struct mac_context *mac, uint32_t sessionId,
|
||||
struct csr_roam_profile *pProfile,
|
||||
tCsrRoamModifyProfileFields modProfileFields,
|
||||
uint32_t *pRoamId);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* csr_roam_connect() -
|
||||
* To inititiate an association
|
||||
* pProfile - can be NULL to join to any open ones
|
||||
* pRoamId - to get back the request ID
|
||||
* Return QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t sessionId,
|
||||
struct csr_roam_profile *pProfile,
|
||||
uint32_t *pRoamId);
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
/*
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "utils_parser.h"
|
||||
#include "sme_power_save_api.h"
|
||||
#include "wlan_mlme_ucfg_api.h"
|
||||
#include "wlan_cm_roam_api.h"
|
||||
|
||||
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
|
||||
/* TODO : 6Mbps as Cisco APs seem to like only this value; analysis req. */
|
||||
@@ -7579,9 +7580,13 @@ static QDF_STATUS sme_qos_request_reassoc(struct mac_context *mac,
|
||||
struct sme_qos_sessioninfo *pSession;
|
||||
struct sme_qos_acinfo *pACInfo;
|
||||
QDF_STATUS status;
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
struct csr_roam_session *session;
|
||||
struct csr_roam_profile *roam_profile;
|
||||
bool roam_offload_enable = true;
|
||||
#endif
|
||||
struct qdf_mac_addr bssid;
|
||||
qdf_freq_t ch_freq;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: %d: Invoked on session %d with UAPSD mask 0x%X",
|
||||
@@ -7593,6 +7598,11 @@ static QDF_STATUS sme_qos_request_reassoc(struct mac_context *mac,
|
||||
}
|
||||
|
||||
pSession = &sme_qos_cb.sessionInfo[sessionId];
|
||||
wlan_mlme_get_bssid_vdev_id(mac->pdev, sessionId, &bssid);
|
||||
ch_freq = wlan_get_operation_chan_freq_vdev_id(mac->pdev, sessionId);
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
status = wlan_cm_roam_invoke(mac->pdev, sessionId, &bssid, ch_freq);
|
||||
#else
|
||||
status = ucfg_mlme_get_roaming_offload(mac->psoc, &roam_offload_enable);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
@@ -7600,14 +7610,15 @@ static QDF_STATUS sme_qos_request_reassoc(struct mac_context *mac,
|
||||
session = CSR_GET_SESSION(mac, sessionId);
|
||||
roam_profile = session->pCurRoamProfile;
|
||||
status = sme_fast_reassoc(MAC_HANDLE(mac), roam_profile,
|
||||
session->connectedProfile.bssid.bytes,
|
||||
session->connectedProfile.op_freq,
|
||||
bssid.bytes,
|
||||
ch_freq,
|
||||
sessionId,
|
||||
session->connectedProfile.bssid.bytes);
|
||||
bssid.bytes);
|
||||
} else {
|
||||
status = csr_reassoc(mac, sessionId, pModFields,
|
||||
&pSession->roamID, fForce);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
/* Update the state to Handoff so subsequent requests are
|
||||
|
@@ -1415,26 +1415,6 @@ enum uapsd_up {
|
||||
UAPSD_UP_MAX
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wma_roam_invoke_cmd - roam invoke command
|
||||
* @vdev_id: vdev id
|
||||
* @bssid: mac address
|
||||
* @ch_freq: channel frequency
|
||||
* @frame_len: frame length, includs mac header, fixed params and ies
|
||||
* @frame_buf: buffer contaning probe response or beacon
|
||||
* @is_same_bssid: flag to indicate if roaming is requested for same bssid
|
||||
* @forced_roaming: Roaming to be done without giving bssid, and channel.
|
||||
*/
|
||||
struct wma_roam_invoke_cmd {
|
||||
uint32_t vdev_id;
|
||||
uint8_t bssid[QDF_MAC_ADDR_SIZE];
|
||||
uint32_t ch_freq;
|
||||
uint32_t frame_len;
|
||||
uint8_t *frame_buf;
|
||||
uint8_t is_same_bssid;
|
||||
bool forced_roaming;
|
||||
};
|
||||
|
||||
/**
|
||||
* wma_trigger_uapsd_params() - set trigger uapsd parameter
|
||||
* @wmi_handle: wma handle
|
||||
|
@@ -171,9 +171,10 @@ QDF_STATUS wma_set_ppsconfig(uint8_t vdev_id, uint16_t pps_param,
|
||||
*/
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
void wma_process_roam_invoke(WMA_HANDLE handle,
|
||||
struct wma_roam_invoke_cmd *roaminvoke);
|
||||
|
||||
struct roam_invoke_req *roaminvoke);
|
||||
#endif
|
||||
void wma_process_roam_synch_fail(WMA_HANDLE handle,
|
||||
struct roam_offload_synch_fail *synch_fail);
|
||||
|
||||
|
@@ -8708,11 +8708,14 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
|
||||
(struct roam_offload_synch_fail *)msg->bodyptr);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
break;
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
case SIR_HAL_ROAM_INVOKE:
|
||||
wma_debug("SIR_HAL_ROAM_INVOKE - wma_process_roam_invoke");
|
||||
wma_process_roam_invoke(wma_handle,
|
||||
(struct wma_roam_invoke_cmd *)msg->bodyptr);
|
||||
(struct roam_invoke_req *)msg->bodyptr);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
break;
|
||||
#endif
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
case SIR_HAL_SET_BASE_MACADDR_IND:
|
||||
wma_set_base_macaddr_indicate(wma_handle,
|
||||
|
@@ -477,7 +477,7 @@ wma_send_roam_preauth_status(tp_wma_handle wma_handle,
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* wma_process_roam_invoke() - send roam invoke command to fw.
|
||||
* @handle: wma handle
|
||||
@@ -488,10 +488,9 @@ wma_send_roam_preauth_status(tp_wma_handle wma_handle,
|
||||
* Return: none
|
||||
*/
|
||||
void wma_process_roam_invoke(WMA_HANDLE handle,
|
||||
struct wma_roam_invoke_cmd *roaminvoke)
|
||||
struct roam_invoke_req *roaminvoke)
|
||||
{
|
||||
tp_wma_handle wma_handle = (tp_wma_handle) handle;
|
||||
uint32_t ch_hz;
|
||||
struct wmi_unified *wmi_handle;
|
||||
|
||||
if (wma_validate_handle(wma_handle))
|
||||
@@ -505,16 +504,17 @@ void wma_process_roam_invoke(WMA_HANDLE handle,
|
||||
wma_err("Invalid vdev id:%d", roaminvoke->vdev_id);
|
||||
goto free_frame_buf;
|
||||
}
|
||||
ch_hz = roaminvoke->ch_freq;
|
||||
wma_err("Sending ROAM INVOKE CMD vdev id:%d", roaminvoke->vdev_id);
|
||||
|
||||
wmi_unified_roam_invoke_cmd(wmi_handle,
|
||||
(struct wmi_roam_invoke_cmd *)roaminvoke,
|
||||
ch_hz);
|
||||
(struct roam_invoke_req *)roaminvoke);
|
||||
free_frame_buf:
|
||||
if (roaminvoke->frame_len) {
|
||||
qdf_mem_free(roaminvoke->frame_buf);
|
||||
roaminvoke->frame_buf = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wma_process_roam_synch_fail() -roam synch failure handle
|
||||
|
Reference in New Issue
Block a user