drivers/net/wireless/intel/iwlwifi/mld/debugfs.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/debugfs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/debugfs.h- Extension
.h- Size
- 8214 bytes
- Lines
- 245
- 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.
- 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
iface.hsta.h
Detected Declarations
function _iwl_dbgfs_releasefunction iwl_mld_from_link_stafunction iwl_mld_from_bss_conf
Annotated Snippet
static const struct file_operations iwl_dbgfs_##name##_ops = { \
.read = _iwl_dbgfs_##name##_read, \
.open = _iwl_dbgfs_##name##_open, \
.llseek = generic_file_llseek, \
.release = _iwl_dbgfs_release, \
}
#define WIPHY_DEBUGFS_WRITE_HANDLER_WRAPPER(name) \
static ssize_t iwl_dbgfs_##name##_write_handler(struct wiphy *wiphy, \
struct file *file, char *buf, \
size_t count, void *data) \
{ \
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); \
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw); \
return iwl_dbgfs_##name##_write(mld, buf, count, data); \
}
static inline struct iwl_mld *
iwl_mld_from_link_sta(struct ieee80211_link_sta *link_sta)
{
struct ieee80211_vif *vif =
iwl_mld_sta_from_mac80211(link_sta->sta)->vif;
return iwl_mld_vif_from_mac80211(vif)->mld;
}
static inline struct iwl_mld *
iwl_mld_from_bss_conf(struct ieee80211_bss_conf *link)
{
return iwl_mld_vif_from_mac80211(link->vif)->mld;
}
static inline struct iwl_mld *iwl_mld_from_vif(struct ieee80211_vif *vif)
{
return iwl_mld_vif_from_mac80211(vif)->mld;
}
#define WIPHY_DEBUGFS_WRITE_WRAPPER(name, bufsz, objtype) \
WIPHY_DEBUGFS_WRITE_HANDLER_WRAPPER(name) \
static ssize_t __iwl_dbgfs_##name##_write(struct file *file, \
const char __user *user_buf, \
size_t count, loff_t *ppos) \
{ \
struct ieee80211_##objtype *arg = file->private_data; \
struct iwl_mld *mld = iwl_mld_from_##objtype(arg); \
char buf[bufsz] = {}; \
\
return wiphy_locked_debugfs_write(mld->wiphy, file, \
buf, sizeof(buf), \
user_buf, count, \
iwl_dbgfs_##name##_write_handler, \
arg); \
}
#define WIPHY_DEBUGFS_WRITE_FILE_OPS(name, bufsz, objtype) \
WIPHY_DEBUGFS_WRITE_WRAPPER(name, bufsz, objtype) \
static const struct file_operations iwl_dbgfs_##name##_ops = { \
.write = __iwl_dbgfs_##name##_write, \
.open = simple_open, \
.llseek = generic_file_llseek, \
}
#define WIPHY_DEBUGFS_READ_HANDLER_WRAPPER_MLD(name) \
static ssize_t iwl_dbgfs_##name##_read_handler(struct wiphy *wiphy, \
struct file *file, char *buf, \
size_t count, void *data) \
{ \
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); \
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw); \
return iwl_dbgfs_##name##_read(mld, buf, count); \
}
#define WIPHY_DEBUGFS_WRITE_HANDLER_WRAPPER_MLD(name) \
static ssize_t iwl_dbgfs_##name##_write_handler(struct wiphy *wiphy, \
struct file *file, char *buf, \
size_t count, void *data) \
{ \
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); \
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw); \
return iwl_dbgfs_##name##_write(mld, buf, count); \
}
#define WIPHY_DEBUGFS_WRITE_WRAPPER_MLD(name) \
WIPHY_DEBUGFS_WRITE_HANDLER_WRAPPER_MLD(name) \
static ssize_t __iwl_dbgfs_##name##_write(struct file *file, \
const char __user *user_buf, \
size_t count, loff_t *ppos) \
{ \
struct dbgfs_##name##_data *data = file->private_data; \
struct iwl_mld *mld = data->arg; \
\
Annotation
- Immediate include surface: `iface.h`, `sta.h`.
- Detected declarations: `function _iwl_dbgfs_release`, `function iwl_mld_from_link_sta`, `function iwl_mld_from_bss_conf`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern 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.