HomeFreeBSD

[ath] Attempt to fix epoch handling.

Description

[ath] Attempt to fix epoch handling.

The epoch stuff with taskqueues works fine if the driver never calls
the receive path in other contexts, but this driver does. If there was
a chip reset during active receive then part of the reset will call
the receive path to flush out any active packets before reinitialising
the receive queue and that needs to be done with the epoch held.

So:

  • make the receive task a normal task again
  • explicitly call epoch enter/exit around the legacy and newer DMA receive paths
  • add a couple of epoch asserts to ensure that the receive packet path itself is called with epoch held.

This fixes it on my Atom eeepc laptop (circa 2010!) that I did
all of my initial 802.11n work in this driver and net80211.

Tested:

  • AR9285, STA mode

TODO:

  • Test on EDMA chipset (AR9380)
  • Test in AP/adhoc modes, just to be sure (eg for beacon receive processing in particular.)