Skip to content

Commit bd79ace

Browse files
arjunvynipadathdavem330
authored andcommitted
cxgb4: copy vlan_id in ndo_get_vf_config
Copy vlan_id to get it displayed in vf info. Signed-off-by: Arjun Vynipadath <[email protected]> Signed-off-by: Casey Leedom <[email protected]> Signed-off-by: Ganesh Goudhar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 843bd7d commit bd79ace

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,13 +2695,17 @@ static int cxgb4_mgmt_get_vf_config(struct net_device *dev,
26952695
{
26962696
struct port_info *pi = netdev_priv(dev);
26972697
struct adapter *adap = pi->adapter;
2698+
struct vf_info *vfinfo;
26982699

26992700
if (vf >= adap->num_vfs)
27002701
return -EINVAL;
2702+
vfinfo = &adap->vfinfo[vf];
2703+
27012704
ivi->vf = vf;
2702-
ivi->max_tx_rate = adap->vfinfo[vf].tx_rate;
2705+
ivi->max_tx_rate = vfinfo->tx_rate;
27032706
ivi->min_tx_rate = 0;
2704-
ether_addr_copy(ivi->mac, adap->vfinfo[vf].vf_mac_addr);
2707+
ether_addr_copy(ivi->mac, vfinfo->vf_mac_addr);
2708+
ivi->vlan = vfinfo->vlan;
27052709
return 0;
27062710
}
27072711

0 commit comments

Comments
 (0)