From 34bea521002ff606936a9fac0b9a193af4363522 Mon Sep 17 00:00:00 2001 From: Kiran Venkatappa Date: Fri, 1 Sep 2017 17:02:34 +0530 Subject: [PATCH] qcacmn: Add support of extended service bitmap handling Extended service bitmap is used by FW to indicate supported services bitmap for services excedding the current limitation of 128. Add support to save and use this bitmap to check services supported in FW. Also, change exisiting services bitmap to be dynamic allocated buffer to optimize the buffer used to save the bitmap. Change-Id: I24a0321bc1a06ee3aedf1c6acbc379e907bbd464 CRs-Fixed: 2103617 --- wmi_unified_api.h | 17 +++++++++++++++++ wmi_unified_param.h | 1 + wmi_unified_priv.h | 11 ++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/wmi_unified_api.h b/wmi_unified_api.h index 26e5f48c1d..49b2e9ee07 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -1150,9 +1150,26 @@ QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl, bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id); +/** + * wmi_save_service_bitmap() - save service bitmap + * @wmi_handle: wmi handle + * @param evt_buf: pointer to event buffer + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code + */ QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf, void *bitmap_buf); +/** + * wmi_save_ext_service_bitmap() - save extended service bitmap + * @wmi_handle: wmi handle + * @param evt_buf: pointer to event buffer + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code + */ +QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf, + void *bitmap_buf); + QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf); QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl, diff --git a/wmi_unified_param.h b/wmi_unified_param.h index bcd0acca2a..20d8025ca1 100644 --- a/wmi_unified_param.h +++ b/wmi_unified_param.h @@ -5157,6 +5157,7 @@ typedef enum { wmi_ext_tbttoffset_update_event_id, wmi_11d_new_country_event_id, wmi_get_arp_stats_req_id, + wmi_service_available_event_id, wmi_events_max, } wmi_conv_event_id; diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h index 372b328716..130c5673c3 100644 --- a/wmi_unified_priv.h +++ b/wmi_unified_priv.h @@ -955,7 +955,9 @@ QDF_STATUS (*send_lteu_config_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_set_ps_mode_cmd)(wmi_unified_t wmi_handle, struct set_ps_mode_params *param); -void (*save_service_bitmap)(wmi_unified_t wmi_handle, +QDF_STATUS (*save_service_bitmap)(wmi_unified_t wmi_handle, + void *evt_buf, void *bitmap_buf); +QDF_STATUS (*save_ext_service_bitmap)(wmi_unified_t wmi_handle, void *evt_buf, void *bitmap_buf); bool (*is_service_enabled)(wmi_unified_t wmi_handle, uint32_t service_id); @@ -1452,8 +1454,6 @@ struct wmi_unified { bool wmi_stopinprogress; uint32_t *wmi_events; #ifndef CONFIG_MCL - /* WMI service bitmap recieved from target */ - uint32_t *wmi_service_bitmap; uint32_t *pdev_param; uint32_t *vdev_param; uint32_t *services; @@ -1478,9 +1478,10 @@ struct wmi_soc { uint16_t max_msg_len[WMI_MAX_RADIOS]; struct wmi_ops *ops; uint32_t wmi_events[wmi_events_max]; -#ifndef CONFIG_MCL /* WMI service bitmap recieved from target */ - uint32_t wmi_service_bitmap[wmi_services_max]; + uint32_t *wmi_service_bitmap; + uint32_t *wmi_ext_service_bitmap; +#ifndef CONFIG_MCL uint32_t pdev_param[wmi_pdev_param_max]; uint32_t vdev_param[wmi_vdev_param_max]; uint32_t services[wmi_services_max];