summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-01-13 21:09:50 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-01-13 21:09:50 +0000
commitf5fb854f0d19e32bb4869b25482117abc3915868 (patch)
treebebec00ca2d61f0c73ca4fcb113949c59c2dabad /sys/dev
parenta7d265886e3dc82396fb6e9fe7b7a6f521869400 (diff)
- fix short slot time
- add WEP capability flag - make sure to reset fallback to CCK rates when switching to 802.11a - give BBP more time to initialize
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/rt2661.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c
index c77c31af585..3f49c16c96e 100644
--- a/sys/dev/ic/rt2661.c
+++ b/sys/dev/ic/rt2661.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661.c,v 1.5 2006/01/11 21:39:10 damien Exp $ */
+/* $OpenBSD: rt2661.c,v 1.6 2006/01/13 21:09:49 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -415,7 +415,9 @@ rt2661_attach(void *xsc, int id)
IEEE80211_C_MONITOR | /* monitor mode supported */
IEEE80211_C_HOSTAP | /* HostAp mode supported */
IEEE80211_C_TXPMGT | /* tx power management */
- IEEE80211_C_SHPREAMBLE; /* short preamble supported */
+ IEEE80211_C_SHPREAMBLE | /* short preamble supported */
+ IEEE80211_C_SHSLOT | /* short slot time supported */
+ IEEE80211_C_WEP; /* s/w WEP */
if (sc->rf_rev == RT2661_RF_5225 || sc->rf_rev == RT2661_RF_5325) {
/* set supported .11a rates */
@@ -939,7 +941,7 @@ rt2661_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
rt2661_enable_mrr(sc);
rt2661_set_txpreamble(sc);
rt2661_set_basicrates(sc);
- rt2661_set_bssid(sc, ic->ic_bss->ni_bssid);
+ rt2661_set_bssid(sc, ni->ni_bssid);
}
if (ic->ic_opmode == IEEE80211_M_HOSTAP ||
@@ -2128,9 +2130,10 @@ rt2661_enable_mrr(struct rt2661_softc *sc)
tmp = RAL_READ(sc, RT2661_TXRX_CSR4);
- tmp |= RT2661_MRR_ENABLED;
+ tmp &= ~RT2661_MRR_CCK_FALLBACK;
if (!IEEE80211_IS_CHAN_5GHZ(ic->ic_bss->ni_chan))
tmp |= RT2661_MRR_CCK_FALLBACK;
+ tmp |= RT2661_MRR_ENABLED;
RAL_WRITE(sc, RT2661_TXRX_CSR4, tmp);
}
@@ -2452,7 +2455,7 @@ rt2661_bbp_init(struct rt2661_softc *sc)
val = rt2661_bbp_read(sc, 0);
if (val != 0 && val != 0xff)
break;
- DELAY(1);
+ DELAY(100);
}
if (ntries == 100) {
printf("%s: timeout waiting for BBP\n", sc->sc_dev.dv_xname);
@@ -2497,6 +2500,8 @@ rt2661_init(struct ifnet *ifp)
sc->sc_flags |= RT2661_ENABLED;
}
+ rt2661_stop(ifp, 0);
+
switch (sc->sc_id) {
case PCI_PRODUCT_RALINK_RT2561:
name = "ral-rt2561";