[PATCH] staging: vt6656: replaced MIN_PACKET_LEN with ETH_ZLEN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Removed custom macro with one from include/linux/if_ether.h.
Also removed MIN_DATA_LEN as it is not used elsewhere.

Signed-off-by: Andres More <more.andres@xxxxxxxxx>
---
 drivers/staging/vt6656/mib.c    |    5 ++---
 drivers/staging/vt6656/tether.h |    5 -----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/vt6656/mib.c b/drivers/staging/vt6656/mib.c
index f5a0647..b31333a 100644
--- a/drivers/staging/vt6656/mib.c
+++ b/drivers/staging/vt6656/mib.c
@@ -347,10 +347,9 @@ 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)) {
diff --git a/drivers/staging/vt6656/tether.h b/drivers/staging/vt6656/tether.h
index 580f5bc..09d40a4 100644
--- a/drivers/staging/vt6656/tether.h
+++ b/drivers/staging/vt6656/tether.h
@@ -39,11 +39,6 @@
 #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_PACKET_LEN      (ETH_DATA_LEN + ETH_HLEN)
                                         // 1514
                                         // max total packet length (tx)
-- 
1.7.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux