bnxt(4): Fix bugs in WOL support.
Before this change driver reported IFCAP_WOL_MAGIC enabled, but not supported. It caused errors on some SIOCSIFCAP calls. Instead report the support if hardware supports WOL, and enabled status if it has such filter installed on boot. Also bnxt_wol_config() should check WOL status in if_getcapenable(), not in if_getcapabilities() to get current one. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
4c7a3a70e0
commit
8c14d7da5b
@ -796,6 +796,9 @@ bnxt_attach_pre(if_ctx_t ctx)
|
||||
IFCAP_VLAN_HWCSUM | IFCAP_JUMBO_MTU;
|
||||
|
||||
if (bnxt_wol_supported(softc))
|
||||
scctx->isc_capabilities |= IFCAP_WOL_MAGIC;
|
||||
bnxt_get_wol_settings(softc);
|
||||
if (softc->wol)
|
||||
scctx->isc_capenable |= IFCAP_WOL_MAGIC;
|
||||
|
||||
/* Get the queue config */
|
||||
@ -805,8 +808,6 @@ bnxt_attach_pre(if_ctx_t ctx)
|
||||
goto failed;
|
||||
}
|
||||
|
||||
bnxt_get_wol_settings(softc);
|
||||
|
||||
/* Now perform a function reset */
|
||||
rc = bnxt_hwrm_func_reset(softc);
|
||||
bnxt_clear_ids(softc);
|
||||
@ -1600,7 +1601,7 @@ bnxt_wol_config(if_ctx_t ctx)
|
||||
if (!bnxt_wol_supported(softc))
|
||||
return -ENOTSUP;
|
||||
|
||||
if (if_getcapabilities(ifp) & IFCAP_WOL_MAGIC) {
|
||||
if (if_getcapenable(ifp) & IFCAP_WOL_MAGIC) {
|
||||
if (!softc->wol) {
|
||||
if (bnxt_hwrm_alloc_wol_fltr(softc))
|
||||
return -EBUSY;
|
||||
|
Loading…
Reference in New Issue
Block a user