Convert the driver's internal error-handling chain from the Linux
negative-errno convention to FreeBSD positive errno everywhere.
- All return (-EXXX) become return (EXXX), int err = -EXXX loses the sign, and if (err < 0) checks become if (err != 0) across aq_fw.c, aq_fw1x.c, aq_fw2x.c and aq_hw.c.
- mac_soft_reset_flb_ returns ETIMEDOUT/0 instead of a bool so it matches its RBL sibling.
- The ETIME and EOK aliases in aq_common.h are removed; all sites use ETIMEDOUT and 0 directly, and the rc = -rc sign flips in aq_if_attach_pre are dropped.
Turn AQ_HW_WAIT_FOR into a statement expression evaluating to 0 on
success or ETIMEDOUT on timeout, assigned explicitly at all seven call
sites, instead of silently assigning ETIMEDOUT to a variable named err
in the caller scope. A statement expression rather than an inline
function because every call must re-evaluate its condition each
iteration -- one even assigns hw->mbox_addr as a side effect.
Fix two correctness bugs surfaced by the conversion:
- fw1x_get_stats gated its stats copy with if (err >= 0), correct under negative errno but accepting every positive errno after the flip. Change to if (err == 0).
- fw2x_reset returned 0 regardless of capability-download failure, silently leaving fw_caps = 0. Return the real err.
Harden aq_if_attach_pre: bit_alloc(4096, M_AQ, M_NOWAIT) was unchecked,
so under OOM a later ifconfig vlanN create would NULL-deref the
bitstring; check for NULL and fail with ENOMEM. The fail label's
hardcoded return (ENXIO) becomes return (rc) so each error path
reports its real errno.
Remove the dead error checks in aq_hw_offload_set: the
if (err != 0) goto err_exit blocks after the void tpo_/rpo_/tdm_
register-write helpers were unreachable (err is never set), and the real
error capture is the aq_hw_err_from_flags call at the function tail.
Drop the now-orphaned err_exit label.