qcacld-3.0: Add support for sme_abort_roaming for ROAM_OFFLOAD_V1
Adds support for sme_abort_roaming for ROAM_OFFLOAD_V1. Also fix compilation error for ROAM_OFFLOAD_V1. Change-Id: I06247b1118b7dee32ff392b247e2e08e32dbaf9f CRs-Fixed: 2768397
This commit is contained in:

committed by
snandini

parent
0dc264f36e
commit
cb27dfd2e4
@@ -149,6 +149,17 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_cm_neighbor_roam_in_progress() -Check if STA is in the middle of
|
||||
* roaming states
|
||||
* @psoc: psoc
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: True or False
|
||||
*/
|
||||
bool wlan_cm_neighbor_roam_in_progress(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* cm_roam_acquire_lock() - Wrapper for sme_acquire_global_lock.
|
||||
*
|
||||
@@ -194,7 +205,7 @@ wlan_cm_rso_set_roam_trigger(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
QDF_STATUS wlan_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason);
|
||||
|
||||
@@ -207,10 +218,34 @@ QDF_STATUS wlan_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
QDF_STATUS wlan_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* wlan_cm_abort_rso() - Enable roam scan offload to firmware
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Returns:
|
||||
* QDF_STATUS_E_BUSY if roam_synch is in progress and upper layer has to wait
|
||||
* before RSO stop cmd can be issued;
|
||||
* QDF_STATUS_SUCCESS if roam_synch is not outstanding. RSO stop cmd will be
|
||||
* issued with the global SME lock held in this case, and
|
||||
* uppler layer doesn't have to do any wait.
|
||||
*/
|
||||
QDF_STATUS wlan_cm_abort_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* wlan_cm_roaming_in_progress() - check if roaming is in progress
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool
|
||||
wlan_cm_roaming_in_progress(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_state_change() - Post roam state change to roam state machine
|
||||
* @pdev: pdev pointer
|
||||
|
@@ -80,7 +80,7 @@ ucfg_cm_rso_set_roam_trigger(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
QDF_STATUS ucfg_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason)
|
||||
{
|
||||
@@ -97,11 +97,43 @@ QDF_STATUS ucfg_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
QDF_STATUS ucfg_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason)
|
||||
{
|
||||
return wlan_cm_enable_rso(pdev, vdev_id, requestor, reason);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_cm_abort_rso() - Enable roam scan offload to firmware
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Returns:
|
||||
* QDF_STATUS_E_BUSY if roam_synch is in progress and upper layer has to wait
|
||||
* before RSO stop cmd can be issued;
|
||||
* QDF_STATUS_SUCCESS if roam_synch is not outstanding. RSO stop cmd will be
|
||||
* issued with the global SME lock held in this case, and
|
||||
* uppler layer doesn't have to do any wait.
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_cm_abort_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
|
||||
{
|
||||
return wlan_cm_abort_rso(pdev, vdev_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_cm_roaming_in_progress() - check if roaming is in progress
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
static inline bool
|
||||
ucfg_cm_roaming_in_progress(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
|
||||
{
|
||||
return wlan_cm_roaming_in_progress(pdev, vdev_id);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -114,7 +114,7 @@ wlan_cm_rso_set_roam_trigger(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
QDF_STATUS wlan_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason)
|
||||
{
|
||||
@@ -138,7 +138,7 @@ QDF_STATUS wlan_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
QDF_STATUS wlan_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason)
|
||||
{
|
||||
@@ -162,6 +162,53 @@ QDF_STATUS wlan_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_abort_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
QDF_STATUS status;
|
||||
|
||||
status = cm_roam_acquire_lock();
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, vdev_id) ||
|
||||
wlan_cm_neighbor_roam_in_progress(psoc, vdev_id)) {
|
||||
cm_roam_release_lock();
|
||||
return QDF_STATUS_E_BUSY;
|
||||
}
|
||||
|
||||
/* RSO stop cmd will be issued with lock held to avoid
|
||||
* any racing conditions with wma/csr layer
|
||||
*/
|
||||
wlan_cm_disable_rso(pdev, vdev_id, REASON_DRIVER_DISABLED,
|
||||
RSO_INVALID_REQUESTOR);
|
||||
|
||||
cm_roam_release_lock();
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool wlan_cm_roaming_in_progress(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
QDF_STATUS status;
|
||||
|
||||
status = cm_roam_acquire_lock();
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return false;
|
||||
|
||||
if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, vdev_id) ||
|
||||
MLME_IS_ROAMING_IN_PROG(psoc, vdev_id) ||
|
||||
mlme_is_roam_invoke_in_progress(psoc, vdev_id) ||
|
||||
wlan_cm_neighbor_roam_in_progress(psoc, vdev_id)) {
|
||||
cm_roam_release_lock();
|
||||
return true;
|
||||
}
|
||||
|
||||
cm_roam_release_lock();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
|
@@ -1817,6 +1817,7 @@ wmi_get_rso_buf_len(struct wlan_roam_scan_offload_params *roam_req)
|
||||
|
||||
if (!roam_req->is_rso_stop)
|
||||
wmi_debug("vdev[%d]: %s roam offload: %d",
|
||||
roam_req->vdev_id,
|
||||
roam_req->is_rso_stop ? "RSO stop cmd." : "",
|
||||
roam_req->roam_offload_enabled);
|
||||
|
||||
|
Reference in New Issue
Block a user