git: 6a56d8553b55 - stable/13 - iwlwifi: improve error message

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Mon, 19 Feb 2024 08:08:00 UTC
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=6a56d8553b557c61fc770ff6b1f202b2ac6180c6

commit 6a56d8553b557c61fc770ff6b1f202b2ac6180c6
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-02-12 16:09:12 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-02-19 08:02:01 +0000

    iwlwifi: improve error message
    
    In case we cannot identify the firmware monitor buf_location,
    print the type (usually 0 = invalid) so we have an idea at least
    of what was set (or not).
    
    (cherry picked from commit df9d7d1e0eb6004c5f5fde78bcc7c28cc27950fb)
---
 sys/contrib/dev/iwlwifi/pcie/ctxt-info-gen3.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/contrib/dev/iwlwifi/pcie/ctxt-info-gen3.c b/sys/contrib/dev/iwlwifi/pcie/ctxt-info-gen3.c
index fa4a14546860..5919346a059f 100644
--- a/sys/contrib/dev/iwlwifi/pcie/ctxt-info-gen3.c
+++ b/sys/contrib/dev/iwlwifi/pcie/ctxt-info-gen3.c
@@ -68,7 +68,11 @@ iwl_pcie_ctxt_info_dbg_enable(struct iwl_trans *trans,
 		}
 		break;
 	default:
+#if defined(__linux__)
 		IWL_ERR(trans, "WRT: Invalid buffer destination\n");
+#elif defined(__FreeBSD__)
+		IWL_ERR(trans, "WRT: Invalid buffer destination: %d\n", le32_to_cpu(fw_mon_cfg->buf_location));
+#endif
 	}
 out:
 	if (dbg_flags)