]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: mvpp2: fix typo in the tcam setup
authorAntoine Tenart <antoine.tenart@free-electrons.com>
Tue, 24 Oct 2017 09:41:26 +0000 (11:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2017 08:07:52 +0000 (17:07 +0900)
This patch fixes a typo in the mvpp2_prs_tcam_data_cmp() function, as
the shift value is inverted with the data.

Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c

index 28c6e8a5e1183bc08251cd56716d2a77997c5431..0b2017170d5b752c427f7b0017968d13bbd7a6fd 100644 (file)
@@ -1539,7 +1539,7 @@ static bool mvpp2_prs_tcam_data_cmp(struct mvpp2_prs_entry *pe, int offs,
        int off = MVPP2_PRS_TCAM_DATA_BYTE(offs);
        u16 tcam_data;
 
-       tcam_data = (8 << pe->tcam.byte[off + 1]) | pe->tcam.byte[off];
+       tcam_data = (pe->tcam.byte[off + 1] << 8) | pe->tcam.byte[off];
        if (tcam_data != data)
                return false;
        return true;