drivers/net/wireless/intel/iwlwifi/mld/tests/chan_load_thresh.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/tests/chan_load_thresh.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/tests/chan_load_thresh.c- Extension
.c- Size
- 3446 bytes
- Lines
- 140
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
kunit/static_stub.hmld.hlink.hiface.hutils.h
Detected Declarations
struct test_chan_load_casefunction test_chan_load_thresholds
Annotated Snippet
struct test_chan_load_case {
const char *desc;
u32 load;
enum iwl_mld_link_chan_load_level old_lvl;
enum iwl_mld_link_chan_load_level expected_lvl;
bool expected_scan_trig;
};
static const struct test_chan_load_case test_chan_load_thresh_cases[] = {
/* Level-up transitions */
{
.desc = "Transition NONE->NONE",
.load = 20,
.old_lvl = LINK_CHAN_LOAD_LVL_NONE,
.expected_lvl = LINK_CHAN_LOAD_LVL_NONE,
.expected_scan_trig = false,
},
{
.desc = "Transition NONE->LVL1",
.load = 50,
.old_lvl = LINK_CHAN_LOAD_LVL_NONE,
.expected_lvl = LINK_CHAN_LOAD_LVL1,
.expected_scan_trig = true,
},
{
.desc = "Transition LVL1->LVL2",
.load = 75,
.old_lvl = LINK_CHAN_LOAD_LVL1,
.expected_lvl = LINK_CHAN_LOAD_LVL2,
.expected_scan_trig = true,
},
{
.desc = "Transition LVL2->LVL3",
.load = 90,
.old_lvl = LINK_CHAN_LOAD_LVL2,
.expected_lvl = LINK_CHAN_LOAD_LVL3,
.expected_scan_trig = true,
},
/* Level-down transitions */
{
.desc = "Transition LVL1->NONE",
.load = 30,
.old_lvl = LINK_CHAN_LOAD_LVL1,
.expected_lvl = LINK_CHAN_LOAD_LVL_NONE,
.expected_scan_trig = false,
},
{
.desc = "Transition LVL2->LVL1",
.load = 60,
.old_lvl = LINK_CHAN_LOAD_LVL2,
.expected_lvl = LINK_CHAN_LOAD_LVL1,
.expected_scan_trig = false,
},
{
.desc = "Transition LVL3->LVL2",
.load = 70,
.old_lvl = LINK_CHAN_LOAD_LVL3,
.expected_lvl = LINK_CHAN_LOAD_LVL2,
.expected_scan_trig = false,
},
/* No change */
{
.desc = "Transition LVL2->LVL2",
.load = 72,
.old_lvl = LINK_CHAN_LOAD_LVL2,
.expected_lvl = LINK_CHAN_LOAD_LVL2,
.expected_scan_trig = false,
},
};
KUNIT_ARRAY_PARAM_DESC(test_chan_load_thresh_cases,
test_chan_load_thresh_cases, desc);
static void test_chan_load_thresholds(struct kunit *test)
{
const struct test_chan_load_case *tc = test->param_value;
struct iwl_mld *mld = test->priv;
struct ieee80211_vif *vif;
struct iwl_mld_vif *mld_vif;
struct ieee80211_bss_conf *link_conf;
struct iwl_mld_link *mld_link;
struct iwl_mld_kunit_link assoc_link = {
.id = 0,
.chandef = &chandef_6ghz_160mhz,
};
bool scan_trig;
u32 chan_load;
Annotation
- Immediate include surface: `kunit/static_stub.h`, `mld.h`, `link.h`, `iface.h`, `utils.h`.
- Detected declarations: `struct test_chan_load_case`, `function test_chan_load_thresholds`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.