bge_encap(): - Move TX ring full sanity check further up and check the number of DMA segments from the DMA map, instead of counting the DMA segments in the for loop and breaking out later. - Unload the DMA map if encountering an error condition.
bge_encap():
- Move TX ring full sanity check further up and check the number of DMA
segments from the DMA map, instead of counting the DMA segments in the
for loop and breaking out later.
- Unload the DMA map if encountering an error condition.

Tested by brad@ sturm@ wilfried@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars