qcacld-3.0: Move rso related process to connection manager [PART 5]
Add new code to implement below functions for connection manager roam part: Filling below WMI cmd parameters related process: WMI_11K_OFFLOAD_REPORT_CMDID WMI_ROAM_DEAUTH_CONFIG_CMDID WMI_ROAM_IDLE_CONFIG_CMDID Change-Id: I346b921a6f378e7c4d8860acd7c3bec45a0b9d3a CRs-Fixed: 2749430
This commit is contained in:
@@ -2516,6 +2516,81 @@ uint32_t wlan_mlme_get_roaming_triggers(struct wlan_objmgr_psoc *psoc);
|
|||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wlan_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc,
|
wlan_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc,
|
||||||
bool *val);
|
bool *val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_enable_disconnect_roam_offload() - Get emergency roaming
|
||||||
|
* Enable/Disable status during deauth/disassoc
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: Pointer to emergency roaming Enable/Disable status
|
||||||
|
* during deauth/disassoc
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_enable_disconnect_roam_offload(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_enable_idle_roam() - Get Enable/Disable idle roaming status
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: Pointer to Enable/Disable idle roaming status
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_enable_idle_roam(struct wlan_objmgr_psoc *psoc, bool *val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_idle_roam_rssi_delta() - Get idle roam rssi delta
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: Pointer to idle roam rssi delta
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_roam_rssi_delta(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint32_t *val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_idle_roam_inactive_time() - Get idle roam inactive time
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: Pointer to idle roam inactive time
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_roam_inactive_time(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint32_t *val);
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_idle_data_packet_count() - Get idle data packet count
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: Pointer to idle data packet count
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_data_packet_count(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint32_t *val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_idle_roam_min_rssi() - Get idle roam min rssi
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: Pointer to idle roam min rssi
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_roam_min_rssi(struct wlan_objmgr_psoc *psoc, uint32_t *val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_idle_roam_band() - Get idle roam band
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: Pointer to idle roam band
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_roam_band(struct wlan_objmgr_psoc *psoc, uint32_t *val);
|
||||||
#else
|
#else
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
wlan_mlme_get_roam_reason_vsie_status(struct wlan_objmgr_psoc *psoc,
|
wlan_mlme_get_roam_reason_vsie_status(struct wlan_objmgr_psoc *psoc,
|
||||||
|
@@ -3932,6 +3932,121 @@ wlan_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc,
|
|||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_enable_disconnect_roam_offload(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *val)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
*val = cfg_default(CFG_LFR_ENABLE_DISCONNECT_ROAM);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*val = mlme_obj->cfg.lfr.enable_disconnect_roam_offload;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_enable_idle_roam(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
*val = cfg_default(CFG_LFR_ENABLE_IDLE_ROAM);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*val = mlme_obj->cfg.lfr.enable_idle_roam;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_roam_rssi_delta(struct wlan_objmgr_psoc *psoc, uint32_t *val)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
*val = cfg_default(CFG_LFR_IDLE_ROAM_RSSI_DELTA);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*val = mlme_obj->cfg.lfr.idle_roam_rssi_delta;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_roam_inactive_time(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint32_t *val)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
*val = cfg_default(CFG_LFR_IDLE_ROAM_INACTIVE_TIME);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*val = mlme_obj->cfg.lfr.idle_roam_inactive_time;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_data_packet_count(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint32_t *val)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
*val = cfg_default(CFG_LFR_IDLE_ROAM_PACKET_COUNT);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*val = mlme_obj->cfg.lfr.idle_data_packet_count;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_roam_min_rssi(struct wlan_objmgr_psoc *psoc, uint32_t *val)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
*val = cfg_default(CFG_LFR_IDLE_ROAM_MIN_RSSI);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*val = mlme_obj->cfg.lfr.idle_roam_min_rssi;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_mlme_get_idle_roam_band(struct wlan_objmgr_psoc *psoc, uint32_t *val)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
*val = cfg_default(CFG_LFR_IDLE_ROAM_BAND);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*val = mlme_obj->cfg.lfr.idle_roam_band;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
|
@@ -242,6 +242,77 @@ target_if_cm_roam_scan_get_cckm_mode(struct wlan_objmgr_vdev *vdev,
|
|||||||
else
|
else
|
||||||
return WMI_AUTH_CCKM;
|
return WMI_AUTH_CCKM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* target_if_cm_roam_disconnect_params(): Send the disconnect roam parameters
|
||||||
|
* to wmi
|
||||||
|
* @wmi_handle: handle to WMI
|
||||||
|
* @command: rso command
|
||||||
|
* @req: disconnect roam parameters
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
target_if_cm_roam_disconnect_params(wmi_unified_t wmi_handle, uint8_t command,
|
||||||
|
struct wlan_roam_disconnect_params *req)
|
||||||
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
switch (command) {
|
||||||
|
case ROAM_SCAN_OFFLOAD_START:
|
||||||
|
case ROAM_SCAN_OFFLOAD_UPDATE_CFG:
|
||||||
|
if (!req->enable)
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case ROAM_SCAN_OFFLOAD_STOP:
|
||||||
|
req->enable = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = wmi_unified_send_disconnect_roam_params(wmi_handle, req);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
target_if_err("failed to send disconnect roam parameters");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* target_if_cm_roam_idle_params(): Send the roam idle parameters to wmi
|
||||||
|
* @wmi_handle: handle to WMI
|
||||||
|
* @command: rso command
|
||||||
|
* @req: roam idle parameters
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
target_if_cm_roam_idle_params(wmi_unified_t wmi_handle, uint8_t command,
|
||||||
|
struct wlan_roam_idle_params *req)
|
||||||
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
bool db2dbm_enabled;
|
||||||
|
|
||||||
|
switch (command) {
|
||||||
|
case ROAM_SCAN_OFFLOAD_START:
|
||||||
|
case ROAM_SCAN_OFFLOAD_UPDATE_CFG:
|
||||||
|
if (!req->enable)
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case ROAM_SCAN_OFFLOAD_STOP:
|
||||||
|
req->enable = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
db2dbm_enabled = wmi_service_enabled(wmi_handle,
|
||||||
|
wmi_service_hw_db2dbm_support);
|
||||||
|
if (!db2dbm_enabled) {
|
||||||
|
req->conn_ap_min_rssi -= NOISE_FLOOR_DBM_DEFAULT;
|
||||||
|
req->conn_ap_min_rssi &= 0x000000ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = wmi_unified_send_idle_roam_params(wmi_handle, req);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
target_if_err("failed to send idle roam parameters");
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static void
|
static void
|
||||||
target_if_cm_roam_reason_vsie(wmi_unified_t wmi_handle,
|
target_if_cm_roam_reason_vsie(wmi_unified_t wmi_handle,
|
||||||
@@ -262,6 +333,18 @@ target_if_cm_roam_scan_get_cckm_mode(struct wlan_objmgr_vdev *vdev,
|
|||||||
{
|
{
|
||||||
return WMI_AUTH_CCKM;
|
return WMI_AUTH_CCKM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
target_if_cm_roam_disconnect_params(wmi_unified_t wmi_handle, uint8_t command,
|
||||||
|
struct wlan_roam_disconnect_params *req)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
target_if_cm_roam_idle_params(wmi_unified_t wmi_handle, uint8_t command,
|
||||||
|
struct wlan_roam_idle_params *req)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
* target_if_cm_roam_scan_offload_rssi_thresh() - Send roam scan rssi threshold
|
* target_if_cm_roam_scan_offload_rssi_thresh() - Send roam scan rssi threshold
|
||||||
@@ -585,6 +668,42 @@ target_if_cm_roam_scan_btm_offload(wmi_unified_t wmi_handle,
|
|||||||
return wmi_unified_send_btm_config(wmi_handle, req);
|
return wmi_unified_send_btm_config(wmi_handle, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_cm_roam_offload_11k_params() - send 11k offload params to firmware
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @req: 11k offload parameters
|
||||||
|
*
|
||||||
|
* Send WMI_11K_OFFLOAD_REPORT_CMDID parameters to firmware
|
||||||
|
*
|
||||||
|
* Return: QDF status
|
||||||
|
*/
|
||||||
|
static QDF_STATUS
|
||||||
|
target_if_cm_roam_offload_11k_params(wmi_unified_t wmi_handle,
|
||||||
|
struct wlan_roam_11k_offload_params *req)
|
||||||
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
if (!wmi_service_enabled(wmi_handle,
|
||||||
|
wmi_service_11k_neighbour_report_support)) {
|
||||||
|
target_if_err("FW doesn't support 11k offload");
|
||||||
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If 11k enable command and ssid length is 0, drop it */
|
||||||
|
if (req->offload_11k_bitmask &&
|
||||||
|
!req->neighbor_report_params.ssid.length) {
|
||||||
|
target_if_debug("SSID Len 0");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = wmi_unified_offload_11k_cmd(wmi_handle, req);
|
||||||
|
|
||||||
|
if (status != QDF_STATUS_SUCCESS)
|
||||||
|
target_if_err("failed to send 11k offload command");
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
static uint32_t
|
static uint32_t
|
||||||
target_if_get_wmi_roam_offload_flag(uint32_t flag)
|
target_if_get_wmi_roam_offload_flag(uint32_t flag)
|
||||||
{
|
{
|
||||||
@@ -702,8 +821,25 @@ target_if_cm_roam_send_start(struct wlan_objmgr_vdev *vdev,
|
|||||||
&req->btm_config);
|
&req->btm_config);
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
target_if_err("Sending BTM config to fw failed");
|
target_if_err("Sending BTM config to fw failed");
|
||||||
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Send 11k offload enable and bss load trigger parameters
|
||||||
|
* to FW as part of RSO Start
|
||||||
|
*/
|
||||||
|
status = target_if_cm_roam_offload_11k_params(wmi_handle,
|
||||||
|
&req->roam_11k_params);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
target_if_err("11k offload enable not sent, status %d", status);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
|
target_if_cm_roam_disconnect_params(wmi_handle, ROAM_SCAN_OFFLOAD_START,
|
||||||
|
&req->disconnect_params);
|
||||||
|
|
||||||
|
target_if_cm_roam_idle_params(wmi_handle, ROAM_SCAN_OFFLOAD_START,
|
||||||
|
&req->idle_params);
|
||||||
/* add other wmi commands */
|
/* add other wmi commands */
|
||||||
end:
|
end:
|
||||||
return status;
|
return status;
|
||||||
|
@@ -55,7 +55,7 @@ cm_roam_scan_bmiss_cnt(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||||||
|
|
||||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
/**
|
/**
|
||||||
* wlan_cm_roam_reason_vsie() - set roam reason vsie
|
* cm_roam_reason_vsie() - set roam reason vsie
|
||||||
* @psoc: psoc pointer
|
* @psoc: psoc pointer
|
||||||
* @vdev_id: vdev id
|
* @vdev_id: vdev id
|
||||||
* @params: roam reason vsie parameters
|
* @params: roam reason vsie parameters
|
||||||
@@ -77,7 +77,7 @@ cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_cm_roam_triggers() - set roam triggers
|
* cm_roam_triggers() - set roam triggers
|
||||||
* @psoc: psoc pointer
|
* @psoc: psoc pointer
|
||||||
* @vdev_id: vdev id
|
* @vdev_id: vdev id
|
||||||
* @params: roam triggers parameters
|
* @params: roam triggers parameters
|
||||||
@@ -96,6 +96,47 @@ cm_roam_triggers(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||||||
wlan_cm_roam_get_vendor_btm_params(psoc, vdev_id,
|
wlan_cm_roam_get_vendor_btm_params(psoc, vdev_id,
|
||||||
¶ms->vendor_btm_param);
|
¶ms->vendor_btm_param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cm_roam_disconnect_params() - set disconnect roam parameters
|
||||||
|
* @psoc: psoc pointer
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
* @params: disconnect roam parameters
|
||||||
|
*
|
||||||
|
* This function is used to set disconnect roam parameters
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
cm_roam_disconnect_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||||
|
struct wlan_roam_disconnect_params *params)
|
||||||
|
{
|
||||||
|
params->vdev_id = vdev_id;
|
||||||
|
wlan_mlme_get_enable_disconnect_roam_offload(psoc, ¶ms->enable);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cm_roam_idle_params() - set roam idle parameters
|
||||||
|
* @psoc: psoc pointer
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
* @params: roam idle parameters
|
||||||
|
*
|
||||||
|
* This function is used to set roam idle parameters
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
cm_roam_idle_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||||
|
struct wlan_roam_idle_params *params)
|
||||||
|
{
|
||||||
|
params->vdev_id = vdev_id;
|
||||||
|
wlan_mlme_get_enable_idle_roam(psoc, ¶ms->enable);
|
||||||
|
wlan_mlme_get_idle_roam_rssi_delta(psoc, ¶ms->conn_ap_rssi_delta);
|
||||||
|
wlan_mlme_get_idle_roam_inactive_time(psoc, ¶ms->inactive_time);
|
||||||
|
wlan_mlme_get_idle_data_packet_count(psoc, ¶ms->data_pkt_count);
|
||||||
|
wlan_mlme_get_idle_roam_min_rssi(psoc, ¶ms->conn_ap_min_rssi);
|
||||||
|
wlan_mlme_get_idle_roam_band(psoc, ¶ms->band);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static inline void
|
static inline void
|
||||||
cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||||
@@ -108,6 +149,18 @@ cm_roam_triggers(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||||||
struct wlan_roam_triggers *params)
|
struct wlan_roam_triggers *params)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
cm_roam_disconnect_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||||
|
struct wlan_roam_disconnect_params *params)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
cm_roam_idle_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||||
|
struct wlan_roam_idle_params *params)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,6 +214,8 @@ cm_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||||||
cm_roam_scan_bmiss_cnt(psoc, vdev_id, &start_req->beacon_miss_cnt);
|
cm_roam_scan_bmiss_cnt(psoc, vdev_id, &start_req->beacon_miss_cnt);
|
||||||
cm_roam_reason_vsie(psoc, vdev_id, &start_req->reason_vsie_enable);
|
cm_roam_reason_vsie(psoc, vdev_id, &start_req->reason_vsie_enable);
|
||||||
cm_roam_triggers(psoc, vdev_id, &start_req->roam_triggers);
|
cm_roam_triggers(psoc, vdev_id, &start_req->roam_triggers);
|
||||||
|
cm_roam_disconnect_params(psoc, vdev_id, &start_req->disconnect_params);
|
||||||
|
cm_roam_idle_params(psoc, vdev_id, &start_req->idle_params);
|
||||||
|
|
||||||
/* fill from legacy through this API */
|
/* fill from legacy through this API */
|
||||||
wlan_cm_roam_fill_start_req(psoc, vdev_id, start_req, reason);
|
wlan_cm_roam_fill_start_req(psoc, vdev_id, start_req, reason);
|
||||||
|
@@ -17689,106 +17689,6 @@ csr_create_roam_scan_offload_request(struct mac_context *mac_ctx,
|
|||||||
return req_buf;
|
return req_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* csr_update_11k_offload_params - Update 11K offload params
|
|
||||||
* @mac_ctx: MAC context
|
|
||||||
* @session: Pointer to the CSR Roam Session
|
|
||||||
* @req_buffer: Pointer to the RSO Request buffer
|
|
||||||
* @enabled: 11k offload enabled/disabled.
|
|
||||||
*
|
|
||||||
* API to update 11k offload params to Roam Scan Offload request buffer
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
csr_update_11k_offload_params(struct mac_context *mac_ctx,
|
|
||||||
struct csr_roam_session *session,
|
|
||||||
struct roam_offload_scan_req *req_buffer,
|
|
||||||
bool enabled)
|
|
||||||
{
|
|
||||||
struct wlan_roam_11k_offload_params *params =
|
|
||||||
&req_buffer->offload_11k_params;
|
|
||||||
struct csr_config *csr_config = &mac_ctx->roam.configParam;
|
|
||||||
struct csr_neighbor_report_offload_params *neighbor_report_offload =
|
|
||||||
&csr_config->neighbor_report_offload;
|
|
||||||
|
|
||||||
params->vdev_id = session->sessionId;
|
|
||||||
|
|
||||||
if (enabled) {
|
|
||||||
params->offload_11k_bitmask =
|
|
||||||
csr_config->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) {
|
|
||||||
sme_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;
|
|
||||||
|
|
||||||
params->neighbor_report_params.ssid.length =
|
|
||||||
session->connectedProfile.SSID.length;
|
|
||||||
qdf_mem_copy(params->neighbor_report_params.ssid.ssid,
|
|
||||||
session->connectedProfile.SSID.ssId,
|
|
||||||
session->connectedProfile.SSID.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check_allowed_ssid_list() - Check the WhiteList
|
* check_allowed_ssid_list() - Check the WhiteList
|
||||||
* @req_buffer: Buffer which contains the connected profile SSID.
|
* @req_buffer: Buffer which contains the connected profile SSID.
|
||||||
@@ -17873,13 +17773,112 @@ csr_add_rssi_reject_ap_list(struct mac_context *mac_ctx,
|
|||||||
sme_debug("BSSID %pM expected rssi %d remaining duration %d",
|
sme_debug("BSSID %pM expected rssi %d remaining duration %d",
|
||||||
roam_params->rssi_reject_bssid_list[i].bssid.bytes,
|
roam_params->rssi_reject_bssid_list[i].bssid.bytes,
|
||||||
roam_params->rssi_reject_bssid_list[i].expected_rssi,
|
roam_params->rssi_reject_bssid_list[i].expected_rssi,
|
||||||
roam_params->rssi_reject_bssid_list[i].reject_duration);
|
roam_params->rssi_reject_bssid_list[i].
|
||||||
|
reject_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_mem_free(reject_list);
|
qdf_mem_free(reject_list);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* csr_update_11k_offload_params - Update 11K offload params
|
||||||
|
* @mac_ctx: MAC context
|
||||||
|
* @session: Pointer to the CSR Roam Session
|
||||||
|
* @params: Pointer to the roam 11k offload params
|
||||||
|
* @enabled: 11k offload enabled/disabled.
|
||||||
|
*
|
||||||
|
* API to update 11k offload params
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
csr_update_11k_offload_params(struct mac_context *mac_ctx,
|
||||||
|
struct csr_roam_session *session,
|
||||||
|
struct wlan_roam_11k_offload_params *params,
|
||||||
|
bool enabled)
|
||||||
|
{
|
||||||
|
struct csr_config *csr_config = &mac_ctx->roam.configParam;
|
||||||
|
struct csr_neighbor_report_offload_params *neighbor_report_offload =
|
||||||
|
&csr_config->neighbor_report_offload;
|
||||||
|
|
||||||
|
params->vdev_id = session->sessionId;
|
||||||
|
|
||||||
|
if (enabled) {
|
||||||
|
params->offload_11k_bitmask =
|
||||||
|
csr_config->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) {
|
||||||
|
sme_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;
|
||||||
|
|
||||||
|
params->neighbor_report_params.ssid.length =
|
||||||
|
session->connectedProfile.SSID.length;
|
||||||
|
qdf_mem_copy(params->neighbor_report_params.ssid.ssid,
|
||||||
|
session->connectedProfile.SSID.ssId,
|
||||||
|
session->connectedProfile.SSID.length);
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS csr_invoke_neighbor_report_request(
|
QDF_STATUS csr_invoke_neighbor_report_request(
|
||||||
uint8_t session_id,
|
uint8_t session_id,
|
||||||
struct sRrmNeighborReq *neighbor_report_req,
|
struct sRrmNeighborReq *neighbor_report_req,
|
||||||
@@ -19214,9 +19213,11 @@ csr_roam_offload_scan(struct mac_context *mac_ctx, uint8_t session_id,
|
|||||||
* 11k offload is disabled during RSO Stop after disconnect indication
|
* 11k offload is disabled during RSO Stop after disconnect indication
|
||||||
*/
|
*/
|
||||||
if (command == ROAM_SCAN_OFFLOAD_START)
|
if (command == ROAM_SCAN_OFFLOAD_START)
|
||||||
csr_update_11k_offload_params(mac_ctx, session, req_buf, TRUE);
|
csr_update_11k_offload_params(
|
||||||
|
mac_ctx, session, &req_buf->offload_11k_params, TRUE);
|
||||||
else if (command == ROAM_SCAN_OFFLOAD_STOP)
|
else if (command == ROAM_SCAN_OFFLOAD_STOP)
|
||||||
csr_update_11k_offload_params(mac_ctx, session, req_buf, FALSE);
|
csr_update_11k_offload_params(
|
||||||
|
mac_ctx, session, &req_buf->offload_11k_params, FALSE);
|
||||||
|
|
||||||
wlan_cm_roam_get_vendor_btm_params(mac_ctx->psoc, session_id,
|
wlan_cm_roam_get_vendor_btm_params(mac_ctx->psoc, session_id,
|
||||||
&req_buf->roam_triggers.
|
&req_buf->roam_triggers.
|
||||||
@@ -19727,7 +19728,7 @@ csr_cm_roam_scan_filter(struct mac_context *mac_ctx, uint8_t vdev_id,
|
|||||||
* csr_cm_roam_scan_btm_offload() - set roam scan btm offload parameters
|
* csr_cm_roam_scan_btm_offload() - set roam scan btm offload parameters
|
||||||
* @mac_ctx: global mac ctx
|
* @mac_ctx: global mac ctx
|
||||||
* @session: sme session
|
* @session: sme session
|
||||||
* @params: roam roam scan btm offload parameters
|
* @params: roam scan btm offload parameters
|
||||||
*
|
*
|
||||||
* This function is used to set roam scan btm offload related parameters
|
* This function is used to set roam scan btm offload related parameters
|
||||||
*
|
*
|
||||||
@@ -19755,6 +19756,26 @@ csr_cm_roam_scan_btm_offload(struct mac_context *mac_ctx,
|
|||||||
mac_ctx->mlme_cfg->btm.btm_trig_min_candidate_score;
|
mac_ctx->mlme_cfg->btm.btm_trig_min_candidate_score;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* csr_cm_roam_offload_11k_params() - set roam 11k offload parameters
|
||||||
|
* @mac_ctx: global mac ctx
|
||||||
|
* @session: sme session
|
||||||
|
* @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
|
||||||
|
csr_cm_roam_offload_11k_params(struct mac_context *mac_ctx,
|
||||||
|
struct csr_roam_session *session,
|
||||||
|
struct wlan_roam_11k_offload_params *params,
|
||||||
|
bool enabled)
|
||||||
|
{
|
||||||
|
csr_update_11k_offload_params(mac_ctx, session, params, enabled);
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wlan_cm_roam_fill_start_req(struct wlan_objmgr_psoc *psoc,
|
wlan_cm_roam_fill_start_req(struct wlan_objmgr_psoc *psoc,
|
||||||
uint8_t vdev_id,
|
uint8_t vdev_id,
|
||||||
@@ -19792,6 +19813,9 @@ wlan_cm_roam_fill_start_req(struct wlan_objmgr_psoc *psoc,
|
|||||||
|
|
||||||
csr_cm_roam_scan_btm_offload(mac_ctx, session, &req->btm_config);
|
csr_cm_roam_scan_btm_offload(mac_ctx, session, &req->btm_config);
|
||||||
|
|
||||||
|
/* 11k offload is enabled during RSO Start after connect indication */
|
||||||
|
csr_cm_roam_offload_11k_params(mac_ctx, session,
|
||||||
|
&req->roam_11k_params, TRUE);
|
||||||
/* fill other struct similar to wlan_roam_offload_scan_rssi_params */
|
/* fill other struct similar to wlan_roam_offload_scan_rssi_params */
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
Reference in New Issue
Block a user