]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
be2net: Fix to display the VLAN priority for a VF
authorAjit Khaparde <ajit.khaparde@emulex.com>
Fri, 27 Sep 2013 20:18:56 +0000 (15:18 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2013 21:11:49 +0000 (17:11 -0400)
VLAN priority is not being displayed for a VF currently when user executes
"ip link show" command. This patch fixes it.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c

index ad593cabeed32a732f10179bc695f6588a9cea7c..2c38cc402119c763021ea77461455fd0fa8ac035 100644 (file)
@@ -1201,8 +1201,8 @@ static int be_get_vf_config(struct net_device *netdev, int vf,
 
        vi->vf = vf;
        vi->tx_rate = vf_cfg->tx_rate;
-       vi->vlan = vf_cfg->vlan_tag;
-       vi->qos = 0;
+       vi->vlan = vf_cfg->vlan_tag & VLAN_VID_MASK;
+       vi->qos = vf_cfg->vlan_tag >> VLAN_PRIO_SHIFT;
        memcpy(&vi->mac, vf_cfg->mac_addr, ETH_ALEN);
 
        return 0;