diff options
| author | Warner Losh <imp@FreeBSD.org> | 2003-03-22 15:39:38 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2003-03-22 15:39:38 +0000 |
| commit | fb9e3919279d58b8391f7bc0c87b3767ef10c207 (patch) | |
| tree | 49511a41f3e338ec842d63fc26f6a64653866513 /sys/dev/wi | |
| parent | 667b217aa31209314a941e86634934470de7554c (diff) | |
Notes
Diffstat (limited to 'sys/dev/wi')
| -rw-r--r-- | sys/dev/wi/if_wi.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 64d68d2b2b8e..4fe1ae0279a5 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. |
