[PATCH] b43: use rx desc underrun interrupt
Thommy Jakobsson
thommyj at gmail.com
Sat Apr 20 15:47:10 EDT 2013
On Sat, 20 Apr 2013, Michael Büsch wrote:
> On Sat, 20 Apr 2013 16:14:09 +0200 (CEST)
> Thommy <thommyj at gmail.com> wrote:
>
> > +void b43_dma_rx_discard(struct b43_dmaring *ring)
> > +{
> > + 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?
> > + */
> > + b43_dma_write(ring, B43_DMA32_RXINDEX, ring->nr_slots *
> > + sizeof(struct b43_dmadesc32));
> > +}
>
> You need to check whether this is a 32bit or 64bit DMA engine and
> write to B43_DMA32_RXINDEX or B43_DMA64_RXINDEX.
> You could simply use the ring->ops->set_current_rxslot() dmaop for that.
>
Good point, I'll fix that
> And I think you need to set ring->current_slot to the value of ring->ops->get_current_slot().
> Not 100% sure, though, since it is years since I worked on that code.
>
Is that really needed? They should already be the same since the device
has thrown the underflow interrupt, or do I miss some race condition?
//thommy
More information about the b43-dev
mailing list