  Let $K$ be the function field of a smooth curve $B$ over a finite field $k$
of arbitrary characteristic. We prove that the average size of the $2$-Selmer
groups of elliptic curves $E/K$ is at most $1+2\zeta_B(2)\zeta_B(10)$, where
$\zeta_B$ is the zeta function of the curve $B/k$. In particular, in the limit
as $q=\#k\to\infty$ (with the genus $g(B)$ fixed), we see that the average size
of 2-Selmer is bounded above by $3$, even in "bad" characteristics.
