mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-17 07:54:54 +08:00
ath9k: add sampling methods for (tx|rx) timestamp
Add sampling methods for ACK RX timestamp in ath_rx_tasklet() and for TX frame timestamp in ath_tx_complete_aggr() and in ath_tx_process_buffer(). These samples will be used in dynack processing for ACK timeout estimation Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
7aefa8aacb
commit
982e0395d3
@ -1007,6 +1007,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
dma_addr_t new_buf_addr;
|
dma_addr_t new_buf_addr;
|
||||||
unsigned int budget = 512;
|
unsigned int budget = 512;
|
||||||
|
struct ieee80211_hdr *hdr;
|
||||||
|
|
||||||
if (edma)
|
if (edma)
|
||||||
dma_type = DMA_BIDIRECTIONAL;
|
dma_type = DMA_BIDIRECTIONAL;
|
||||||
@ -1136,6 +1137,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
|
|||||||
ath9k_apply_ampdu_details(sc, &rs, rxs);
|
ath9k_apply_ampdu_details(sc, &rs, rxs);
|
||||||
ath_debug_rate_stats(sc, &rs, skb);
|
ath_debug_rate_stats(sc, &rs, skb);
|
||||||
|
|
||||||
|
hdr = (struct ieee80211_hdr *)skb->data;
|
||||||
|
if (ieee80211_is_ack(hdr->frame_control))
|
||||||
|
ath_dynack_sample_ack_ts(sc->sc_ah, skb, rs.rs_tstamp);
|
||||||
|
|
||||||
ieee80211_rx(hw, skb);
|
ieee80211_rx(hw, skb);
|
||||||
|
|
||||||
requeue_drop_frag:
|
requeue_drop_frag:
|
||||||
|
@ -587,6 +587,10 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
memcpy(tx_info->control.rates, rates, sizeof(rates));
|
memcpy(tx_info->control.rates, rates, sizeof(rates));
|
||||||
ath_tx_rc_status(sc, bf, ts, nframes, nbad, txok);
|
ath_tx_rc_status(sc, bf, ts, nframes, nbad, txok);
|
||||||
rc_update = false;
|
rc_update = false;
|
||||||
|
if (bf == bf->bf_lastbf)
|
||||||
|
ath_dynack_sample_tx_ts(sc->sc_ah,
|
||||||
|
bf->bf_mpdu,
|
||||||
|
ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
ath_tx_complete_buf(sc, bf, txq, &bf_head, ts,
|
ath_tx_complete_buf(sc, bf, txq, &bf_head, ts,
|
||||||
@ -687,6 +691,7 @@ static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
memcpy(info->control.rates, bf->rates,
|
memcpy(info->control.rates, bf->rates,
|
||||||
sizeof(info->control.rates));
|
sizeof(info->control.rates));
|
||||||
ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok);
|
ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok);
|
||||||
|
ath_dynack_sample_tx_ts(sc->sc_ah, bf->bf_mpdu, ts);
|
||||||
}
|
}
|
||||||
ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok);
|
ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok);
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user