qcacld-3.0: Move rso related process to connection manager [PART 6]

Add new code to implement below functions for connection manager
roam part:
And below two RSO command related process:
ROAM_SCAN_OFFLOAD_STOP
ROAM_SCAN_OFFLOAD_UPDATE_CFG

Change-Id: I378b969ddae77fff49ad1d4d8ce21764b292e5ac
CRs-Fixed: 2753011
This commit is contained in:
hqu
2020-08-07 17:21:33 +08:00
committed by snandini
parent f7d6bc2675
commit 75feb60ade
8 changed files with 403 additions and 29 deletions

View File

@@ -249,6 +249,19 @@ cm_roam_update_config_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
update_req = qdf_mem_malloc(sizeof(*update_req));
if (!update_req)
return QDF_STATUS_E_NOMEM;
/* fill from mlme directly */
cm_roam_scan_bmiss_cnt(psoc, vdev_id, &update_req->beacon_miss_cnt);
if (!MLME_IS_ROAM_STATE_RSO_ENABLED(psoc, vdev_id)) {
cm_roam_disconnect_params(psoc, vdev_id,
&update_req->disconnect_params);
cm_roam_idle_params(psoc, vdev_id,
&update_req->idle_params);
cm_roam_triggers(psoc, vdev_id,
&update_req->roam_triggers);
}
/* fill from legacy through this API */
wlan_cm_roam_fill_update_config_req(psoc, vdev_id, update_req, reason);
status = wlan_cm_tgt_send_roam_update_req(psoc, vdev_id, update_req);
if (QDF_IS_STATUS_ERROR(status))
@@ -317,31 +330,61 @@ cm_roam_abort_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
return status;
}
/**
* cm_roam_stop_req() - roam stop request handling
* @psoc: psoc pointer
* @vdev_id: vdev id
* @reason: reason for changing roam state for the requested vdev id
*
* Return: QDF_STATUS
*/
static QDF_STATUS
QDF_STATUS
cm_roam_stop_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint8_t reason)
{
struct wlan_roam_stop_config *stop_req;
QDF_STATUS status;
/*
* If roam synch propagation is in progress and an user space
* disconnect is requested, then there is no need to send the
* RSO STOP to firmware, since the roaming is already complete.
* If the RSO STOP is sent to firmware, then an HO_FAIL will be
* generated and the expectation from firmware would be to
* clean up the peer context on the host and not send down any
* WMI PEER DELETE commands to firmware. But, if the user space
* disconnect gets processed first, then there is a chance to
* send down the PEER DELETE commands. Hence, if we do not
* receive the HO_FAIL, and we complete the roam sync
* propagation, then the host and firmware will be in sync with
* respect to the peer and then the user space disconnect can
* be handled gracefully in a normal way.
*
* Ensure to check the reason code since the RSO Stop might
* come when roam sync failed as well and at that point it
* should go through to the firmware and receive HO_FAIL
* and clean up.
*/
if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, vdev_id) &&
reason == REASON_ROAM_STOP_ALL) {
mlme_info("vdev_id:%d : Drop RSO stop during roam sync",
vdev_id);
return QDF_STATUS_E_FAILURE;
}
cm_roam_set_roam_reason_better_ap(psoc, vdev_id, false);
stop_req = qdf_mem_malloc(sizeof(*stop_req));
if (!stop_req)
return QDF_STATUS_E_NOMEM;
/* do the filling as csr_post_rso_stop */
status = wlan_cm_roam_fill_stop_req(psoc, vdev_id, stop_req, reason);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_debug("fail to fill stop config req");
return status;
}
status = wlan_cm_tgt_send_roam_stop_req(psoc, vdev_id, stop_req);
if (QDF_IS_STATUS_ERROR(status))
if (QDF_IS_STATUS_ERROR(status)) {
mlme_debug("fail to send roam stop");
} else {
status = wlan_cm_roam_scan_offload_rsp(vdev_id, reason);
if (QDF_IS_STATUS_ERROR(status))
mlme_debug("fail to send rso rsp msg");
}
qdf_mem_free(stop_req);

View File

