Date: Thu, 23 Aug 2007 16:06:04 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 125586 for review Message-ID: <200708231606.l7NG64uk025597@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125586 Change 125586 by sam@sam_ebb on 2007/08/23 16:05:44 checkpoint changes to convert ni_txrate from an index into the rate set to an IEEE rate; amrr is likely broken, untested Affected files ... .. //depot/projects/wifi/sys/dev/ath/ath_rate/amrr/amrr.c#21 edit .. //depot/projects/wifi/sys/dev/ath/ath_rate/onoe/onoe.c#22 edit .. //depot/projects/wifi/sys/dev/ath/ath_rate/sample/sample.c#14 edit .. //depot/projects/wifi/sys/dev/awi/awi.c#18 edit .. //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#33 edit .. //depot/projects/wifi/sys/dev/ral/rt2560.c#25 edit .. //depot/projects/wifi/sys/dev/usb/if_rum.c#7 edit .. //depot/projects/wifi/sys/dev/usb/if_ural.c#34 edit .. //depot/projects/wifi/sys/dev/wi/if_wi.c#42 edit .. //depot/projects/wifi/sys/net80211/ieee80211.c#56 edit .. //depot/projects/wifi/sys/net80211/ieee80211_amrr.c#6 edit .. //depot/projects/wifi/sys/net80211/ieee80211_amrr.h#3 edit .. //depot/projects/wifi/sys/net80211/ieee80211_node.h#49 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#61 edit .. //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#26 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/ath_rate/amrr/amrr.c#21 (text+ko) ==== @@ -210,7 +210,6 @@ ni->ni_rates.rs_nrates > 0 ? (ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL) / 2 : 0); - ni->ni_txrate = rate; /* * Before associating a node has no rate set setup * so we can't calculate any transmit codes to use. @@ -219,8 +218,8 @@ * lowest hardware rate. */ if (ni->ni_rates.rs_nrates > 0) { - amn->amn_tx_rix0 = sc->sc_rixmap[ - ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL]; + ni->ni_txrate = ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL; + amn->amn_tx_rix0 = sc->sc_rixmap[ni->ni_txrate]; amn->amn_tx_rate0 = rt->info[amn->amn_tx_rix0].rateCode; amn->amn_tx_rate0sp = amn->amn_tx_rate0 | rt->info[amn->amn_tx_rix0].shortPreamble; @@ -387,7 +386,7 @@ { struct ath_softc *sc = arg; struct amrr_node *amn = ATH_NODE_AMRR(ATH_NODE (ni)); - int old_rate; + int new_rate; #define is_success(amn) \ (amn->amn_tx_try1_cnt < (amn->amn_tx_try0_cnt/10)) @@ -395,12 +394,12 @@ (amn->amn_tx_try0_cnt > 10) #define is_failure(amn) \ (amn->amn_tx_try1_cnt > (amn->amn_tx_try0_cnt/3)) -#define is_max_rate(ni) \ -((ni->ni_txrate + 1) >= ni->ni_rates.rs_nrates) -#define is_min_rate(ni) \ -(ni->ni_txrate == 0) +#define is_max_rate(rix, ni) \ +((rix + 1) >= ni->ni_rates.rs_nrates) +#define is_min_rate(rix, ni) \ +(rix == 0) - old_rate = ni->ni_txrate; + rix = sc->sc_rixmap[ni->ni_txrate]; DPRINTF (sc, "cnt0: %d cnt1: %d cnt2: %d cnt3: %d -- threshold: %d\n", amn->amn_tx_try0_cnt, @@ -411,17 +410,17 @@ if (is_success (amn) && is_enough (amn)) { amn->amn_success++; if (amn->amn_success == amn->amn_success_threshold && - !is_max_rate (ni)) { + !is_max_rate (rix, ni)) { amn->amn_recovery = 1; amn->amn_success = 0; - ni->ni_txrate++; - DPRINTF (sc, "increase rate to %d\n", ni->ni_txrate); + rix++; + DPRINTF (sc, "increase rate to %d\n", rix); } else { amn->amn_recovery = 0; } } else if (is_failure (amn)) { amn->amn_success = 0; - if (!is_min_rate (ni)) { + if (!is_min_rate (rix, ni)) { if (amn->amn_recovery) { /* recovery failure. */ amn->amn_success_threshold *= 2; @@ -434,7 +433,7 @@ DPRINTF (sc, "decrease rate normal thr: %d\n", amn->amn_success_threshold); } amn->amn_recovery = 0; - ni->ni_txrate--; + rix--; } else { amn->amn_recovery = 0; } @@ -448,8 +447,9 @@ amn->amn_tx_try3_cnt = 0; amn->amn_tx_failure_cnt = 0; } - if (old_rate != ni->ni_txrate) { - ath_rate_update(sc, ni, ni->ni_txrate); + new_rate = ni->ni_rates.rs_rates[rix] & IEEE80211_RATE_VAL; + if (new_rate != ni->ni_txrate) { + ath_rate_update(sc, ni, new_rate); } } ==== //depot/projects/wifi/sys/dev/ath/ath_rate/onoe/onoe.c#22 (text+ko) ==== @@ -187,7 +187,6 @@ ni->ni_rates.rs_nrates > 0 ? (ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL) / 2 : 0); - ni->ni_txrate = rate; /* * Before associating a node has no rate set setup * so we can't calculate any transmit codes to use. @@ -197,8 +196,8 @@ */ if (ni->ni_rates.rs_nrates == 0) goto done; - on->on_tx_rix0 = sc->sc_rixmap[ - ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL]; + ni->ni_txrate = ni->ni_rates[rate] & IEEE80211_RATE_VAL; + on->on_tx_rix0 = sc->sc_rixmap[ni->ni_txrate]; on->on_tx_rate0 = rt->info[on->on_tx_rix0].rateCode; on->on_tx_rate0sp = on->on_tx_rate0 | @@ -365,7 +364,7 @@ struct ath_softc *sc = arg; struct onoe_node *on = ATH_NODE_ONOE(ATH_NODE(ni)); struct ieee80211_rateset *rs = &ni->ni_rates; - int dir = 0, nrate, enough; + int dir = 0, nrix, nrate, enough; /* * Rate control @@ -392,14 +391,15 @@ on->on_tx_upper, dir); nrate = ni->ni_txrate; + nrix = sc->sc_rixmap[nrate]; switch (dir) { case 0: if (enough && on->on_tx_upper > 0) on->on_tx_upper--; break; case -1: - if (nrate > 0) { - nrate--; + if (nrix > 0) { + nrate = rs->rs_rates[nrix-1] & IEEE80211_RATE_VAL; sc->sc_stats.ast_rate_drop++; } on->on_tx_upper = 0; @@ -409,8 +409,8 @@ if (++on->on_tx_upper < ath_rate_raise_threshold) break; on->on_tx_upper = 0; - if (nrate + 1 < rs->rs_nrates) { - nrate++; + if (nrix + 1 < rs->rs_nrates) { + nrate = rs->rs_rates[nrix+1] & IEEE80211_RATE_VAL; sc->sc_stats.ast_rate_raise++; } break; @@ -419,10 +419,9 @@ if (nrate != ni->ni_txrate) { DPRINTF(sc, "%s: %dM -> %dM (%d ok, %d err, %d retr)\n", __func__, - (rs->rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL) / 2, - (rs->rs_rates[nrate] & IEEE80211_RATE_VAL) / 2, + ni->ni_ntxrate / 2, nrate / 2, on->on_tx_ok, on->on_tx_err, on->on_tx_retr); - ath_rate_update(sc, ni, nrate); + ath_rate_update(sc, ni, nrix); } else if (enough) on->on_tx_ok = on->on_tx_err = on->on_tx_retr = 0; } ==== //depot/projects/wifi/sys/dev/ath/ath_rate/sample/sample.c#14 (text+ko) ==== @@ -49,7 +49,7 @@ #include <sys/module.h> #include <sys/kernel.h> #include <sys/lock.h> -#include <sys/sx.h> +#include <sys/mutex.h> #include <sys/errno.h> #include <machine/bus.h> @@ -348,7 +348,7 @@ * set the visible txrate for this node * to the rate of small packets */ - an->an_node.ni_txrate = ndx; + an->an_node.ni_txrate = sn->rates[ndx].rate; } } } @@ -723,7 +723,7 @@ DPRINTF(sc, ATH_DEBUG_RATE, "%s\n", ""); /* set the visible bit-rate to the lowest one available */ - ni->ni_txrate = 0; + ni->ni_txrate = ni->ni_rates.rs_rates[0] & IEEE80211_RATE_VAL; sn->num_rates = ni->ni_rates.rs_nrates; for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { @@ -768,9 +768,9 @@ ); if (sn->static_rate_ndx != -1) - ni->ni_txrate = sn->static_rate_ndx; + ni->ni_txrate = sn->rates[sn->static_rate_ndx].rate; else - ni->ni_txrate = sn->current_rate[0]; + ni->ni_txrate = sn->rates[sn->current_rate[0]].rate; #undef RATE } ==== //depot/projects/wifi/sys/dev/awi/awi.c#18 (text+ko) ==== @@ -868,9 +868,7 @@ if ((ifp->if_flags & IFF_DEBUG) && (ifp->if_flags & IFF_LINK2)) ieee80211_dump_pkt(ic, m0->m_data, m0->m_len, - ic->ic_bss->ni_rates. - rs_rates[ic->ic_bss->ni_txrate] & - IEEE80211_RATE_VAL, -1); + ic->ic_bss->ni_rates. ic->ic_bss->ni_txrate, -1); for (m = m0, len = 0; m != NULL; m = m->m_next) { awi_write_bytes(sc, frame + len, mtod(m, u_int8_t *), @@ -878,8 +876,7 @@ len += m->m_len; } m_freem(m0); - rate = (ic->ic_bss->ni_rates.rs_rates[ic->ic_bss->ni_txrate] & - IEEE80211_RATE_VAL) * 5; + rate = ic->ic_bss->ni_txrate * 5; awi_write_1(sc, ntxd + AWI_TXD_STATE, 0); awi_write_4(sc, txd + AWI_TXD_START, frame); awi_write_4(sc, txd + AWI_TXD_NEXT, ntxd); @@ -1094,8 +1091,7 @@ else mode = IEEE80211_MODE_11B; if (ic->ic_state == IEEE80211_S_RUN) { - rate = ic->ic_bss->ni_rates.rs_rates[ic->ic_bss->ni_txrate] & - IEEE80211_RATE_VAL; + rate = ic->ic_bss->ni_txrate; } else { if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) rate = 0; ==== //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#33 (text+ko) ==== @@ -2568,13 +2568,13 @@ ni = ic->ic_bss; /* calculate rate subtype */ imr->ifm_active |= ieee80211_rate2media(ic, - ni->ni_rates.rs_rates[ni->ni_txrate], ic->ic_curmode); + ni->ni_txrate, ic->ic_curmode); break; case IEEE80211_M_IBSS: ni = ic->ic_bss; /* calculate rate subtype */ imr->ifm_active |= ieee80211_rate2media(ic, - ni->ni_rates.rs_rates[ni->ni_txrate], ic->ic_curmode); + ni->ni_txrate, ic->ic_curmode); imr->ifm_active |= IFM_IEEE80211_ADHOC; break; case IEEE80211_M_AHDEMO: @@ -2697,30 +2697,11 @@ device_printf (sc->ndis_dev, "get link speed failed: %d\n", rval); - if (isset(ic->ic_modecaps, IEEE80211_MODE_11B)) { - ic->ic_bss->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11B]; - for (i = 0; i < ic->ic_bss->ni_rates.rs_nrates; i++) { - if ((ic->ic_bss->ni_rates.rs_rates[i] & - IEEE80211_RATE_VAL) == arg / 5000) - break; - } - } - - if (i == ic->ic_bss->ni_rates.rs_nrates && - isset(ic->ic_modecaps, IEEE80211_MODE_11G)) { + if (isset(ic->ic_modecaps, IEEE80211_MODE_11G)) ic->ic_bss->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11G]; - for (i = 0; i < ic->ic_bss->ni_rates.rs_nrates; i++) { - if ((ic->ic_bss->ni_rates.rs_rates[i] & - IEEE80211_RATE_VAL) == arg / 5000) - break; - } - } - - if (i == ic->ic_bss->ni_rates.rs_nrates) - device_printf(sc->ndis_dev, "no matching rate for: %d\n", - arg / 5000); else - ic->ic_bss->ni_txrate = i; + ic->ic_bss->ni_rates = ic->ic_sup_rates[IEEE80211_MODE_11B]; + ic->ic_bss->ni_txrate = arg / 5000; if (ic->ic_caps & IEEE80211_C_PMGT) { len = sizeof(arg); ==== //depot/projects/wifi/sys/dev/ral/rt2560.c#25 (text) ==== @@ -1796,7 +1796,7 @@ rn = (struct rt2560_node *)ni; ni->ni_txrate = ral_rssadapt_choose(&rn->rssadapt, rs, wh, m0->m_pkthdr.len, NULL, 0); - rate = rs->rs_rates[ni->ni_txrate]; + rate = ni->ni_txrate; } rate &= IEEE80211_RATE_VAL; ==== //depot/projects/wifi/sys/dev/usb/if_rum.c#7 (text+ko) ==== @@ -1293,7 +1293,7 @@ if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) rate = ic->ic_fixed_rate; else - rate = ni->ni_rates.rs_rates[ni->ni_txrate]; + rate = ni->ni_txrate; rate &= IEEE80211_RATE_VAL; @@ -2360,7 +2360,7 @@ for (i = ni->ni_rates.rs_nrates - 1; i > 0 && (ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL) > 72; i--); - ni->ni_txrate = i; + ni->ni_txrate = ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL; callout_reset(&sc->amrr_ch, hz, rum_amrr_timeout, sc); } ==== //depot/projects/wifi/sys/dev/usb/if_ural.c#34 (text+ko) ==== @@ -1358,7 +1358,7 @@ if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) rate = ic->ic_fixed_rate; else - rate = ni->ni_rates.rs_rates[ni->ni_txrate]; + rate = ni->ni_txrate; rate &= IEEE80211_RATE_VAL; @@ -2448,7 +2448,7 @@ i > 0 && (ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL) > 72; i--); - ni->ni_txrate = i; + ni->ni_txrate = ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL; callout_reset(&sc->amrr_ch, hz, ural_amrr_timeout, sc); } ==== //depot/projects/wifi/sys/dev/wi/if_wi.c#42 (text+ko) ==== @@ -1014,8 +1014,7 @@ } #if NBPFILTER > 0 if (bpf_peers_present(sc->sc_drvbpf)) { - sc->sc_tx_th.wt_rate = - ni->ni_rates.rs_rates[ni->ni_txrate]; + sc->sc_tx_th.wt_rate = ni->ni_txrate; bpf_mtap2(sc->sc_drvbpf, &sc->sc_tx_th, sc->sc_tx_th_len, m0); } @@ -1132,8 +1131,7 @@ } #if NBPFILTER > 0 if (bpf_peers_present(sc->sc_drvbpf)) { - sc->sc_tx_th.wt_rate = - ni->ni_rates.rs_rates[ni->ni_txrate]; + sc->sc_tx_th.wt_rate = ni->ni_txrate; bpf_mtap2(sc->sc_drvbpf, &sc->sc_tx_th, sc->sc_tx_th_len, m0); } @@ -3153,8 +3151,7 @@ if (ni != NULL) ieee80211_dump_pkt(ni->ni_ic, (u_int8_t *) &wh->wi_whdr, sizeof(wh->wi_whdr), - ni->ni_rates.rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL, - rssi); + ni->ni_txrate, rssi); printf(" status 0x%x rx_tstamp1 %u rx_tstamp0 0x%u rx_silence %u\n", le16toh(wh->wi_status), le16toh(wh->wi_rx_tstamp1), le16toh(wh->wi_rx_tstamp0), wh->wi_rx_silence); ==== //depot/projects/wifi/sys/net80211/ieee80211.c#56 (text+ko) ==== @@ -944,7 +944,6 @@ { struct ieee80211com *ic; enum ieee80211_phymode mode; - const struct ieee80211_rateset *rs; ic = ieee80211_find_instance(ifp); if (!ic) { @@ -975,11 +974,9 @@ } else if (ic->ic_opmode == IEEE80211_M_STA) { /* * In station mode report the current transmit rate. - * XXX HT rate */ - rs = &ic->ic_bss->ni_rates; imr->ifm_active |= ieee80211_rate2media(ic, - rs->rs_rates[ic->ic_bss->ni_txrate], mode); + ic->ic_bss->ni_txrate, mode); } else imr->ifm_active |= IFM_AUTO; } ==== //depot/projects/wifi/sys/net80211/ieee80211_amrr.c#6 (text+ko) ==== @@ -51,17 +51,22 @@ ((amn)->amn_retrycnt > (amn)->amn_txcnt / 3) #define is_enough(amn) \ ((amn)->amn_txcnt > 10) -#define is_min_rate(ni) \ - ((ni)->ni_txrate == 0) -#define is_max_rate(ni) \ - ((ni)->ni_txrate == (ni)->ni_rates.rs_nrates - 1) -#define increase_rate(ni) \ - ((ni)->ni_txrate++) -#define decrease_rate(ni) \ - ((ni)->ni_txrate--) #define reset_cnt(amn) \ do { (amn)->amn_txcnt = (amn)->amn_retrycnt = 0; } while (0) +static __inline void +increase_rate(struct ieee80211_amrr *amrr, struct ieee80211_node *ni) +{ + int rix = amrr->amrr_rixmap[ni->ni_txrate]; + ni->ni_txrate = ni->ni_rates.rs_rates[rix+1] & IEEE80211_RATE_VAL; +} +static __inline void +decrease_rate(struct ieee80211_amrr *amrr, struct ieee80211_node *ni) +{ + int rix = amrr->amrr_rixmap[ni->ni_txrate]; + ni->ni_txrate = ni->ni_rates.rs_rates[rix-1] & IEEE80211_RATE_VAL; +} + void ieee80211_amrr_init(struct ieee80211_amrr *amrr, struct ieee80211com *ic, int amin, int amax) @@ -73,6 +78,19 @@ } void +ieee80211_amrr_setrates(struct ieee80211_amrr *amrr, + const struct ieee80211_rateset *rs) +{ + int i; + + memset(amrr->amrr_rixmap, 0xff, sizeof(amrr->amrr_rixmap)); + for (i = 0; i < rs->rs_nrates; i++) + amrr->amrr_rixmap[rs->rs_rates[i] & IEEE80211_RATE_VAL] = i; + amrr->amrr_minrate = rs->rs_rates[0] & IEEE80211_RATE_VAL; + amrr->amrr_maxrate = rs->rs_rates[rs->rs_nrates-1] & IEEE80211_RATE_VAL; +} + +void ieee80211_amrr_node_init(struct ieee80211_amrr *amrr, struct ieee80211_amrr_node *amn) { @@ -94,23 +112,20 @@ if (is_success(amn) && is_enough(amn)) { amn->amn_success++; if (amn->amn_success >= amn->amn_success_threshold && - !is_max_rate(ni)) { + ni->ni_txrate != amrr->amrr_maxrate) { amn->amn_recovery = 1; amn->amn_success = 0; - increase_rate(ni); + increase_rate(amrr, ni); IEEE80211_DPRINTF(amrr->amrr_ic, IEEE80211_MSG_RATECTL, - "AMRR increasing rate %d (txcnt=%d " - "retrycnt=%d)\n", - ni->ni_rates.rs_rates[ni->ni_txrate] & - IEEE80211_RATE_VAL, - amn->amn_txcnt, amn->amn_retrycnt); + "AMRR increasing rate %d (txcnt=%d retrycnt=%d)\n", + ni->ni_txrate, amn->amn_txcnt, amn->amn_retrycnt); need_change = 1; } else { amn->amn_recovery = 0; } } else if (is_failure(amn)) { amn->amn_success = 0; - if (!is_min_rate(ni)) { + if (ni->ni_txrate != amrr->amrr_minrate) { if (amn->amn_recovery) { amn->amn_success_threshold *= 2; if (amn->amn_success_threshold > @@ -121,13 +136,10 @@ amn->amn_success_threshold = amrr->amrr_min_success_threshold; } - decrease_rate(ni); + decrease_rate(amrr, ni); IEEE80211_DPRINTF(amrr->amrr_ic, IEEE80211_MSG_RATECTL, - "AMRR decreasing rate %d (txcnt=%d " - "retrycnt=%d)\n", - ni->ni_rates.rs_rates[ni->ni_txrate] & - IEEE80211_RATE_VAL, - amn->amn_txcnt, amn->amn_retrycnt); + "AMRR decreasing rate %d (txcnt=%d retrycnt=%d)\n", + ni->ni_txrate, amn->amn_txcnt, amn->amn_retrycnt); need_change = 1; } amn->amn_recovery = 0; ==== //depot/projects/wifi/sys/net80211/ieee80211_amrr.h#3 (text+ko) ==== @@ -37,6 +37,8 @@ struct ieee80211_amrr { u_int amrr_min_success_threshold; u_int amrr_max_success_threshold; + uint8_t amrr_rixmap[256]; /* IEEE to h/w rate table ix */ + uint8_t amrr_minrate, amrr_maxrate; struct ieee80211com *amrr_ic; }; @@ -56,6 +58,8 @@ void ieee80211_amrr_init(struct ieee80211_amrr *, struct ieee80211com *ic, int, int); +void ieee80211_amrr_setrates(struct ieee80211_amrr *, + const struct ieee80211_rateset *); void ieee80211_amrr_node_init(struct ieee80211_amrr *, struct ieee80211_amrr_node *); void ieee80211_amrr_choose(struct ieee80211_amrr *, struct ieee80211_node *, ==== //depot/projects/wifi/sys/net80211/ieee80211_node.h#49 (text+ko) ==== @@ -169,7 +169,7 @@ int ni_fails; /* failure count to associate */ short ni_inact; /* inactivity mark count */ short ni_inact_reload;/* inactivity reload value */ - int ni_txrate; /* index to ni_rates[] */ + int ni_txrate; /* legacy RATE/MC */ struct ifqueue ni_savedq; /* ps-poll queue */ struct ieee80211_nodestats ni_stats; /* per-node statistics */ }; ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#61 (text+ko) ==== @@ -1311,9 +1311,6 @@ break; case IEEE80211_S_SCAN: /* adhoc/hostap mode */ case IEEE80211_S_ASSOC: /* infra mode */ - KASSERT(ni->ni_txrate < ni->ni_rates.rs_nrates, - ("%s: bogus xmit rate %u setup\n", __func__, - ni->ni_txrate)); #ifdef IEEE80211_DEBUG if (ieee80211_msg_debug(ic)) { if (ic->ic_opmode == IEEE80211_M_STA) @@ -1326,7 +1323,7 @@ ni->ni_esslen); printf(" channel %d start %uMb\n", ieee80211_chan2ieee(ic, ic->ic_curchan), - IEEE80211_RATE2MBS(ni->ni_rates.rs_rates[ni->ni_txrate])); + IEEE80211_RATE2MBS(ni->ni_txrate)); } #endif if (ic->ic_opmode == IEEE80211_M_STA) { ==== //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#26 (text+ko) ==== @@ -1013,7 +1013,7 @@ /* NB: the most up to date rssi is in the node, not the scan cache */ curRssi = ic->ic_node_getrssi(ni); if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) { - curRate = ni->ni_rates.rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL; + curRate = ni->ni_txrate; IEEE80211_DPRINTF(ic, IEEE80211_MSG_ROAM, "%s: currssi %d currate %u roamrssi %d roamrate %u\n", __func__, curRssi, curRate, roamRssi, roamRate);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708231606.l7NG64uk025597>