drivers/net/wireless/ti/wlcore/scan.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ti/wlcore/scan.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ti/wlcore/scan.c- Extension
.c- Size
- 12181 bytes
- Lines
- 478
- 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.hlinux/pm_runtime.hwlcore.hdebug.hcmd.hscan.hacx.htx.h
Detected Declarations
function Copyrightfunction wlcore_started_vifs_iterfunction wlcore_count_started_vifsfunction wlcore_scan_get_channelsfunction wlcore_set_scan_chan_paramsfunction wlcore_scanfunction wlcore_scan_sched_scan_ssid_listfunction wlcore_scan_sched_scan_resultsexport wlcore_set_scan_chan_paramsexport wlcore_scan_sched_scan_ssid_listexport wlcore_scan_sched_scan_results
Annotated Snippet
if (flags & IEEE80211_CHAN_RADAR) {
channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS;
channels[j].passive_duration =
cpu_to_le16(dwell_time_dfs);
} else {
channels[j].passive_duration =
cpu_to_le16(dwell_time_passive);
}
channels[j].min_duration =
cpu_to_le16(min_dwell_time_active);
channels[j].max_duration =
cpu_to_le16(max_dwell_time_active);
channels[j].tx_power_att = req_channels[i]->max_power;
channels[j].channel = req_channels[i]->hw_value;
if (n_pactive_ch &&
(band == NL80211_BAND_2GHZ) &&
(channels[j].channel >= 12) &&
(channels[j].channel <= 14) &&
(flags & IEEE80211_CHAN_NO_IR) &&
!force_passive) {
/* pactive channels treated as DFS */
channels[j].flags = SCAN_CHANNEL_FLAGS_DFS;
/*
* n_pactive_ch is counted down from the end of
* the passive channel list
*/
(*n_pactive_ch)++;
wl1271_debug(DEBUG_SCAN, "n_pactive_ch = %d",
*n_pactive_ch);
}
wl1271_debug(DEBUG_SCAN, "freq %d, ch. %d, flags 0x%x, power %d, min/max_dwell %d/%d%s%s",
req_channels[i]->center_freq,
req_channels[i]->hw_value,
req_channels[i]->flags,
req_channels[i]->max_power,
min_dwell_time_active,
max_dwell_time_active,
flags & IEEE80211_CHAN_RADAR ?
", DFS" : "",
flags & IEEE80211_CHAN_NO_IR ?
", NO-IR" : "");
j++;
}
}
return j - start;
}
bool
wlcore_set_scan_chan_params(struct wl1271 *wl,
struct wlcore_scan_channels *cfg,
struct ieee80211_channel *channels[],
u32 n_channels,
u32 n_ssids,
int scan_type)
{
u8 n_pactive_ch = 0;
cfg->passive[0] =
wlcore_scan_get_channels(wl,
channels,
n_channels,
n_ssids,
cfg->channels_2,
NL80211_BAND_2GHZ,
false, true, 0,
MAX_CHANNELS_2GHZ,
&n_pactive_ch,
scan_type);
cfg->active[0] =
wlcore_scan_get_channels(wl,
channels,
n_channels,
n_ssids,
cfg->channels_2,
NL80211_BAND_2GHZ,
false, false,
cfg->passive[0],
MAX_CHANNELS_2GHZ,
&n_pactive_ch,
scan_type);
cfg->passive[1] =
wlcore_scan_get_channels(wl,
channels,
Annotation
- Immediate include surface: `linux/ieee80211.h`, `linux/pm_runtime.h`, `wlcore.h`, `debug.h`, `cmd.h`, `scan.h`, `acx.h`, `tx.h`.
- Detected declarations: `function Copyright`, `function wlcore_started_vifs_iter`, `function wlcore_count_started_vifs`, `function wlcore_scan_get_channels`, `function wlcore_set_scan_chan_params`, `function wlcore_scan`, `function wlcore_scan_sched_scan_ssid_list`, `function wlcore_scan_sched_scan_results`, `export wlcore_set_scan_chan_params`, `export wlcore_scan_sched_scan_ssid_list`.
- 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.