mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-07 05:53:06 +00:00
rtl8188eu: Convert from endian defined in Makefile to use architecture-defined value
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
2951f6bc15
commit
dc7c8c0b5d
10 changed files with 31 additions and 97 deletions
|
@ -2699,9 +2699,6 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
#define ENDIAN_FREE 1
|
||||
|
||||
int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe);
|
||||
int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
||||
{
|
||||
#if defined (PLATFORM_LINUX) || defined (PLATFORM_FREEBSD) //for amsdu TP improvement,Creator: Thomas
|
||||
|
@ -2739,15 +2736,8 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
while (a_len > ETH_HLEN) {
|
||||
|
||||
/* Offset 12 denote 2 mac address */
|
||||
#ifdef ENDIAN_FREE
|
||||
//nSubframe_Length = ntohs(*((u16*)(pdata + 12)));
|
||||
nSubframe_Length = RTW_GET_BE16(pdata + 12);
|
||||
#else // ENDIAN_FREE
|
||||
nSubframe_Length = *((u16*)(pdata + 12));
|
||||
//==m==>change the length order
|
||||
nSubframe_Length = (nSubframe_Length>>8) + (nSubframe_Length<<8);
|
||||
//ntohs(nSubframe_Length);
|
||||
#endif // ENDIAN_FREE
|
||||
|
||||
if ( a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length) ) {
|
||||
DBG_871X("nRemain_Length is %d and nSubframe_Length is : %d\n",a_len,nSubframe_Length);
|
||||
|
@ -2829,12 +2819,8 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
#ifndef PLATFORM_FREEBSD
|
||||
sub_skb = subframes[i];
|
||||
/* convert hdr + possible LLC headers into Ethernet header */
|
||||
#ifdef ENDIAN_FREE
|
||||
//eth_type = ntohs(*(u16*)&sub_skb->data[6]);
|
||||
eth_type = RTW_GET_BE16(&sub_skb->data[6]);
|
||||
#else // ENDIAN_FREE
|
||||
eth_type = (sub_skb->data[6] << 8) | sub_skb->data[7];
|
||||
#endif // ENDIAN_FREE
|
||||
if (sub_skb->len >= 8 &&
|
||||
((_rtw_memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) &&
|
||||
eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
|
||||
|
@ -2910,11 +2896,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
ptr=mtod(sub_m, u8 *);
|
||||
offset=ETH_HLEN;
|
||||
/* convert hdr + possible LLC headers into Ethernet header */
|
||||
#ifdef ENDIAN_FREE
|
||||
eth_type = ntohs(*(u16*)&ptr[offset+6]);
|
||||
#else // ENDIAN_FREE
|
||||
eth_type = ( ptr[offset+6] << 8) | ptr[offset+7];
|
||||
#endif // ENDIAN_FREE
|
||||
if (sub_m->m_pkthdr.len >= ETH_HLEN+8 &&
|
||||
((_rtw_memcmp(ptr+ETH_HLEN, rtw_rfc1042_header, SNAP_SIZE) &&
|
||||
eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue