diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-03-08 21:58:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-03-08 21:58:28 +0000 |
commit | f81737c002c0cac1aedd1494595bb5fbff452692 (patch) | |
tree | 514f655a57266f45df5f76f13400b14eb7c31976 /sys/dev/ic/rt2560.c | |
parent | 5ac42f797bbfa4cd4d40a72a050d90f1207a9ef8 (diff) |
XXX commit a workaround (as found in a few other drivers) for the
divide by zero rate bug. Someone has to find the source of this
bug one day; from jsg
Diffstat (limited to 'sys/dev/ic/rt2560.c')
-rw-r--r-- | sys/dev/ic/rt2560.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c index 68e84da2101..a9c73b084ae 100644 --- a/sys/dev/ic/rt2560.c +++ b/sys/dev/ic/rt2560.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2560.c,v 1.31 2007/01/24 17:56:24 damien Exp $ */ +/* $OpenBSD: rt2560.c,v 1.32 2007/03/08 21:58:27 deraadt Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -1730,6 +1730,8 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0, 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; /* |