Skip to content

Commit

Permalink
Staging: vt6655: use ETH_FRAME_LEN macro instead of custom one
Browse files Browse the repository at this point in the history
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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Charles Clément authored and Greg Kroah-Hartman committed May 18, 2010
1 parent 31c21b7 commit f4a68b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/vt6655/mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}

Expand Down
5 changes: 1 addition & 4 deletions drivers/staging/vt6655/tether.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,8 @@
#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)

#define MAX_LOOKAHEAD_SIZE MAX_PACKET_LEN
#define MAX_LOOKAHEAD_SIZE ETH_FRAME_LEN

#define U_MULTI_ADDR_LEN 8 // multicast address length

Expand Down

0 comments on commit f4a68b9

Please sign in to comment.