]> git.baikalelectronics.ru Git - kernel.git/commit
ixgb and e1000: Use new function for copybreak tests
authorJoe Perches <joe@perches.com>
Thu, 13 May 2010 15:26:17 +0000 (15:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 May 2010 10:06:19 +0000 (03:06 -0700)
commit8fe5b7638f3721af48f8962625dd68d4c6c78277
tree54ea4e292e1a6279139580b7d3e9ea74f3d09c61
parent0ccb516b5b29dc620dc7ed3053a7767e85644078
ixgb and e1000: Use new function for copybreak tests

There appears to be an off-by-1 defect in the maximum packet size
copied when copybreak is speified in these modules.

The copybreak module params are specified as:
"Maximum size of packet that is copied to a new buffer on receive"

The tests are changed from "< copybreak" to "<= copybreak"
and moved into new static functions for readability.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e1000/e1000_main.c
drivers/net/ixgb/ixgb_main.c