linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 7/9] staging: rtl8188eu: use existing define for ethernet header len
Date: Sat,  5 Jun 2021 18:58:56 +0200	[thread overview]
Message-ID: <20210605165858.3175-7-martin@kaiser.cx> (raw)
In-Reply-To: <20210605165858.3175-1-martin@kaiser.cx>

Replace the driver's internal define with ETH_HLEN.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++--
 1 file 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;
 		}
-- 
2.20.1


  parent reply	other threads:[~2021-06-05 16:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-05 16:58 [PATCH 1/9] staging: rtl8188eu: remove unused RT_PRINT_DATA macro Martin Kaiser
2021-06-05 16:58 ` [PATCH 2/9] staging: rtl8188eu: remove RT_TRACE and DBG_88E prints from rtw_cmd.c Martin Kaiser
2021-06-05 16:58 ` [PATCH 3/9] staging: rtl8188eu: refactor rtw_lps_ctrl_wk_cmd Martin Kaiser
2021-06-05 16:58 ` [PATCH 4/9] staging: rtl8188eu: make rtw_free_recvframe return void Martin Kaiser
2021-06-05 16:58 ` [PATCH 5/9] staging: rtl8188eu: simplify rtw_get_wireless_stats Martin Kaiser
2021-06-05 16:58 ` [PATCH 6/9] staging: rtl8188eu: remove RT_TRACE and DBG_88E prints from usb_ops_linux.c Martin Kaiser
2021-06-07  7:19   ` Dan Carpenter
2021-06-05 16:58 ` Martin Kaiser [this message]
2021-06-05 16:58 ` [PATCH 8/9] staging: rtl8188eu: use standard kthread handling Martin Kaiser
2021-06-05 16:58 ` [PATCH 9/9] staging: rtl8188eu: remove unused function parameter Martin Kaiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210605165858.3175-7-martin@kaiser.cx \
    --to=martin@kaiser.cx \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).