drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c- Extension
.c- Size
- 8453 bytes
- Lines
- 307
- 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.
- 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
mvm.h
Detected Declarations
function Copyrightfunction iwl_mvm_mld_mac_ctxt_cmd_commonfunction iwl_mvm_mld_mac_ctxt_send_cmdfunction iwl_mvm_mld_mac_ctxt_cmd_stafunction iwl_mvm_mld_mac_ctxt_cmd_listenerfunction iwl_mvm_mld_mac_ctxt_cmd_ibssfunction iwl_mvm_mld_mac_ctxt_cmd_p2p_devicefunction iwl_mvm_mld_mac_ctxt_cmd_ap_gofunction iwl_mvm_mld_mac_ctx_sendfunction iwl_mvm_mld_mac_ctxt_addfunction iwl_mvm_mld_mac_ctxt_changedfunction iwl_mvm_mld_mac_ctxt_remove
Annotated Snippet
if (link_conf->eht_support) {
if (cmd_ver == 2)
cmd->wifi_gen_v2.eht_support = cpu_to_le32(1);
else
cmd->wifi_gen.eht_support = 1;
break;
}
}
rcu_read_unlock();
}
static int iwl_mvm_mld_mac_ctxt_send_cmd(struct iwl_mvm *mvm,
struct iwl_mac_config_cmd_v3 *cmd)
{
int ret = iwl_mvm_send_cmd_pdu(mvm,
WIDE_ID(MAC_CONF_GROUP, MAC_CONFIG_CMD),
0, sizeof(*cmd), cmd);
if (ret)
IWL_ERR(mvm, "Failed to send MAC_CONFIG_CMD (action:%d): %d\n",
le32_to_cpu(cmd->action), ret);
return ret;
}
static int iwl_mvm_mld_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
struct ieee80211_vif *vif,
u32 action, bool force_assoc_off)
{
struct iwl_mac_config_cmd_v3 cmd = {};
WARN_ON(vif->type != NL80211_IFTYPE_STATION);
/* Fill the common data for all mac context types */
iwl_mvm_mld_mac_ctxt_cmd_common(mvm, vif, &cmd, action);
/*
* We always want to hear MCAST frames, if we're not authorized yet,
* we'll drop them.
*/
cmd.filter_flags |= cpu_to_le32(MAC_CFG_FILTER_ACCEPT_GRP);
if (vif->p2p)
cmd.client.ctwin =
iwl_mvm_mac_ctxt_cmd_p2p_sta_get_oppps_ctwin(mvm, vif);
if (vif->cfg.assoc && !force_assoc_off) {
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
cmd.client.is_assoc = 1;
if (!mvmvif->authorized &&
fw_has_capa(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_CAPA_COEX_HIGH_PRIO))
cmd.client.data_policy |=
cpu_to_le16(COEX_HIGH_PRIORITY_ENABLE);
} else {
cmd.client.is_assoc = 0;
/* Allow beacons to pass through as long as we are not
* associated, or we do not have dtim period information.
*/
cmd.filter_flags |= cpu_to_le32(MAC_CFG_FILTER_ACCEPT_BEACON);
}
cmd.client.assoc_id = cpu_to_le16(vif->cfg.aid);
if (vif->probe_req_reg && vif->cfg.assoc && vif->p2p)
cmd.filter_flags |= cpu_to_le32(MAC_CFG_FILTER_ACCEPT_PROBE_REQ);
if (vif->bss_conf.he_support && !iwlwifi_mod_params.disable_11ax)
cmd.client.data_policy |=
cpu_to_le16(iwl_mvm_mac_ctxt_cmd_sta_get_twt_policy(mvm, vif));
return iwl_mvm_mld_mac_ctxt_send_cmd(mvm, &cmd);
}
static int iwl_mvm_mld_mac_ctxt_cmd_listener(struct iwl_mvm *mvm,
struct ieee80211_vif *vif,
u32 action)
{
struct iwl_mac_config_cmd_v3 cmd = {};
WARN_ON(vif->type != NL80211_IFTYPE_MONITOR);
iwl_mvm_mld_mac_ctxt_cmd_common(mvm, vif, &cmd, action);
cmd.filter_flags = cpu_to_le32(MAC_CFG_FILTER_PROMISC |
MAC_CFG_FILTER_ACCEPT_CONTROL_AND_MGMT |
MAC_CFG_FILTER_ACCEPT_BEACON |
MAC_CFG_FILTER_ACCEPT_PROBE_REQ |
Annotation
- Immediate include surface: `mvm.h`.
- Detected declarations: `function Copyright`, `function iwl_mvm_mld_mac_ctxt_cmd_common`, `function iwl_mvm_mld_mac_ctxt_send_cmd`, `function iwl_mvm_mld_mac_ctxt_cmd_sta`, `function iwl_mvm_mld_mac_ctxt_cmd_listener`, `function iwl_mvm_mld_mac_ctxt_cmd_ibss`, `function iwl_mvm_mld_mac_ctxt_cmd_p2p_device`, `function iwl_mvm_mld_mac_ctxt_cmd_ap_go`, `function iwl_mvm_mld_mac_ctx_send`, `function iwl_mvm_mld_mac_ctxt_add`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.