aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/selftest.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-06-25 03:05:33 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-26 00:03:30 -0400
commit604f6049ba2af86fe361d4cc320443d35b232df1 (patch)
tree21c5cc57e19fb477f86b67170c0eb1c0ff0fe1cf /drivers/net/sfc/selftest.c
parent29046f9b1e36f6e3332ce2d8e366005fd177b37a (diff)
sfc: Fix reading of inserted hash
The hash appears immediately before the packet data, not at the beginning of the buffer. This means we can easily use negative offsets from the start of packet data, so adjust the data and length at the top of __efx_rx_packet() instead of wherever we consume the hash. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/selftest.c')
-rw-r--r--drivers/net/sfc/selftest.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index 0399be21c122..85f015f005d5 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -258,9 +258,6 @@ void efx_loopback_rx_packet(struct efx_nic *efx,
258 258
259 payload = &state->payload; 259 payload = &state->payload;
260 260
261 buf_ptr += efx->type->rx_buffer_hash_size;
262 pkt_len -= efx->type->rx_buffer_hash_size;
263
264 received = (struct efx_loopback_payload *) buf_ptr; 261 received = (struct efx_loopback_payload *) buf_ptr;
265 received->ip.saddr = payload->ip.saddr; 262 received->ip.saddr = payload->ip.saddr;
266 if (state->offload_csum) 263 if (state->offload_csum)