[PATCH] b43: use rx desc underrun interrupt

Michael Büsch m at bues.ch
Sun Apr 21 14:26:01 EDT 2013


On Sun, 21 Apr 2013 20:07:39 +0200 (CEST)
Thommy Jakobsson <thommyj at gmail.com> wrote:

> +void b43_dma_rx_discard(struct b43_dmaring *ring)
> +{
> +	int current_slot, previous_slot;
> +
> +	B43_WARN_ON(ring->tx);
> +
> +	/* Device has filled all buffers, drop all packets in buffers
> +	* and let TCP decrease speed.
> +	* Set index to one desc after the last one
> +	* so the device will see all slots as free again
> +	*/
> +	/*
> +	*TODO: How to increase rx_drop in mac80211?
> +	*/
> +	current_slot = ring->ops->get_current_rxslot(ring);
> +	previous_slot = prev_slot(ring, current_slot);
> +	ring->ops->set_current_rxslot(ring, previous_slot);

Hmmm. While this does work (because the register and ring->current_slot contain the same
value at this point), I'd prefer if you write ring->current_slot - 1
to the stop-index-register.

Also, the comment needs to be updated.

PS: I'll send a patch that renames set_current_rxslot() later, because it's really confusing.

-- 
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20130421/30d76e76/attachment.sig>


More information about the b43-dev mailing list