[PATCH 1/7] ath10k: simplify HTC credits calculation
Bob Copeland
me at bobcopeland.com
Tue Sep 10 10:14:13 EDT 2013
On Tue, Sep 10, 2013 at 03:49:57PM +0200, Michal Kazior wrote:
> + skb = __skb_dequeue(&ep->tx_queue);
> +
> + if (ep->tx_credit_flow_enabled) {
> + /* integer division w/ round-up */
> + credits = (skb->len + htc->target_credit_size - 1) /
> + htc->target_credit_size;
There's a macro for that...
credits = DIV_ROUND_UP(skb->len, htc->target_credit_size);
--
Bob Copeland %% www.bobcopeland.com
More information about the ath10k
mailing list