qcacmn: Use correct enum type in function send_get_rcpi_cmd_tlv

Use the wmi enum type in function send_get_rcpi_cmd_tlv converting from
rcpi_measurement_type.

Change-Id: I5b506059ad8b0f4cd65c24e20df6306a47249fdb
CRs-Fixed: 2216017
diff --git a/wmi_unified_tlv.c b/wmi_unified_tlv.c
index 5014df1..d516f0a 100644
--- a/wmi_unified_tlv.c
+++ b/wmi_unified_tlv.c
@@ -21140,7 +21140,33 @@
 	cmd->vdev_id = get_rcpi_param->vdev_id;
 	WMI_CHAR_ARRAY_TO_MAC_ADDR(get_rcpi_param->mac_addr,
 				   &cmd->peer_macaddr);
-	cmd->measurement_type = get_rcpi_param->measurement_type;
+
+	switch (get_rcpi_param->measurement_type) {
+
+	case RCPI_MEASUREMENT_TYPE_AVG_MGMT:
+		cmd->measurement_type = WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT;
+		break;
+
+	case RCPI_MEASUREMENT_TYPE_AVG_DATA:
+		cmd->measurement_type = WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA;
+		break;
+
+	case RCPI_MEASUREMENT_TYPE_LAST_MGMT:
+		cmd->measurement_type = WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT;
+		break;
+
+	case RCPI_MEASUREMENT_TYPE_LAST_DATA:
+		cmd->measurement_type = WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA;
+		break;
+
+	default:
+		/*
+		 * invalid rcpi measurement type, fall back to
+		 * RCPI_MEASUREMENT_TYPE_AVG_MGMT
+		 */
+		cmd->measurement_type = WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT;
+		break;
+	}
 	WMI_LOGD("RCPI REQ VDEV_ID:%d-->", cmd->vdev_id);
 	if (wmi_unified_cmd_send(wmi_handle, buf, len,
 				 WMI_REQUEST_RCPI_CMDID)) {