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.

Dependency Surface

Detected Declarations

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

Implementation Notes