drivers/net/wireless/intel/iwlwifi/fw/dbg.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/fw/dbg.h- Extension
.h- Size
- 10191 bytes
- Lines
- 350
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/workqueue.hnet/cfg80211.hruntime.hiwl-prph.hiwl-io.hfile.herror-dump.hapi/commands.hapi/dbg-tlv.hapi/alive.h
Detected Declarations
struct iwl_fw_dump_descstruct iwl_fw_dbg_paramsfunction _iwl_fw_dbg_get_triggerfunction iwl_fw_dbg_trigger_vif_matchfunction iwl_fw_dbg_trigger_stop_conf_matchfunction iwl_fw_dbg_no_trig_windowfunction iwl_fw_dbg_trigger_check_stopfunction _iwl_fw_dbg_trigger_onfunction _iwl_fw_dbg_trigger_simple_stopfunction iwl_fw_set_dbg_rec_onfunction iwl_fw_dump_conf_clearfunction iwl_fw_dbg_type_onfunction iwl_fw_dbg_is_d3_debug_enabledfunction iwl_fw_dbg_is_paging_enabledfunction iwl_fw_flush_dumpsfunction iwl_fw_cancel_timestampfunction iwl_fw_suspend_timestampfunction iwl_fw_resume_timestampfunction iwl_fw_cancel_timestampfunction iwl_fw_lmac1_set_alive_err_tablefunction iwl_fw_umac_set_alive_err_tablefunction iwl_fw_error_collectfunction iwl_fwrt_update_fw_versions
Annotated Snippet
struct iwl_fw_dump_desc {
size_t len;
/* must be last */
struct iwl_fw_error_dump_trigger_desc trig_desc;
};
/**
* struct iwl_fw_dbg_params - register values to restore
* @in_sample: DBGC_IN_SAMPLE value
* @out_ctrl: DBGC_OUT_CTRL value
*/
struct iwl_fw_dbg_params {
u32 in_sample;
u32 out_ctrl;
};
/* old-style dump entry point */
void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt,
struct iwl_fwrt_dump_data *dump_data);
struct scatterlist *iwl_fw_dbg_alloc_sgtable(ssize_t size);
extern const struct iwl_fw_dump_desc iwl_dump_desc_assert;
int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
const struct iwl_fw_dump_desc *desc,
bool monitor_only, unsigned int delay);
int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt,
enum iwl_fw_dbg_trigger trig_type);
int iwl_fw_dbg_ini_collect(struct iwl_fw_runtime *fwrt,
struct iwl_fwrt_dump_data *dump_data,
bool sync);
int iwl_fw_dbg_collect(struct iwl_fw_runtime *fwrt,
enum iwl_fw_dbg_trigger trig, const char *str,
size_t len, struct iwl_fw_dbg_trigger_tlv *trigger);
int iwl_fw_dbg_collect_trig(struct iwl_fw_runtime *fwrt,
struct iwl_fw_dbg_trigger_tlv *trigger,
const char *fmt, ...) __printf(3, 4);
int iwl_fw_start_dbg_conf(struct iwl_fw_runtime *fwrt, u8 id);
#define iwl_fw_dbg_trigger_enabled(fw, id) ({ \
void *__dbg_trigger = (fw)->dbg.trigger_tlv[(id)]; \
unlikely(__dbg_trigger); \
})
static inline struct iwl_fw_dbg_trigger_tlv*
_iwl_fw_dbg_get_trigger(const struct iwl_fw *fw, enum iwl_fw_dbg_trigger id)
{
return fw->dbg.trigger_tlv[id];
}
#define iwl_fw_dbg_get_trigger(fw, id) ({ \
BUILD_BUG_ON(!__builtin_constant_p(id)); \
BUILD_BUG_ON((id) >= FW_DBG_TRIGGER_MAX); \
_iwl_fw_dbg_get_trigger((fw), (id)); \
})
static inline bool
iwl_fw_dbg_trigger_vif_match(struct iwl_fw_dbg_trigger_tlv *trig,
struct wireless_dev *wdev)
{
u32 trig_vif = le32_to_cpu(trig->vif_type);
return trig_vif == IWL_FW_DBG_CONF_VIF_ANY ||
wdev->iftype == trig_vif;
}
static inline bool
iwl_fw_dbg_trigger_stop_conf_match(struct iwl_fw_runtime *fwrt,
struct iwl_fw_dbg_trigger_tlv *trig)
{
return ((trig->mode & IWL_FW_DBG_TRIGGER_STOP) &&
(fwrt->dump.conf == FW_DBG_INVALID ||
(BIT(fwrt->dump.conf) & le32_to_cpu(trig->stop_conf_ids))));
}
static inline bool
iwl_fw_dbg_no_trig_window(struct iwl_fw_runtime *fwrt, u32 id, u32 dis_usec)
{
unsigned long wind_jiff = usecs_to_jiffies(dis_usec);
/* If this is the first event checked, jump to update start ts */
if (fwrt->dump.non_collect_ts_start[id] &&
(time_after(fwrt->dump.non_collect_ts_start[id] + wind_jiff,
jiffies)))
return true;
fwrt->dump.non_collect_ts_start[id] = jiffies;
return false;
}
Annotation
- Immediate include surface: `linux/workqueue.h`, `net/cfg80211.h`, `runtime.h`, `iwl-prph.h`, `iwl-io.h`, `file.h`, `error-dump.h`, `api/commands.h`.
- Detected declarations: `struct iwl_fw_dump_desc`, `struct iwl_fw_dbg_params`, `function _iwl_fw_dbg_get_trigger`, `function iwl_fw_dbg_trigger_vif_match`, `function iwl_fw_dbg_trigger_stop_conf_match`, `function iwl_fw_dbg_no_trig_window`, `function iwl_fw_dbg_trigger_check_stop`, `function _iwl_fw_dbg_trigger_on`, `function _iwl_fw_dbg_trigger_simple_stop`, `function iwl_fw_set_dbg_rec_on`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.