Staging: vt6655: use ETH_ZLEN macro instead of custom one
authorCharles Clément <caratorn@gmail.com>
Wed, 19 May 2010 16:53:17 +0000 (09:53 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Jun 2010 17:06:52 +0000 (10:06 -0700)
Replace custom minimum packet lenght definition MIN_PACKET_LEN by
ETH_ZLEN from <linux/if_ether.h>.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vt6655/mib.c
drivers/staging/vt6655/tether.h

index 4ca7877075b2dd0d7d32fbf8ad52dc7c8ff6a5e0..2f390ab5ed9d944680345854127ba4668cdc55ea 100644 (file)
@@ -341,10 +341,10 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
     if (WLAN_GET_FC_MOREFRAG(pHeader->wFrameCtl))
         pStatistic->dwRsrRxFragment++;
 
-    if (cbFrameLength < MIN_PACKET_LEN + 4) {
+    if (cbFrameLength < ETH_ZLEN + 4) {
         pStatistic->dwRsrRunt++;
     }
-    else if (cbFrameLength == MIN_PACKET_LEN + 4) {
+    else if (cbFrameLength == ETH_ZLEN + 4) {
         pStatistic->dwRsrRxFrmLen64++;
     }
     else if ((65 <= cbFrameLength) && (cbFrameLength <= 127)) {
index 3c9acd7903a89178cd09d4a6071521a510e001b0..99fdc032d47ab17b7fa1d9276e330b093236d9f7 100644 (file)
 #define U_ETHER_ADDR_STR_LEN (ETH_ALEN * 2 + 1)
                                         // Ethernet address string length
 
-#define MIN_DATA_LEN        46          // min data length
-
-#define MIN_PACKET_LEN      (MIN_DATA_LEN + ETH_HLEN)
-                                        // 60
-                                        // min total packet length (tx)
-
 #define MAX_LOOKAHEAD_SIZE  ETH_FRAME_LEN
 
 #define U_MULTI_ADDR_LEN    8           // multicast address length