qcacld-3.0: Roam sync frame event Wma cleanup
Wma to target_if migration for ROAM SYNC FRAME EVENT Change-Id: I2a56dadf7f45a13a577bdf49bc9514ab2e6dee29 CRs-Fixed: 2968404
This commit is contained in:

committed by
Madan Koyyalamudi

parent
e2171a078f
commit
0c30cb8f04
@@ -82,11 +82,13 @@ struct pwr_channel_info {
|
||||
* struct wlan_mlme_psoc_ext_obj -MLME ext psoc priv object
|
||||
* @cfg: cfg items
|
||||
* @rso_tx_ops: Roam Tx ops to send roam offload commands to firmware
|
||||
* @rso_rx_ops: Roam Rx ops to receive roam offload events from firmware
|
||||
* @wfa_testcmd: WFA config tx ops to send to FW
|
||||
*/
|
||||
struct wlan_mlme_psoc_ext_obj {
|
||||
struct wlan_mlme_cfg cfg;
|
||||
struct wlan_cm_roam_tx_ops rso_tx_ops;
|
||||
struct wlan_cm_roam_rx_ops rso_rx_ops;
|
||||
struct wlan_mlme_wfa_cmd wfa_testcmd;
|
||||
};
|
||||
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <../../core/src/wlan_cm_vdev_api.h>
|
||||
#include "csr_api.h"
|
||||
#include <cm_utf.h>
|
||||
#include "target_if_cm_roam_event.h"
|
||||
|
||||
static struct vdev_mlme_ops sta_mlme_ops;
|
||||
static struct vdev_mlme_ops ap_mlme_ops;
|
||||
@@ -1487,6 +1488,11 @@ QDF_STATUS psoc_mlme_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme)
|
||||
|
||||
target_if_wfatestcmd_register_tx_ops(
|
||||
&psoc_mlme->ext_psoc_ptr->wfa_testcmd.tx_ops);
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
target_if_roam_offload_register_events(psoc_mlme->psoc);
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
target_if_cm_roam_register_rx_ops(
|
||||
&psoc_mlme->ext_psoc_ptr->rso_rx_ops);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@@ -27,15 +27,69 @@
|
||||
#include "wlan_objmgr_pdev_obj.h"
|
||||
#include "wlan_objmgr_vdev_obj.h"
|
||||
#include "wlan_cm_roam_public_struct.h"
|
||||
#include <target_if.h>
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
/**
|
||||
* target_if_cm_roam_sync_event() - Target IF handler for roam sync events
|
||||
* @scn: target handle
|
||||
* @event: event buffer
|
||||
* @len: event buffer length
|
||||
*
|
||||
* Return: int for success or error code
|
||||
*/
|
||||
int target_if_cm_roam_sync_event(ol_scn_t scn, uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* target_if_cm_roam_sync_frame_event() - Target IF handler for
|
||||
* roam sync frame events
|
||||
* @scn: target handle
|
||||
* @event: event buffer
|
||||
* @len: event buffer length
|
||||
*
|
||||
* Return: int for success or error code
|
||||
*/
|
||||
int
|
||||
target_if_cm_roam_sync_frame_event(ol_scn_t scn,
|
||||
uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* target_if_roam_offload_register_events() - register roam events
|
||||
* @psoc: pointer to psoc object
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc);
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
|
||||
/**
|
||||
* target_if_cm_roam_register_rx_ops - Target IF API to register roam
|
||||
* related rx op.
|
||||
* @rx_ops: Pointer to rx ops fp struct
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
* Return: none
|
||||
*/
|
||||
QDF_STATUS
|
||||
void
|
||||
target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops);
|
||||
|
||||
#else /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
static inline
|
||||
void
|
||||
target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
static inline
|
||||
QDF_STATUS
|
||||
target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
#endif
|
||||
|
@@ -21,11 +21,181 @@
|
||||
#include "wlan_objmgr_psoc_obj.h"
|
||||
#include "wlan_objmgr_pdev_obj.h"
|
||||
#include "wlan_objmgr_vdev_obj.h"
|
||||
#include "wmi_unified_api.h"
|
||||
#include "scheduler_api.h"
|
||||
#include <wmi_unified.h>
|
||||
#include "target_if_cm_roam_event.h"
|
||||
#include "wlan_psoc_mlme_api.h"
|
||||
#include "wlan_mlme_main.h"
|
||||
#include <../../core/src/wlan_cm_roam_i.h>
|
||||
|
||||
QDF_STATUS
|
||||
target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops)
|
||||
static inline struct wlan_cm_roam_rx_ops *
|
||||
target_if_cm_get_roam_rx_ops(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
struct wlan_mlme_psoc_ext_obj *psoc_ext_priv;
|
||||
struct wlan_cm_roam_rx_ops *rx_ops;
|
||||
|
||||
if (!psoc) {
|
||||
target_if_err("psoc object is NULL");
|
||||
return NULL;
|
||||
}
|
||||
psoc_ext_priv = wlan_psoc_mlme_get_ext_hdl(psoc);
|
||||
if (!psoc_ext_priv) {
|
||||
target_if_err("psoc legacy private object is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rx_ops = &psoc_ext_priv->rso_rx_ops;
|
||||
return rx_ops;
|
||||
}
|
||||
|
||||
void
|
||||
target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops)
|
||||
{
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
rx_ops->roam_sync_event = cm_roam_sync_event_handler;
|
||||
rx_ops->roam_sync_frame_event = cm_roam_sync_frame_event_handler;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
int
|
||||
target_if_cm_roam_sync_frame_event(ol_scn_t scn,
|
||||
uint8_t *event,
|
||||
uint32_t len)
|
||||
{
|
||||
QDF_STATUS qdf_status;
|
||||
struct roam_synch_frame_ind *frame_ind_ptr;
|
||||
struct wmi_unified *wmi_handle;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_cm_roam_rx_ops *roam_rx_ops;
|
||||
int status = 0;
|
||||
|
||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("wmi_handle is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
frame_ind_ptr = qdf_mem_malloc(sizeof(*frame_ind_ptr));
|
||||
|
||||
if (!frame_ind_ptr)
|
||||
return -EINVAL;
|
||||
|
||||
qdf_status = wmi_extract_roam_sync_frame_event(wmi_handle, event,
|
||||
len,
|
||||
frame_ind_ptr);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
||||
target_if_err("parsing of event failed, %d", qdf_status);
|
||||
status = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
roam_rx_ops = target_if_cm_get_roam_rx_ops(psoc);
|
||||
|
||||
if (!roam_rx_ops || !roam_rx_ops->roam_sync_frame_event) {
|
||||
target_if_err("No valid roam rx ops");
|
||||
status = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
qdf_status = roam_rx_ops->roam_sync_frame_event(psoc,
|
||||
frame_ind_ptr);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
status = -EINVAL;
|
||||
|
||||
err:
|
||||
qdf_mem_free(frame_ind_ptr);
|
||||
return status;
|
||||
}
|
||||
|
||||
int target_if_cm_roam_sync_event(ol_scn_t scn, uint8_t *event,
|
||||
uint32_t len)
|
||||
{
|
||||
QDF_STATUS qdf_status;
|
||||
struct wmi_unified *wmi_handle;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_cm_roam_rx_ops *roam_rx_ops;
|
||||
int status = 0;
|
||||
uint8_t vdev_id;
|
||||
|
||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("wmi_handle is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
status = wmi_extract_roam_sync_event(wmi_handle, event,
|
||||
len, &vdev_id);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
target_if_err("parsing of event failed, %d", status);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
roam_rx_ops = target_if_cm_get_roam_rx_ops(psoc);
|
||||
|
||||
if (!roam_rx_ops || !roam_rx_ops->roam_sync_event) {
|
||||
target_if_err("No valid roam rx ops");
|
||||
status = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
qdf_status = roam_rx_ops->roam_sync_event(psoc,
|
||||
event,
|
||||
len,
|
||||
vdev_id);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
status = -EINVAL;
|
||||
|
||||
err:
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
QDF_STATUS ret;
|
||||
wmi_unified_t handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
|
||||
if (!handle) {
|
||||
target_if_err("handle is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* Register for roam offload event */
|
||||
ret = wmi_unified_register_event_handler(handle,
|
||||
wmi_roam_synch_event_id,
|
||||
target_if_cm_roam_sync_event,
|
||||
WMI_RX_SERIALIZER_CTX);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
target_if_err("wmi event registration failed, ret: %d", ret);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* Register for roam offload event */
|
||||
ret = wmi_unified_register_event_handler(handle,
|
||||
wmi_roam_synch_frame_event_id,
|
||||
target_if_cm_roam_sync_frame_event,
|
||||
WMI_RX_SERIALIZER_CTX);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
target_if_err("wmi event registration failed, ret: %d", ret);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
@@ -1110,3 +1110,33 @@ rel_ref:
|
||||
return status;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_FIPS */
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
QDF_STATUS cm_free_roam_synch_frame_ind(struct rso_config *rso_cfg)
|
||||
{
|
||||
struct roam_synch_frame_ind *frame_ind;
|
||||
|
||||
if (!rso_cfg)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
frame_ind = &rso_cfg->roam_sync_frame_ind;
|
||||
|
||||
if (frame_ind->bcn_probe_rsp) {
|
||||
qdf_mem_free(frame_ind->bcn_probe_rsp);
|
||||
frame_ind->bcn_probe_rsp_len = 0;
|
||||
frame_ind->bcn_probe_rsp = NULL;
|
||||
}
|
||||
if (frame_ind->reassoc_req) {
|
||||
qdf_mem_free(frame_ind->reassoc_req);
|
||||
frame_ind->reassoc_req_len = 0;
|
||||
frame_ind->reassoc_req = NULL;
|
||||
}
|
||||
if (frame_ind->reassoc_rsp) {
|
||||
qdf_mem_free(frame_ind->reassoc_rsp);
|
||||
frame_ind->reassoc_rsp_len = 0;
|
||||
frame_ind->reassoc_rsp = NULL;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
|
@@ -167,6 +167,7 @@ void cm_fw_ho_fail_req(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
QDF_STATUS cm_fw_roam_invoke_fail(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id);
|
||||
|
||||
#ifdef WLAN_FEATURE_FIPS
|
||||
/**
|
||||
* cm_roam_pmkid_req_ind() - Function to handle
|
||||
@@ -186,12 +187,59 @@ cm_roam_pmkid_req_ind(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_FIPS */
|
||||
#else /*WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
/**
|
||||
* cm_free_roam_synch_frame_ind() - Free the bcn_probe_rsp, reassoc_req,
|
||||
* reassoc_rsp received as part of the ROAM_SYNC_FRAME event
|
||||
*
|
||||
* @vdev - vdev obj mgr ptr
|
||||
*
|
||||
* This API is used to free the buffer allocated during the ROAM_SYNC_FRAME
|
||||
* event
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS cm_free_roam_synch_frame_ind(struct rso_config *rso_cfg);
|
||||
|
||||
/**
|
||||
* cm_roam_sync_event_handler() - CM handler for roam sync event
|
||||
*
|
||||
* @psoc - psoc objmgr ptr
|
||||
* @event - event ptr
|
||||
* @len - event buff length
|
||||
* @vdev_id - vdev id
|
||||
*
|
||||
* This API is used to handle the buffer allocated during the ROAM_SYNC_EVENT
|
||||
* event
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS cm_roam_sync_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *event,
|
||||
uint32_t len,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* cm_roam_sync_frame_event_handler() - CM handler for roam sync frame event
|
||||
*
|
||||
* @psoc - psoc objmgr ptr
|
||||
* @frame_ind - ptr to roam sync frame struct
|
||||
*
|
||||
* This API is used to handle the buffer allocated during the ROAM_SYNC_FRAME
|
||||
* event
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
cm_roam_sync_frame_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
struct roam_synch_frame_ind *frame_ind);
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
#else /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
static inline
|
||||
QDF_STATUS cm_fw_roam_invoke_fail(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif /*WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
#endif /* _WLAN_CM_ROAM_I_H_ */
|
||||
|
@@ -333,3 +333,119 @@ rel_ref:
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
QDF_STATUS
|
||||
cm_roam_sync_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *event,
|
||||
uint32_t len,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
return cm_fw_roam_sync_req(psoc, vdev_id, event, len);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
cm_roam_sync_frame_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
struct roam_synch_frame_ind *frame_ind)
|
||||
{
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct rso_config *rso_cfg;
|
||||
struct roam_synch_frame_ind *sync_frame_ind = frame_ind;
|
||||
struct roam_synch_frame_ind *roam_synch_frame_ind;
|
||||
uint8_t vdev_id;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!sync_frame_ind)
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
|
||||
vdev_id = sync_frame_ind->vdev_id;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||
WLAN_MLME_SB_ID);
|
||||
if (!vdev) {
|
||||
mlme_err("vdev object is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
rso_cfg = wlan_cm_get_rso_config(vdev);
|
||||
if (!rso_cfg) {
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto err;
|
||||
}
|
||||
|
||||
roam_synch_frame_ind = &rso_cfg->roam_sync_frame_ind;
|
||||
|
||||
if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, vdev_id)) {
|
||||
mlme_err("Ignoring this event as it is unexpected");
|
||||
cm_free_roam_synch_frame_ind(rso_cfg);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (sync_frame_ind->bcn_probe_rsp_len) {
|
||||
roam_synch_frame_ind->bcn_probe_rsp_len =
|
||||
sync_frame_ind->bcn_probe_rsp_len;
|
||||
|
||||
roam_synch_frame_ind->is_beacon =
|
||||
sync_frame_ind->is_beacon;
|
||||
|
||||
if (roam_synch_frame_ind->bcn_probe_rsp)
|
||||
qdf_mem_free(roam_synch_frame_ind->bcn_probe_rsp);
|
||||
|
||||
roam_synch_frame_ind->bcn_probe_rsp =
|
||||
qdf_mem_malloc(roam_synch_frame_ind->bcn_probe_rsp_len);
|
||||
if (!roam_synch_frame_ind->bcn_probe_rsp) {
|
||||
QDF_ASSERT(roam_synch_frame_ind->bcn_probe_rsp);
|
||||
cm_free_roam_synch_frame_ind(rso_cfg);
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto err;
|
||||
}
|
||||
qdf_mem_copy(roam_synch_frame_ind->bcn_probe_rsp,
|
||||
sync_frame_ind->bcn_probe_rsp,
|
||||
roam_synch_frame_ind->bcn_probe_rsp_len);
|
||||
}
|
||||
|
||||
if (sync_frame_ind->reassoc_req_len) {
|
||||
roam_synch_frame_ind->reassoc_req_len =
|
||||
sync_frame_ind->reassoc_req_len;
|
||||
|
||||
if (roam_synch_frame_ind->reassoc_req)
|
||||
qdf_mem_free(roam_synch_frame_ind->reassoc_req);
|
||||
roam_synch_frame_ind->reassoc_req =
|
||||
qdf_mem_malloc(roam_synch_frame_ind->reassoc_req_len);
|
||||
if (!roam_synch_frame_ind->reassoc_req) {
|
||||
QDF_ASSERT(roam_synch_frame_ind->reassoc_req);
|
||||
cm_free_roam_synch_frame_ind(rso_cfg);
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto err;
|
||||
}
|
||||
qdf_mem_copy(roam_synch_frame_ind->reassoc_req,
|
||||
sync_frame_ind->reassoc_req,
|
||||
roam_synch_frame_ind->reassoc_req_len);
|
||||
}
|
||||
|
||||
if (sync_frame_ind->reassoc_rsp_len) {
|
||||
roam_synch_frame_ind->reassoc_rsp_len =
|
||||
sync_frame_ind->reassoc_rsp_len;
|
||||
|
||||
if (roam_synch_frame_ind->reassoc_rsp)
|
||||
qdf_mem_free(roam_synch_frame_ind->reassoc_rsp);
|
||||
|
||||
roam_synch_frame_ind->reassoc_rsp =
|
||||
qdf_mem_malloc(roam_synch_frame_ind->reassoc_rsp_len);
|
||||
if (!roam_synch_frame_ind->reassoc_rsp) {
|
||||
QDF_ASSERT(roam_synch_frame_ind->reassoc_rsp);
|
||||
cm_free_roam_synch_frame_ind(rso_cfg);
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto err;
|
||||
}
|
||||
qdf_mem_copy(roam_synch_frame_ind->reassoc_rsp,
|
||||
sync_frame_ind->reassoc_rsp,
|
||||
roam_synch_frame_ind->reassoc_rsp_len);
|
||||
}
|
||||
|
||||
err:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_SB_ID);
|
||||
return status;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
|
@@ -275,6 +275,17 @@ struct reassoc_timer_ctx {
|
||||
};
|
||||
#endif
|
||||
|
||||
struct roam_synch_frame_ind {
|
||||
uint32_t bcn_probe_rsp_len;
|
||||
uint8_t *bcn_probe_rsp;
|
||||
uint8_t is_beacon;
|
||||
uint32_t reassoc_req_len;
|
||||
uint8_t *reassoc_req;
|
||||
uint32_t reassoc_rsp_len;
|
||||
uint8_t *reassoc_rsp;
|
||||
uint8_t vdev_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rso_config - connect config to be used to send info in
|
||||
* RSO. This is the info we dont have in VDEV or CM ctx
|
||||
@@ -322,6 +333,7 @@ struct reassoc_timer_ctx {
|
||||
* @roam_invoke_fail_reason: One of reason id from enum
|
||||
* wmi_roam_invoke_status_error in case of forced roam
|
||||
* @lost_link_rssi: lost link RSSI
|
||||
* @roam_sync_frame_ind: roam sync frame ind
|
||||
*/
|
||||
struct rso_config {
|
||||
#ifdef WLAN_FEATURE_HOST_ROAM
|
||||
@@ -364,6 +376,7 @@ struct rso_config {
|
||||
uint32_t roam_trigger_reason;
|
||||
uint32_t roam_invoke_fail_reason;
|
||||
int32_t lost_link_rssi;
|
||||
struct roam_synch_frame_ind roam_sync_frame_ind;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1732,12 +1745,18 @@ struct wlan_cm_roam_tx_ops {
|
||||
};
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_rx_ops - structure of tx function pointers for
|
||||
* wlan_cm_roam_rx_ops - structure of rx function pointers for
|
||||
* roaming related commands
|
||||
* @roam_sync_event_rx: RX ops function pointer for roam sync event
|
||||
* @roam_sync_event: RX ops function pointer for roam sync event
|
||||
* @roam_sync_frame_event: Rx ops function pointer for roam sync frame event
|
||||
*/
|
||||
struct wlan_cm_roam_rx_ops {
|
||||
QDF_STATUS (*roam_sync_event_rx)(struct wlan_objmgr_vdev *vdev);
|
||||
QDF_STATUS (*roam_sync_event)(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *event,
|
||||
uint32_t len,
|
||||
uint8_t vdev_id);
|
||||
QDF_STATUS (*roam_sync_frame_event)(struct wlan_objmgr_psoc *psoc,
|
||||
struct roam_synch_frame_ind *frm);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -237,6 +237,34 @@ wmi_unified_send_roam_preauth_status(wmi_unified_t wmi_handle,
|
||||
*/
|
||||
QDF_STATUS wmi_unified_vdev_set_pcl_cmd(wmi_unified_t wmi_handle,
|
||||
struct set_pcl_cmd_params *params);
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
/**
|
||||
* wmi_extract_roam_sync_event - Extract roam sync event
|
||||
* @wmi_handle: WMI handle
|
||||
* @evt_buf: Event buffer
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_extract_roam_sync_event(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
uint32_t len,
|
||||
uint8_t *vdev_id);
|
||||
|
||||
/**
|
||||
* wmi_extract_roam_sync_frame_event - Extract roam sync frame event
|
||||
* @wmi_handle: WMI handle
|
||||
* @event: Event buffer
|
||||
* @len: evt buffer data len
|
||||
* @frame_ptr: roam sync frame ptr
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_extract_roam_sync_frame_event(wmi_unified_t wmi_handle, void *event,
|
||||
uint32_t len,
|
||||
struct roam_synch_frame_ind *frame_ptr);
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
/**
|
||||
|
@@ -337,4 +337,33 @@ QDF_STATUS wmi_unified_set_roam_triggers(wmi_unified_t wmi_handle,
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
QDF_STATUS wmi_extract_roam_sync_event(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
uint32_t len,
|
||||
uint8_t *vdev_id)
|
||||
{
|
||||
if (wmi_handle->ops->extract_roam_sync_event)
|
||||
return wmi_handle->ops->extract_roam_sync_event(wmi_handle,
|
||||
evt_buf,
|
||||
len,
|
||||
vdev_id);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wmi_extract_roam_sync_frame_event(wmi_unified_t wmi_handle, void *event,
|
||||
uint32_t len,
|
||||
struct roam_synch_frame_ind *frame_ptr)
|
||||
{
|
||||
if (wmi_handle->ops->extract_roam_sync_frame_event)
|
||||
return wmi_handle->ops->extract_roam_sync_frame_event(wmi_handle,
|
||||
event,
|
||||
len,
|
||||
frame_ptr);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
#endif
|
||||
|
@@ -1661,6 +1661,176 @@ extract_roam_msg_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
/**
|
||||
* extract_roam_sync_event_tlv() - Extract the roam sync event
|
||||
* from the wmi_roam_synch_event_id
|
||||
* @wmi_handle: wmi handle
|
||||
* @evt_buf: Pointer to the event buffer
|
||||
* @len: Data length
|
||||
* @vdev_id: Vdev Id
|
||||
*/
|
||||
static QDF_STATUS
|
||||
extract_roam_sync_event_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
uint32_t len,
|
||||
uint8_t *vdev_id)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
wmi_roam_synch_event_fixed_param *synch_event = NULL;
|
||||
WMI_ROAM_SYNCH_EVENTID_param_tlvs *param_buf = NULL;
|
||||
|
||||
if (!evt_buf) {
|
||||
wmi_debug("Empty roam_sync_event param buf");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
param_buf = (WMI_ROAM_SYNCH_EVENTID_param_tlvs *)evt_buf;
|
||||
if (!param_buf) {
|
||||
wmi_debug("received null buf from target");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
synch_event = param_buf->fixed_param;
|
||||
if (!synch_event) {
|
||||
wmi_debug("received null event data from target");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (synch_event->vdev_id >= WLAN_MAX_VDEVS) {
|
||||
wmi_err("received invalid vdev_id %d",
|
||||
synch_event->vdev_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*vdev_id = synch_event->vdev_id;
|
||||
|
||||
end:
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* extract_roam_sync_frame_event_tlv() - Extract the roam sync frame event
|
||||
* from the wmi_roam_synch_event_id
|
||||
* @wmi_handle: wmi handle
|
||||
* @event: Pointer to the event buffer
|
||||
* @len: Data length
|
||||
* @roam_synch_frame_ind_ptr: wmi sync frame event ptr
|
||||
*/
|
||||
static QDF_STATUS
|
||||
extract_roam_sync_frame_event_tlv(wmi_unified_t wmi_handle, void *event,
|
||||
uint32_t len,
|
||||
struct roam_synch_frame_ind *frame_ptr)
|
||||
{
|
||||
WMI_ROAM_SYNCH_FRAME_EVENTID_param_tlvs *param_buf = NULL;
|
||||
struct roam_synch_frame_ind *roam_sync_frame_ind;
|
||||
wmi_roam_synch_frame_event_fixed_param *synch_frame_event;
|
||||
|
||||
if (!event) {
|
||||
wmi_err("Event param null");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
param_buf = (WMI_ROAM_SYNCH_FRAME_EVENTID_param_tlvs *)event;
|
||||
if (!param_buf) {
|
||||
wmi_err("received null buf from target");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
synch_frame_event = param_buf->fixed_param;
|
||||
|
||||
if (!synch_frame_event) {
|
||||
wmi_err("received null event data from target");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
if (synch_frame_event->vdev_id >= WLAN_MAX_VDEVS) {
|
||||
wmi_err("received invalid vdev_id %d",
|
||||
synch_frame_event->vdev_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (synch_frame_event->bcn_probe_rsp_len >
|
||||
param_buf->num_bcn_probe_rsp_frame ||
|
||||
synch_frame_event->reassoc_req_len >
|
||||
param_buf->num_reassoc_req_frame ||
|
||||
synch_frame_event->reassoc_rsp_len >
|
||||
param_buf->num_reassoc_rsp_frame) {
|
||||
wmi_err("fixed/actual len err: bcn:%d/%d req:%d/%d rsp:%d/%d",
|
||||
synch_frame_event->bcn_probe_rsp_len,
|
||||
param_buf->num_bcn_probe_rsp_frame,
|
||||
synch_frame_event->reassoc_req_len,
|
||||
param_buf->num_reassoc_req_frame,
|
||||
synch_frame_event->reassoc_rsp_len,
|
||||
param_buf->num_reassoc_rsp_frame);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
roam_sync_frame_ind = frame_ptr;
|
||||
roam_sync_frame_ind->vdev_id = synch_frame_event->vdev_id;
|
||||
|
||||
if (synch_frame_event->bcn_probe_rsp_len) {
|
||||
roam_sync_frame_ind->bcn_probe_rsp_len =
|
||||
synch_frame_event->bcn_probe_rsp_len;
|
||||
|
||||
roam_sync_frame_ind->is_beacon =
|
||||
synch_frame_event->is_beacon;
|
||||
|
||||
if (roam_sync_frame_ind->bcn_probe_rsp)
|
||||
qdf_mem_free(roam_sync_frame_ind->bcn_probe_rsp);
|
||||
|
||||
roam_sync_frame_ind->bcn_probe_rsp =
|
||||
qdf_mem_malloc(roam_sync_frame_ind->bcn_probe_rsp_len);
|
||||
if (!roam_sync_frame_ind->bcn_probe_rsp) {
|
||||
QDF_ASSERT(roam_sync_frame_ind->bcn_probe_rsp);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
qdf_mem_copy(roam_sync_frame_ind->bcn_probe_rsp,
|
||||
param_buf->bcn_probe_rsp_frame,
|
||||
roam_sync_frame_ind->bcn_probe_rsp_len);
|
||||
}
|
||||
|
||||
if (synch_frame_event->reassoc_req_len) {
|
||||
roam_sync_frame_ind->reassoc_req_len =
|
||||
synch_frame_event->reassoc_req_len;
|
||||
|
||||
if (roam_sync_frame_ind->reassoc_req)
|
||||
qdf_mem_free(roam_sync_frame_ind->reassoc_req);
|
||||
roam_sync_frame_ind->reassoc_req =
|
||||
qdf_mem_malloc(roam_sync_frame_ind->reassoc_req_len);
|
||||
if (!roam_sync_frame_ind->reassoc_req) {
|
||||
QDF_ASSERT(roam_sync_frame_ind->reassoc_req);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
qdf_mem_copy(roam_sync_frame_ind->reassoc_req,
|
||||
param_buf->reassoc_req_frame,
|
||||
roam_sync_frame_ind->reassoc_req_len);
|
||||
}
|
||||
|
||||
if (synch_frame_event->reassoc_rsp_len) {
|
||||
roam_sync_frame_ind->reassoc_rsp_len =
|
||||
synch_frame_event->reassoc_rsp_len;
|
||||
|
||||
if (roam_sync_frame_ind->reassoc_rsp)
|
||||
qdf_mem_free(roam_sync_frame_ind->reassoc_rsp);
|
||||
|
||||
roam_sync_frame_ind->reassoc_rsp =
|
||||
qdf_mem_malloc(roam_sync_frame_ind->reassoc_rsp_len);
|
||||
if (!roam_sync_frame_ind->reassoc_rsp) {
|
||||
QDF_ASSERT(roam_sync_frame_ind->reassoc_rsp);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
qdf_mem_copy(roam_sync_frame_ind->reassoc_rsp,
|
||||
param_buf->reassoc_rsp_frame,
|
||||
roam_sync_frame_ind->reassoc_rsp_len);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
|
||||
void wmi_roam_offload_attach_tlv(wmi_unified_t wmi_handle)
|
||||
{
|
||||
struct wmi_ops *ops = wmi_handle->ops;
|
||||
@@ -1669,7 +1839,10 @@ void wmi_roam_offload_attach_tlv(wmi_unified_t wmi_handle)
|
||||
extract_roam_btm_response_stats_tlv;
|
||||
ops->extract_roam_initial_info = extract_roam_initial_info_tlv;
|
||||
ops->extract_roam_msg_info = extract_roam_msg_info_tlv;
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
ops->extract_roam_sync_event = extract_roam_sync_event_tlv;
|
||||
ops->extract_roam_sync_frame_event = extract_roam_sync_frame_event_tlv;
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
ops->send_set_ric_req_cmd = send_set_ric_req_cmd_tlv;
|
||||
ops->send_process_roam_synch_complete_cmd =
|
||||
send_process_roam_synch_complete_cmd_tlv;
|
||||
@@ -1699,6 +1872,22 @@ extract_roam_msg_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
static inline QDF_STATUS
|
||||
extract_roam_sync_event(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
struct roam_msg_info *dst, uint8_t idx)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
extract_roam_sync_frame_event(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
struct roam_msg_info *dst, uint8_t idx)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
#define ROAM_OFFLOAD_PMK_EXT_BYTES 16
|
||||
|
@@ -628,16 +628,6 @@ struct wma_version_info {
|
||||
u_int32_t revision;
|
||||
};
|
||||
|
||||
struct roam_synch_frame_ind {
|
||||
uint32_t bcn_probe_rsp_len;
|
||||
uint8_t *bcn_probe_rsp;
|
||||
uint8_t is_beacon;
|
||||
uint32_t reassoc_req_len;
|
||||
uint8_t *reassoc_req;
|
||||
uint32_t reassoc_rsp_len;
|
||||
uint8_t *reassoc_rsp;
|
||||
};
|
||||
|
||||
/* Max number of invalid peer entries */
|
||||
#define INVALID_PEER_MAX_NUM 5
|
||||
|
||||
|
@@ -262,6 +262,7 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
|
||||
int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
#ifndef ROAM_TARGET_IF_CONVERGENCE
|
||||
/**
|
||||
* wma_roam_synch_frame_event_handler() - roam synch frame event handler
|
||||
* @handle: wma handle
|
||||
@@ -274,7 +275,7 @@ int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
|
||||
*/
|
||||
int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
/**
|
||||
* wma_roam_vdev_disconnect_event_handler() - Handles roam vdev disconnect event
|
||||
* @handle: wma_handle
|
||||
|
@@ -3322,6 +3322,7 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
|
||||
#endif /* WLAN_FEATURE_STATS_EXT */
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
#ifndef ROAM_TARGET_IF_CONVERGENCE
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
wmi_roam_synch_event_id,
|
||||
wma_roam_synch_event_handler,
|
||||
@@ -3330,7 +3331,7 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
|
||||
wmi_roam_synch_frame_event_id,
|
||||
wma_roam_synch_frame_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
wmi_roam_auth_offload_event_id,
|
||||
wma_roam_auth_offload_event_handler,
|
||||
|
@@ -1178,6 +1178,7 @@ cleanup_label:
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifndef ROAM_TARGET_IF_CONVERGENCE
|
||||
int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
|
||||
uint32_t len)
|
||||
{
|
||||
@@ -1357,6 +1358,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
|
||||
int wma_roam_auth_offload_event_handler(WMA_HANDLE handle, uint8_t *event,
|
||||
uint32_t len)
|
||||
|
Reference in New Issue
Block a user