]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
be2net: Fix to parse RSS hash from Receive completions correctly.
authorSarveshwar Bandi <sarveshwar.bandi@emulex.com>
Wed, 25 Jul 2012 21:29:50 +0000 (21:29 +0000)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 27 Aug 2012 14:06:32 +0000 (07:06 -0700)
Wrong pointer variable is being used to parse the rss hash from
receive completions leading to corrupted rss_hash values filled into skb.

Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_main.c

index 9f136cf570896a3f67205a565b157ec79a4ae9fd..d63480b30cd05f523200ae4129ffcb04b6a31730 100644 (file)
@@ -1371,7 +1371,7 @@ static void be_parse_rx_compl_v1(struct be_eth_rx_compl *compl,
        rxcp->pkt_type =
                AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl);
        rxcp->rss_hash =
-               AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, rxcp);
+               AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, compl);
        if (rxcp->vlanf) {
                rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm,
                                          compl);
@@ -1403,7 +1403,7 @@ static void be_parse_rx_compl_v0(struct be_eth_rx_compl *compl,
        rxcp->pkt_type =
                AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl);
        rxcp->rss_hash =
-               AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, rxcp);
+               AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, compl);
        if (rxcp->vlanf) {
                rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm,
                                          compl);