bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST.

Otherwise, all the host based DCBX settings from lldpad will fail if the
firmware DCBX agent is running.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michael Chan 2017-05-16 16:39:44 -04:00 committed by David S. Miller
parent 87fe603274
commit f667724b99

View file

@ -553,8 +553,10 @@ static u8 bnxt_dcbnl_setdcbx(struct net_device *dev, u8 mode)
if ((mode & DCB_CAP_DCBX_VER_CEE) || !(mode & DCB_CAP_DCBX_VER_IEEE))
return 1;
if ((mode & DCB_CAP_DCBX_HOST) && BNXT_VF(bp))
return 1;
if (mode & DCB_CAP_DCBX_HOST) {
if (BNXT_VF(bp) || (bp->flags & BNXT_FLAG_FW_LLDP_AGENT))
return 1;
}
if (mode == bp->dcbx_cap)
return 0;