qcacmn: Add support in host to receive ext2 ready event
Currently the host gets service_ready_event and service_ready_ext_event during the init sequence as a part of handshake with firmware. As the size of the service_ready_ext_event exceeds on adding further parameters, new event is created. Add support for WMI_SERVICE_READY_EXT2_EVENT to be processed after WMI_SERVICE_READY_EXT_EVENT based on the service bit WMI_SERVICE_EXT2_MSG. Also add support to extract the reg db/bdf version information that comes inside the ext2 event. Change-Id: If0b57af362e7eb653f9189b912ec1dd3efb0f731 CRs-Fixed: 2501132
This commit is contained in:

committed by
nshrivas

szülő
f01c83d57e
commit
6561456601
@@ -2883,6 +2883,19 @@ QDF_STATUS wmi_extract_service_ready_ext(
|
||||
wmi_unified_t wmi_handle, uint8_t *evt_buf,
|
||||
struct wlan_psoc_host_service_ext_param *param);
|
||||
|
||||
/*
|
||||
* wmi_extract_service_ready_ext2() - extract extended2 service ready
|
||||
* @wmi_handle: wmi handle
|
||||
* @evt_buff: pointer to event buffer
|
||||
* @param: wmi ext2 base parameters
|
||||
*
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
|
||||
*/
|
||||
QDF_STATUS wmi_extract_service_ready_ext2(
|
||||
struct wmi_unified *wmi_handle, uint8_t *evt_buf,
|
||||
struct wlan_psoc_host_service_ext2_param *param);
|
||||
|
||||
/**
|
||||
* wmi_extract_hw_mode_cap_service_ready_ext() -
|
||||
* extract HW mode cap from service ready event
|
||||
|
@@ -4520,6 +4520,7 @@ typedef enum {
|
||||
wmi_coex_report_antenna_isolation_event_id,
|
||||
wmi_chan_rf_characterization_info_event_id,
|
||||
wmi_roam_auth_offload_event_id,
|
||||
wmi_service_ready_ext2_event_id,
|
||||
wmi_events_max,
|
||||
} wmi_conv_event_id;
|
||||
|
||||
@@ -5015,6 +5016,7 @@ typedef enum {
|
||||
wmi_service_dynamic_hw_mode,
|
||||
wmi_service_sae_roam_support,
|
||||
wmi_service_owe_roam_support,
|
||||
wmi_service_ext2_msg,
|
||||
wmi_services_max,
|
||||
} wmi_conv_service_ids;
|
||||
#define WMI_SERVICE_UNAVAILABLE 0xFFFF
|
||||
|
@@ -1648,10 +1648,16 @@ QDF_STATUS (*send_peer_rx_reorder_queue_setup_cmd)(wmi_unified_t wmi_handle,
|
||||
QDF_STATUS (*send_peer_rx_reorder_queue_remove_cmd)(wmi_unified_t wmi_handle,
|
||||
struct rx_reorder_queue_remove_params *param);
|
||||
|
||||
QDF_STATUS (*extract_service_ready_ext)(wmi_unified_t wmi_handle,
|
||||
QDF_STATUS (*extract_service_ready_ext)(
|
||||
wmi_unified_t wmi_handle,
|
||||
uint8_t *evt_buf,
|
||||
struct wlan_psoc_host_service_ext_param *param);
|
||||
|
||||
QDF_STATUS (*extract_service_ready_ext2)(
|
||||
wmi_unified_t wmi_handle,
|
||||
uint8_t *evt_buf,
|
||||
struct wlan_psoc_host_service_ext2_param *param);
|
||||
|
||||
QDF_STATUS (*extract_hw_mode_cap_service_ready_ext)(
|
||||
wmi_unified_t wmi_handle,
|
||||
uint8_t *evt_buf, uint8_t hw_mode_idx,
|
||||
|
@@ -2287,6 +2287,17 @@ QDF_STATUS wmi_extract_service_ready_ext(
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_extract_service_ready_ext2(
|
||||
struct wmi_unified *wmi_handle, uint8_t *evt_buf,
|
||||
struct wlan_psoc_host_service_ext2_param *param)
|
||||
{
|
||||
if (wmi_handle->ops->extract_service_ready_ext2)
|
||||
return wmi_handle->ops->extract_service_ready_ext2(wmi_handle,
|
||||
evt_buf, param);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
|
||||
wmi_unified_t wmi_handle,
|
||||
uint8_t *evt_buf,
|
||||
|
@@ -9604,6 +9604,46 @@ static QDF_STATUS extract_service_ready_ext_tlv(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* extract_service_ready_ext2_tlv() - extract service ready ext2 params from
|
||||
* event
|
||||
* @wmi_handle: wmi handle
|
||||
* @event: pointer to event buffer
|
||||
* @param: Pointer to hold the params
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
static QDF_STATUS
|
||||
extract_service_ready_ext2_tlv(wmi_unified_t wmi_handle, uint8_t *event,
|
||||
struct wlan_psoc_host_service_ext2_param *param)
|
||||
{
|
||||
WMI_SERVICE_READY_EXT2_EVENTID_param_tlvs *param_buf;
|
||||
wmi_service_ready_ext2_event_fixed_param *ev;
|
||||
|
||||
param_buf = (WMI_SERVICE_READY_EXT2_EVENTID_param_tlvs *)event;
|
||||
if (!param_buf)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
ev = param_buf->fixed_param;
|
||||
if (!ev)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
param->reg_db_version_major =
|
||||
WMI_REG_DB_VERSION_MAJOR_GET(
|
||||
ev->reg_db_version);
|
||||
param->reg_db_version_minor =
|
||||
WMI_REG_DB_VERSION_MINOR_GET(
|
||||
ev->reg_db_version);
|
||||
param->bdf_reg_db_version_major =
|
||||
WMI_BDF_REG_DB_VERSION_MAJOR_GET(
|
||||
ev->reg_db_version);
|
||||
param->bdf_reg_db_version_minor =
|
||||
WMI_BDF_REG_DB_VERSION_MINOR_GET(
|
||||
ev->reg_db_version);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* extract_sar_cap_service_ready_ext_tlv() -
|
||||
* extract SAR cap from service ready event
|
||||
@@ -11940,6 +11980,7 @@ struct wmi_ops tlv_ops = {
|
||||
.send_fw_test_cmd = send_fw_test_cmd_tlv,
|
||||
.send_power_dbg_cmd = send_power_dbg_cmd_tlv,
|
||||
.extract_service_ready_ext = extract_service_ready_ext_tlv,
|
||||
.extract_service_ready_ext2 = extract_service_ready_ext2_tlv,
|
||||
.extract_hw_mode_cap_service_ready_ext =
|
||||
extract_hw_mode_cap_service_ready_ext_tlv,
|
||||
.extract_mac_phy_cap_service_ready_ext =
|
||||
@@ -12066,6 +12107,8 @@ static void populate_tlv_events_id(uint32_t *event_ids)
|
||||
event_ids[wmi_pdev_temperature_event_id] = WMI_PDEV_TEMPERATURE_EVENTID;
|
||||
event_ids[wmi_service_ready_ext_event_id] =
|
||||
WMI_SERVICE_READY_EXT_EVENTID;
|
||||
event_ids[wmi_service_ready_ext2_event_id] =
|
||||
WMI_SERVICE_READY_EXT2_EVENTID;
|
||||
event_ids[wmi_vdev_start_resp_event_id] = WMI_VDEV_START_RESP_EVENTID;
|
||||
event_ids[wmi_vdev_stopped_event_id] = WMI_VDEV_STOPPED_EVENTID;
|
||||
event_ids[wmi_vdev_install_key_complete_event_id] =
|
||||
@@ -12493,6 +12536,7 @@ static void populate_tlv_service(uint32_t *wmi_service)
|
||||
wmi_service[wmi_service_mgmt_tx_htt] = WMI_SERVICE_MGMT_TX_HTT;
|
||||
wmi_service[wmi_service_mgmt_tx_wmi] = WMI_SERVICE_MGMT_TX_WMI;
|
||||
wmi_service[wmi_service_ext_msg] = WMI_SERVICE_EXT_MSG;
|
||||
wmi_service[wmi_service_ext2_msg] = WMI_SERVICE_EXT2_MSG;
|
||||
wmi_service[wmi_service_mawc] = WMI_SERVICE_MAWC;
|
||||
wmi_service[wmi_service_multiple_vdev_restart] =
|
||||
WMI_SERVICE_MULTIPLE_VDEV_RESTART;
|
||||
|
Reference in New Issue
Block a user