diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-03-08 18:50:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-03-08 18:50:58 +0000 |
commit | 5ac42f797bbfa4cd4d40a72a050d90f1207a9ef8 (patch) | |
tree | 15e9424b7c810412c226f29e72d2f881f52c4ebb /sys/dev/ic/rt2661.c | |
parent | 5cc24b1c63d130913fab47c2a28d6ec2a41b8d60 (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 stephen@sock.org.uk, ok niallo
Diffstat (limited to 'sys/dev/ic/rt2661.c')
-rw-r--r-- | sys/dev/ic/rt2661.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index d7fa264e9da..b0ebe1c8d0a 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661.c,v 1.35 2007/01/03 18:16:43 claudio Exp $ */ +/* $OpenBSD: rt2661.c,v 1.36 2007/03/08 18:50:57 deraadt Exp $ */ /*- * Copyright (c) 2006 @@ -1576,6 +1576,8 @@ rt2661_tx_data(struct rt2661_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; /* |