aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Jude <allanjude@FreeBSD.org>2021-02-23 22:48:37 +0000
committerAllan Jude <allanjude@FreeBSD.org>2021-02-23 22:48:59 +0000
commit4a5dfded17efb48fd04bcc8d69b70597b8cea808 (patch)
tree9e7a2664762a5ec4785f30e66000500535d897a1
parent9c4a8d24f0ffd5243fa5c6fe27178f669f16d1f5 (diff)
downloadsrc-4a5dfded17efb48fd04bcc8d69b70597b8cea808.tar.gz
src-4a5dfded17efb48fd04bcc8d69b70597b8cea808.zip
Revert "ipmi_smbios: remove unused smbios_cksum function"
This reverts commit d2589dc3d56ce063b28b54df11c950c3758d9578.
-rw-r--r--sys/dev/ipmi/ipmi_smbios.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c
index f7bc50d5173e..735f404eec5f 100644
--- a/sys/dev/ipmi/ipmi_smbios.c
+++ b/sys/dev/ipmi/ipmi_smbios.c
@@ -87,6 +87,7 @@ static struct mtx ipmi_info_mtx;
MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF);
static void ipmi_smbios_probe(struct ipmi_get_info *);
+static int smbios_cksum(struct smbios_eps *);
static void smbios_walk_table(uint8_t *, vm_size_t, smbios_callback_t,
void *);
static void smbios_ipmi_info(struct smbios_structure_header *, void *);
@@ -236,3 +237,19 @@ ipmi_smbios_identify(struct ipmi_get_info *info)
return (info->iface_type != 0);
}
+
+static int
+smbios_cksum(struct smbios_eps *e)
+{
+ u_int8_t *ptr;
+ u_int8_t cksum;
+ int i;
+
+ ptr = (u_int8_t *)e;
+ cksum = 0;
+ for (i = 0; i < e->length; i++) {
+ cksum += ptr[i];
+ }
+
+ return (cksum);
+}