drivers/net/wireless/intel/iwlwifi/mld/tests/link.c

Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/tests/link.c

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/intel/iwlwifi/mld/tests/link.c
Extension
.c
Size
15100 bytes
Lines
581
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct dup_beacon_test_case {
	const char *desc;
	enum nl80211_chan_width bandwidth;
	bool has_he_oper;
	bool dup_beacon_bit;
	s8 expected_adj;
};

static const struct dup_beacon_test_case dup_beacon_cases[] = {
	{
		.desc = "20 MHz - no duplication",
		.bandwidth = NL80211_CHAN_WIDTH_20,
		.has_he_oper = true,
		.dup_beacon_bit = true,
		.expected_adj = 0,
	},
	{
		.desc = "40 MHz with duplication - 3 dB",
		.bandwidth = NL80211_CHAN_WIDTH_40,
		.has_he_oper = true,
		.dup_beacon_bit = true,
		.expected_adj = 3,
	},
	{
		.desc = "80 MHz with duplication - 6 dB",
		.bandwidth = NL80211_CHAN_WIDTH_80,
		.has_he_oper = true,
		.dup_beacon_bit = true,
		.expected_adj = 6,
	},
	{
		.desc = "160 MHz with duplication - 9 dB",
		.bandwidth = NL80211_CHAN_WIDTH_160,
		.has_he_oper = true,
		.dup_beacon_bit = true,
		.expected_adj = 9,
	},
	{
		.desc = "320 MHz with duplication - 12 dB",
		.bandwidth = NL80211_CHAN_WIDTH_320,
		.has_he_oper = true,
		.dup_beacon_bit = true,
		.expected_adj = 12,
	},
	{
		.desc = "80 MHz without dup bit - no adjustment",
		.bandwidth = NL80211_CHAN_WIDTH_80,
		.has_he_oper = true,
		.dup_beacon_bit = false,
		.expected_adj = 0,
	},
	{
		.desc = "80 MHz without HE oper - no adjustment",
		.bandwidth = NL80211_CHAN_WIDTH_80,
		.has_he_oper = false,
		.dup_beacon_bit = true,
		.expected_adj = 0,
	},
};

KUNIT_ARRAY_PARAM_DESC(test_dup_beacon_rssi_adjust, dup_beacon_cases, desc);

struct psd_eirp_test_case {
	const char *desc;
	const struct cfg80211_chan_def *chandef;
	enum ieee80211_ap_reg_power power_type;
	struct {
		s8 psd_20;
		s8 psd_oper;
		s8 eirp_20;
		s8 eirp_oper;
	} local, reg;
	s8 expected_adj;
	struct {
		bool no_psd_data;
		bool no_eirp_data;
		bool no_reg_psd_data;
		bool has_partial_psd;
		u8 psd_partial_count;
		bool non_uniform_psd;
		bool has_unusable_channels;
	} flags;
};

static const struct psd_eirp_test_case psd_eirp_cases[] = {
	{
		.desc = "20 MHz VLP baseline - no boost expected",
		.chandef = &chandef_6ghz_20mhz,
		.power_type = IEEE80211_REG_VLP_AP,
		.local = {

Annotation

Implementation Notes