@@ -63,5 +63,17 @@ QDF_STATUS cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t rso_command,
uint8_t reason);
/**
* cm_roam_stop_req() - roam stop request handling
* @psoc: psoc pointer
* @vdev_id: vdev id
* @reason: reason for changing roam state for the requested vdev id
*
* Return: QDF_STATUS
*/
QDF_STATUS
cm_roam_stop_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint8_t reason);
#endif
#endif

View File

@@ -57,10 +57,8 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id,
uint8_t rso_command,
uint8_t reason);
wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint8_t rso_command, uint8_t reason);
/**
* wlan_cm_roam_fill_start_req() - fill start request structure content
@@ -74,10 +72,53 @@ wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc,
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_cm_roam_fill_start_req(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id,
struct wlan_roam_start_config *req,
uint8_t reason);
wlan_cm_roam_fill_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
struct wlan_roam_start_config *req, uint8_t reason);
/**
* wlan_cm_roam_fill_stop_req() - fill stop request structure content
* @psoc: pointer to psoc object
* @vdev_id: vdev id
* @req: roam stop config pointer
* @reason: reason to roam
*
* This function gets called to fill stop request structure content
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_cm_roam_fill_stop_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
struct wlan_roam_stop_config *req, uint8_t reason);
/**
* wlan_cm_roam_fill_update_config_req() - fill update config request
* structure content
* @psoc: pointer to psoc object
* @vdev_id: vdev id
* @req: roam update config pointer
* @reason: reason to roam
*
* This function gets called to fill update config request structure content
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_cm_roam_fill_update_config_req(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id,
struct wlan_roam_update_config *req,
uint8_t reason);
/**
* wlan_cm_roam_scan_offload_rsp() - send roam scan offload response message
* @vdev_id: vdev id
* @reason: reason to roam
*
* This function gets called to send roam scan offload response message
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_cm_roam_scan_offload_rsp(uint8_t vdev_id, uint8_t reason);
/**
* wlan_cm_send_beacon_miss() - initiate beacon miss
@@ -190,6 +231,17 @@ QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
QDF_STATUS wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t rso_command,
uint8_t reason);
/**
* wlan_cm_roam_stop_req() - roam stop request handling
* @psoc: psoc pointer
* @vdev_id: vdev id
* @reason: reason for changing roam state for the requested vdev id
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_cm_roam_stop_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint8_t reason);
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD

View File

@@ -722,6 +722,8 @@ struct wlan_roam_start_config {
/**
* struct wlan_roam_stop_config - structure containing parameters for
* roam stop
* @reason: roaming reason
* @middle_of_roaming: in the middle of roaming
* @roam_11k_params: 11k params
* @btm_config: btm configuration
* @scan_filter_params: roam scan filter parameters
@@ -731,6 +733,8 @@ struct wlan_roam_start_config {
* @rssi_params: roam scan rssi threshold parameters
*/
struct wlan_roam_stop_config {
uint8_t reason;
uint8_t middle_of_roaming;
struct wlan_roam_11k_offload_params roam_11k_params;
struct wlan_roam_btm_config btm_config;
struct wlan_roam_scan_filter_params scan_filter_params;
@@ -746,17 +750,21 @@ struct wlan_roam_stop_config {
* @beacon_miss_cnt: roam beacon miss count parameters
* @scan_filter_params: roam scan filter parameters
* @scan_period_params: roam scan period parameters
* @profile_params: ap profile parameters
* @rssi_params: roam scan rssi threshold parameters
* @disconnect_params: disconnect params
* @idle_params: idle params
* @roam_triggers: roam triggers parameters
*/
struct wlan_roam_update_config {
struct wlan_roam_beacon_miss_cnt beacon_miss_cnt;
struct wlan_roam_scan_filter_params scan_filter_params;
struct wlan_roam_scan_period_params scan_period_params;
struct ap_profile_params profile_params;
struct wlan_roam_offload_scan_rssi_params rssi_params;
struct wlan_roam_disconnect_params disconnect_params;
struct wlan_roam_idle_params idle_params;
struct wlan_roam_triggers roam_triggers;
};
#endif

View File

@@ -183,6 +183,12 @@ QDF_STATUS wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
{
return cm_roam_send_rso_cmd(psoc, vdev_id, rso_command, reason);
}
QDF_STATUS wlan_cm_roam_stop_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint8_t reason)
{
return cm_roam_stop_req(psoc, vdev_id, reason);
}
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD