diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2006-11-19 16:44:37 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2006-11-19 16:44:37 +0000 |
commit | c57d535fdd72d6b65556cdd4093f0e01a7358b09 (patch) | |
tree | 53b02657bcf02fcb0a7035199b4ba7b4a3d05c28 /sys | |
parent | 2c4921e027274a12eaaab8cf8016f8ab5a4baf0b (diff) |
restore the workaround for rate==0 bug.
i removed it in my last commit because i thought it was gone.
looks like it's not the case.
pointed out by niallo@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/if_ral.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_rum.c | 4 |
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 */ |