summaryrefslogtreecommitdiff
path: root/sys
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
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')
-rw-r--r--sys/dev/ic/ral.c9
-rw-r--r--sys/dev/usb/if_ral.c9
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c
index b84af1c3773..8fadafa3c82 100644
--- a/sys/dev/ic/ral.c
+++ b/sys/dev/ic/ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ral.c,v 1.50 2005/05/13 19:00:07 damien Exp $ */
+/* $OpenBSD: ral.c,v 1.51 2005/05/13 19:13:09 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -1782,8 +1782,13 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
wh = mtod(m0, struct ieee80211_frame *);
+ /* 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;
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;