mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
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...
This commit is contained in:
parent
667b217aa3
commit
fb9e391927
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112501
@ -312,6 +312,7 @@ wi_attach(device_t dev)
|
|||||||
ic->ic_flags = IEEE80211_F_HASPMGT | IEEE80211_F_HASAHDEMO;
|
ic->ic_flags = IEEE80211_F_HASPMGT | IEEE80211_F_HASAHDEMO;
|
||||||
ic->ic_state = IEEE80211_S_INIT;
|
ic->ic_state = IEEE80211_S_INIT;
|
||||||
ic->ic_newstate = wi_newstate;
|
ic->ic_newstate = wi_newstate;
|
||||||
|
ic->ic_fixed_rate = -1; /* Auto */
|
||||||
|
|
||||||
/* Find available channels */
|
/* Find available channels */
|
||||||
buflen = sizeof(val);
|
buflen = sizeof(val);
|
||||||
@ -1238,8 +1239,10 @@ wi_media_status(struct ifnet *ifp, struct ifmediareq *imr)
|
|||||||
/* convert to 802.11 rate */
|
/* convert to 802.11 rate */
|
||||||
rate = val * 2;
|
rate = val * 2;
|
||||||
if (sc->sc_firmware_type == WI_LUCENT) {
|
if (sc->sc_firmware_type == WI_LUCENT) {
|
||||||
if (rate == 10)
|
if (rate == 4 * 2)
|
||||||
rate = 11; /* 5.5Mbps */
|
rate = 11; /* 5.5Mbps */
|
||||||
|
else if (rate == 5 * 2)
|
||||||
|
rate = 22; /* 11Mbps */
|
||||||
} else {
|
} else {
|
||||||
if (rate == 4*2)
|
if (rate == 4*2)
|
||||||
rate = 11; /* 5.5Mbps */
|
rate = 11; /* 5.5Mbps */
|
||||||
@ -2005,8 +2008,20 @@ wi_write_txrate(struct wi_softc *sc)
|
|||||||
|
|
||||||
switch (sc->sc_firmware_type) {
|
switch (sc->sc_firmware_type) {
|
||||||
case WI_LUCENT:
|
case WI_LUCENT:
|
||||||
if (rate == 0)
|
switch (rate) {
|
||||||
rate = 3; /* auto */
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Choose a bit according to this table.
|
/* Choose a bit according to this table.
|
||||||
|
Loading…
Reference in New Issue
Block a user