drivers/net/wireless/intel/iwlwifi/mld/mld.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/mld.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/mld.c- Extension
.c- Size
- 21449 bytes
- Lines
- 791
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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
linux/rtnetlink.hnet/mac80211.hfw/api/rx.hfw/api/datapath.hfw/api/commands.hfw/api/offload.hfw/api/coex.hfw/dbg.hfw/uefi.hmld.hmlo.hmac80211.hled.hscan.htx.hsta.hregulatory.hthermal.hlow_latency.hhcmd.hfw/api/location.hiwl-nvm-parse.h
Detected Declarations
function iwl_mld_initfunction iwl_mld_exitfunction iwl_mld_hw_set_regulatoryfunction iwl_construct_mldfunction __acquiresfunction __releasesfunction iwl_mld_d3_debug_enablefunction iwl_mld_fwrt_send_hcmdfunction iwl_mld_construct_fw_runtimefunction iwl_mld_configure_transfunction iwl_op_mode_mld_startfunction iwl_op_mode_mld_stopfunction iwl_mld_queue_state_changefunction iwl_mld_queue_fullfunction iwl_mld_queue_not_fullfunction iwl_mld_set_hw_rfkill_statefunction iwl_mld_free_skbfunction iwl_mld_read_error_recovery_bufferfunction iwl_mld_restart_nicfunction iwl_mld_nic_errorfunction iwl_mld_dump_errorfunction iwl_mld_sw_resetfunction iwl_mld_time_pointfunction iwl_mld_device_powered_offfunction iwl_mld_device_powered_offmodule init iwl_mld_init
Annotated Snippet
module_init(iwl_mld_init);
static void __exit iwl_mld_exit(void)
{
iwl_opmode_deregister("iwlmld");
}
module_exit(iwl_mld_exit);
static void iwl_mld_hw_set_regulatory(struct iwl_mld *mld)
{
struct wiphy *wiphy = mld->wiphy;
wiphy->regulatory_flags |= REGULATORY_WIPHY_SELF_MANAGED;
wiphy->regulatory_flags |= REGULATORY_ENABLE_RELAX_NO_IR;
}
VISIBLE_IF_IWLWIFI_KUNIT
void iwl_construct_mld(struct iwl_mld *mld, struct iwl_trans *trans,
const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw,
struct ieee80211_hw *hw, struct dentry *dbgfs_dir)
{
mld->dev = trans->dev;
mld->trans = trans;
mld->cfg = cfg;
mld->fw = fw;
mld->hw = hw;
mld->wiphy = hw->wiphy;
mld->debugfs_dir = dbgfs_dir;
iwl_notification_wait_init(&mld->notif_wait);
/* Setup async RX handling */
spin_lock_init(&mld->async_handlers_lock);
INIT_LIST_HEAD(&mld->async_handlers_list);
wiphy_work_init(&mld->async_handlers_wk,
iwl_mld_async_handlers_wk);
/* Dynamic Queue Allocation */
spin_lock_init(&mld->add_txqs_lock);
INIT_LIST_HEAD(&mld->txqs_to_add);
wiphy_work_init(&mld->add_txqs_wk, iwl_mld_add_txqs_wk);
/* Setup RX queues sync wait queue */
init_waitqueue_head(&mld->rxq_sync.waitq);
}
EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_construct_mld);
static void __acquires(&mld->wiphy->mtx)
iwl_mld_fwrt_dump_start(void *ctx)
{
struct iwl_mld *mld = ctx;
wiphy_lock(mld->wiphy);
}
static void __releases(&mld->wiphy->mtx)
iwl_mld_fwrt_dump_end(void *ctx)
{
struct iwl_mld *mld = ctx;
wiphy_unlock(mld->wiphy);
}
static bool iwl_mld_d3_debug_enable(void *ctx)
{
return IWL_MLD_D3_DEBUG;
}
static int iwl_mld_fwrt_send_hcmd(void *ctx, struct iwl_host_cmd *host_cmd)
{
struct iwl_mld *mld = (struct iwl_mld *)ctx;
int ret;
wiphy_lock(mld->wiphy);
ret = iwl_mld_send_cmd(mld, host_cmd);
wiphy_unlock(mld->wiphy);
return ret;
}
static const struct iwl_fw_runtime_ops iwl_mld_fwrt_ops = {
.dump_start = iwl_mld_fwrt_dump_start,
.dump_end = iwl_mld_fwrt_dump_end,
.send_hcmd = iwl_mld_fwrt_send_hcmd,
.d3_debug_enable = iwl_mld_d3_debug_enable,
};
static void
iwl_mld_construct_fw_runtime(struct iwl_mld *mld, struct iwl_trans *trans,
const struct iwl_fw *fw,
Annotation
- Immediate include surface: `linux/rtnetlink.h`, `net/mac80211.h`, `fw/api/rx.h`, `fw/api/datapath.h`, `fw/api/commands.h`, `fw/api/offload.h`, `fw/api/coex.h`, `fw/dbg.h`.
- Detected declarations: `function iwl_mld_init`, `function iwl_mld_exit`, `function iwl_mld_hw_set_regulatory`, `function iwl_construct_mld`, `function __acquires`, `function __releases`, `function iwl_mld_d3_debug_enable`, `function iwl_mld_fwrt_send_hcmd`, `function iwl_mld_construct_fw_runtime`, `function iwl_mld_configure_trans`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.