mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-12-23 20:41:43 +00:00
remove ethernet.h header file
There are only two definitions from ethernet.h used in the driver. Namely: 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. Link: https://lore.kernel.org/r/20210824123621.10801-4-straube.linux@gmail.com
This commit is contained in:
parent
a99eff7ea3
commit
2f0a5e695b
@ -2917,11 +2917,11 @@ static int rtw_recv_indicatepkt_check(union recv_frame *rframe, u8 *ehdr_pos, u3
|
||||
if (ntohs(ehdr->h_proto) == ETH_P_ARP) {
|
||||
|
||||
if(check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == _TRUE){
|
||||
if(ehdr_pos[ETHERNET_HEADER_SIZE+LEN_ARP_OP_HDR] == 2) {
|
||||
if(ehdr_pos[ETH_HLEN+LEN_ARP_OP_HDR] == 2) {
|
||||
RTW_INFO("%s,[DBG_ARP] Rx ARP RSP Packet with Dst= "MAC_FMT" ;SeqNum = %d !\n",
|
||||
__FUNCTION__, MAC_ARG(pattrib->dst), pattrib->seq_num);
|
||||
for(i=0;i<(pkt_len -ETHERNET_HEADER_SIZE);i++)
|
||||
RTW_INFO("0x%x ",ehdr_pos[i+ETHERNET_HEADER_SIZE]);
|
||||
for(i=0;i<(pkt_len -ETH_HLEN);i++)
|
||||
RTW_INFO("0x%x ",ehdr_pos[i+ETH_HLEN]);
|
||||
RTW_INFO("\n");
|
||||
}
|
||||
}
|
||||
@ -3053,7 +3053,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
||||
while (a_len > ETH_HLEN) {
|
||||
/* Offset 12 denote 2 mac address */
|
||||
nSubframe_Length = RTW_GET_BE16(pdata + 12);
|
||||
if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
|
||||
if (a_len < (ETH_HLEN + nSubframe_Length)) {
|
||||
RTW_INFO("nRemain_Length is %d and nSubframe_Length is : %d\n", a_len, nSubframe_Length);
|
||||
break;
|
||||
}
|
||||
|
@ -129,7 +129,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
|
||||
#include <rtw_iol.h>
|
||||
#endif /* CONFIG_IOL */
|
||||
|
||||
#include <ethernet.h>
|
||||
#include <circ_buf.h>
|
||||
|
||||
#include <rtw_android.h>
|
||||
|
@ -1,36 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*! \file */
|
||||
#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 /* !< Minimum Ethernet Packet Size */
|
||||
#define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /* !< Maximum Ethernet Packet Size */
|
||||
|
||||
#define RT_ETH_IS_MULTICAST(_pAddr) ((((UCHAR *)(_pAddr))[0]&0x01) != 0) /* !< Is Multicast Address? */
|
||||
#define RT_ETH_IS_BROADCAST(_pAddr) (\
|
||||
((UCHAR *)(_pAddr))[0] == 0xff && \
|
||||
((UCHAR *)(_pAddr))[1] == 0xff && \
|
||||
((UCHAR *)(_pAddr))[2] == 0xff && \
|
||||
((UCHAR *)(_pAddr))[3] == 0xff && \
|
||||
((UCHAR *)(_pAddr))[4] == 0xff && \
|
||||
((UCHAR *)(_pAddr))[5] == 0xff) /* !< Is Broadcast Address? */
|
||||
|
||||
|
||||
#endif /* #ifndef __INC_ETHERNET_H */
|
@ -89,6 +89,8 @@
|
||||
extern u8 rtw_bridge_tunnel_header[];
|
||||
extern u8 rtw_rfc1042_header[];
|
||||
|
||||
#define LLC_HEADER_SIZE 6
|
||||
|
||||
/* for Rx reordering buffer control */
|
||||
struct recv_reorder_ctrl {
|
||||
_adapter *padapter;
|
||||
|
Loading…
Reference in New Issue
Block a user