summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ral.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/ral.c')
-rw-r--r--sys/dev/ic/ral.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c
index a2509a520e7..fa03c9699fb 100644
--- a/sys/dev/ic/ral.c
+++ b/sys/dev/ic/ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ral.c,v 1.61 2005/10/02 13:50:29 damien Exp $ */
+/* $OpenBSD: ral.c,v 1.62 2005/10/02 14:01:52 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -1820,6 +1820,9 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
}
rate &= IEEE80211_RATE_VAL;
+ /* assert tx rate is non-null so we don't end up dividing by zero */
+ KASSERT(rate != 0);
+
if (ic->ic_flags & IEEE80211_F_WEPON) {
m0 = ieee80211_wep_crypt(ifp, m0, 1);
if (m0 == NULL)