drivers/net/wireless/intel/iwlwifi/mld/tests/utils.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/tests/utils.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/tests/utils.h- Extension
.h- Size
- 4605 bytes
- Lines
- 148
- 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.
- 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
net/mac80211.hkunit/test-bug.h
Detected Declarations
struct iwl_mldstruct iwl_mld_kunit_linkenum nl80211_iftype
Annotated Snippet
struct iwl_mld_kunit_link {
const struct cfg80211_chan_def *chandef;
u8 id;
};
enum nl80211_iftype;
struct ieee80211_vif *iwlmld_kunit_add_vif(bool mlo, enum nl80211_iftype type);
struct ieee80211_bss_conf *
iwlmld_kunit_add_link(struct ieee80211_vif *vif, int link_id);
#define KUNIT_ALLOC_AND_ASSERT_SIZE(test, ptr, size) \
do { \
(ptr) = kunit_kzalloc((test), (size), GFP_KERNEL); \
KUNIT_ASSERT_NOT_NULL((test), (ptr)); \
} while (0)
#define KUNIT_ALLOC_AND_ASSERT(test, ptr) \
KUNIT_ALLOC_AND_ASSERT_SIZE(test, ptr, sizeof(*(ptr)))
#define CHANNEL(_name, _band, _freq) \
static struct ieee80211_channel _name = { \
.band = (_band), \
.center_freq = (_freq), \
.hw_value = (_freq), \
}
CHANNEL(chan_2ghz, NL80211_BAND_2GHZ, 2412);
CHANNEL(chan_2ghz_11, NL80211_BAND_2GHZ, 2462);
CHANNEL(chan_5ghz, NL80211_BAND_5GHZ, 5200);
CHANNEL(chan_5ghz_120, NL80211_BAND_5GHZ, 5600);
CHANNEL(chan_6ghz, NL80211_BAND_6GHZ, 6115);
CHANNEL(chan_6ghz_221, NL80211_BAND_6GHZ, 7055);
/* Feel free to add more */
#undef CHANNEL
#define CHANDEF_LIST \
CHANDEF(chandef_2ghz_20mhz, chan_2ghz, 2412, \
NL80211_CHAN_WIDTH_20) \
CHANDEF(chandef_2ghz_40mhz, chan_2ghz, 2422, \
NL80211_CHAN_WIDTH_40) \
CHANDEF(chandef_2ghz_11_20mhz, chan_2ghz_11, 2462, \
NL80211_CHAN_WIDTH_20) \
CHANDEF(chandef_5ghz_20mhz, chan_5ghz, 5200, \
NL80211_CHAN_WIDTH_20) \
CHANDEF(chandef_5ghz_40mhz, chan_5ghz, 5210, \
NL80211_CHAN_WIDTH_40) \
CHANDEF(chandef_5ghz_80mhz, chan_5ghz, 5210, \
NL80211_CHAN_WIDTH_80) \
CHANDEF(chandef_5ghz_160mhz, chan_5ghz, 5250, \
NL80211_CHAN_WIDTH_160) \
CHANDEF(chandef_5ghz_120_40mhz, chan_5ghz_120, 5610, \
NL80211_CHAN_WIDTH_40) \
CHANDEF(chandef_6ghz_20mhz, chan_6ghz, 6115, \
NL80211_CHAN_WIDTH_20) \
CHANDEF(chandef_6ghz_40mhz, chan_6ghz, 6125, \
NL80211_CHAN_WIDTH_40) \
CHANDEF(chandef_6ghz_80mhz, chan_6ghz, 6145, \
NL80211_CHAN_WIDTH_80) \
CHANDEF(chandef_6ghz_160mhz, chan_6ghz, 6185, \
NL80211_CHAN_WIDTH_160) \
CHANDEF(chandef_6ghz_320mhz, chan_6ghz, 6105, \
NL80211_CHAN_WIDTH_320) \
CHANDEF(chandef_6ghz_320mhz_pri0, chan_6ghz, 6265, \
NL80211_CHAN_WIDTH_320) \
CHANDEF(chandef_6ghz_221_160mhz, chan_6ghz_221, 6985, \
NL80211_CHAN_WIDTH_160) \
/* Feel free to add more */
#define CHANDEF(_name, _channel, _freq1, _width) \
__maybe_unused static const struct cfg80211_chan_def _name = { \
.chan = &(_channel), \
.center_freq1 = (_freq1), \
.width = (_width), \
};
CHANDEF_LIST
#undef CHANDEF
struct ieee80211_chanctx_conf *
iwlmld_kunit_add_chanctx(const struct cfg80211_chan_def *def);
void iwlmld_kunit_assign_chanctx_to_link(struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link,
struct ieee80211_chanctx_conf *ctx);
/* Allocate a sta, initialize it and move it to the wanted state */
struct ieee80211_sta *iwlmld_kunit_setup_sta(struct ieee80211_vif *vif,
enum ieee80211_sta_state state,
int link_id);
Annotation
- Immediate include surface: `net/mac80211.h`, `kunit/test-bug.h`.
- Detected declarations: `struct iwl_mld`, `struct iwl_mld_kunit_link`, `enum nl80211_iftype`.
- 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.