net/wireless/tests/scan.c
Source file repositories/reference/linux-study-clean/net/wireless/tests/scan.c
File Facts
- System
- Linux kernel
- Corpus path
net/wireless/tests/scan.c- Extension
.c- Size
- 25586 bytes
- Lines
- 881
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- 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.hnet/cfg80211.hkunit/test.hkunit/skbuff.h../core.hutil.h../../mac80211/ieee80211_i.h
Detected Declarations
struct test_elemstruct inform_bssfunction test_gen_new_iefunction test_gen_new_ie_malformedfunction inform_bss_inc_counterfunction test_inform_bss_ssid_onlyfunction test_inform_bss_ml_stafunction test_cfg80211_parse_colocated_ap
Annotated Snippet
struct test_elem {
u8 id;
u8 len;
union {
u8 data[255];
struct {
u8 eid;
u8 edata[254];
};
};
};
static struct gen_new_ie_case {
const char *desc;
struct test_elem parent_ies[16];
struct test_elem child_ies[16];
struct test_elem result_ies[16];
} gen_new_ie_cases[] = {
{
.desc = "ML not inherited",
.parent_ies = {
{ .id = WLAN_EID_EXTENSION, .len = 255,
.eid = WLAN_EID_EXT_EHT_MULTI_LINK },
},
.child_ies = {
{ .id = WLAN_EID_SSID, .len = 2 },
},
.result_ies = {
{ .id = WLAN_EID_SSID, .len = 2 },
},
},
{
.desc = "fragments are ignored if previous len not 255",
.parent_ies = {
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 254, },
{ .id = WLAN_EID_FRAGMENT, .len = 125, },
},
.child_ies = {
{ .id = WLAN_EID_SSID, .len = 2 },
{ .id = WLAN_EID_FRAGMENT, .len = 125, },
},
.result_ies = {
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 254, },
{ .id = WLAN_EID_SSID, .len = 2 },
},
},
{
.desc = "fragments inherited",
.parent_ies = {
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 255, },
{ .id = WLAN_EID_FRAGMENT, .len = 125, },
},
.child_ies = {
{ .id = WLAN_EID_SSID, .len = 2 },
},
.result_ies = {
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 255, },
{ .id = WLAN_EID_FRAGMENT, .len = 125, },
{ .id = WLAN_EID_SSID, .len = 2 },
},
},
{
.desc = "fragments copied",
.parent_ies = {
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 255, },
{ .id = WLAN_EID_FRAGMENT, .len = 125, },
},
.child_ies = {
{ .id = WLAN_EID_SSID, .len = 2 },
},
.result_ies = {
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 255, },
{ .id = WLAN_EID_FRAGMENT, .len = 125, },
{ .id = WLAN_EID_SSID, .len = 2 },
},
},
{
.desc = "multiple elements inherit",
.parent_ies = {
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 255, },
{ .id = WLAN_EID_FRAGMENT, .len = 125, },
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 123, },
},
.child_ies = {
{ .id = WLAN_EID_SSID, .len = 2 },
},
.result_ies = {
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 255, },
{ .id = WLAN_EID_FRAGMENT, .len = 125, },
{ .id = WLAN_EID_REDUCED_NEIGHBOR_REPORT, .len = 123, },
Annotation
- Immediate include surface: `linux/ieee80211.h`, `net/cfg80211.h`, `kunit/test.h`, `kunit/skbuff.h`, `../core.h`, `util.h`, `../../mac80211/ieee80211_i.h`.
- Detected declarations: `struct test_elem`, `struct inform_bss`, `function test_gen_new_ie`, `function test_gen_new_ie_malformed`, `function inform_bss_inc_counter`, `function test_inform_bss_ssid_only`, `function test_inform_bss_ml_sta`, `function test_cfg80211_parse_colocated_ap`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- 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.