linux/drivers/net/wwan/iosm/iosm_ipc_trace.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2020-2021 Intel Corporation.
 */

#include <linux/wwan.h>
#include "iosm_ipc_trace.h"

/* sub buffer size and number of sub buffer */
#define IOSM_TRC_SUB_BUFF_SIZE
#define IOSM_TRC_N_SUB_BUFF

#define IOSM_TRC_FILE_PERM

#define IOSM_TRC_DEBUGFS_TRACE
#define IOSM_TRC_DEBUGFS_TRACE_CTRL

/**
 * ipc_trace_port_rx - Receive trace packet from cp and write to relay buffer
 * @ipc_imem:   Pointer to iosm_imem structure
 * @skb:        Pointer to struct sk_buff
 */
void ipc_trace_port_rx(struct iosm_imem *ipc_imem, struct sk_buff *skb)
{}

/* Creates relay file in debugfs. */
static struct dentry *
ipc_trace_create_buf_file_handler(const char *filename,
				  struct dentry *parent,
				  umode_t mode,
				  struct rchan_buf *buf,
				  int *is_global)
{}

/* Removes relay file from debugfs. */
static int ipc_trace_remove_buf_file_handler(struct dentry *dentry)
{}

static int ipc_trace_subbuf_start_handler(struct rchan_buf *buf, void *subbuf,
					  void *prev_subbuf,
					  size_t prev_padding)
{}

/* Relay interface callbacks */
static struct rchan_callbacks relay_callbacks =;

/* Copy the trace control mode to user buffer */
static ssize_t ipc_trace_ctrl_file_read(struct file *filp, char __user *buffer,
					size_t count, loff_t *ppos)
{}

/* Open and close the trace channel depending on user input */
static ssize_t ipc_trace_ctrl_file_write(struct file *filp,
					 const char __user *buffer,
					 size_t count, loff_t *ppos)
{}

static const struct file_operations ipc_trace_fops =;

/**
 * ipc_trace_init - Create trace interface & debugfs entries
 * @ipc_imem:   Pointer to iosm_imem structure
 *
 * Returns: Pointer to trace instance on success else NULL
 */
struct iosm_trace *ipc_trace_init(struct iosm_imem *ipc_imem)
{}

/**
 * ipc_trace_deinit - Closing relayfs, removing debugfs entries
 * @ipc_trace: Pointer to the iosm_trace data struct
 */
void ipc_trace_deinit(struct iosm_trace *ipc_trace)
{}