MFC r220691-220694,220700-220702,220704,220710-220711:
- Remove the flags argument of iwn_dma_contig_alloc(), it is always set
as BUS_DMA_NOWAIT. While here also set BUS_DMA_COHERENT.
- OpenBSD uses IWN_RBUF_SIZE not MJUMPAGESIZE for the RX path, also replace
caddr_t with void * to be in sync.
- In case a new mbuf can't be loaded, reuse the old one.
- scratch_paddr has the same address pre-assigned, use that instead.
- Rewrite DMA segment handling to be more inline with the OpenBSD code.
Also change the m_len == 0 hack to have less code churn.
- Make sure to destroy all DMA tags and maps.
- Unify TX/RX ring allocation, finish the descriptior DMA stuff before
starting with data.
- Add missing bus_dmamap_sync calls as well as remove two duplicate ones.
- Prevent double-free, also use the same error codes as OpenBSD.
- Replace RX/TX ring allocation error messages with something more sane
and remove those where the caller already prints one.
git-svn-id: svn://svn.freebsd.org/base/stable/8@223244
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f