drivers/net/wireless/marvell/mwifiex/debugfs.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/marvell/mwifiex/debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/marvell/mwifiex/debugfs.c- Extension
.c- Size
- 26326 bytes
- Lines
- 1007
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.hmain.h11n.h
Detected Declarations
function mwifiex_info_readfunction mwifiex_getlog_readfunction mwifiex_histogram_readfunction mwifiex_histogram_writefunction mwifiex_debug_readfunction mwifiex_regrdwr_writefunction mwifiex_regrdwr_readfunction mwifiex_debug_mask_readfunction mwifiex_debug_mask_writefunction mwifiex_verext_writefunction mwifiex_verext_readfunction mwifiex_memrw_writefunction mwifiex_memrw_readfunction mwifiex_rdeeprom_writefunction mwifiex_rdeeprom_readfunction mwifiex_hscfg_writefunction mwifiex_hscfg_readfunction mwifiex_timeshare_coex_readfunction mwifiex_timeshare_coex_writefunction mwifiex_reset_writefunction mwifiex_dev_debugfs_initfunction mwifiex_dev_debugfs_removefunction mwifiex_debugfs_initfunction mwifiex_debugfs_remove
Annotated Snippet
static const struct file_operations mwifiex_dfs_##name##_fops = { \
.read = mwifiex_##name##_read, \
.write = mwifiex_##name##_write, \
.open = simple_open, \
};
#define MWIFIEX_DFS_FILE_READ_OPS(name) \
static const struct file_operations mwifiex_dfs_##name##_fops = { \
.read = mwifiex_##name##_read, \
.open = simple_open, \
};
#define MWIFIEX_DFS_FILE_WRITE_OPS(name) \
static const struct file_operations mwifiex_dfs_##name##_fops = { \
.write = mwifiex_##name##_write, \
.open = simple_open, \
};
MWIFIEX_DFS_FILE_READ_OPS(info);
MWIFIEX_DFS_FILE_READ_OPS(debug);
MWIFIEX_DFS_FILE_READ_OPS(getlog);
MWIFIEX_DFS_FILE_OPS(regrdwr);
MWIFIEX_DFS_FILE_OPS(rdeeprom);
MWIFIEX_DFS_FILE_OPS(memrw);
MWIFIEX_DFS_FILE_OPS(hscfg);
MWIFIEX_DFS_FILE_OPS(histogram);
MWIFIEX_DFS_FILE_OPS(debug_mask);
MWIFIEX_DFS_FILE_OPS(timeshare_coex);
MWIFIEX_DFS_FILE_WRITE_OPS(reset);
MWIFIEX_DFS_FILE_OPS(verext);
/*
* This function creates the debug FS directory structure and the files.
*/
void
mwifiex_dev_debugfs_init(struct mwifiex_private *priv)
{
if (!mwifiex_dfs_dir || !priv)
return;
priv->dfs_dev_dir = debugfs_create_dir(priv->netdev->name,
mwifiex_dfs_dir);
MWIFIEX_DFS_ADD_FILE(info);
MWIFIEX_DFS_ADD_FILE(debug);
MWIFIEX_DFS_ADD_FILE(getlog);
MWIFIEX_DFS_ADD_FILE(regrdwr);
MWIFIEX_DFS_ADD_FILE(rdeeprom);
MWIFIEX_DFS_ADD_FILE(memrw);
MWIFIEX_DFS_ADD_FILE(hscfg);
MWIFIEX_DFS_ADD_FILE(histogram);
MWIFIEX_DFS_ADD_FILE(debug_mask);
MWIFIEX_DFS_ADD_FILE(timeshare_coex);
MWIFIEX_DFS_ADD_FILE(reset);
MWIFIEX_DFS_ADD_FILE(verext);
}
/*
* This function removes the debug FS directory structure and the files.
*/
void
mwifiex_dev_debugfs_remove(struct mwifiex_private *priv)
{
if (!priv)
return;
debugfs_remove_recursive(priv->dfs_dev_dir);
}
/*
* This function creates the top level proc directory.
*/
void
mwifiex_debugfs_init(void)
{
if (!mwifiex_dfs_dir)
mwifiex_dfs_dir = debugfs_create_dir("mwifiex", NULL);
}
/*
* This function removes the top level proc directory.
*/
void
mwifiex_debugfs_remove(void)
{
debugfs_remove(mwifiex_dfs_dir);
}
Annotation
- Immediate include surface: `linux/debugfs.h`, `main.h`, `11n.h`.
- Detected declarations: `function mwifiex_info_read`, `function mwifiex_getlog_read`, `function mwifiex_histogram_read`, `function mwifiex_histogram_write`, `function mwifiex_debug_read`, `function mwifiex_regrdwr_write`, `function mwifiex_regrdwr_read`, `function mwifiex_debug_mask_read`, `function mwifiex_debug_mask_write`, `function mwifiex_verext_write`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.