drivers/net/wireless/intel/iwlwifi/mvm/scan.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mvm/scan.c- Extension
.c- Size
- 105588 bytes
- Lines
- 3643
- 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.
- 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/etherdevice.hnet/mac80211.hlinux/crc32.hmvm.hfw/api/scan.hiwl-io.hiwl-utils.h
Detected Declarations
struct iwl_mvm_scan_timing_paramsstruct iwl_mvm_scan_paramsstruct iwl_mvm_scan_iter_datastruct iwl_mvm_scan_channel_segmentstruct iwl_scan_umac_handlerstruct iwl_mvm_scan_respect_p2p_go_iter_datafunction iwl_mvm_get_scan_req_umac_channelfunction iwl_mvm_scan_rx_antfunction iwl_mvm_scan_rx_chainfunction iwl_mvm_scan_rate_n_flagsfunction iwl_mvm_get_traffic_loadfunction iwl_mvm_get_traffic_load_bandfunction iwl_mvm_scan_iteratorfunction _iwl_mvm_get_scan_typefunction iwl_mvm_get_scan_typefunction iwl_mvm_get_scan_type_bandfunction iwl_mvm_rrm_scan_neededfunction iwl_mvm_max_scan_ie_fw_cmd_roomfunction iwl_mvm_max_scan_ie_lenfunction iwl_mvm_rx_lmac_scan_iter_complete_notiffunction iwl_mvm_rx_scan_match_foundfunction iwl_mvm_rx_lmac_scan_complete_notiffunction timefunction iwl_ssid_existfunction iwl_scan_build_ssidsfunction iwl_mvm_config_sched_scan_profilesfunction iwl_mvm_scan_pass_allfunction iwl_mvm_lmac_scan_abortfunction iwl_mvm_scan_fill_tx_cmdfunction iwl_mvm_lmac_scan_cfg_channelsfunction iwl_mvm_add_tpc_report_iefunction iwl_mvm_build_scan_probefunction iwl_mvm_scan_lmac_dwellfunction iwl_mvm_scan_fitsfunction iwl_mvm_scan_use_ebsfunction iwl_mvm_is_regular_scanfunction iwl_mvm_is_scan_fragmentedfunction iwl_mvm_scan_lmac_flagsfunction iwl_mvm_scan_set_legacy_probe_reqfunction iwl_mvm_scan_lmacfunction rate_to_scan_rate_flagfunction iwl_mvm_scan_config_ratesfunction iwl_mvm_fill_scan_dwellfunction iwl_mvm_fill_channelsfunction iwl_mvm_fill_scan_config_v1function iwl_mvm_fill_scan_config_v2function iwl_mvm_legacy_config_scanfunction iwl_mvm_config_scan
Annotated Snippet
struct iwl_mvm_scan_timing_params {
u32 suspend_time;
u32 max_out_time;
};
static struct iwl_mvm_scan_timing_params scan_timing[] = {
[IWL_SCAN_TYPE_UNASSOC] = {
.suspend_time = 0,
.max_out_time = 0,
},
[IWL_SCAN_TYPE_WILD] = {
.suspend_time = 30,
.max_out_time = 120,
},
[IWL_SCAN_TYPE_MILD] = {
.suspend_time = 120,
.max_out_time = 120,
},
[IWL_SCAN_TYPE_FRAGMENTED] = {
.suspend_time = 95,
.max_out_time = 44,
},
[IWL_SCAN_TYPE_FAST_BALANCE] = {
.suspend_time = 30,
.max_out_time = 37,
},
};
struct iwl_mvm_scan_params {
/* For CDB this is low band scan type, for non-CDB - type. */
enum iwl_mvm_scan_type type;
enum iwl_mvm_scan_type hb_type;
u32 n_channels;
u16 delay;
int n_ssids;
struct cfg80211_ssid *ssids;
struct ieee80211_channel **channels;
u32 flags;
u8 *mac_addr;
u8 *mac_addr_mask;
bool no_cck;
bool pass_all;
int n_match_sets;
struct iwl_scan_probe_req preq;
struct cfg80211_match_set *match_sets;
int n_scan_plans;
struct cfg80211_sched_scan_plan *scan_plans;
bool iter_notif;
struct cfg80211_scan_6ghz_params *scan_6ghz_params;
u32 n_6ghz_params;
bool scan_6ghz;
bool enable_6ghz_passive;
bool respect_p2p_go, respect_p2p_go_hb;
s8 tsf_report_link_id;
u8 bssid[ETH_ALEN] __aligned(2);
};
static inline void *iwl_mvm_get_scan_req_umac_data(struct iwl_mvm *mvm)
{
struct iwl_scan_req_umac *cmd = mvm->scan_cmd;
if (iwl_mvm_is_adaptive_dwell_v2_supported(mvm))
return (void *)&cmd->v8.data;
if (iwl_mvm_is_adaptive_dwell_supported(mvm))
return (void *)&cmd->v7.data;
if (iwl_mvm_cdb_scan_api(mvm))
return (void *)&cmd->v6.data;
return (void *)&cmd->v1.data;
}
static inline struct iwl_scan_umac_chan_param *
iwl_mvm_get_scan_req_umac_channel(struct iwl_mvm *mvm)
{
struct iwl_scan_req_umac *cmd = mvm->scan_cmd;
if (iwl_mvm_is_adaptive_dwell_v2_supported(mvm))
return &cmd->v8.channel;
if (iwl_mvm_is_adaptive_dwell_supported(mvm))
return &cmd->v7.channel;
if (iwl_mvm_cdb_scan_api(mvm))
return &cmd->v6.channel;
return &cmd->v1.channel;
}
Annotation
- Immediate include surface: `linux/etherdevice.h`, `net/mac80211.h`, `linux/crc32.h`, `mvm.h`, `fw/api/scan.h`, `iwl-io.h`, `iwl-utils.h`.
- Detected declarations: `struct iwl_mvm_scan_timing_params`, `struct iwl_mvm_scan_params`, `struct iwl_mvm_scan_iter_data`, `struct iwl_mvm_scan_channel_segment`, `struct iwl_scan_umac_handler`, `struct iwl_mvm_scan_respect_p2p_go_iter_data`, `function iwl_mvm_get_scan_req_umac_channel`, `function iwl_mvm_scan_rx_ant`, `function iwl_mvm_scan_rx_chain`, `function iwl_mvm_scan_rate_n_flags`.
- 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.