Search Linux Wireless

Re: [PATCH 1/7] ath10k: simplify HTC credits calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux