diff options
| author | Andriy Voskoboinyk <avos@FreeBSD.org> | 2016-10-02 20:35:55 +0000 |
|---|---|---|
| committer | Andriy Voskoboinyk <avos@FreeBSD.org> | 2016-10-02 20:35:55 +0000 |
| commit | f6930bec3346bb31ba289844a0532e51b011ac8e (patch) | |
| tree | 7498c690145d9d293ef9ed00615987f9093c6777 /sys/dev/otus | |
| parent | d2e877f0fab3ffdc4017a542929416e953297332 (diff) | |
Notes
Diffstat (limited to 'sys/dev/otus')
| -rw-r--r-- | sys/dev/otus/if_otus.c | 16 | ||||
| -rw-r--r-- | sys/dev/otus/if_otusreg.h | 1 |
2 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/otus/if_otus.c b/sys/dev/otus/if_otus.c index f08332ccd38f..679b0932d691 100644 --- a/sys/dev/otus/if_otus.c +++ b/sys/dev/otus/if_otus.c @@ -2148,14 +2148,18 @@ otus_hw_rate_is_ofdm(struct otus_softc *sc, uint8_t hw_rate) static void otus_tx_update_ratectl(struct otus_softc *sc, struct ieee80211_node *ni) { - int tx, tx_success, tx_retry; + struct ieee80211_ratectl_tx_stats *txs = &sc->sc_txs; + struct otus_node *on = OTUS_NODE(ni); - tx = OTUS_NODE(ni)->tx_done; - tx_success = OTUS_NODE(ni)->tx_done - OTUS_NODE(ni)->tx_err; - tx_retry = OTUS_NODE(ni)->tx_retries; + txs->flags = IEEE80211_RATECTL_TX_STATS_NODE | + IEEE80211_RATECTL_TX_STATS_RETRIES; + txs->ni = ni; + txs->nframes = on->tx_done; + txs->nsuccess = on->tx_done - on->tx_err; + txs->nretries = on->tx_retries; - ieee80211_ratectl_tx_update(ni->ni_vap, ni, &tx, &tx_success, - &tx_retry); + ieee80211_ratectl_tx_update(ni->ni_vap, txs); + on->tx_done = on->tx_err = on->tx_retries = 0; } /* diff --git a/sys/dev/otus/if_otusreg.h b/sys/dev/otus/if_otusreg.h index f7b1eda5484d..e13b1066c9e8 100644 --- a/sys/dev/otus/if_otusreg.h +++ b/sys/dev/otus/if_otusreg.h @@ -997,6 +997,7 @@ struct otus_vap { struct otus_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_stats sc_txs; struct mbufq sc_snd; device_t sc_dev; struct usb_device *sc_udev; |
