git: 71ebd2d00b96 - main - iwlwifi: constify another argument of iwl_print_hex_dump()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 22 Oct 2022 19:52:06 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=71ebd2d00b9618325ef6d0bb8c224d3d5f32160a
commit 71ebd2d00b9618325ef6d0bb8c224d3d5f32160a
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2022-10-22 17:33:18 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2022-10-22 17:33:18 +0000
iwlwifi: constify another argument of iwl_print_hex_dump()
This is needed when enabling debugfs as it passes a const in which
would otherwise be dropped.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
---
sys/contrib/dev/iwlwifi/iwl-debug.c | 4 ++++
sys/contrib/dev/iwlwifi/iwl-debug.h | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/sys/contrib/dev/iwlwifi/iwl-debug.c b/sys/contrib/dev/iwlwifi/iwl-debug.c
index 5bb61151b93b..5a9c8bc70168 100644
--- a/sys/contrib/dev/iwlwifi/iwl-debug.c
+++ b/sys/contrib/dev/iwlwifi/iwl-debug.c
@@ -115,7 +115,11 @@ iwl_have_debug_level(enum iwl_dl level)
/* Passing the iwl_drv * in seems pointless. */
void
iwl_print_hex_dump(void *drv __unused, enum iwl_dl level,
+#if defined(__linux__)
const char *prefix, uint8_t *data, size_t len)
+#elif defined(__FreeBSD__)
+ const char *prefix, const uint8_t *data, size_t len)
+#endif
{
/* Given we have a level, check for it. */
diff --git a/sys/contrib/dev/iwlwifi/iwl-debug.h b/sys/contrib/dev/iwlwifi/iwl-debug.h
index dac2c6b31562..43288a5a8d74 100644
--- a/sys/contrib/dev/iwlwifi/iwl-debug.h
+++ b/sys/contrib/dev/iwlwifi/iwl-debug.h
@@ -109,7 +109,11 @@ void __iwl_err(struct device *, enum iwl_err_mode, const char *, ...);
#ifdef CONFIG_IWLWIFI_DEBUG
bool iwl_have_debug_level(enum iwl_dl);
+#if defined(__linux__)
void iwl_print_hex_dump(void *, enum iwl_dl, const char *, uint8_t *, size_t);
+#elif defined(__FreeBSD__)
+void iwl_print_hex_dump(void *, enum iwl_dl, const char *, const uint8_t *, size_t);
+#endif
void __iwl_dbg(struct device *, u32, bool, const char *, const char *fmt, ...);
#define IWL_DPRINTF_DEV_PREFIX(_dev, _e, _prefix, _fmt, ...) \