forked from luck/tmp_suning_uos_patched
[PATCH] e1000: Fixed frame size logic
Simplified the logic used to assign the frame_size. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
parent
ff14701350
commit
ce7393b935
@ -1401,7 +1401,7 @@ static void
|
||||
e1000_create_lbtest_frame(struct sk_buff *skb, unsigned int frame_size)
|
||||
{
|
||||
memset(skb->data, 0xFF, frame_size);
|
||||
frame_size = (frame_size % 2) ? (frame_size - 1) : frame_size;
|
||||
frame_size &= ~1;
|
||||
memset(&skb->data[frame_size / 2], 0xAA, frame_size / 2 - 1);
|
||||
memset(&skb->data[frame_size / 2 + 10], 0xBE, 1);
|
||||
memset(&skb->data[frame_size / 2 + 12], 0xAF, 1);
|
||||
@ -1410,7 +1410,7 @@ e1000_create_lbtest_frame(struct sk_buff *skb, unsigned int frame_size)
|
||||
static int
|
||||
e1000_check_lbtest_frame(struct sk_buff *skb, unsigned int frame_size)
|
||||
{
|
||||
frame_size = (frame_size % 2) ? (frame_size - 1) : frame_size;
|
||||
frame_size &= ~1;
|
||||
if(*(skb->data + 3) == 0xFF) {
|
||||
if((*(skb->data + frame_size / 2 + 10) == 0xBE) &&
|
||||
(*(skb->data + frame_size / 2 + 12) == 0xAF)) {
|
||||
|
Loading…
Reference in New Issue
Block a user