cxgb4: fix endianness for vlan value in cxgb4_tc_flower
authorKumar Sanghvi <kumaras@chelsio.com>
Wed, 17 Jan 2018 06:43:34 +0000 (12:13 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2018 20:26:57 +0000 (15:26 -0500)
Don't change endianness when assigning vlan value in cxgb4_tc_flower
code when processing flow match parameters. The value gets converted
to network order as part of filtering code in set_filter_wr.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c

index 276edcbb3259d679184eda5ac5adeee9d15d23ab..a452d5a1b0f3fb4c602793679b1e80295ea13e29 100644 (file)
@@ -208,8 +208,8 @@ static void cxgb4_process_flow_match(struct net_device *dev,
                                           VLAN_PRIO_SHIFT);
                vlan_tci_mask = mask->vlan_id | (mask->vlan_priority <<
                                                 VLAN_PRIO_SHIFT);
-               fs->val.ivlan = cpu_to_be16(vlan_tci);
-               fs->mask.ivlan = cpu_to_be16(vlan_tci_mask);
+               fs->val.ivlan = vlan_tci;
+               fs->mask.ivlan = vlan_tci_mask;
 
                /* Chelsio adapters use ivlan_vld bit to match vlan packets
                 * as 802.1Q. Also, when vlan tag is present in packets,