Skip to content

Commit

Permalink
e1000: FIX: move length adjustment due to crc stripping disabled.
Browse files Browse the repository at this point in the history
Move the length (rx_bytes counter) adjustment of 4 bytes down to after the
TBI_ACCEPT workaround.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
  • Loading branch information
Jesse Brandeburg authored and Auke Kok committed Oct 24, 2006
1 parent 032fe6e commit d2a1e21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3786,9 +3786,6 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,

length = le16_to_cpu(rx_desc->length);

/* adjust length to remove Ethernet CRC */
length -= 4;

if (unlikely(!(status & E1000_RXD_STAT_EOP))) {
/* All receives must fit into a single buffer */
E1000_DBG("%s: Receive packet consumed multiple"
Expand Down Expand Up @@ -3816,6 +3813,10 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
}
}

/* adjust length to remove Ethernet CRC, this must be
* done after the TBI_ACCEPT workaround above */
length -= 4;

/* code added for copybreak, this should improve
* performance for small packets with large amounts
* of reassembly being done in the stack */
Expand Down

0 comments on commit d2a1e21

Please sign in to comment.