drivers/net/wireless/rsi/rsi_91x_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/rsi/rsi_91x_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/rsi/rsi_91x_debugfs.c- Extension
.c- Size
- 9914 bytes
- Lines
- 329
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
rsi_debugfs.hrsi_sdio.h
Detected Declarations
function Copyrightfunction rsi_sdio_stats_openfunction rsi_version_readfunction rsi_version_openfunction rsi_stats_readfunction rsi_stats_openfunction rsi_debug_zone_readfunction rsi_debug_readfunction rsi_debug_zone_writefunction rsi_init_dbgfsfunction rsi_remove_dbgfsexport rsi_init_dbgfsexport rsi_remove_dbgfs
Annotated Snippet
#include "rsi_debugfs.h"
#include "rsi_sdio.h"
/**
* rsi_sdio_stats_read() - This function returns the sdio status of the driver.
* @seq: Pointer to the sequence file structure.
* @data: Pointer to the data.
*
* Return: 0 on success, -1 on failure.
*/
static int rsi_sdio_stats_read(struct seq_file *seq, void *data)
{
struct rsi_common *common = seq->private;
struct rsi_hw *adapter = common->priv;
struct rsi_91x_sdiodev *dev = adapter->rsi_dev;
seq_printf(seq, "total_sdio_interrupts: %d\n",
dev->rx_info.sdio_int_counter);
seq_printf(seq, "sdio_msdu_pending_intr_count: %d\n",
dev->rx_info.total_sdio_msdu_pending_intr);
seq_printf(seq, "sdio_buff_full_count : %d\n",
dev->rx_info.buf_full_counter);
seq_printf(seq, "sdio_buf_semi_full_count %d\n",
dev->rx_info.buf_semi_full_counter);
seq_printf(seq, "sdio_unknown_intr_count: %d\n",
dev->rx_info.total_sdio_unknown_intr);
/* RX Path Stats */
seq_printf(seq, "BUFFER FULL STATUS : %d\n",
dev->rx_info.buffer_full);
seq_printf(seq, "SEMI BUFFER FULL STATUS : %d\n",
dev->rx_info.semi_buffer_full);
seq_printf(seq, "MGMT BUFFER FULL STATUS : %d\n",
dev->rx_info.mgmt_buffer_full);
seq_printf(seq, "BUFFER FULL COUNTER : %d\n",
dev->rx_info.buf_full_counter);
seq_printf(seq, "BUFFER SEMI FULL COUNTER : %d\n",
dev->rx_info.buf_semi_full_counter);
seq_printf(seq, "MGMT BUFFER FULL COUNTER : %d\n",
dev->rx_info.mgmt_buf_full_counter);
return 0;
}
/**
* rsi_sdio_stats_open() - This function calls single open function of seq_file
* to open file and read contents from it.
* @inode: Pointer to the inode structure.
* @file: Pointer to the file structure.
*
* Return: Pointer to the opened file status: 0 on success, ENOMEM on failure.
*/
static int rsi_sdio_stats_open(struct inode *inode,
struct file *file)
{
return single_open(file, rsi_sdio_stats_read, inode->i_private);
}
/**
* rsi_version_read() - This function gives driver and firmware version number.
* @seq: Pointer to the sequence file structure.
* @data: Pointer to the data.
*
* Return: 0 on success, -1 on failure.
*/
static int rsi_version_read(struct seq_file *seq, void *data)
{
struct rsi_common *common = seq->private;
seq_printf(seq, "LMAC : %d.%d.%d.%d\n",
common->lmac_ver.major,
common->lmac_ver.minor,
common->lmac_ver.release_num,
common->lmac_ver.patch_num);
return 0;
}
/**
* rsi_version_open() - This function calls single open function of seq_file to
* open file and read contents from it.
* @inode: Pointer to the inode structure.
* @file: Pointer to the file structure.
*
* Return: Pointer to the opened file status: 0 on success, ENOMEM on failure.
*/
static int rsi_version_open(struct inode *inode,
struct file *file)
{
return single_open(file, rsi_version_read, inode->i_private);
}
Annotation
- Immediate include surface: `rsi_debugfs.h`, `rsi_sdio.h`.
- Detected declarations: `function Copyright`, `function rsi_sdio_stats_open`, `function rsi_version_read`, `function rsi_version_open`, `function rsi_stats_read`, `function rsi_stats_open`, `function rsi_debug_zone_read`, `function rsi_debug_read`, `function rsi_debug_zone_write`, `function rsi_init_dbgfs`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.