OSDN Git Service

bnx2x: Provide VF link status in ndo_get_vf_config
authorShahed Shaikh <Shahed.Shaikh@cavium.com>
Thu, 20 Sep 2018 18:22:52 +0000 (11:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Sep 2018 16:14:21 +0000 (09:14 -0700)
Provide current link status of VF in ndo_get_vf_config
handler.

Signed-off-by: Shahed Shaikh <Shahed.Shaikh@cavium.com>
Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

index 2f76b37..c835f6c 100644 (file)
@@ -2638,6 +2638,7 @@ int bnx2x_get_vf_config(struct net_device *dev, int vfidx,
        ivi->max_tx_rate = 10000; /* always 10G. TBA take from link struct */
        ivi->min_tx_rate = 0;
        ivi->spoofchk = vf->spoofchk ? 1 : 0;
+       ivi->linkstate = vf->link_cfg;
        if (vf->state == VF_ENABLED) {
                /* mac and vlan are in vlan_mac objects */
                if (bnx2x_validate_vf_sp_objs(bp, vf, false)) {