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:
Michael Straube
2021-08-24 14:36:21 +02:00
committed by Carlos Garces
parent a99eff7ea3
commit 2f0a5e695b
4 changed files with 6 additions and 41 deletions

View File

@@ -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;
}