cxgb4: copy vlan_id in ndo_get_vf_config
Subsystems (3)
PATCH 1/1 cxgb4: copy vlan_id in ndo_get_vf_config
From: Arjun Vynipadath <[email protected]>
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]>
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +6 -2
@@ -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 ; }
Signature · 1 line
2.1.0
From: Ganesh Goudar <[email protected]>
Date: Fri, 23 Mar 2018 15:48:46 +0530
Quoted 7 lines
From: Arjun Vynipadath <[email protected]>
Copy
vlan_idto 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]>
Applied.