On 05/22/2018 11:15 PM, Niklas Cassel wrote:[...]
I also dont prefer to call *_push_pending for every HTC packets. Similar toAn equivalent for SDIO would most likely be *ath10k_htt_htc_t2h_msg_handler*
Perhaps it would be possible to call ath10k_mac_tx_push_pending()
from the equivalent to ath10k_htt_txrx_compl_task(),
but from SDIO's point of view.
or any of the other functions called from this function.
*ath10k_txrx_tx_unref* is actually called from *ath10k_htt_htc_t2h_msg_handler*,
so that function could be viewed as an equivalent.
If the call should be added in the bus driver (sdio.c) it should most likely be
placed in *ath10k_sdio_mbox_rx_process_packets*
if (!pkt->trailer_only) {
ep->ep_ops.ep_rx_complete(ar_sdio->ar, pkt->skb);
ath10k_mac_tx_push_pending(ar_sdio->ar);
} else {
kfree_skb(pkt->skb)
}
The above call would of course result in lot's of calls to
*ath10k_mac_tx_push_pending*
Adding a htt_num_pending check here wouldn't look nice.
The HL RX path differs from the LL path in that the t2h_msg_handler returns
false indicating that it has consumed the skb.
This is because it is the HL RX indication handler that delivers the skb's
to mac80211.
Another solution could be to add an *else-statement* as a part of the
*if (release)*
in *ath10k_htt_htc_t2h_msg_handler*, where
*ath10k_mac_tx_push_pending* could be called.
Something like this perhaps:
/* Free the indication buffer */
if (release)
dev_kfree_skb_any(skb);
else if (!ar->htt.num_pending_tx)
ath10k_mac_tx_push_pending(ar);
I think I prefer your original patch though.