Commit bd79acee authored by Arjun Vynipadath's avatar Arjun Vynipadath Committed by David S. Miller

cxgb4: copy vlan_id in ndo_get_vf_config

Copy vlan_id to get it displayed in vf info.
Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
Signed-off-by: default avatarGanesh Goudhar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 843bd7db
...@@ -2695,13 +2695,17 @@ static int cxgb4_mgmt_get_vf_config(struct net_device *dev, ...@@ -2695,13 +2695,17 @@ static int cxgb4_mgmt_get_vf_config(struct net_device *dev,
{ {
struct port_info *pi = netdev_priv(dev); struct port_info *pi = netdev_priv(dev);
struct adapter *adap = pi->adapter; struct adapter *adap = pi->adapter;
struct vf_info *vfinfo;
if (vf >= adap->num_vfs) if (vf >= adap->num_vfs)
return -EINVAL; return -EINVAL;
vfinfo = &adap->vfinfo[vf];
ivi->vf = vf; ivi->vf = vf;
ivi->max_tx_rate = adap->vfinfo[vf].tx_rate; ivi->max_tx_rate = vfinfo->tx_rate;
ivi->min_tx_rate = 0; ivi->min_tx_rate = 0;
ether_addr_copy(ivi->mac, adap->vfinfo[vf].vf_mac_addr); ether_addr_copy(ivi->mac, vfinfo->vf_mac_addr);
ivi->vlan = vfinfo->vlan;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment