Replace custom maximum packet lenght definition MAX_PACKET_LEN by ETH_FRAME_LEN from <linux/if_ether.h>. Signed-off-by: Charles Clément <caratorn@xxxxxxxxx> --- drivers/staging/vt6655/mib.c | 4 ++-- drivers/staging/vt6655/tether.h | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c index 658bf96..2f390ab 100644 --- a/drivers/staging/vt6655/mib.c +++ b/drivers/staging/vt6655/mib.c @@ -359,9 +359,9 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic, else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023)) { pStatistic->dwRsrRxFrmLen512_1023++; } - else if ((1024 <= cbFrameLength) && (cbFrameLength <= MAX_PACKET_LEN + 4)) { + else if ((1024 <= cbFrameLength) && (cbFrameLength <= ETH_FRAME_LEN + 4)) { pStatistic->dwRsrRxFrmLen1024_1518++; - } else if (cbFrameLength > MAX_PACKET_LEN + 4) { + } else if (cbFrameLength > ETH_FRAME_LEN + 4) { pStatistic->dwRsrLong++; } diff --git a/drivers/staging/vt6655/tether.h b/drivers/staging/vt6655/tether.h index ec40678..99fdc03 100644 --- a/drivers/staging/vt6655/tether.h +++ b/drivers/staging/vt6655/tether.h @@ -39,11 +39,7 @@ #define U_ETHER_ADDR_STR_LEN (ETH_ALEN * 2 + 1) // 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 MAX_LOOKAHEAD_SIZE ETH_FRAME_LEN #define U_MULTI_ADDR_LEN 8 // multicast address length -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel