Commit 6d4e807c authored by Andres More's avatar Andres More Committed by Greg Kroah-Hartman

staging: vt6656: replaced MAX_PACKET_LEN with ETH_FRAME_LEN

Replaced custom macro with one from include/linux/if_ether.h.
Also removed MAX_LOOKAHEAD_SIZE as it is not used elsewhere.
Signed-off-by: default avatarAndres More <more.andres@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5e03f73f
...@@ -363,17 +363,14 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic, ...@@ -363,17 +363,14 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
} }
else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023)) { else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023)) {
pStatistic->dwRsrRxFrmLen512_1023++; pStatistic->dwRsrRxFrmLen512_1023++;
} } else if ((1024 <= cbFrameLength) &&
else if ((1024 <= cbFrameLength) && (cbFrameLength <= MAX_PACKET_LEN + 4)) { (cbFrameLength <= ETH_FRAME_LEN + 4)) {
pStatistic->dwRsrRxFrmLen1024_1518++; pStatistic->dwRsrRxFrmLen1024_1518++;
} else if (cbFrameLength > MAX_PACKET_LEN + 4) { } else if (cbFrameLength > ETH_FRAME_LEN + 4) {
pStatistic->dwRsrLong++; pStatistic->dwRsrLong++;
} }
} }
/* /*
* Description: Update Rx Statistic Counter and copy Rx buffer * Description: Update Rx Statistic Counter and copy Rx buffer
* *
......
...@@ -38,16 +38,8 @@ ...@@ -38,16 +38,8 @@
// //
#define U_ETHER_ADDR_STR_LEN (ETH_ALEN * 2 + 1) #define U_ETHER_ADDR_STR_LEN (ETH_ALEN * 2 + 1)
// Ethernet address string length // Ethernet address string length
#define MAX_PACKET_LEN (ETH_DATA_LEN + ETH_HLEN)
// 1514
// max total packet length (tx)
#define MAX_LOOKAHEAD_SIZE MAX_PACKET_LEN
#define U_MULTI_ADDR_LEN 8 // multicast address length #define U_MULTI_ADDR_LEN 8 // multicast address length
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
#define TYPE_PKT_IP 0x0800 // #define TYPE_PKT_IP 0x0800 //
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment