drivers/net/wireless/intel/iwlwifi/mld/sta.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/sta.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/sta.c- Extension
.c- Size
- 42381 bytes
- Lines
- 1522
- 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/ieee80211.hkunit/static_stub.hsta.hhcmd.hiface.hmlo.hkey.hagg.htlc.hnan.hfw/api/sta.hfw/api/mac.hfw/api/rx.h
Detected Declarations
function Copyrightfunction iwl_mld_fill_ampdu_size_and_densfunction iwl_mld_get_uapsd_acsfunction iwl_mld_he_get_ppe_valfunction iwl_mld_parse_ppefunction iwl_mld_set_pkt_ext_from_he_ppefunction iwl_mld_set_pkt_ext_from_nominal_paddingfunction iwl_mld_get_optimal_ppe_infofunction iwl_mld_fill_pkt_extfunction iwl_mld_get_htc_flagsfunction iwl_mld_send_sta_cmdfunction cpu_to_le32function hweight32function iwl_mld_get_nan_link_maskfunction iwl_mld_add_modify_sta_cmdfunction iwl_mld_add_link_stafunction iwl_mld_rm_sta_from_fwfunction iwl_mld_remove_link_stafunction iwl_mld_set_max_amsdu_lenfunction iwl_mld_update_all_link_stationsfunction for_each_sta_active_linkfunction iwl_mld_destroy_stafunction iwl_mld_alloc_dup_datafunction iwl_mld_alloc_mpdu_countersfunction iwl_mld_init_stafunction iwl_mld_add_stafunction iwl_mld_flush_sta_txqsfunction for_each_sta_active_linkfunction iwl_mld_wait_sta_txqs_emptyfunction iwl_mld_remove_stafunction for_each_sta_active_linkfunction iwl_mld_fw_sta_id_maskfunction for_each_sta_active_linkfunction iwl_mld_count_mpdufunction time_is_before_jiffiesfunction iwl_mld_count_mpdu_rxfunction iwl_mld_count_mpdu_txfunction iwl_mld_allocate_internal_txqfunction iwl_mld_send_aux_sta_cmdfunction iwl_mld_set_internal_sta_to_fwfunction iwl_mld_add_internal_stafunction iwl_mld_add_bcast_stafunction iwl_mld_add_mcast_stafunction iwl_mld_add_aux_stafunction iwl_mld_add_mon_stafunction iwl_mld_remove_internal_stafunction iwl_mld_remove_bcast_stafunction iwl_mld_remove_mcast_sta
Annotated Snippet
if (!(ru_index_tmp & 1)) {
if (inheritance)
goto set_thresholds;
else
continue;
}
high_th = iwl_mld_he_get_ppe_val(ppe, ppe_pos_bit);
ppe_pos_bit += IEEE80211_PPE_THRES_INFO_PPET_SIZE;
low_th = iwl_mld_he_get_ppe_val(ppe, ppe_pos_bit);
ppe_pos_bit += IEEE80211_PPE_THRES_INFO_PPET_SIZE;
set_thresholds:
pkt_ext->pkt_ext_qam_th[i][bw][0] = low_th;
pkt_ext->pkt_ext_qam_th[i][bw][1] = high_th;
}
}
}
static void iwl_mld_set_pkt_ext_from_he_ppe(struct iwl_mld *mld,
struct ieee80211_link_sta *link_sta,
struct iwl_he_pkt_ext_v2 *pkt_ext,
bool inheritance)
{
u8 nss = (link_sta->he_cap.ppe_thres[0] &
IEEE80211_PPE_THRES_NSS_MASK) + 1;
u8 *ppe = &link_sta->he_cap.ppe_thres[0];
u8 ru_index_bitmap =
u8_get_bits(*ppe,
IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK);
/* Starting after PPE header */
u8 ppe_pos_bit = IEEE80211_HE_PPE_THRES_INFO_HEADER_SIZE;
iwl_mld_parse_ppe(mld, pkt_ext, nss, ru_index_bitmap, ppe, ppe_pos_bit,
inheritance);
}
static int
iwl_mld_set_pkt_ext_from_nominal_padding(struct iwl_he_pkt_ext_v2 *pkt_ext,
u8 nominal_padding)
{
int low_th = -1;
int high_th = -1;
/* all the macros are the same for EHT and HE */
switch (nominal_padding) {
case IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_0US:
low_th = IWL_HE_PKT_EXT_NONE;
high_th = IWL_HE_PKT_EXT_NONE;
break;
case IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_8US:
low_th = IWL_HE_PKT_EXT_BPSK;
high_th = IWL_HE_PKT_EXT_NONE;
break;
case IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_16US:
case IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_20US:
low_th = IWL_HE_PKT_EXT_NONE;
high_th = IWL_HE_PKT_EXT_BPSK;
break;
}
if (low_th < 0 || high_th < 0)
return -EINVAL;
/* Set the PPE thresholds accordingly */
for (int i = 0; i < MAX_HE_SUPP_NSS; i++) {
for (u8 bw = 0;
bw < ARRAY_SIZE(pkt_ext->pkt_ext_qam_th[i]);
bw++) {
pkt_ext->pkt_ext_qam_th[i][bw][0] = low_th;
pkt_ext->pkt_ext_qam_th[i][bw][1] = high_th;
}
}
return 0;
}
static void iwl_mld_get_optimal_ppe_info(struct iwl_he_pkt_ext_v2 *pkt_ext,
u8 nominal_padding)
{
for (int i = 0; i < MAX_HE_SUPP_NSS; i++) {
for (u8 bw = 0; bw < ARRAY_SIZE(pkt_ext->pkt_ext_qam_th[i]);
bw++) {
u8 *qam_th = &pkt_ext->pkt_ext_qam_th[i][bw][0];
if (nominal_padding >
IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_8US &&
qam_th[1] == IWL_HE_PKT_EXT_NONE)
qam_th[1] = IWL_HE_PKT_EXT_4096QAM;
else if (nominal_padding ==
Annotation
- Immediate include surface: `linux/ieee80211.h`, `kunit/static_stub.h`, `sta.h`, `hcmd.h`, `iface.h`, `mlo.h`, `key.h`, `agg.h`.
- Detected declarations: `function Copyright`, `function iwl_mld_fill_ampdu_size_and_dens`, `function iwl_mld_get_uapsd_acs`, `function iwl_mld_he_get_ppe_val`, `function iwl_mld_parse_ppe`, `function iwl_mld_set_pkt_ext_from_he_ppe`, `function iwl_mld_set_pkt_ext_from_nominal_padding`, `function iwl_mld_get_optimal_ppe_info`, `function iwl_mld_fill_pkt_ext`, `function iwl_mld_get_htc_flags`.
- 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.