summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
diff options
context:
space:
mode:
authorArjun Vynipadath <arjun@chelsio.com>2018-03-23 15:48:46 +0530
committerDavid S. Miller <davem@davemloft.net>2018-03-25 21:07:56 -0400
commitbd79aceed53b22766c87c1cf5ddf4639a488c3f4 (patch)
tree442a3c216b1eb4d6b3d41b9a9f7f7c5d337621b3 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
parent843bd7db79c861b49e2912d723625f5fa8e94502 (diff)
downloadlwn-bd79aceed53b22766c87c1cf5ddf4639a488c3f4.tar.gz
lwn-bd79aceed53b22766c87c1cf5ddf4639a488c3f4.zip
cxgb4: copy vlan_id in ndo_get_vf_config
Copy vlan_id to get it displayed in vf info. Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ganesh Goudhar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 30dfb9f24f73..57d38f8ed455 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2695,13 +2695,17 @@ static int cxgb4_mgmt_get_vf_config(struct net_device *dev,
{
struct port_info *pi = netdev_priv(dev);
struct adapter *adap = pi->adapter;
+ struct vf_info *vfinfo;
if (vf >= adap->num_vfs)
return -EINVAL;
+ vfinfo = &adap->vfinfo[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;
- 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;
}