Replace custom maximum data lenght definition MAX_DATA_LEN by ETH_DATA_LEN from <linux/if_ether.h>. Signed-off-by: Charles Clément <caratorn@xxxxxxxxx> --- drivers/staging/vt6655/device_main.c | 4 ++-- drivers/staging/vt6655/rxtx.c | 4 ++-- drivers/staging/vt6655/tether.h | 4 +--- drivers/staging/vt6655/wroute.c | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index cef7ff7..e49bb25 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -2156,7 +2156,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex) { cbFrameBodySize = skb->len - ETH_HLEN; // 802.1H - if (ntohs(pDevice->sTxEthHeader.wType) > MAX_DATA_LEN) { + if (ntohs(pDevice->sTxEthHeader.wType) > ETH_DATA_LEN) { cbFrameBodySize += 8; } uMACfragNum = cbGetFragCount(pDevice, pTransmitKey, cbFrameBodySize, &pDevice->sTxEthHeader); @@ -2359,7 +2359,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)(skb->data), ETH_HLEN); cbFrameBodySize = skb->len - ETH_HLEN; // 802.1H - if (ntohs(pDevice->sTxEthHeader.wType) > MAX_DATA_LEN) { + if (ntohs(pDevice->sTxEthHeader.wType) > ETH_DATA_LEN) { cbFrameBodySize += 8; } diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index b5bd310..a0445c3 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1622,7 +1622,7 @@ s_cbFillTxBufHead ( // 802.1H - if (ntohs(psEthHeader->wType) > MAX_DATA_LEN) { + if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) { if ((psEthHeader->wType == TYPE_PKT_IPX) || (psEthHeader->wType == cpu_to_le16(0xF380))) { memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6); @@ -1986,7 +1986,7 @@ s_cbFillTxBufHead ( } // 802.1H - if (ntohs(psEthHeader->wType) > MAX_DATA_LEN) { + if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) { if ((psEthHeader->wType == TYPE_PKT_IPX) || (psEthHeader->wType == cpu_to_le16(0xF380))) { memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6); diff --git a/drivers/staging/vt6655/tether.h b/drivers/staging/vt6655/tether.h index 2187808..ec40678 100644 --- a/drivers/staging/vt6655/tether.h +++ b/drivers/staging/vt6655/tether.h @@ -39,9 +39,7 @@ #define U_ETHER_ADDR_STR_LEN (ETH_ALEN * 2 + 1) // Ethernet address string length -#define MAX_DATA_LEN 1500 // max data length - -#define MAX_PACKET_LEN (MAX_DATA_LEN + ETH_HLEN) +#define MAX_PACKET_LEN (ETH_DATA_LEN + ETH_HLEN) // 1514 // max total packet length (tx) diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c index 485e105..bf92fb9 100644 --- a/drivers/staging/vt6655/wroute.c +++ b/drivers/staging/vt6655/wroute.c @@ -95,7 +95,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI cbFrameBodySize = uDataLen - ETH_HLEN; - if (ntohs(pDevice->sTxEthHeader.wType) > MAX_DATA_LEN) { + if (ntohs(pDevice->sTxEthHeader.wType) > ETH_DATA_LEN) { cbFrameBodySize += 8; } -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel