if_awg: drain tx buffers and clear rx buffers when stopping
authormanu <manu@FreeBSD.org>
Sat, 18 Nov 2017 21:12:06 +0000 (21:12 +0000)
committermanu <manu@FreeBSD.org>
Sat, 18 Nov 2017 21:12:06 +0000 (21:12 +0000)
commite7fd94bdf52793cd4a701c1a385cb790729ac759
tree1a65055c7dc4ac83f3a3135170c106f6f2eadb7a
parentc82e2270563a8f1491de4a1255bbc4f5d9167823
if_awg: drain tx buffers and clear rx buffers when stopping

Stale packets should not be transmitted when the interface comes up after being down.
Count the successfully transmitted ones for statistics and drop the rest.

Submitted by: Guy Yur <guyyur@gmail.com>
Differential Revision: https://reviews.freebsd.org/D12539
sys/arm/allwinner/if_awg.c