drivers/net/wireless/intel/iwlwifi/mvm/sf.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mvm/sf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mvm/sf.c- Extension
.c- Size
- 7432 bytes
- Lines
- 289
- 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
struct iwl_mvm_active_iface_iterator_datafunction iwl_mvm_bound_iface_iteratorfunction iwl_mvm_fill_sf_commandfunction iwl_mvm_sf_configfunction iwl_mvm_sf_update
Annotated Snippet
struct iwl_mvm_active_iface_iterator_data {
struct ieee80211_vif *ignore_vif;
struct ieee80211_sta *sta_vif_ap_sta;
enum iwl_sf_state sta_vif_state;
u32 num_active_macs;
};
/*
* Count bound interfaces which are not p2p, besides data->ignore_vif.
* data->station_vif will point to one bound vif of type station, if exists.
*/
static void iwl_mvm_bound_iface_iterator(void *_data, u8 *mac,
struct ieee80211_vif *vif)
{
struct iwl_mvm_active_iface_iterator_data *data = _data;
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
if (vif == data->ignore_vif || !mvmvif->deflink.phy_ctxt ||
vif->type == NL80211_IFTYPE_P2P_DEVICE)
return;
data->num_active_macs++;
if (vif->type == NL80211_IFTYPE_STATION) {
data->sta_vif_ap_sta = mvmvif->ap_sta;
if (vif->cfg.assoc)
data->sta_vif_state = SF_FULL_ON;
else
data->sta_vif_state = SF_INIT_OFF;
}
}
/*
* Aging and idle timeouts for the different possible scenarios
* in default configuration
*/
static const
__le32 sf_full_timeout_def[SF_NUM_SCENARIO][SF_NUM_TIMEOUT_TYPES] = {
{
cpu_to_le32(SF_SINGLE_UNICAST_AGING_TIMER_DEF),
cpu_to_le32(SF_SINGLE_UNICAST_IDLE_TIMER_DEF)
},
{
cpu_to_le32(SF_AGG_UNICAST_AGING_TIMER_DEF),
cpu_to_le32(SF_AGG_UNICAST_IDLE_TIMER_DEF)
},
{
cpu_to_le32(SF_MCAST_AGING_TIMER_DEF),
cpu_to_le32(SF_MCAST_IDLE_TIMER_DEF)
},
{
cpu_to_le32(SF_BA_AGING_TIMER_DEF),
cpu_to_le32(SF_BA_IDLE_TIMER_DEF)
},
{
cpu_to_le32(SF_TX_RE_AGING_TIMER_DEF),
cpu_to_le32(SF_TX_RE_IDLE_TIMER_DEF)
},
};
/*
* Aging and idle timeouts for the different possible scenarios
* in single BSS MAC configuration.
*/
static const __le32 sf_full_timeout[SF_NUM_SCENARIO][SF_NUM_TIMEOUT_TYPES] = {
{
cpu_to_le32(SF_SINGLE_UNICAST_AGING_TIMER),
cpu_to_le32(SF_SINGLE_UNICAST_IDLE_TIMER)
},
{
cpu_to_le32(SF_AGG_UNICAST_AGING_TIMER),
cpu_to_le32(SF_AGG_UNICAST_IDLE_TIMER)
},
{
cpu_to_le32(SF_MCAST_AGING_TIMER),
cpu_to_le32(SF_MCAST_IDLE_TIMER)
},
{
cpu_to_le32(SF_BA_AGING_TIMER),
cpu_to_le32(SF_BA_IDLE_TIMER)
},
{
cpu_to_le32(SF_TX_RE_AGING_TIMER),
cpu_to_le32(SF_TX_RE_IDLE_TIMER)
},
};
static void iwl_mvm_fill_sf_command(struct iwl_mvm *mvm,
struct iwl_sf_cfg_cmd *sf_cmd,
struct ieee80211_sta *sta)
Annotation
- Immediate include surface: `mvm.h`.
- Detected declarations: `struct iwl_mvm_active_iface_iterator_data`, `function iwl_mvm_bound_iface_iterator`, `function iwl_mvm_fill_sf_command`, `function iwl_mvm_sf_config`, `function iwl_mvm_sf_update`.
- 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.