drivers/staging/rtl8723bs/os_dep/wifi_regd.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/os_dep/wifi_regd.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/os_dep/wifi_regd.c- Extension
.c- Size
- 3252 bytes
- Lines
- 136
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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
drv_types.hrtw_wifi_regd.h
Detected Declarations
function _rtw_reg_apply_flagsfunction _rtw_reg_notifier_applyfunction _rtw_regd_init_wiphyfunction rtw_regd_initfunction rtw_reg_notifier
Annotated Snippet
if (sband) {
for (j = 0; j < sband->n_channels; j++) {
ch = &sband->channels[j];
if (ch)
ch->flags = IEEE80211_CHAN_DISABLED;
}
}
}
/* channels apply by channel plans. */
for (i = 0; i < max_chan_nums; i++) {
channel = channel_set[i].ChannelNum;
freq = rtw_ieee80211_channel_to_frequency(channel);
ch = ieee80211_get_channel(wiphy, freq);
if (ch) {
if (channel_set[i].ScanType == SCAN_PASSIVE)
ch->flags = IEEE80211_CHAN_NO_IR;
else
ch->flags = 0;
}
}
}
static int _rtw_reg_notifier_apply(struct wiphy *wiphy,
struct regulatory_request *request,
struct rtw_regulatory *reg)
{
/* Hard code flags */
_rtw_reg_apply_flags(wiphy);
return 0;
}
static const struct ieee80211_regdomain *_rtw_regdomain_select(struct
rtw_regulatory
*reg)
{
return &rtw_regdom_rd;
}
static void _rtw_regd_init_wiphy(struct rtw_regulatory *reg,
struct wiphy *wiphy,
void (*reg_notifier)(struct wiphy *wiphy,
struct
regulatory_request *
request))
{
const struct ieee80211_regdomain *regd;
wiphy->reg_notifier = reg_notifier;
wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG;
wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG;
wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS;
regd = _rtw_regdomain_select(reg);
wiphy_apply_custom_regulatory(wiphy, regd);
/* Hard code flags */
_rtw_reg_apply_flags(wiphy);
}
void rtw_regd_init(struct wiphy *wiphy,
void (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request))
{
_rtw_regd_init_wiphy(NULL, wiphy, reg_notifier);
}
void rtw_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
{
struct rtw_regulatory *reg = NULL;
_rtw_reg_notifier_apply(wiphy, request, reg);
}
Annotation
- Immediate include surface: `drv_types.h`, `rtw_wifi_regd.h`.
- Detected declarations: `function _rtw_reg_apply_flags`, `function _rtw_reg_notifier_apply`, `function _rtw_regd_init_wiphy`, `function rtw_regd_init`, `function rtw_reg_notifier`.
- Atlas domain: Driver Families / drivers/staging.
- 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.