drivers/net/wireless/ath/ath11k/wow.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath11k/wow.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath11k/wow.c- Extension
.c- Size
- 22547 bytes
- Lines
- 884
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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
linux/delay.hmac.hnet/mac80211.hcore.hhif.hdebug.hwmi.hwow.hdp_rx.h
Detected Declarations
function ath11k_wow_enablefunction ath11k_wow_wakeupfunction ath11k_wow_vif_cleanupfunction ath11k_wow_cleanupfunction list_for_each_entryfunction ath11k_wow_convert_8023_to_80211function ath11k_wmi_pno_check_and_convertfunction ath11k_vif_wow_set_wakeupsfunction ath11k_wow_set_wakeupsfunction list_for_each_entryfunction ath11k_vif_wow_clean_nlofunction ath11k_wow_nlo_cleanupfunction list_for_each_entryfunction ath11k_wow_set_hw_filterfunction list_for_each_entryfunction ath11k_wow_clear_hw_filterfunction list_for_each_entryfunction ath11k_wow_arp_ns_offloadfunction list_for_each_entryfunction ath11k_gtk_rekey_offloadfunction list_for_each_entryfunction ath11k_wow_protocol_offloadfunction ath11k_wow_set_keepalivefunction list_for_each_entryfunction ath11k_wow_op_suspendfunction ath11k_wow_op_set_wakeupfunction ath11k_wow_op_resumefunction ath11k_wow_init
Annotated Snippet
if (ret) {
ath11k_warn(ab, "failed to issue wow enable: %d\n", ret);
return ret;
}
ret = wait_for_completion_timeout(&ab->htc_suspend, 3 * HZ);
if (ret == 0) {
ath11k_warn(ab,
"timed out while waiting for htc suspend completion\n");
return -ETIMEDOUT;
}
if (test_bit(ATH11K_FLAG_HTC_SUSPEND_COMPLETE, &ab->dev_flags))
/* success, suspend complete received */
return 0;
ath11k_warn(ab, "htc suspend not complete, retrying (try %d)\n",
i);
msleep(ATH11K_WOW_RETRY_WAIT_MS);
}
ath11k_warn(ab, "htc suspend not complete, failing after %d tries\n", i);
return -ETIMEDOUT;
}
int ath11k_wow_wakeup(struct ath11k_base *ab)
{
struct ath11k *ar = ath11k_ab_to_ar(ab, 0);
int ret;
/* In the case of WCN6750, WoW wakeup is done
* by sending SMP2P power save exit message
* to the target processor.
*/
if (ab->hw_params.smp2p_wow_exit)
return 0;
reinit_completion(&ab->wow.wakeup_completed);
ret = ath11k_wmi_wow_host_wakeup_ind(ar);
if (ret) {
ath11k_warn(ab, "failed to send wow wakeup indication: %d\n",
ret);
return ret;
}
ret = wait_for_completion_timeout(&ab->wow.wakeup_completed, 3 * HZ);
if (ret == 0) {
ath11k_warn(ab, "timed out while waiting for wow wakeup completion\n");
return -ETIMEDOUT;
}
return 0;
}
static int ath11k_wow_vif_cleanup(struct ath11k_vif *arvif)
{
struct ath11k *ar = arvif->ar;
int i, ret;
for (i = 0; i < WOW_EVENT_MAX; i++) {
ret = ath11k_wmi_wow_add_wakeup_event(ar, arvif->vdev_id, i, 0);
if (ret) {
ath11k_warn(ar->ab, "failed to issue wow wakeup for event %s on vdev %i: %d\n",
wow_wakeup_event(i), arvif->vdev_id, ret);
return ret;
}
}
for (i = 0; i < ar->wow.max_num_patterns; i++) {
ret = ath11k_wmi_wow_del_pattern(ar, arvif->vdev_id, i);
if (ret) {
ath11k_warn(ar->ab, "failed to delete wow pattern %d for vdev %i: %d\n",
i, arvif->vdev_id, ret);
return ret;
}
}
return 0;
}
static int ath11k_wow_cleanup(struct ath11k *ar)
{
struct ath11k_vif *arvif;
int ret;
lockdep_assert_held(&ar->conf_mutex);
list_for_each_entry(arvif, &ar->arvifs, list) {
Annotation
- Immediate include surface: `linux/delay.h`, `mac.h`, `net/mac80211.h`, `core.h`, `hif.h`, `debug.h`, `wmi.h`, `wow.h`.
- Detected declarations: `function ath11k_wow_enable`, `function ath11k_wow_wakeup`, `function ath11k_wow_vif_cleanup`, `function ath11k_wow_cleanup`, `function list_for_each_entry`, `function ath11k_wow_convert_8023_to_80211`, `function ath11k_wmi_pno_check_and_convert`, `function ath11k_vif_wow_set_wakeups`, `function ath11k_wow_set_wakeups`, `function list_for_each_entry`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.