drivers/net/wireless/intel/iwlwifi/mld/tests/rx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/tests/rx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/tests/rx.c- Extension
.c- Size
- 8160 bytes
- Lines
- 354
- 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/test.hutils.hiwl-trans.hmld.hsta.h
Detected Declarations
function setup_dup_data_statefunction setup_rx_pktfunction test_is_dup
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
* KUnit tests for channel helper functions
*
* Copyright (C) 2024 Intel Corporation
*/
#include <kunit/test.h>
#include "utils.h"
#include "iwl-trans.h"
#include "mld.h"
#include "sta.h"
static const struct is_dup_case {
const char *desc;
struct {
/* ieee80211_hdr fields */
__le16 fc;
__le16 seq;
u8 tid;
bool multicast;
/* iwl_rx_mpdu_desc fields */
bool is_amsdu;
u8 sub_frame_idx;
} rx_pkt;
struct {
__le16 last_seq;
u8 last_sub_frame_idx;
u8 tid;
} dup_data_state;
struct {
bool is_dup;
u32 rx_status_flag;
} result;
} is_dup_cases[] = {
{
.desc = "Control frame",
.rx_pkt = {
.fc = __cpu_to_le16(IEEE80211_FTYPE_CTL),
},
.result = {
.is_dup = false,
.rx_status_flag = 0,
}
},
{
.desc = "Null func frame",
.rx_pkt = {
.fc = __cpu_to_le16(IEEE80211_FTYPE_DATA |
IEEE80211_STYPE_NULLFUNC),
},
.result = {
.is_dup = false,
.rx_status_flag = 0,
}
},
{
.desc = "Multicast data",
.rx_pkt = {
.fc = __cpu_to_le16(IEEE80211_FTYPE_DATA),
.multicast = true,
},
.result = {
.is_dup = false,
.rx_status_flag = 0,
}
},
{
.desc = "QoS null func frame",
.rx_pkt = {
.fc = __cpu_to_le16(IEEE80211_FTYPE_DATA |
IEEE80211_STYPE_QOS_NULLFUNC),
},
.result = {
.is_dup = false,
.rx_status_flag = 0,
}
},
{
.desc = "QoS data new sequence",
.rx_pkt = {
.fc = __cpu_to_le16(IEEE80211_FTYPE_DATA |
IEEE80211_STYPE_QOS_DATA),
.seq = __cpu_to_le16(0x101),
},
.dup_data_state = {
.last_seq = __cpu_to_le16(0x100),
.last_sub_frame_idx = 0,
},
.result = {
.is_dup = false,
Annotation
- Immediate include surface: `kunit/test.h`, `utils.h`, `iwl-trans.h`, `mld.h`, `sta.h`.
- Detected declarations: `function setup_dup_data_state`, `function setup_rx_pkt`, `function test_is_dup`.
- 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.