diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2010-08-20 19:15:30 +0400 |
---|---|---|
committer | Larry Finger <Larry.Finger@lwfinger.net> | 2010-08-20 19:15:30 +0400 |
commit | 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef (patch) | |
tree | 430b79f753b0e1cec6379b9a4208a716c914ac65 /drivers/staging/rtl8712/ethernet.h | |
parent | 763008c4357b73c8d18396dfd8d79dc58fa3f99d (diff) | |
download | linux-2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef.tar.xz |
staging: r8712u: Add the new driver to the mainline kernel
This code is for a completely new version of the Realtek 8192 USB devices
such as the D-Link DWA-130. The Realtek code, which was originally for
Linux, Windows XP and Windows CE, has been stripped of all code not needed
for Linux. In addition, only one additional configuration variable, which
enables AP mode, remains.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Tested-by: Frederic Leroy <fredo@starox.org>
Diffstat (limited to 'drivers/staging/rtl8712/ethernet.h')
-rw-r--r-- | drivers/staging/rtl8712/ethernet.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/staging/rtl8712/ethernet.h b/drivers/staging/rtl8712/ethernet.h new file mode 100644 index 000000000000..ba8d777d8e10 --- /dev/null +++ b/drivers/staging/rtl8712/ethernet.h @@ -0,0 +1,23 @@ +#ifndef __INC_ETHERNET_H +#define __INC_ETHERNET_H + +#define ETHERNET_ADDRESS_LENGTH 6 /*!< Ethernet Address Length*/ +#define ETHERNET_HEADER_SIZE 14 /*!< Ethernet Header Length*/ +#define LLC_HEADER_SIZE 6 /*!< LLC Header Length*/ +#define TYPE_LENGTH_FIELD_SIZE 2 /*!< Type/Length Size*/ +#define MINIMUM_ETHERNET_PACKET_SIZE 60 /*!< Min Ethernet Packet Size*/ +#define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /*!< Max Ethernet Packet Size*/ + +/*!< Is Multicast Address? */ +#define RT_ETH_IS_MULTICAST(_pAddr) ((((u8 *)(_pAddr))[0]&0x01) != 0) +/*!< Is Broadcast Address? */ +#define RT_ETH_IS_BROADCAST(_pAddr) ( \ + ((u8 *)(_pAddr))[0] == 0xff && \ + ((u8 *)(_pAddr))[1] == 0xff && \ + ((u8 *)(_pAddr))[2] == 0xff && \ + ((u8 *)(_pAddr))[3] == 0xff && \ + ((u8 *)(_pAddr))[4] == 0xff && \ + ((u8 *)(_pAddr))[5] == 0xff) + +#endif /* #ifndef __INC_ETHERNET_H */ + |