drivers/net/wireless/realtek/rtw88/ps.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtw88/ps.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtw88/ps.c- Extension
.c- Size
- 8078 bytes
- Lines
- 344
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
main.hreg.hfw.hps.hmac.hcoex.hdebug.h
Detected Declarations
struct rtw_vif_recalc_lps_iter_datafunction rtw_ips_pwr_upfunction rtw_enter_ipsfunction rtw_restore_port_cfg_iterfunction rtw_leave_ipsfunction rtw_power_mode_changefunction __rtw_leave_lps_deepfunction __rtw_fw_leave_lps_check_regfunction __rtw_fw_leave_lps_check_c2hfunction rtw_fw_leave_lps_checkfunction rtw_fw_leave_lps_check_preparefunction rtw_leave_lps_corefunction rtw_get_lps_deep_modefunction __rtw_enter_lps_deepfunction rtw_enter_lps_corefunction __rtw_enter_lpsfunction __rtw_leave_lpsfunction rtw_enter_lpsfunction rtw_leave_lpsfunction rtw_leave_lps_deepfunction __rtw_vif_recalc_lpsfunction rtw_vif_recalc_lps_iterfunction rtw_recalc_lpsexport rtw_power_mode_change
Annotated Snippet
struct rtw_vif_recalc_lps_iter_data {
struct rtw_dev *rtwdev;
struct ieee80211_vif *found_vif;
int count;
};
static void __rtw_vif_recalc_lps(struct rtw_vif_recalc_lps_iter_data *data,
struct ieee80211_vif *vif)
{
if (data->count < 0)
return;
if (vif->type != NL80211_IFTYPE_STATION) {
data->count = -1;
return;
}
data->count++;
data->found_vif = vif;
}
static void rtw_vif_recalc_lps_iter(void *data, struct ieee80211_vif *vif)
{
__rtw_vif_recalc_lps(data, vif);
}
void rtw_recalc_lps(struct rtw_dev *rtwdev, struct ieee80211_vif *new_vif)
{
struct rtw_vif_recalc_lps_iter_data data = { .rtwdev = rtwdev };
if (new_vif)
__rtw_vif_recalc_lps(&data, new_vif);
rtw_iterate_vifs(rtwdev, rtw_vif_recalc_lps_iter, &data);
if (data.count == 1 && data.found_vif->cfg.ps) {
rtwdev->ps_enabled = true;
} else {
rtwdev->ps_enabled = false;
rtw_leave_lps(rtwdev);
}
}
Annotation
- Immediate include surface: `main.h`, `reg.h`, `fw.h`, `ps.h`, `mac.h`, `coex.h`, `debug.h`.
- Detected declarations: `struct rtw_vif_recalc_lps_iter_data`, `function rtw_ips_pwr_up`, `function rtw_enter_ips`, `function rtw_restore_port_cfg_iter`, `function rtw_leave_ips`, `function rtw_power_mode_change`, `function __rtw_leave_lps_deep`, `function __rtw_fw_leave_lps_check_reg`, `function __rtw_fw_leave_lps_check_c2h`, `function rtw_fw_leave_lps_check`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.