mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 18:22:00 -04:00
Move files built as part of ath12k.ko from wifi7 directory to ath12k_wifi7.ko. Export necessary symbols from ath12k.ko and remove redundant exports from the wifi7 directory, as they are no longer needed. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Pavankumar Nandeshwar <quic_pnandesh@quicinc.com> Signed-off-by: Ripan Deuri <quic_rdeuri@quicinc.com> Reviewed-by: Karthikeyan Periyasamy <karthikeyan.periyasamy@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20251103112111.2260639-11-quic_rdeuri@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
111 lines
2.2 KiB
C
111 lines
2.2 KiB
C
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
/*
|
|
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
|
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
|
*
|
|
*/
|
|
|
|
#include <linux/vmalloc.h>
|
|
#include "core.h"
|
|
#include "debug.h"
|
|
|
|
void ath12k_info(struct ath12k_base *ab, const char *fmt, ...)
|
|
{
|
|
struct va_format vaf = {
|
|
.fmt = fmt,
|
|
};
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
vaf.va = &args;
|
|
dev_info(ab->dev, "%pV", &vaf);
|
|
/* TODO: Trace the log */
|
|
va_end(args);
|
|
}
|
|
EXPORT_SYMBOL(ath12k_info);
|
|
|
|
void ath12k_err(struct ath12k_base *ab, const char *fmt, ...)
|
|
{
|
|
struct va_format vaf = {
|
|
.fmt = fmt,
|
|
};
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
vaf.va = &args;
|
|
dev_err(ab->dev, "%pV", &vaf);
|
|
/* TODO: Trace the log */
|
|
va_end(args);
|
|
}
|
|
EXPORT_SYMBOL(ath12k_err);
|
|
|
|
void __ath12k_warn(struct device *dev, const char *fmt, ...)
|
|
{
|
|
struct va_format vaf = {
|
|
.fmt = fmt,
|
|
};
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
vaf.va = &args;
|
|
dev_warn_ratelimited(dev, "%pV", &vaf);
|
|
/* TODO: Trace the log */
|
|
va_end(args);
|
|
}
|
|
EXPORT_SYMBOL(__ath12k_warn);
|
|
|
|
#ifdef CONFIG_ATH12K_DEBUG
|
|
|
|
void __ath12k_dbg(struct ath12k_base *ab, enum ath12k_debug_mask mask,
|
|
const char *fmt, ...)
|
|
{
|
|
struct va_format vaf;
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
|
|
vaf.fmt = fmt;
|
|
vaf.va = &args;
|
|
|
|
if (likely(ab))
|
|
dev_printk(KERN_DEBUG, ab->dev, "%pV", &vaf);
|
|
else
|
|
printk(KERN_DEBUG "ath12k: %pV", &vaf);
|
|
|
|
/* TODO: trace log */
|
|
|
|
va_end(args);
|
|
}
|
|
EXPORT_SYMBOL(__ath12k_dbg);
|
|
|
|
void ath12k_dbg_dump(struct ath12k_base *ab,
|
|
enum ath12k_debug_mask mask,
|
|
const char *msg, const char *prefix,
|
|
const void *buf, size_t len)
|
|
{
|
|
char linebuf[256];
|
|
size_t linebuflen;
|
|
const void *ptr;
|
|
|
|
if (ath12k_debug_mask & mask) {
|
|
if (msg)
|
|
__ath12k_dbg(ab, mask, "%s\n", msg);
|
|
|
|
for (ptr = buf; (ptr - buf) < len; ptr += 16) {
|
|
linebuflen = 0;
|
|
linebuflen += scnprintf(linebuf + linebuflen,
|
|
sizeof(linebuf) - linebuflen,
|
|
"%s%08x: ",
|
|
(prefix ? prefix : ""),
|
|
(unsigned int)(ptr - buf));
|
|
hex_dump_to_buffer(ptr, len - (ptr - buf), 16, 1,
|
|
linebuf + linebuflen,
|
|
sizeof(linebuf) - linebuflen, true);
|
|
dev_dbg(ab->dev, "%s\n", linebuf);
|
|
}
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(ath12k_dbg_dump);
|
|
|
|
#endif /* CONFIG_ATH12K_DEBUG */
|