summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/usb/if_ral.c4
-rw-r--r--sys/dev/usb/if_rum.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index ff52ab1d6fd..506caa91eb1 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.82 2006/11/13 20:06:38 damien Exp $ */
+/* $OpenBSD: if_ral.c,v 1.83 2006/11/19 16:44:36 damien Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -1074,6 +1074,8 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
rs_rates[ic->ic_fixed_rate];
} else
rate = ni->ni_rates.rs_rates[ni->ni_txrate];
+ if (rate == 0)
+ rate = 2; /* XXX should not happen */
rate &= IEEE80211_RATE_VAL;
/* check if RTS/CTS or CTS-to-self protection must be used */
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index b480ef90dd8..5a7ab77c989 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.43 2006/11/13 20:06:38 damien Exp $ */
+/* $OpenBSD: if_rum.c,v 1.44 2006/11/19 16:44:36 damien Exp $ */
/*-
* Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -1071,6 +1071,8 @@ rum_tx_data(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
rs_rates[ic->ic_fixed_rate];
} else
rate = ni->ni_rates.rs_rates[ni->ni_txrate];
+ if (rate == 0)
+ rate = 2; /* XXX should not happen */
rate &= IEEE80211_RATE_VAL;
/* check if RTS/CTS or CTS-to-self protection must be used */