Date: Mon, 11 Feb 2008 03:47:15 GMT From: Sepherosa Ziehau <sephe@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 135191 for review Message-ID: <200802110347.m1B3lFkb024668@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135191 Change 135191 by sephe@sephe_zealot:sam_wifi on 2008/02/11 03:47:00 Current channel's rate table is in ieee80211com now. Affected files ... .. //depot/projects/wifi/sys/dev/ral/rt2560.c#34 edit .. //depot/projects/wifi/sys/dev/ral/rt2560var.h#11 edit .. //depot/projects/wifi/sys/dev/ral/rt2661.c#25 edit .. //depot/projects/wifi/sys/dev/ral/rt2661var.h#9 edit Differences ... ==== //depot/projects/wifi/sys/dev/ral/rt2560.c#34 (text) ==== @@ -1488,7 +1488,7 @@ desc->plcp_service = 4; len += IEEE80211_CRC_LEN; - if (ieee80211_rate2phytype(sc->sc_currates, rate) == IEEE80211_T_OFDM) { + if (ieee80211_rate2phytype(ic->ic_currates, rate) == IEEE80211_T_OFDM) { desc->flags |= htole32(RT2560_TX_OFDM); plcp_length = len & 0xfff; @@ -1626,7 +1626,7 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2560_TX_ACK; - dur = ieee80211_ack_duration(sc->sc_currates, rate, + dur = ieee80211_ack_duration(ic->ic_currates, rate, ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); @@ -1811,12 +1811,12 @@ rtsrate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; - dur = ieee80211_ack_duration(sc->sc_currates, + dur = ieee80211_ack_duration(ic->ic_currates, rtsrate, ic->ic_flags) - + ieee80211_compute_duration(sc->sc_currates, + + ieee80211_compute_duration(ic->ic_currates, m0->m_pkthdr.len + IEEE80211_CRC_LEN, rate, ic->ic_flags) - + ieee80211_ack_duration(sc->sc_currates, + + ieee80211_ack_duration(ic->ic_currates, rate, ic->ic_flags); m = rt2560_get_rts(sc, wh, dur); @@ -1923,7 +1923,7 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2560_TX_ACK; - dur = ieee80211_ack_duration(sc->sc_currates, rate, + dur = ieee80211_ack_duration(ic->ic_currates, rate, ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); } @@ -2229,7 +2229,6 @@ chan = ieee80211_chan2ieee(ic, c); if (chan == 0 || chan == IEEE80211_CHAN_ANY) return; - sc->sc_currates = ieee80211_get_ratetable(c); if (IEEE80211_IS_CHAN_2GHZ(c)) power = min(sc->txpow[chan - 1], 31); ==== //depot/projects/wifi/sys/dev/ral/rt2560var.h#11 (text) ==== @@ -165,7 +165,6 @@ #define RT2560_F_PRIO_OACTIVE 0x2 #define RT2560_F_DATA_OACTIVE 0x4 int sc_flags; - const struct ieee80211_rate_table *sc_currates; }; int rt2560_attach(device_t, int); ==== //depot/projects/wifi/sys/dev/ral/rt2661.c#25 (text) ==== @@ -1356,7 +1356,7 @@ desc->plcp_service = 4; len += IEEE80211_CRC_LEN; - if (ieee80211_rate2phytype(sc->sc_currates, rate) == IEEE80211_T_OFDM) { + if (ieee80211_rate2phytype(ic->ic_currates, rate) == IEEE80211_T_OFDM) { desc->flags |= htole32(RT2661_TX_OFDM); plcp_length = len & 0xfff; @@ -1442,7 +1442,7 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2661_TX_NEED_ACK; - dur = ieee80211_ack_duration(sc->sc_currates, + dur = ieee80211_ack_duration(ic->ic_currates, rate, ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); @@ -1567,12 +1567,12 @@ rtsrate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; - dur = ieee80211_ack_duration(sc->sc_currates, + dur = ieee80211_ack_duration(ic->ic_currates, rtsrate, ic->ic_flags) - + ieee80211_compute_duration(sc->sc_currates, + + ieee80211_compute_duration(ic->ic_currates, m0->m_pkthdr.len + IEEE80211_CRC_LEN, rate, ic->ic_flags) - + ieee80211_ack_duration(sc->sc_currates, + + ieee80211_ack_duration(ic->ic_currates, rate, ic->ic_flags); m = rt2661_get_rts(sc, wh, dur); @@ -1676,7 +1676,7 @@ if (!noack && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2661_TX_NEED_ACK; - dur = ieee80211_ack_duration(sc->sc_currates, rate, + dur = ieee80211_ack_duration(ic->ic_currates, rate, ic->ic_flags); *(uint16_t *)wh->i_dur = htole16(dur); } @@ -2137,8 +2137,6 @@ if (chan == 0 || chan == IEEE80211_CHAN_ANY) return; - sc->sc_currates = ieee80211_get_ratetable(c); - /* select the appropriate RF settings based on what EEPROM says */ rfprog = (sc->rfprog == 0) ? rt2661_rf5225_1 : rt2661_rf5225_2; ==== //depot/projects/wifi/sys/dev/ral/rt2661var.h#9 (text) ==== @@ -168,7 +168,6 @@ int sc_txtap_len; #define RAL_INPUT_RUNNING 1 int sc_flags; - const struct ieee80211_rate_table *sc_currates; }; int rt2661_attach(device_t, int);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802110347.m1B3lFkb024668>