|
@@ -5118,6 +5118,60 @@ static QDF_STATUS send_pno_start_cmd_tlv(wmi_unified_t wmi_handle,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * is_service_enabled_tlv() - Check if service enabled
|
|
|
+ * @param wmi_handle: wmi handle
|
|
|
+ * @param service_id: service identifier
|
|
|
+ *
|
|
|
+ * Return: 1 enabled, 0 disabled
|
|
|
+ */
|
|
|
+static bool is_service_enabled_tlv(wmi_unified_t wmi_handle,
|
|
|
+ uint32_t service_id)
|
|
|
+{
|
|
|
+ struct wmi_soc *soc = wmi_handle->soc;
|
|
|
+
|
|
|
+ if (!soc->wmi_service_bitmap) {
|
|
|
+ wmi_err("WMI service bit map is not saved yet");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* if wmi_service_enabled was received with extended2 bitmap,
|
|
|
+ * use WMI_SERVICE_EXT2_IS_ENABLED to check the services.
|
|
|
+ */
|
|
|
+ if (soc->wmi_ext2_service_bitmap) {
|
|
|
+ if (!soc->wmi_ext_service_bitmap) {
|
|
|
+ wmi_err("WMI service ext bit map is not saved yet");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return WMI_SERVICE_EXT2_IS_ENABLED(soc->wmi_service_bitmap,
|
|
|
+ soc->wmi_ext_service_bitmap,
|
|
|
+ soc->wmi_ext2_service_bitmap,
|
|
|
+ service_id);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (service_id >= WMI_MAX_EXT_SERVICE) {
|
|
|
+ wmi_err("Service id %d but WMI ext2 service bitmap is NULL",
|
|
|
+ service_id);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ /* if wmi_service_enabled was received with extended bitmap,
|
|
|
+ * use WMI_SERVICE_EXT_IS_ENABLED to check the services.
|
|
|
+ */
|
|
|
+ if (soc->wmi_ext_service_bitmap)
|
|
|
+ return WMI_SERVICE_EXT_IS_ENABLED(soc->wmi_service_bitmap,
|
|
|
+ soc->wmi_ext_service_bitmap,
|
|
|
+ service_id);
|
|
|
+
|
|
|
+ if (service_id >= WMI_MAX_SERVICE) {
|
|
|
+ wmi_err("Service id %d but WMI ext service bitmap is NULL",
|
|
|
+ service_id);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return WMI_SERVICE_IS_ENABLED(soc->wmi_service_bitmap,
|
|
|
+ service_id);
|
|
|
+}
|
|
|
+
|
|
|
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
|
|
|
/**
|
|
|
* send_process_ll_stats_clear_cmd_tlv() - clear link layer stats
|
|
@@ -5287,20 +5341,19 @@ static QDF_STATUS send_process_ll_stats_get_cmd_tlv(wmi_unified_t wmi_handle,
|
|
|
* station request
|
|
|
* @wmi_handle: wmi handle
|
|
|
* @get_req: ll stats get request command params
|
|
|
- * @is_always_over_qmi: flag to send stats request always over qmi
|
|
|
*
|
|
|
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
|
*/
|
|
|
static QDF_STATUS send_unified_ll_stats_get_sta_cmd_tlv(
|
|
|
wmi_unified_t wmi_handle,
|
|
|
- const struct ll_stats_get_params *get_req,
|
|
|
- bool is_always_over_qmi)
|
|
|
+ const struct ll_stats_get_params *get_req)
|
|
|
{
|
|
|
wmi_request_unified_ll_get_sta_cmd_fixed_param *unified_cmd;
|
|
|
int32_t len;
|
|
|
wmi_buf_t buf;
|
|
|
void *buf_ptr;
|
|
|
QDF_STATUS ret;
|
|
|
+ bool is_ll_get_sta_stats_over_qmi;
|
|
|
|
|
|
len = sizeof(*unified_cmd);
|
|
|
buf = wmi_buf_alloc(wmi_handle, len);
|
|
@@ -5340,7 +5393,16 @@ static QDF_STATUS send_unified_ll_stats_get_sta_cmd_tlv(
|
|
|
|
|
|
wmi_mtrace(WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID, get_req->vdev_id, 0);
|
|
|
|
|
|
- if (is_always_over_qmi && wmi_is_qmi_stats_enabled(wmi_handle)) {
|
|
|
+ /**
|
|
|
+ * FW support for LL_get_sta command. True represents the unified
|
|
|
+ * ll_get_sta command should be sent over QMI always irrespective of
|
|
|
+ * WOW state.
|
|
|
+ */
|
|
|
+ is_ll_get_sta_stats_over_qmi = is_service_enabled_tlv(
|
|
|
+ wmi_handle,
|
|
|
+ WMI_SERVICE_UNIFIED_LL_GET_STA_OVER_QMI_SUPPORT);
|
|
|
+
|
|
|
+ if (is_ll_get_sta_stats_over_qmi) {
|
|
|
ret = wmi_unified_cmd_send_over_qmi(
|
|
|
wmi_handle, buf, len,
|
|
|
WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID);
|
|
@@ -8730,60 +8792,6 @@ QDF_STATUS send_adfs_ocac_abort_cmd_tlv(wmi_unified_t wmi_handle,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-/**
|
|
|
- * is_service_enabled_tlv() - Check if service enabled
|
|
|
- * @param wmi_handle: wmi handle
|
|
|
- * @param service_id: service identifier
|
|
|
- *
|
|
|
- * Return: 1 enabled, 0 disabled
|
|
|
- */
|
|
|
-static bool is_service_enabled_tlv(wmi_unified_t wmi_handle,
|
|
|
- uint32_t service_id)
|
|
|
-{
|
|
|
- struct wmi_soc *soc = wmi_handle->soc;
|
|
|
-
|
|
|
- if (!soc->wmi_service_bitmap) {
|
|
|
- wmi_err("WMI service bit map is not saved yet");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- /* if wmi_service_enabled was received with extended2 bitmap,
|
|
|
- * use WMI_SERVICE_EXT2_IS_ENABLED to check the services.
|
|
|
- */
|
|
|
- if (soc->wmi_ext2_service_bitmap) {
|
|
|
- if (!soc->wmi_ext_service_bitmap) {
|
|
|
- wmi_err("WMI service ext bit map is not saved yet");
|
|
|
- return false;
|
|
|
- }
|
|
|
- return WMI_SERVICE_EXT2_IS_ENABLED(soc->wmi_service_bitmap,
|
|
|
- soc->wmi_ext_service_bitmap,
|
|
|
- soc->wmi_ext2_service_bitmap,
|
|
|
- service_id);
|
|
|
- }
|
|
|
-
|
|
|
- if (service_id >= WMI_MAX_EXT_SERVICE) {
|
|
|
- wmi_err("Service id %d but WMI ext2 service bitmap is NULL",
|
|
|
- service_id);
|
|
|
- return false;
|
|
|
- }
|
|
|
- /* if wmi_service_enabled was received with extended bitmap,
|
|
|
- * use WMI_SERVICE_EXT_IS_ENABLED to check the services.
|
|
|
- */
|
|
|
- if (soc->wmi_ext_service_bitmap)
|
|
|
- return WMI_SERVICE_EXT_IS_ENABLED(soc->wmi_service_bitmap,
|
|
|
- soc->wmi_ext_service_bitmap,
|
|
|
- service_id);
|
|
|
-
|
|
|
- if (service_id >= WMI_MAX_SERVICE) {
|
|
|
- wmi_err("Service id %d but WMI ext service bitmap is NULL",
|
|
|
- service_id);
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- return WMI_SERVICE_IS_ENABLED(soc->wmi_service_bitmap,
|
|
|
- service_id);
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* init_cmd_send_tlv() - send initialization cmd to fw
|
|
|
* @wmi_handle: wmi handle
|
|
@@ -15385,7 +15393,6 @@ static void wmi_populate_service_get_sta_in_ll_stats_req(uint32_t *wmi_service)
|
|
|
wmi_service[wmi_service_get_station_in_ll_stats_req] =
|
|
|
WMI_SERVICE_UNIFIED_LL_GET_STA_CMD_SUPPORT;
|
|
|
}
|
|
|
-
|
|
|
#else
|
|
|
static void wmi_populate_service_get_sta_in_ll_stats_req(uint32_t *wmi_service)
|
|
|
{
|