// SPDX-License-Identifier: ISC /* * Copyright (c) 2012-2015,2017 Qualcomm Atheros, Inc. * Copyright (c) 2018, The Linux Foundation. All rights reserved. */ #include <linux/types.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/seq_file.h> #include "wmi.h" #include "wil6210.h" #include "txrx.h" #include "pmc.h" struct desc_alloc_info { … }; static int wil_is_pmc_allocated(struct pmc_ctx *pmc) { … } void wil_pmc_init(struct wil6210_priv *wil) { … } /* Allocate the physical ring (p-ring) and the required * number of descriptors of required size. * Initialize the descriptors as required by pmc dma. * The descriptors' buffers dwords are initialized to hold * dword's serial number in the lsw and reserved value * PCM_DATA_INVALID_DW_VAL in the msw. */ void wil_pmc_alloc(struct wil6210_priv *wil, int num_descriptors, int descriptor_size) { … } /* Traverse the p-ring and release all buffers. * At the end release the p-ring memory */ void wil_pmc_free(struct wil6210_priv *wil, int send_pmc_cmd) { … } /* Status of the last operation requested via debugfs: alloc/free/read. * 0 - success or negative errno */ int wil_pmc_last_cmd_status(struct wil6210_priv *wil) { … } /* Read from required position up to the end of current descriptor, * depends on descriptor size configured during alloc request. */ ssize_t wil_pmc_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos) { … } loff_t wil_pmc_llseek(struct file *filp, loff_t off, int whence) { … } int wil_pmcring_read(struct seq_file *s, void *data) { … }