]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: mvpp2: prs: Drop unnecessary swab16 in vlan detection
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 28 Jun 2018 12:42:06 +0000 (14:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 09:54:09 +0000 (18:54 +0900)
Vlan IDs must not be swapped when creating Header Parser entries. This
has no effect on little-endian systems, but is wrong for big-endian.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c

index af11feea681c6cb151c366ae196c7e8a61d0a74f..a882c14d7d7790babe6acc7cdbb46f4c46578323 100644 (file)
@@ -647,7 +647,7 @@ static int mvpp2_prs_vlan_find(struct mvpp2 *priv, unsigned short tpid, int ai)
                        continue;
 
                mvpp2_prs_init_from_hw(priv, &pe, tid);
-               match = mvpp2_prs_tcam_data_cmp(&pe, 0, swab16(tpid));
+               match = mvpp2_prs_tcam_data_cmp(&pe, 0, tpid);
                if (!match)
                        continue;
 
@@ -775,8 +775,8 @@ static int mvpp2_prs_double_vlan_find(struct mvpp2 *priv, unsigned short tpid1,
 
                mvpp2_prs_init_from_hw(priv, &pe, tid);
 
-               match = mvpp2_prs_tcam_data_cmp(&pe, 0, swab16(tpid1)) &&
-                       mvpp2_prs_tcam_data_cmp(&pe, 4, swab16(tpid2));
+               match = mvpp2_prs_tcam_data_cmp(&pe, 0, tpid1) &&
+                       mvpp2_prs_tcam_data_cmp(&pe, 4, tpid2);
 
                if (!match)
                        continue;