drivers/net/wireless/intel/iwlwifi/mld/ap.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/ap.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/ap.c- Extension
.c- Size
- 10604 bytes
- Lines
- 408
- 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/crc32.hnet/mac80211.hap.hhcmd.htx.hkey.hphy.hiwl-utils.hfw/api/sta.h
Detected Declarations
function Copyrightfunction iwl_mld_get_rate_flagsfunction iwl_mld_send_beacon_template_cmdfunction iwl_mld_fill_beacon_template_cmdfunction iwl_mld_update_beacon_templatefunction iwl_mld_free_ap_early_keyfunction iwl_mld_store_ap_early_keyfunction iwl_mld_stop_beaconfunction iwl_mld_link_info_changed_ap_ibssfunction iwl_mld_send_ap_early_keysfunction iwl_mld_start_ap_ibssfunction iwl_mld_stop_ap_ibss
Annotated Snippet
if (!link->ap_early_keys[i]) {
link->ap_early_keys[i] = key;
return 0;
}
}
return -ENOSPC;
}
static void iwl_mld_stop_beacon(struct iwl_mld *mld, struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link)
{
struct iwl_mld_link *mld_link = iwl_mld_link_from_mac80211(link);
struct iwl_mac_beacon_cmd cmd = {};
int cmd_ver = iwl_fw_lookup_cmd_ver(mld->fw, BEACON_TEMPLATE_CMD, 14);
if (WARN_ON(!mld_link))
return;
if (cmd_ver < 15)
return;
/* leave byte_cnt 0 */
cmd.link_id = cpu_to_le32(mld_link->fw_id);
iwl_mld_send_cmd_pdu(mld, BEACON_TEMPLATE_CMD, &cmd);
}
void
iwl_mld_link_info_changed_ap_ibss(struct iwl_mld *mld,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link,
u64 changes)
{
u32 link_changes = 0;
if (changes & BSS_CHANGED_ERP_SLOT)
link_changes |= LINK_CONTEXT_MODIFY_RATES_INFO;
if (changes & (BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_HT))
link_changes |= LINK_CONTEXT_MODIFY_PROTECT_FLAGS;
if (changes & (BSS_CHANGED_QOS | BSS_CHANGED_BANDWIDTH))
link_changes |= LINK_CONTEXT_MODIFY_QOS_PARAMS;
if (changes & BSS_CHANGED_HE_BSS_COLOR)
link_changes |= LINK_CONTEXT_MODIFY_HE_PARAMS;
if (link_changes)
iwl_mld_change_link_in_fw(mld, link, link_changes);
if (changes & BSS_CHANGED_BEACON) {
WARN_ON(!link->enable_beacon);
iwl_mld_update_beacon_template(mld, vif, link);
}
/* Enabling beacons was already covered above */
if ((changes & BSS_CHANGED_BEACON_ENABLED) && !link->enable_beacon)
iwl_mld_stop_beacon(mld, vif, link);
}
static int iwl_mld_send_ap_early_keys(struct iwl_mld *mld,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link)
{
struct iwl_mld_link *mld_link = iwl_mld_link_from_mac80211(link);
int ret = 0;
if (WARN_ON(!link))
return -EINVAL;
for (int i = 0; i < ARRAY_SIZE(mld_link->ap_early_keys); i++) {
struct ieee80211_key_conf *key = mld_link->ap_early_keys[i];
if (!key)
continue;
mld_link->ap_early_keys[i] = NULL;
ret = iwl_mld_add_key(mld, vif, NULL, key);
if (ret)
break;
}
return ret;
}
int iwl_mld_start_ap_ibss(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link)
{
Annotation
- Immediate include surface: `linux/crc32.h`, `net/mac80211.h`, `ap.h`, `hcmd.h`, `tx.h`, `key.h`, `phy.h`, `iwl-utils.h`.
- Detected declarations: `function Copyright`, `function iwl_mld_get_rate_flags`, `function iwl_mld_send_beacon_template_cmd`, `function iwl_mld_fill_beacon_template_cmd`, `function iwl_mld_update_beacon_template`, `function iwl_mld_free_ap_early_key`, `function iwl_mld_store_ap_early_key`, `function iwl_mld_stop_beacon`, `function iwl_mld_link_info_changed_ap_ibss`, `function iwl_mld_send_ap_early_keys`.
- 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.