summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2023-08-29 23:28:39 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2023-08-29 23:28:39 +0000
commit1ac76659f98db78e4034fc4675e714fd94dffd90 (patch)
tree0db2b53d62bada267b1317c2c4fb392bc7271e76 /sys
parent21cdef7d18938c856d5b0242c50b5c1a46700d08 (diff)
fix handling of unknown error rate in mbim signal state info
from gerhard@: > According to MBIM spec, table 10-58 (MBIM_SIGNAL_STATE_INFO) a value > of 99 means the error rate is "Unknown or undetectable". the code was using -99 before, but properly reports unknown/null now.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/if_umb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c
index fb8df89ea62..3df4ad88e97 100644
--- a/sys/dev/usb/if_umb.c
+++ b/sys/dev/usb/if_umb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_umb.c,v 1.53 2023/08/29 23:26:40 dlg Exp $ */
+/* $OpenBSD: if_umb.c,v 1.54 2023/08/29 23:28:38 dlg Exp $ */
/*
* Copyright (c) 2016 genua mbH
@@ -1710,7 +1710,7 @@ umb_decode_signal_state(struct umb_softc *sc, void *data, int len)
}
sc->sc_info.rssi = rssi;
sc->sc_info.ber = letoh32(ss->err_rate);
- if (sc->sc_info.ber == -99)
+ if (sc->sc_info.ber == 99)
sc->sc_info.ber = UMB_VALUE_UNKNOWN;
#if NKSTAT > 0