drivers/net/wireless/realtek/rtw88/regd.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtw88/regd.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtw88/regd.c- Extension
.c- Size
- 20957 bytes
- Lines
- 542
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
main.hregd.hdebug.hphy.h
Detected Declarations
struct rtw_regd_alternative_tfunction rtw_regd_apply_hw_cap_flagsfunction rtw_reg_is_wwfunction rtw_reg_matchfunction rtw_regd_initfunction rtw_regd_hintfunction rtw_regd_mgmt_worldwidefunction rtw_regd_mgmt_programmedfunction rtw_regd_mgmt_settingfunction rtw_regd_state_hdlfunction rtw_regd_notifierfunction rtw_regd_getfunction rtw_regd_srrcfunction rtw_regd_has_altexport rtw_regd_getexport rtw_regd_srrc
Annotated Snippet
struct rtw_regd_alternative_t {
bool set;
u8 alt;
};
#define DECL_REGD_ALT(_regd, _regd_alt) \
[(_regd)] = {.set = true, .alt = (_regd_alt)}
static const struct rtw_regd_alternative_t
rtw_regd_alt[RTW_REGD_MAX] = {
DECL_REGD_ALT(RTW_REGD_IC, RTW_REGD_FCC),
DECL_REGD_ALT(RTW_REGD_KCC, RTW_REGD_ETSI),
DECL_REGD_ALT(RTW_REGD_ACMA, RTW_REGD_ETSI),
DECL_REGD_ALT(RTW_REGD_CHILE, RTW_REGD_FCC),
DECL_REGD_ALT(RTW_REGD_UKRAINE, RTW_REGD_ETSI),
DECL_REGD_ALT(RTW_REGD_MEXICO, RTW_REGD_FCC),
DECL_REGD_ALT(RTW_REGD_CN, RTW_REGD_ETSI),
DECL_REGD_ALT(RTW_REGD_QATAR, RTW_REGD_ETSI),
DECL_REGD_ALT(RTW_REGD_UK, RTW_REGD_ETSI),
};
bool rtw_regd_has_alt(u8 regd, u8 *regd_alt)
{
if (!rtw_regd_alt[regd].set)
return false;
*regd_alt = rtw_regd_alt[regd].alt;
return true;
}
Annotation
- Immediate include surface: `main.h`, `regd.h`, `debug.h`, `phy.h`.
- Detected declarations: `struct rtw_regd_alternative_t`, `function rtw_regd_apply_hw_cap_flags`, `function rtw_reg_is_ww`, `function rtw_reg_match`, `function rtw_regd_init`, `function rtw_regd_hint`, `function rtw_regd_mgmt_worldwide`, `function rtw_regd_mgmt_programmed`, `function rtw_regd_mgmt_setting`, `function rtw_regd_state_hdl`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.