From: Petko Manolov <petkan@mip-labs.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, a1291762@gmail.com,
johannes@sipsolutions.net, Petko Manolov <petkan@mip-labs.com>
Subject: [PATCH v3 2/2] pegasus: fixes reported packet length
Date: Wed, 27 Apr 2016 14:24:50 +0300 [thread overview]
Message-ID: <1461756290-27421-3-git-send-email-petkan@mip-labs.com> (raw)
In-Reply-To: <1461756290-27421-1-git-send-email-petkan@mip-labs.com>
The default Pegasus setup was to append the status and CRC at the end of each
received packet. The status bits are used to update various stats, but CRC has
been ignored. The new default is to not append CRC at the end of RX packets.
Signed-off-by: Petko Manolov <petkan@mip-labs.com>
---
drivers/net/usb/pegasus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index f919e20..82129ee 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -411,7 +411,7 @@ static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
int ret;
read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart);
- data[0] = 0xc9;
+ data[0] = 0xc8; /* TX & RX enable, append status, no CRC */
data[1] = 0;
if (linkpart & (ADVERTISE_100FULL | ADVERTISE_10FULL))
data[1] |= 0x20; /* set full duplex */
@@ -497,7 +497,7 @@ static void read_bulk_callback(struct urb *urb)
pkt_len = buf[count - 3] << 8;
pkt_len += buf[count - 4];
pkt_len &= 0xfff;
- pkt_len -= 8;
+ pkt_len -= 4;
}
/*
--
2.8.0.rc3
next prev parent reply other threads:[~2016-04-27 11:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 11:24 [PATCH v3 0/2] pegasus: correct buffer & packet sizes Petko Manolov
2016-04-27 11:24 ` [PATCH v3 1/2] pegasus: fixes URB buffer allocation size; Petko Manolov
2016-04-27 11:24 ` Petko Manolov [this message]
2016-04-28 21:09 ` [PATCH v3 0/2] pegasus: correct buffer & packet sizes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461756290-27421-3-git-send-email-petkan@mip-labs.com \
--to=petkan@mip-labs.com \
--cc=a1291762@gmail.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox