drivers/net/wireless/ath/ath12k/coredump.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/coredump.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/coredump.c- Extension
.c- Size
- 1369 bytes
- Lines
- 55
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/devcoredump.hhif.hcoredump.hdebug.h
Detected Declarations
function Copyrightfunction ath12k_coredump_uploadfunction ath12k_coredump_collect
Annotated Snippet
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
#include <linux/devcoredump.h>
#include "hif.h"
#include "coredump.h"
#include "debug.h"
enum
ath12k_fw_crash_dump_type ath12k_coredump_get_dump_type(enum ath12k_qmi_target_mem type)
{
enum ath12k_fw_crash_dump_type dump_type;
switch (type) {
case HOST_DDR_REGION_TYPE:
dump_type = FW_CRASH_DUMP_REMOTE_MEM_DATA;
break;
case M3_DUMP_REGION_TYPE:
dump_type = FW_CRASH_DUMP_M3_DUMP;
break;
case PAGEABLE_MEM_REGION_TYPE:
dump_type = FW_CRASH_DUMP_PAGEABLE_DATA;
break;
case BDF_MEM_REGION_TYPE:
case CALDB_MEM_REGION_TYPE:
dump_type = FW_CRASH_DUMP_NONE;
break;
case MLO_GLOBAL_MEM_REGION_TYPE:
dump_type = FW_CRASH_DUMP_MLO_GLOBAL_DATA;
break;
default:
dump_type = FW_CRASH_DUMP_TYPE_MAX;
break;
}
return dump_type;
}
void ath12k_coredump_upload(struct work_struct *work)
{
struct ath12k_base *ab = container_of(work, struct ath12k_base, dump_work);
ath12k_info(ab, "Uploading coredump\n");
/* dev_coredumpv() takes ownership of the buffer */
dev_coredumpv(ab->dev, ab->dump_data, ab->ath12k_coredump_len, GFP_KERNEL);
ab->dump_data = NULL;
}
void ath12k_coredump_collect(struct ath12k_base *ab)
{
ath12k_hif_coredump_download(ab);
}
Annotation
- Immediate include surface: `linux/devcoredump.h`, `hif.h`, `coredump.h`, `debug.h`.
- Detected declarations: `function Copyright`, `function ath12k_coredump_upload`, `function ath12k_coredump_collect`.
- 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.