summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcs <jcs@openbsd.org>2017-09-04 13:47:56 +0000
committerjcs <jcs@openbsd.org>2017-09-04 13:47:56 +0000
commitd09d5f7cc4458cdde50bfe149aefab892c90cd7d (patch)
treee3f0c51666117cde999800ddc35014578fe425fd
parentFix typo in comment; ok mpi@ (diff)
downloadwireguard-openbsd-d09d5f7cc4458cdde50bfe149aefab892c90cd7d.tar.xz
wireguard-openbsd-d09d5f7cc4458cdde50bfe149aefab892c90cd7d.zip
Don't require exactly 20 elements in the _BIX package if at least 20
are returned since extras may be OEM-specific values we end up ignoring anyway, such as on the Lenovo X1C 5th Gen which returns 21 elements. ok mpi
-rw-r--r--sys/dev/acpi/acpibat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpibat.c b/sys/dev/acpi/acpibat.c
index 94a65926d22..82f6fc61d9c 100644
--- a/sys/dev/acpi/acpibat.c
+++ b/sys/dev/acpi/acpibat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibat.c,v 1.65 2017/07/25 21:32:07 jcs Exp $ */
+/* $OpenBSD: acpibat.c,v 1.66 2017/09/04 13:47:56 jcs Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -332,10 +332,10 @@ acpibat_getbix(struct acpibat_softc *sc)
if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_BIX", 0, NULL,
&res) == 0) {
- if (res.length == 20)
+ if (res.length >= 20)
sc->sc_use_bif = 0;
else
- dnprintf(10, "%s: invalid _BIX (%d != 20)\n",
+ dnprintf(10, "%s: invalid _BIX (%d < 20)\n",
DEVNAME(sc), res.length);
}