drivers/net/wireless/intel/iwlwifi/mld/iface.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/iface.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/iface.c- Extension
.c- Size
- 24625 bytes
- Lines
- 875
- 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.
- 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
net/cfg80211.hiface.hnan.hhcmd.hkey.hmlo.hmac80211.hfw/api/context.hfw/api/mac.hfw/api/time-event.hfw/api/datapath.h
Detected Declarations
struct iwl_mld_mac_wifi_gen_sta_iter_datafunction Copyrightfunction for_each_mld_vif_valid_linkfunction iwl_mld_send_mac_cmdfunction iwl_mld_mac80211_iftype_to_fwfunction iwl_mld_is_nic_ack_enabledfunction iwl_mld_mac_wifi_gen_sta_iterfunction for_each_sta_active_linkfunction iwl_mld_set_wifi_genfunction for_each_vif_active_linkfunction stationfunction iwl_mld_mac_cmd_fill_commonfunction iwl_mld_fill_mac_cmd_stafunction for_each_vif_active_linkfunction iwl_mld_fill_mac_cmd_apfunction iwl_mld_go_iteratorfunction iwl_mld_p2p_dev_has_extended_discfunction iwl_mld_fill_mac_cmd_p2p_devfunction iwl_mld_fill_mac_cmd_ibssfunction iwl_mld_fill_mac_cmd_nanfunction for_each_active_interfacefunction iwl_mld_rm_mac_from_fwfunction __iwl_mld_mac_fw_actionfunction iwl_mld_mac_fw_actionfunction iwl_mld_mlo_scan_start_wkfunction iwl_mld_init_viffunction iwl_mld_update_nan_macfunction iwl_mld_add_viffunction iwl_mld_add_nan_viffunction iwl_mld_rm_viffunction iwl_mld_set_vif_associatedfunction for_each_vif_active_linkfunction iwl_mld_get_fw_id_bss_bitmap_iterfunction iwl_mld_get_fw_bss_vifs_idsfunction iwl_mld_handle_probe_resp_data_notiffunction iwl_mld_handle_datapath_monitor_notiffunction iwl_mld_reset_cca_40mhz_workaround
Annotated Snippet
struct iwl_mld_mac_wifi_gen_sta_iter_data {
struct ieee80211_vif *vif;
struct iwl_mac_wifi_gen_support *support;
};
static void iwl_mld_mac_wifi_gen_sta_iter(void *_data,
struct ieee80211_sta *sta)
{
struct iwl_mld_sta *mld_sta = iwl_mld_sta_from_mac80211(sta);
struct iwl_mld_mac_wifi_gen_sta_iter_data *data = _data;
struct ieee80211_link_sta *link_sta;
unsigned int link_id;
if (mld_sta->vif != data->vif)
return;
for_each_sta_active_link(data->vif, sta, link_sta, link_id) {
if (link_sta->he_cap.has_he)
data->support->he_support = 1;
if (link_sta->eht_cap.has_eht)
data->support->eht_support = 1;
}
}
static void iwl_mld_set_wifi_gen(struct iwl_mld *mld,
struct ieee80211_vif *vif,
struct iwl_mac_wifi_gen_support *support)
{
struct iwl_mld_mac_wifi_gen_sta_iter_data sta_iter_data = {
.vif = vif,
.support = support,
};
struct ieee80211_bss_conf *link_conf;
unsigned int link_id;
switch (vif->type) {
case NL80211_IFTYPE_MONITOR:
/* for sniffer, set to HW capabilities */
support->he_support = 1;
support->eht_support = mld->trans->cfg->eht_supported;
break;
case NL80211_IFTYPE_AP:
/* for AP set according to the link configs */
for_each_vif_active_link(vif, link_conf, link_id) {
support->he_ap_support |= link_conf->he_support;
support->eht_support |= link_conf->eht_support;
}
break;
default:
/*
* If we have MLO enabled, then the firmware needs to enable
* address translation for the station(s) we add. That depends
* on having EHT enabled in firmware, which in turn depends on
* mac80211 in the iteration below.
* However, mac80211 doesn't enable capabilities on the AP STA
* until it has parsed the association response successfully,
* so set EHT (and HE as a pre-requisite for EHT) when the vif
* is an MLD.
*/
if (ieee80211_vif_is_mld(vif)) {
support->he_support = 1;
support->eht_support = 1;
}
ieee80211_iterate_stations_mtx(mld->hw,
iwl_mld_mac_wifi_gen_sta_iter,
&sta_iter_data);
break;
}
}
/* fill the common part for all interface types */
static void iwl_mld_mac_cmd_fill_common(struct iwl_mld *mld,
struct ieee80211_vif *vif,
struct iwl_mac_config_cmd *cmd,
u32 action)
{
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
lockdep_assert_wiphy(mld->wiphy);
cmd->id_and_color = cpu_to_le32(mld_vif->fw_id);
cmd->action = cpu_to_le32(action);
cmd->mac_type =
cpu_to_le32(iwl_mld_mac80211_iftype_to_fw(vif));
memcpy(cmd->local_mld_addr, vif->addr, ETH_ALEN);
if (iwlwifi_mod_params.disable_11ax)
Annotation
- Immediate include surface: `net/cfg80211.h`, `iface.h`, `nan.h`, `hcmd.h`, `key.h`, `mlo.h`, `mac80211.h`, `fw/api/context.h`.
- Detected declarations: `struct iwl_mld_mac_wifi_gen_sta_iter_data`, `function Copyright`, `function for_each_mld_vif_valid_link`, `function iwl_mld_send_mac_cmd`, `function iwl_mld_mac80211_iftype_to_fw`, `function iwl_mld_is_nic_ack_enabled`, `function iwl_mld_mac_wifi_gen_sta_iter`, `function for_each_sta_active_link`, `function iwl_mld_set_wifi_gen`, `function for_each_vif_active_link`.
- 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.