Migrate iwn(4) to use the new ieee80211_tx_complete() API.
Tested: * Intel 5100, STA mode
This commit is contained in:
parent
808d6d430f
commit
e733e239ee
@ -2668,11 +2668,7 @@ iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc,
|
||||
KASSERT(ni != NULL, ("no node"));
|
||||
KASSERT(m != NULL, ("no mbuf"));
|
||||
|
||||
if (m->m_flags & M_TXCB)
|
||||
ieee80211_process_callback(ni, m, 1);
|
||||
|
||||
m_freem(m);
|
||||
ieee80211_free_node(ni);
|
||||
ieee80211_tx_complete(ni, m, 1);
|
||||
|
||||
txq->queued--;
|
||||
txq->read = (txq->read + 1) % IWN_TX_RING_COUNT;
|
||||
@ -2934,7 +2930,19 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int ackfailcnt,
|
||||
ni = data->ni, data->ni = NULL;
|
||||
vap = ni->ni_vap;
|
||||
|
||||
if (m->m_flags & M_TXCB) {
|
||||
/*
|
||||
* Update rate control statistics for the node.
|
||||
*/
|
||||
if (status & IWN_TX_FAIL) {
|
||||
ifp->if_oerrors++;
|
||||
ieee80211_ratectl_tx_complete(vap, ni,
|
||||
IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL);
|
||||
} else {
|
||||
ifp->if_opackets++;
|
||||
ieee80211_ratectl_tx_complete(vap, ni,
|
||||
IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Channels marked for "radar" require traffic to be received
|
||||
* to unlock before we can transmit. Until traffic is seen
|
||||
@ -2951,26 +2959,10 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int ackfailcnt,
|
||||
*/
|
||||
if (status == IWN_TX_FAIL_TX_LOCKED &&
|
||||
ni->ni_vap->iv_state == IEEE80211_S_AUTH)
|
||||
ieee80211_process_callback(ni, m, 0);
|
||||
ieee80211_tx_complete(ni, m, 0);
|
||||
else
|
||||
ieee80211_process_callback(ni, m,
|
||||
ieee80211_tx_complete(ni, m,
|
||||
(status & IWN_TX_FAIL) != 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Update rate control statistics for the node.
|
||||
*/
|
||||
if (status & IWN_TX_FAIL) {
|
||||
ifp->if_oerrors++;
|
||||
ieee80211_ratectl_tx_complete(vap, ni,
|
||||
IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL);
|
||||
} else {
|
||||
ifp->if_opackets++;
|
||||
ieee80211_ratectl_tx_complete(vap, ni,
|
||||
IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL);
|
||||
}
|
||||
m_freem(m);
|
||||
ieee80211_free_node(ni);
|
||||
|
||||
sc->sc_tx_timer = 0;
|
||||
if (--ring->queued < IWN_TX_RING_LOMARK) {
|
||||
@ -3091,11 +3083,7 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, int qid, int idx, int nframes,
|
||||
KASSERT(ni != NULL, ("no node"));
|
||||
KASSERT(m != NULL, ("no mbuf"));
|
||||
|
||||
if (m->m_flags & M_TXCB)
|
||||
ieee80211_process_callback(ni, m, 1);
|
||||
|
||||
m_freem(m);
|
||||
ieee80211_free_node(ni);
|
||||
ieee80211_tx_complete(ni, m, 1);
|
||||
|
||||
ring->queued--;
|
||||
ring->read = (ring->read + 1) % IWN_TX_RING_COUNT;
|
||||
|
Loading…
Reference in New Issue
Block a user