summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-08-27 06:43:14 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-08-27 06:43:14 +0000
commit0a85834931a8455fb8201d6b31ea4a7c703248e0 (patch)
tree57489041f52c4b111fff63f743c1112fda7b6fec /sys/dev/usb
parenta0dbc34adc90aeacb26e57becc86026bc599f60e (diff)
backout unapproved diff
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_ral.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 1f40972d6e1..87ef6434f7e 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.42 2005/08/25 20:28:19 damien Exp $ */
+/* $OpenBSD: if_ral.c,v 1.43 2005/08/27 06:42:27 deraadt Exp $ */
/*-
* Copyright (c) 2005
@@ -119,7 +119,7 @@ Static void ural_txeof(usbd_xfer_handle, usbd_private_handle,
usbd_status);
Static void ural_rxeof(usbd_xfer_handle, usbd_private_handle,
usbd_status);
-Static int ural_ack_rate(struct ieee80211com *, int);
+Static int ural_ack_rate(int);
Static uint16_t ural_txtime(int, int, uint32_t);
Static uint8_t ural_plcp_signal(int);
Static void ural_setup_tx_desc(struct ural_softc *,
@@ -736,18 +736,6 @@ ural_task(void *arg)
case IEEE80211_S_RUN:
ural_set_chan(sc, ic->ic_bss->ni_chan);
- /* update basic rate set */
- if (ic->ic_curmode == IEEE80211_MODE_11B) {
- /* 11b basic rates: 1, 2Mbps */
- ural_write(sc, RAL_TXRX_CSR11, 0x3);
- } else if (IEEE80211_IS_CHAN_5GHZ(ic->ic_bss->ni_chan)) {
- /* 11a basic rates: 6, 12, 24Mbps */
- ural_write(sc, RAL_TXRX_CSR11, 0x150);
- } else {
- /* 11g basic rates: 1, 2, 5.5, 11, 6, 12, 24Mbps */
- ural_write(sc, RAL_TXRX_CSR11, 0x15f);
- }
-
if (ic->ic_opmode != IEEE80211_M_MONITOR)
ural_set_bssid(sc, ic->ic_bss->ni_bssid);
@@ -959,7 +947,7 @@ skip: /* setup a new transfer */
* XXX: this should depend on the destination node basic rate set.
*/
Static int
-ural_ack_rate(struct ieee80211com *ic, int rate)
+ural_ack_rate(int rate)
{
switch (rate) {
/* CCK rates */
@@ -968,7 +956,7 @@ ural_ack_rate(struct ieee80211com *ic, int rate)
case 4:
case 11:
case 22:
- return (ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate;
+ return 4;
/* OFDM rates */
case 12:
@@ -1069,7 +1057,7 @@ ural_setup_tx_desc(struct ural_softc *sc, struct ural_tx_desc *desc,
if (RAL_RATE_IS_OFDM(rate))
desc->flags |= htole32(RAL_TX_OFDM);
- desc->wme = htole16(RAL_AIFSN(3) | RAL_LOGCWMIN(4) | RAL_LOGCWMAX(6));
+ desc->wme = htole16(RAL_LOGCWMAX(5) | RAL_LOGCWMIN(3) | RAL_AIFSN(2));
/*
* Fill PLCP fields.
@@ -1306,7 +1294,7 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
flags |= RAL_TX_ACK;
flags |= RAL_TX_RETRY(7);
- dur = ural_txtime(RAL_ACK_SIZE, ural_ack_rate(ic, rate),
+ dur = ural_txtime(RAL_ACK_SIZE, ural_ack_rate(rate),
ic->ic_flags) + RAL_SIFS;
*(uint16_t *)wh->i_dur = htole16(dur);
}
@@ -2020,7 +2008,7 @@ ural_init(struct ifnet *ifp)
/* we're ready! */
ural_write(sc, RAL_MAC_CSR1, RAL_HOST_READY);
- /* set basic rate set (will be updated later) */
+ /* set supported basic rates (1, 2, 6, 12, 24) */
ural_write(sc, RAL_TXRX_CSR11, 0x153);
error = ural_bbp_init(sc);