2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-14 08:34:02 +08:00

Staging: vt6655: use ETH_ZLEN macro instead of custom one

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>
This commit is contained in:
Charles Clément 2010-05-19 09:53:17 -07:00 committed by Greg Kroah-Hartman
parent 3a4d1b9096
commit c92069f3d7
2 changed files with 2 additions and 8 deletions

View 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)) {

View File

@ -39,12 +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_LOOKAHEAD_SIZE ETH_FRAME_LEN
#define U_MULTI_ADDR_LEN 8 // multicast address length