qcacld-3.0: Move code from csr to rso for 11k offload
Move code from csr to rso for 11k offload. Change-Id: I8930ca381a8af45e39d3ed69cb1614ccc363f766 CRs-Fixed: 2861183
这个提交包含在:
@@ -2177,6 +2177,107 @@ cm_roam_scan_btm_offload(struct wlan_objmgr_psoc *psoc,
|
||||
params->btm_candidate_min_score = btm_cfg->btm_trig_min_candidate_score;
|
||||
}
|
||||
|
||||
/**
|
||||
* cm_roam_offload_11k_params() - set roam 11k offload parameters
|
||||
* @psoc: psoc ctx
|
||||
* @vdev: vdev
|
||||
* @params: roam 11k offload parameters
|
||||
* @enabled: 11k offload enabled/disabled
|
||||
*
|
||||
* This function is used to set roam 11k offload related parameters
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void
|
||||
cm_roam_offload_11k_params(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_roam_11k_offload_params *params,
|
||||
bool enabled)
|
||||
{
|
||||
struct cm_roam_neighbor_report_offload_params *neighbor_report_offload;
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return;
|
||||
|
||||
neighbor_report_offload =
|
||||
&mlme_obj->cfg.lfr.rso_user_config.neighbor_report_offload;
|
||||
|
||||
params->vdev_id = wlan_vdev_get_id(vdev);
|
||||
|
||||
if (enabled) {
|
||||
params->offload_11k_bitmask =
|
||||
neighbor_report_offload->offload_11k_enable_bitmask;
|
||||
} else {
|
||||
params->offload_11k_bitmask = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If none of the parameters are enabled, then set the
|
||||
* offload_11k_bitmask to 0, so that we don't send the command
|
||||
* to the FW and drop it in WMA
|
||||
*/
|
||||
if ((neighbor_report_offload->params_bitmask &
|
||||
NEIGHBOR_REPORT_PARAMS_ALL) == 0) {
|
||||
mlme_err("No valid neighbor report offload params %x",
|
||||
neighbor_report_offload->params_bitmask);
|
||||
params->offload_11k_bitmask = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* First initialize all params to NEIGHBOR_REPORT_PARAM_INVALID
|
||||
* Then set the values that are enabled
|
||||
*/
|
||||
params->neighbor_report_params.time_offset =
|
||||
NEIGHBOR_REPORT_PARAM_INVALID;
|
||||
params->neighbor_report_params.low_rssi_offset =
|
||||
NEIGHBOR_REPORT_PARAM_INVALID;
|
||||
params->neighbor_report_params.bmiss_count_trigger =
|
||||
NEIGHBOR_REPORT_PARAM_INVALID;
|
||||
params->neighbor_report_params.per_threshold_offset =
|
||||
NEIGHBOR_REPORT_PARAM_INVALID;
|
||||
params->neighbor_report_params.neighbor_report_cache_timeout =
|
||||
NEIGHBOR_REPORT_PARAM_INVALID;
|
||||
params->neighbor_report_params.max_neighbor_report_req_cap =
|
||||
NEIGHBOR_REPORT_PARAM_INVALID;
|
||||
|
||||
if (neighbor_report_offload->params_bitmask &
|
||||
NEIGHBOR_REPORT_PARAMS_TIME_OFFSET)
|
||||
params->neighbor_report_params.time_offset =
|
||||
neighbor_report_offload->time_offset;
|
||||
|
||||
if (neighbor_report_offload->params_bitmask &
|
||||
NEIGHBOR_REPORT_PARAMS_LOW_RSSI_OFFSET)
|
||||
params->neighbor_report_params.low_rssi_offset =
|
||||
neighbor_report_offload->low_rssi_offset;
|
||||
|
||||
if (neighbor_report_offload->params_bitmask &
|
||||
NEIGHBOR_REPORT_PARAMS_BMISS_COUNT_TRIGGER)
|
||||
params->neighbor_report_params.bmiss_count_trigger =
|
||||
neighbor_report_offload->bmiss_count_trigger;
|
||||
|
||||
if (neighbor_report_offload->params_bitmask &
|
||||
NEIGHBOR_REPORT_PARAMS_PER_THRESHOLD_OFFSET)
|
||||
params->neighbor_report_params.per_threshold_offset =
|
||||
neighbor_report_offload->per_threshold_offset;
|
||||
|
||||
if (neighbor_report_offload->params_bitmask &
|
||||
NEIGHBOR_REPORT_PARAMS_CACHE_TIMEOUT)
|
||||
params->neighbor_report_params.neighbor_report_cache_timeout =
|
||||
neighbor_report_offload->neighbor_report_cache_timeout;
|
||||
|
||||
if (neighbor_report_offload->params_bitmask &
|
||||
NEIGHBOR_REPORT_PARAMS_MAX_REQ_CAP)
|
||||
params->neighbor_report_params.max_neighbor_report_req_cap =
|
||||
neighbor_report_offload->max_neighbor_report_req_cap;
|
||||
|
||||
wlan_vdev_mlme_get_ssid(vdev, params->neighbor_report_params.ssid.ssid,
|
||||
¶ms->neighbor_report_params.ssid.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* cm_roam_start_req() - roam start request handling
|
||||
* @psoc: psoc pointer
|
||||
@@ -2241,9 +2342,8 @@ cm_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
ROAM_SCAN_OFFLOAD_START,
|
||||
reason);
|
||||
cm_roam_scan_btm_offload(psoc, vdev, &start_req->btm_config, rso_cfg);
|
||||
|
||||
/* fill from legacy through this API */
|
||||
wlan_cm_roam_fill_start_req(psoc, vdev_id, start_req, reason);
|
||||
cm_roam_offload_11k_params(psoc, vdev, &start_req->roam_11k_params,
|
||||
true);
|
||||
|
||||
status = wlan_cm_tgt_send_roam_start_req(psoc, vdev_id, start_req);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
|
@@ -44,6 +44,51 @@ QDF_STATUS
|
||||
wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_send_rso_cmd() - send rso command
|
||||
* @psoc: psoc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @rso_command: roam command to send
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* similar to csr_roam_offload_scan, will be used from many legacy
|
||||
* process directly, generate a new function wlan_cm_roam_send_rso_cmd
|
||||
* for external usage.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
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_state_change() - Post roam state change to roam state machine
|
||||
* @pdev: pdev pointer
|
||||
* @vdev_id: vdev id
|
||||
* @requested_state: roam state to be set
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* This function posts roam state change to roam state machine handling
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* csr_roam_update_cfg() - Process RSO update cfg request
|
||||
* @psoc: psoc context
|
||||
* @vdev_id: vdev id
|
||||
* @reason: reason for requesting RSO update cfg
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_roam_update_cfg(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
uint8_t reason);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* wlan_cm_roam_cmd_allowed() - check roam cmd is allowed or not
|
||||
@@ -61,21 +106,6 @@ wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
uint8_t rso_command, uint8_t reason);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_fill_start_req() - fill start request structure content
|
||||
* @psoc: pointer to psoc object
|
||||
* @vdev_id: vdev id
|
||||
* @req: roam start config pointer
|
||||
* @reason: reason to roam
|
||||
*
|
||||
* This function gets called to fill start request structure content
|
||||
*
|
||||
* 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_scan_offload_rsp() - send roam scan offload response message
|
||||
* @vdev_id: vdev id
|
||||
@@ -118,6 +148,30 @@ wlan_cm_roam_neighbor_proceed_with_handoff_req(uint8_t vdev_id);
|
||||
bool wlan_cm_is_sta_connected(uint8_t vdev_id);
|
||||
|
||||
#else
|
||||
static inline
|
||||
QDF_STATUS wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint8_t rso_command,
|
||||
uint8_t reason)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
wlan_roam_update_cfg(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
uint8_t reason)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
uint8_t reason)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id)
|
||||
@@ -230,39 +284,6 @@ QDF_STATUS wlan_cm_abort_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
|
||||
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
|
||||
* @vdev_id: vdev id
|
||||
* @requested_state: roam state to be set
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* This function posts roam state change to roam state machine handling
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_send_rso_cmd() - send rso command
|
||||
* @psoc: psoc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @rso_command: roam command to send
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* similar to csr_roam_offload_scan, will be used from many legacy
|
||||
* process directly, generate a new function wlan_cm_roam_send_rso_cmd
|
||||
* for external usage.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
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
|
||||
|
@@ -115,6 +115,52 @@
|
||||
#define ROAM_R0KH_ID_MAX_LEN 48
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Neighbor Report Params Bitmask
|
||||
*/
|
||||
#define NEIGHBOR_REPORT_PARAMS_TIME_OFFSET 0x01
|
||||
#define NEIGHBOR_REPORT_PARAMS_LOW_RSSI_OFFSET 0x02
|
||||
#define NEIGHBOR_REPORT_PARAMS_BMISS_COUNT_TRIGGER 0x04
|
||||
#define NEIGHBOR_REPORT_PARAMS_PER_THRESHOLD_OFFSET 0x08
|
||||
#define NEIGHBOR_REPORT_PARAMS_CACHE_TIMEOUT 0x10
|
||||
#define NEIGHBOR_REPORT_PARAMS_MAX_REQ_CAP 0x20
|
||||
#define NEIGHBOR_REPORT_PARAMS_ALL 0x3F
|
||||
|
||||
/*
|
||||
* Neighbor report offload needs to send 0xFFFFFFFF if a particular
|
||||
* parameter is disabled from the ini
|
||||
*/
|
||||
#define NEIGHBOR_REPORT_PARAM_INVALID (0xFFFFFFFFU)
|
||||
|
||||
/**
|
||||
* struct cm_roam_neighbor_report_offload_params - neighbor report offload
|
||||
* parameters
|
||||
* @offload_11k_enable_bitmask: neighbor report offload bitmask control
|
||||
* @params_bitmask: bitmask to specify which of the below are enabled
|
||||
* @time_offset: time offset after 11k offload command to trigger a neighbor
|
||||
* report request (in seconds)
|
||||
* @low_rssi_offset: Offset from rssi threshold to trigger neighbor
|
||||
* report request (in dBm)
|
||||
* @bmiss_count_trigger: Number of beacon miss events to trigger neighbor
|
||||
* report request
|
||||
* @per_threshold_offset: offset from PER threshold to trigger neighbor
|
||||
* report request (in %)
|
||||
* @neighbor_report_cache_timeout: timeout after which new trigger can enable
|
||||
* sending of a neighbor report request (in seconds)
|
||||
* @max_neighbor_report_req_cap: max number of neighbor report requests that
|
||||
* can be sent to the peer in the current session
|
||||
*/
|
||||
struct cm_roam_neighbor_report_offload_params {
|
||||
uint32_t offload_11k_enable_bitmask;
|
||||
uint8_t params_bitmask;
|
||||
uint32_t time_offset;
|
||||
uint32_t low_rssi_offset;
|
||||
uint32_t bmiss_count_trigger;
|
||||
uint32_t per_threshold_offset;
|
||||
uint32_t neighbor_report_cache_timeout;
|
||||
uint32_t max_neighbor_report_req_cap;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rso_chan_info - chan info
|
||||
* @num_chan: number of channels
|
||||
@@ -284,6 +330,7 @@ struct rso_roam_policy_params {
|
||||
* @max_raise_rssi_5g: Maximum amount of Boost that can added
|
||||
* @is_fils_roaming_supported: fils roaming supported
|
||||
* @policy_params: roam policy params
|
||||
* @neighbor_report_offload: neighbor report offload params
|
||||
*/
|
||||
struct rso_config_params {
|
||||
uint8_t num_ssid_allowed_list;
|
||||
@@ -302,6 +349,7 @@ struct rso_config_params {
|
||||
uint8_t cat_rssi_offset;
|
||||
bool is_fils_roaming_supported;
|
||||
struct rso_roam_policy_params policy_params;
|
||||
struct cm_roam_neighbor_report_offload_params neighbor_report_offload;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -79,6 +79,35 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
WLAN_ROAM_RSO_ENABLED,
|
||||
REASON_CTX_INIT);
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
uint8_t reason)
|
||||
{
|
||||
return cm_roam_state_change(pdev, vdev_id, requested_state, reason);
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint8_t rso_command,
|
||||
uint8_t reason)
|
||||
{
|
||||
return cm_roam_send_rso_cmd(psoc, vdev_id, rso_command, reason);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_roam_update_cfg(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
uint8_t reason)
|
||||
{
|
||||
if (!MLME_IS_ROAM_STATE_RSO_ENABLED(psoc, vdev_id)) {
|
||||
mlme_debug("Update cfg received while ROAM RSO not started");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return cm_roam_send_rso_cmd(psoc, vdev_id, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
|
||||
reason);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
char *cm_roam_get_requestor_string(enum wlan_cm_rso_control_requestor requestor)
|
||||
@@ -238,21 +267,6 @@ bool wlan_cm_roaming_in_progress(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
uint8_t reason)
|
||||
{
|
||||
return cm_roam_state_change(pdev, vdev_id, requested_state, reason);
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint8_t rso_command,
|
||||
uint8_t reason)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
在新工单中引用
屏蔽一个用户