staging: r8188eu: remove ethernet.h header file
There are only two definitions from ethernet.h used in the driver. Namely: #define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ #define LLC_HEADER_SIZE 6 /* LLC Header Length */ Both are only used in the file core/rtw_recv.c. Replace the usage of ETHERNET_HEADER_SIZE with ETH_HLEN, move the definition of LLC_HEADER_SIZE into rtw_recv.h and remove the now unused ethernet.h header file. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210824123621.10801-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
f09dc911bd
Коммит
f7766f1b00
|
@ -7,7 +7,6 @@
|
||||||
#include "../include/drv_types.h"
|
#include "../include/drv_types.h"
|
||||||
#include "../include/recv_osdep.h"
|
#include "../include/recv_osdep.h"
|
||||||
#include "../include/mlme_osdep.h"
|
#include "../include/mlme_osdep.h"
|
||||||
#include "../include/ethernet.h"
|
|
||||||
#include "../include/usb_ops.h"
|
#include "../include/usb_ops.h"
|
||||||
#include "../include/wifi.h"
|
#include "../include/wifi.h"
|
||||||
|
|
||||||
|
@ -1519,7 +1518,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
|
||||||
/* Offset 12 denote 2 mac address */
|
/* Offset 12 denote 2 mac address */
|
||||||
nSubframe_Length = RTW_GET_BE16(pdata + 12);
|
nSubframe_Length = RTW_GET_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);
|
DBG_88E("nRemain_Length is %d and nSubframe_Length is : %d\n", a_len, nSubframe_Length);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "../include/drv_types.h"
|
#include "../include/drv_types.h"
|
||||||
#include "../include/recv_osdep.h"
|
#include "../include/recv_osdep.h"
|
||||||
#include "../include/mlme_osdep.h"
|
#include "../include/mlme_osdep.h"
|
||||||
#include "../include/ethernet.h"
|
|
||||||
|
|
||||||
#include "../include/usb_ops.h"
|
#include "../include/usb_ops.h"
|
||||||
#include "../include/wifi.h"
|
#include "../include/wifi.h"
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
||||||
/* Copyright(c) 2007 - 2011 Realtek Corporation. */
|
|
||||||
|
|
||||||
#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(_addr) ((((u8 *)(_addr))[0]&0x01) != 0)
|
|
||||||
#define RT_ETH_IS_BROADCAST(_addr) ( \
|
|
||||||
((u8 *)(_addr))[0] == 0xff && \
|
|
||||||
((u8 *)(_addr))[1] == 0xff && \
|
|
||||||
((u8 *)(_addr))[2] == 0xff && \
|
|
||||||
((u8 *)(_addr))[3] == 0xff && \
|
|
||||||
((u8 *)(_addr))[4] == 0xff && \
|
|
||||||
((u8 *)(_addr))[5] == 0xff) /* Is Broadcast Address? */
|
|
||||||
|
|
||||||
#endif /* #ifndef __INC_ETHERNET_H */
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
#define MAX_SUBFRAME_COUNT 64
|
#define MAX_SUBFRAME_COUNT 64
|
||||||
|
|
||||||
|
#define LLC_HEADER_SIZE 6
|
||||||
|
|
||||||
/* for Rx reordering buffer control */
|
/* for Rx reordering buffer control */
|
||||||
struct recv_reorder_ctrl {
|
struct recv_reorder_ctrl {
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "../include/recv_osdep.h"
|
#include "../include/recv_osdep.h"
|
||||||
|
|
||||||
#include "../include/osdep_intf.h"
|
#include "../include/osdep_intf.h"
|
||||||
#include "../include/ethernet.h"
|
|
||||||
#include "../include/usb_ops.h"
|
#include "../include/usb_ops.h"
|
||||||
|
|
||||||
/* init os related resource in struct recv_priv */
|
/* init os related resource in struct recv_priv */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче