aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/core
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2021-06-05 18:58:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-09 14:20:05 +0200
commit0e37b86d1fcaf2a5ed0f8e3b2e55c05818d9fc61 (patch)
tree4ff4746463c6a5ac34a0aa27e135e939f7277281 /drivers/staging/rtl8188eu/core
parentstaging: rtl8188eu: remove RT_TRACE and DBG_88E prints from usb_ops_linux.c (diff)
downloadlinux-dev-0e37b86d1fcaf2a5ed0f8e3b2e55c05818d9fc61.tar.xz
linux-dev-0e37b86d1fcaf2a5ed0f8e3b2e55c05818d9fc61.zip
staging: rtl8188eu: use existing define for ethernet header len
Replace the driver's internal define with ETH_HLEN. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/core')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_recv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index c20141638b73..ef37cc6bf51f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -7,6 +7,7 @@
#define _RTW_RECV_C_
#include <linux/ieee80211.h>
+#include <linux/if_ether.h>
#include <osdep_service.h>
#include <drv_types.h>
@@ -17,7 +18,6 @@
#include <linux/vmalloc.h>
#include <net/cfg80211.h>
-#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */
#define LLC_HEADER_SIZE 6 /* LLC Header Length */
static u8 SNAP_ETH_TYPE_IPX[2] = {0x81, 0x37};
@@ -1503,7 +1503,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
/* Offset 12 denote 2 mac address */
nSubframe_Length = get_unaligned_be16(pdata + 12);
- if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
+ if (a_len < (ETH_HLEN + nSubframe_Length)) {
DBG_88E("nRemain_Length is %d and nSubframe_Length is : %d\n", a_len, nSubframe_Length);
goto exit;
}