summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_ral.c
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2005-05-13 19:13:12 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2005-05-13 19:13:12 +0000
commiteabf1da9481a99db897a57fda8e4ac42ed2e8da4 (patch)
tree6f134baf0c2d8859e65588733ebba7169d0d6489 /sys/dev/usb/if_ral.c
parentac8112a615bf00cbda21b8489a72ce6b1aa35c47 (diff)
before ieee80211.c rev 1.6, it was guaranted that ic_curmode was different
from IEEE80211_MODE_AUTO if ic_fixed_rate != -1. it is no longer the case. this implements a temporary workaround. the whole rate selection should be rewritten.
Diffstat (limited to 'sys/dev/usb/if_ral.c')
-rw-r--r--sys/dev/usb/if_ral.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 262a76d2f4b..09f73638ed4 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.31 2005/05/13 19:00:10 damien Exp $ */
+/* $OpenBSD: if_ral.c,v 1.32 2005/05/13 19:13:11 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -1229,8 +1229,13 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
usbd_status error;
int xferlen, rate;
+ /* XXX this should be reworked! */
if (ic->ic_fixed_rate != -1) {
- rs = &ic->ic_sup_rates[ic->ic_curmode];
+ if (ic->ic_curmode != IEEE80211_MODE_AUTO)
+ rs = &ic->ic_sup_rates[ic->ic_curmode];
+ else
+ rs = &ic->ic_sup_rates[IEEE80211_MODE_11G];
+
rate = rs->rs_rates[ic->ic_fixed_rate];
} else {
rs = &ni->ni_rates;