drivers/net/wireless/intel/iwlwifi/mld/power.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/power.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/power.c- Extension
.c- Size
- 15103 bytes
- Lines
- 540
- 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
net/mac80211.hmld.hhcmd.hpower.hiface.hlink.hconstants.h
Detected Declarations
function Copyrightfunction iwl_mld_enable_beacon_filterfunction iwl_mld_disable_beacon_filterfunction iwl_mld_power_is_radarfunction iwl_mld_power_configure_uapsd_v2function iwl_mld_power_configure_uapsdfunction iwl_mld_power_config_skip_dtimfunction iwl_mld_power_build_cmd_v2function iwl_mld_power_build_cmdfunction iwl_mld_update_mac_powerfunction iwl_mld_tpe_sta_cmd_datafunction iwl_mld_set_ap_power_typefunction iwl_mld_send_ap_tx_power_constraint_cmdfunction iwl_mld_set_tx_power
Annotated Snippet
if (!tid_found && !link->queue_params[ac].acm) {
tid_found = true;
switch (ac) {
case IEEE80211_AC_VO:
cmd->qndp_tid = 6;
break;
case IEEE80211_AC_VI:
cmd->qndp_tid = 5;
break;
case IEEE80211_AC_BE:
cmd->qndp_tid = 0;
break;
case IEEE80211_AC_BK:
cmd->qndp_tid = 1;
break;
}
}
}
if (cmd->uapsd_ac_flags == (BIT(IEEE80211_AC_VO) |
BIT(IEEE80211_AC_VI) |
BIT(IEEE80211_AC_BE) |
BIT(IEEE80211_AC_BK))) {
cmd->flags |= cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK);
cmd->snooze_interval = cpu_to_le16(IWL_MLD_PS_SNOOZE_INTERVAL);
cmd->snooze_window = cpu_to_le16(IWL_MLD_PS_SNOOZE_WINDOW);
}
cmd->uapsd_max_sp = mld->hw->uapsd_max_sp_len;
}
static void iwl_mld_power_configure_uapsd(struct iwl_mld *mld,
struct iwl_mld_link *link,
struct iwl_mac_power_cmd *cmd,
bool ps_poll)
{
bool tid_found = false;
/* set advanced pm flag with no uapsd ACs to enable ps-poll */
if (ps_poll) {
cmd->flags |= cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK);
return;
}
for (enum ieee80211_ac_numbers ac = IEEE80211_AC_VO;
ac <= IEEE80211_AC_BK;
ac++) {
if (!link->queue_params[ac].uapsd)
continue;
cmd->flags |=
cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK);
cmd->uapsd_ac_flags |= BIT(ac);
/* QNDP TID - the highest TID with no admission control */
if (!tid_found && !link->queue_params[ac].acm) {
tid_found = true;
switch (ac) {
case IEEE80211_AC_VO:
cmd->qndp_tid = 6;
break;
case IEEE80211_AC_VI:
cmd->qndp_tid = 5;
break;
case IEEE80211_AC_BE:
cmd->qndp_tid = 0;
break;
case IEEE80211_AC_BK:
cmd->qndp_tid = 1;
break;
}
}
}
}
static void
iwl_mld_power_config_skip_dtim(struct iwl_mld *mld,
const struct ieee80211_bss_conf *link_conf,
u8 *skip_dtim_periods, __le16 *flags)
{
unsigned int dtimper_tu;
unsigned int dtimper;
unsigned int skip;
dtimper = link_conf->dtim_period ?: 1;
dtimper_tu = dtimper * link_conf->beacon_int;
if (dtimper >= 10 || iwl_mld_power_is_radar(mld, link_conf))
return;
Annotation
- Immediate include surface: `net/mac80211.h`, `mld.h`, `hcmd.h`, `power.h`, `iface.h`, `link.h`, `constants.h`.
- Detected declarations: `function Copyright`, `function iwl_mld_enable_beacon_filter`, `function iwl_mld_disable_beacon_filter`, `function iwl_mld_power_is_radar`, `function iwl_mld_power_configure_uapsd_v2`, `function iwl_mld_power_configure_uapsd`, `function iwl_mld_power_config_skip_dtim`, `function iwl_mld_power_build_cmd_v2`, `function iwl_mld_power_build_cmd`, `function iwl_mld_update_mac_power`.
- 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.