Skip to content

Commit

Permalink
staging: vt6656: replaced MIN_PACKET_LEN with ETH_ZLEN
Browse files Browse the repository at this point in the history
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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andres More authored and Greg Kroah-Hartman committed Jul 22, 2010
1 parent 020c0a9 commit 5e03f73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/vt6656/mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
5 changes: 0 additions & 5 deletions drivers/staging/vt6656/tether.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5e03f73

Please sign in to comment.