summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-03-22 15:39:38 +0000
committerimp <imp@FreeBSD.org>2003-03-22 15:39:38 +0000
commitb74ad635d3b96b1f8ffa1552a8b79dffdbdd9e70 (patch)
tree49511a41f3e338ec842d63fc26f6a64653866513
parent7928fbf09d4518923e2ac50ed19f8ef7b1869a61 (diff)
downloadFreeBSD-src-b74ad635d3b96b1f8ffa1552a8b79dffdbdd9e70.zip
FreeBSD-src-b74ad635d3b96b1f8ffa1552a8b79dffdbdd9e70.tar.gz
MFP4 27224 and 27225:
Change 27224 by imp@imp_hammer on 2003/03/22 00:16:22 Put what I think are the correct TX RATE translation tables in place for LUCENT firmware. This is based on the 4.x driver. Maybe it should be table driven? ifconfig wi0 media DS/11Mbps still fails, but it fails before we even get to the txrate stuff, so other things are wrong. Change 27225 by imp@imp_hammer on 2003/03/22 00:45:11 Default ic_fixed_rate to -1. This is the same thing as autoselect. There really should be a #define for this...
-rw-r--r--sys/dev/wi/if_wi.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 64d68d2..4fe1ae0 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -312,6 +312,7 @@ wi_attach(device_t dev)
ic->ic_flags = IEEE80211_F_HASPMGT | IEEE80211_F_HASAHDEMO;
ic->ic_state = IEEE80211_S_INIT;
ic->ic_newstate = wi_newstate;
+ ic->ic_fixed_rate = -1; /* Auto */
/* Find available channels */
buflen = sizeof(val);
@@ -1238,8 +1239,10 @@ wi_media_status(struct ifnet *ifp, struct ifmediareq *imr)
/* convert to 802.11 rate */
rate = val * 2;
if (sc->sc_firmware_type == WI_LUCENT) {
- if (rate == 10)
+ if (rate == 4 * 2)
rate = 11; /* 5.5Mbps */
+ else if (rate == 5 * 2)
+ rate = 22; /* 11Mbps */
} else {
if (rate == 4*2)
rate = 11; /* 5.5Mbps */
@@ -2005,8 +2008,20 @@ wi_write_txrate(struct wi_softc *sc)
switch (sc->sc_firmware_type) {
case WI_LUCENT:
- if (rate == 0)
- rate = 3; /* auto */
+ switch (rate) {
+ case 0: /* auto == 11mbps auto */
+ rate = 3;
+ break;
+ /* case 1, 2 map to 1, 2*/
+ case 5: /* 5.5Mbps -> 4 */
+ rate = 4;
+ break;
+ case 11: /* 11mbps -> 5 */
+ rate = 5;
+ break;
+ default:
+ break;
+ }
break;
default:
/* Choose a bit according to this table.
OpenPOWER on IntegriCloud