mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
qcacld-3.0: Move rso related process to connection manager [PART 2]
Add new code to implement below functions for connection manager roam part: WLAN_ROAMING_IN_PROG/WLAN_ROAM_SYNCH_IN_PROG related handler. Filling below WMI cmd parameters related process: WMI_VDEV_PARAM_BMISS_FIRST_BCNT WMI_VDEV_PARAM_BMISS_FINAL_BCNT WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID WMI_ROAM_SCAN_PERIOD Change-Id: I28439393a57c72012f9de51f24050f95366294bc CRs-Fixed: 2738353
This commit is contained in:
parent
ede5f59a27
commit
f36840cce8
13 changed files with 902 additions and 211 deletions
|
|
@ -73,6 +73,18 @@ wmi_unified_set_rssi_monitoring_cmd(wmi_unified_t wmi_handle,
|
|||
QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct wlan_roam_offload_scan_rssi_params *roam_req);
|
||||
|
||||
/**
|
||||
* wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
|
||||
* @wmi_handle: wmi handle
|
||||
* @param: pointer to roam scan period params to be sent to fw
|
||||
*
|
||||
* Send WMI_ROAM_SCAN_PERIOD parameters to fw.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_roam_scan_offload_scan_period(
|
||||
wmi_unified_t wmi_handle, struct wlan_roam_scan_period_params *param);
|
||||
#else
|
||||
/**
|
||||
* wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
|
||||
|
|
@ -88,6 +100,18 @@ QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
|
|||
QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct roam_offload_scan_rssi_params *roam_req);
|
||||
|
||||
/**
|
||||
* wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
|
||||
* @wmi_handle: wmi handle
|
||||
* @param: pointer to roam scan period params to be sent to fw
|
||||
*
|
||||
* Send WMI_ROAM_SCAN_PERIOD parameters to fw.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_roam_scan_offload_scan_period(
|
||||
wmi_unified_t wmi_handle, struct roam_scan_period_params *param);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
@ -289,18 +313,6 @@ QDF_STATUS wmi_unified_roam_scan_offload_cmd(wmi_unified_t wmi_handle,
|
|||
uint32_t command,
|
||||
uint32_t vdev_id);
|
||||
|
||||
/**
|
||||
* wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
|
||||
* @wmi_handle: wmi handle
|
||||
* @param: pointer to roam scan period params to be sent to fw
|
||||
*
|
||||
* Send WMI_ROAM_SCAN_PERIOD parameters to fw.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_roam_scan_offload_scan_period(
|
||||
wmi_unified_t wmi_handle, struct roam_scan_period_params *param);
|
||||
|
||||
/**
|
||||
* wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
|
||||
* @wmi_handle: wmi handle
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ struct roam_offload_scan_rssi_params {
|
|||
uint32_t bg_scan_client_bitmap;
|
||||
uint32_t flags;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct roam_scan_period_params - Roam scan period parameters
|
||||
|
|
@ -152,6 +151,7 @@ struct roam_scan_period_params {
|
|||
uint32_t roam_scan_period_after_inactivity;
|
||||
uint32_t full_scan_period;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct wmi_mawc_roam_params - Motion Aided wireless connectivity params
|
||||
|
|
|
|||
|
|
@ -57,6 +57,18 @@ QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
|
|||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wmi_unified_roam_scan_offload_scan_period(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct wlan_roam_scan_period_params *param)
|
||||
{
|
||||
if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
|
||||
return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(
|
||||
wmi_handle, param);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#else
|
||||
QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
|
||||
wmi_unified_t wmi_handle,
|
||||
|
|
@ -68,6 +80,17 @@ QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
|
|||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wmi_unified_roam_scan_offload_scan_period(wmi_unified_t wmi_handle,
|
||||
struct roam_scan_period_params *param)
|
||||
{
|
||||
if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
|
||||
return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(
|
||||
wmi_handle, param);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS wmi_unified_roam_mawc_params_cmd(
|
||||
|
|
@ -221,17 +244,6 @@ QDF_STATUS wmi_unified_roam_scan_offload_cmd(wmi_unified_t wmi_handle,
|
|||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wmi_unified_roam_scan_offload_scan_period(wmi_unified_t wmi_handle,
|
||||
struct roam_scan_period_params *param)
|
||||
{
|
||||
if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
|
||||
return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(
|
||||
wmi_handle, param);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wmi_unified_roam_scan_offload_chan_list_cmd(wmi_unified_t wmi_handle,
|
||||
uint8_t chan_count,
|
||||
|
|
|
|||
|
|
@ -300,6 +300,75 @@ static QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(
|
|||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_roam_scan_offload_scan_period_cmd_tlv() - set roam offload scan period
|
||||
* @wmi_handle: wmi handle
|
||||
* @param: roam scan parameters to be sent to firmware
|
||||
*
|
||||
* Send WMI_ROAM_SCAN_PERIOD parameters to fw.
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
static QDF_STATUS
|
||||
send_roam_scan_offload_scan_period_cmd_tlv(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct wlan_roam_scan_period_params *param)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
wmi_buf_t buf = NULL;
|
||||
int len;
|
||||
uint8_t *buf_ptr;
|
||||
wmi_roam_scan_period_fixed_param *scan_period_fp;
|
||||
|
||||
/* Send scan period values */
|
||||
len = sizeof(wmi_roam_scan_period_fixed_param);
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
||||
scan_period_fp = (wmi_roam_scan_period_fixed_param *)buf_ptr;
|
||||
WMITLV_SET_HDR(&scan_period_fp->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_roam_scan_period_fixed_param));
|
||||
/* fill in scan period values */
|
||||
scan_period_fp->vdev_id = param->vdev_id;
|
||||
scan_period_fp->roam_scan_period = param->scan_period;
|
||||
scan_period_fp->roam_scan_age = param->scan_age;
|
||||
scan_period_fp->inactivity_time_period =
|
||||
param->roam_scan_inactivity_time;
|
||||
scan_period_fp->roam_inactive_count =
|
||||
param->roam_inactive_data_packet_count;
|
||||
scan_period_fp->roam_scan_period_after_inactivity =
|
||||
param->roam_scan_period_after_inactivity;
|
||||
/* Firmware expects the full scan preriod in msec whereas host
|
||||
* provides the same in seconds.
|
||||
* Convert it to msec and send to firmware
|
||||
*/
|
||||
scan_period_fp->roam_full_scan_period = param->full_scan_period * 1000;
|
||||
|
||||
wmi_debug("roam_scan_period=%d, roam_scan_age=%d, full_scan_period= %u",
|
||||
scan_period_fp->roam_scan_period,
|
||||
scan_period_fp->roam_scan_age,
|
||||
scan_period_fp->roam_full_scan_period);
|
||||
|
||||
wmi_debug("inactiviy time:%d inactive cnt:%d time after inactivity:%d",
|
||||
scan_period_fp->inactivity_time_period,
|
||||
scan_period_fp->roam_inactive_count,
|
||||
scan_period_fp->roam_scan_period_after_inactivity);
|
||||
|
||||
wmi_mtrace(WMI_ROAM_SCAN_PERIOD, NO_SESSION, 0);
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
WMI_ROAM_SCAN_PERIOD);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
wmi_buf_free(buf);
|
||||
return status;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#else
|
||||
static QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(
|
||||
wmi_unified_t wmi_handle,
|
||||
|
|
@ -431,6 +500,75 @@ static QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(
|
|||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_roam_scan_offload_scan_period_cmd_tlv() - set roam offload scan period
|
||||
* @wmi_handle: wmi handle
|
||||
* @param: roam scan parameters to be sent to firmware
|
||||
*
|
||||
* Send WMI_ROAM_SCAN_PERIOD parameters to fw.
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
static QDF_STATUS
|
||||
send_roam_scan_offload_scan_period_cmd_tlv(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct roam_scan_period_params *param)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
wmi_buf_t buf = NULL;
|
||||
int len;
|
||||
uint8_t *buf_ptr;
|
||||
wmi_roam_scan_period_fixed_param *scan_period_fp;
|
||||
|
||||
/* Send scan period values */
|
||||
len = sizeof(wmi_roam_scan_period_fixed_param);
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
||||
scan_period_fp = (wmi_roam_scan_period_fixed_param *)buf_ptr;
|
||||
WMITLV_SET_HDR(&scan_period_fp->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_roam_scan_period_fixed_param));
|
||||
/* fill in scan period values */
|
||||
scan_period_fp->vdev_id = param->vdev_id;
|
||||
scan_period_fp->roam_scan_period = param->scan_period;
|
||||
scan_period_fp->roam_scan_age = param->scan_age;
|
||||
scan_period_fp->inactivity_time_period =
|
||||
param->roam_scan_inactivity_time;
|
||||
scan_period_fp->roam_inactive_count =
|
||||
param->roam_inactive_data_packet_count;
|
||||
scan_period_fp->roam_scan_period_after_inactivity =
|
||||
param->roam_scan_period_after_inactivity;
|
||||
/* Firmware expects the full scan preriod in msec whereas host
|
||||
* provides the same in seconds.
|
||||
* Convert it to msec and send to firmware
|
||||
*/
|
||||
scan_period_fp->roam_full_scan_period = param->full_scan_period * 1000;
|
||||
|
||||
wmi_debug("roam_scan_period=%d, roam_scan_age=%d, full_scan_period= %u",
|
||||
scan_period_fp->roam_scan_period,
|
||||
scan_period_fp->roam_scan_age,
|
||||
scan_period_fp->roam_full_scan_period);
|
||||
|
||||
wmi_debug("inactiviy time:%d inactive cnt:%d time after inactivity:%d",
|
||||
scan_period_fp->inactivity_time_period,
|
||||
scan_period_fp->roam_inactive_count,
|
||||
scan_period_fp->roam_scan_period_after_inactivity);
|
||||
|
||||
wmi_mtrace(WMI_ROAM_SCAN_PERIOD, NO_SESSION, 0);
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
WMI_ROAM_SCAN_PERIOD);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
wmi_buf_free(buf);
|
||||
return status;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
static QDF_STATUS send_roam_mawc_params_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
|
|
@ -2327,75 +2465,6 @@ error:
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_roam_scan_offload_scan_period_cmd_tlv() - set roam offload scan period
|
||||
* @wmi_handle: wmi handle
|
||||
* @param: roam scan parameters to be sent to firmware
|
||||
*
|
||||
* Send WMI_ROAM_SCAN_PERIOD parameters to fw.
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
static QDF_STATUS
|
||||
send_roam_scan_offload_scan_period_cmd_tlv(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct roam_scan_period_params *param)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
wmi_buf_t buf = NULL;
|
||||
int len;
|
||||
uint8_t *buf_ptr;
|
||||
wmi_roam_scan_period_fixed_param *scan_period_fp;
|
||||
|
||||
/* Send scan period values */
|
||||
len = sizeof(wmi_roam_scan_period_fixed_param);
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
||||
scan_period_fp = (wmi_roam_scan_period_fixed_param *)buf_ptr;
|
||||
WMITLV_SET_HDR(&scan_period_fp->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_roam_scan_period_fixed_param));
|
||||
/* fill in scan period values */
|
||||
scan_period_fp->vdev_id = param->vdev_id;
|
||||
scan_period_fp->roam_scan_period = param->scan_period;
|
||||
scan_period_fp->roam_scan_age = param->scan_age;
|
||||
scan_period_fp->inactivity_time_period =
|
||||
param->roam_scan_inactivity_time;
|
||||
scan_period_fp->roam_inactive_count =
|
||||
param->roam_inactive_data_packet_count;
|
||||
scan_period_fp->roam_scan_period_after_inactivity =
|
||||
param->roam_scan_period_after_inactivity;
|
||||
/* Firmware expects the full scan preriod in msec whereas host
|
||||
* provides the same in seconds.
|
||||
* Convert it to msec and send to firmware
|
||||
*/
|
||||
scan_period_fp->roam_full_scan_period = param->full_scan_period * 1000;
|
||||
|
||||
wmi_debug("roam_scan_period=%d, roam_scan_age=%d, full_scan_period= %u",
|
||||
scan_period_fp->roam_scan_period,
|
||||
scan_period_fp->roam_scan_age,
|
||||
scan_period_fp->roam_full_scan_period);
|
||||
|
||||
wmi_debug("inactiviy time:%d inactive cnt:%d time after inactivity:%d",
|
||||
scan_period_fp->inactivity_time_period,
|
||||
scan_period_fp->roam_inactive_count,
|
||||
scan_period_fp->roam_scan_period_after_inactivity);
|
||||
|
||||
wmi_mtrace(WMI_ROAM_SCAN_PERIOD, NO_SESSION, 0);
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
WMI_ROAM_SCAN_PERIOD);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
wmi_buf_free(buf);
|
||||
return status;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_roam_scan_offload_chan_list_cmd_tlv() - set roam offload channel list
|
||||
* @wmi_handle: wmi handle
|
||||
|
|
|
|||
Loading…
Reference in a new issue