From 8d52cc5868799831315f12df20be3ea304e367ba Mon Sep 17 00:00:00 2001 From: John Fastabend Date: Wed, 27 Jul 2011 15:07:53 -0700 Subject: [PATCH 15/29] lldpad: dcbx mode needs to be set before set_state() cmd lldp_dcbx issues a set_state() command before setting the dcbx mode. In almost all cases this is OK because we don't use dcbx mode unless the driver is already setup this way or we received a CEE DCBX frame which already set the mode. The corner case being when the user manually forces CEE mode in this case the driver may be in IEEE mode and we need to set the mode before issueing CEE commands otherwise the driver may be expecting IEEE cmds or the driver and lldpad can become out of sync. Signed-off-by: John Fastabend Signed-off-by: Petr Sabata --- lldp_dcbx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lldp_dcbx.c b/lldp_dcbx.c index efde957..4cf2cb5 100644 --- a/lldp_dcbx.c +++ b/lldp_dcbx.c @@ -567,9 +567,9 @@ initialized: */ get_dcb_capabilities(ifname, &dcb_support); if (!dcb_support.dcbx || (gdcbx_subtype & ~MASK_DCBX_FORCE)) { - set_hw_state(ifname, 1); set_dcbx_mode(tlvs->ifname, DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_CEE); + set_hw_state(ifname, 1); tlvs->active = true; } else { tlvs->active = false; -- 1.7.6