Commit ceb8c5da authored by Andres More's avatar Andres More Committed by Greg Kroah-Hartman

staging: vt6656: removed usage of custom Ethernet header

Removed struct tagSEthernetHeader, replacing with struct ethhdr.
Not all checkpatch errors and warnings were removed.
Signed-off-by: default avatarAndres More <more.andres@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7d7d34a1
......@@ -190,7 +190,7 @@ typedef struct _USB_SEND_CONTEXT {
struct urb *pUrb;
unsigned int uBufLen;
CONTEXT_TYPE Type;
SEthernetHeader sEthHeader;
struct ethhdr sEthHeader;
void *Next;
bool bBoolInUse;
unsigned char Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
......@@ -746,8 +746,8 @@ struct vnt_private {
u8 byReAssocCount;
u8 byLinkWaitCount;
SEthernetHeader sTxEthHeader;
SEthernetHeader sRxEthHeader;
struct ethhdr sTxEthHeader;
struct ethhdr sRxEthHeader;
u8 abyBroadcastAddr[ETH_ALEN];
u8 abySNAP_RFC1042[ETH_ALEN];
u8 abySNAP_Bridgetunnel[ETH_ALEN];
......
......@@ -81,7 +81,7 @@ void
s_vGetDASA(
u8 * pbyRxBufferAddr,
unsigned int *pcbHeaderSize,
PSEthernetHeader psEthHeader
struct ethhdr *psEthHeader
);
static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
......@@ -190,9 +190,9 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
cbHeaderSize -= (ETH_ALEN * 2);
pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize);
for (ii = 0; ii < ETH_ALEN; ii++)
*pbyRxBuffer++ = pDevice->sRxEthHeader.abyDstAddr[ii];
*pbyRxBuffer++ = pDevice->sRxEthHeader.h_dest[ii];
for (ii = 0; ii < ETH_ALEN; ii++)
*pbyRxBuffer++ = pDevice->sRxEthHeader.abySrcAddr[ii];
*pbyRxBuffer++ = pDevice->sRxEthHeader.h_source[ii];
*pcbHeadSize = cbHeaderSize;
}
......@@ -217,7 +217,7 @@ void
s_vGetDASA (
u8 * pbyRxBufferAddr,
unsigned int *pcbHeaderSize,
PSEthernetHeader psEthHeader
struct ethhdr *psEthHeader
)
{
unsigned int cbHeaderSize = 0;
......@@ -229,17 +229,17 @@ s_vGetDASA (
if ((pMACHeader->wFrameCtl & FC_TODS) == 0) {
if (pMACHeader->wFrameCtl & FC_FROMDS) {
for (ii = 0; ii < ETH_ALEN; ii++) {
psEthHeader->abyDstAddr[ii] =
psEthHeader->h_dest[ii] =
pMACHeader->abyAddr1[ii];
psEthHeader->abySrcAddr[ii] =
psEthHeader->h_source[ii] =
pMACHeader->abyAddr3[ii];
}
} else {
/* IBSS mode */
for (ii = 0; ii < ETH_ALEN; ii++) {
psEthHeader->abyDstAddr[ii] =
psEthHeader->h_dest[ii] =
pMACHeader->abyAddr1[ii];
psEthHeader->abySrcAddr[ii] =
psEthHeader->h_source[ii] =
pMACHeader->abyAddr2[ii];
}
}
......@@ -247,17 +247,17 @@ s_vGetDASA (
/* Is AP mode.. */
if (pMACHeader->wFrameCtl & FC_FROMDS) {
for (ii = 0; ii < ETH_ALEN; ii++) {
psEthHeader->abyDstAddr[ii] =
psEthHeader->h_dest[ii] =
pMACHeader->abyAddr3[ii];
psEthHeader->abySrcAddr[ii] =
psEthHeader->h_source[ii] =
pMACHeader->abyAddr4[ii];
cbHeaderSize += 6;
}
} else {
for (ii = 0; ii < ETH_ALEN; ii++) {
psEthHeader->abyDstAddr[ii] =
psEthHeader->h_dest[ii] =
pMACHeader->abyAddr3[ii];
psEthHeader->abySrcAddr[ii] =
psEthHeader->h_source[ii] =
pMACHeader->abyAddr2[ii];
}
}
......@@ -407,7 +407,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
// Use for TKIP MIC
s_vGetDASA(pbyFrame, &cbHeaderSize, &pDevice->sRxEthHeader);
if (!compare_ether_addr((u8 *)&(pDevice->sRxEthHeader.abySrcAddr[0]),
if (!compare_ether_addr((u8 *)&(pDevice->sRxEthHeader.h_source[0]),
pDevice->abyCurrentNetAddr))
return false;
......@@ -776,7 +776,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
}
MIC_vInit(dwMICKey0, dwMICKey1);
MIC_vAppend((u8 *)&(pDevice->sRxEthHeader.abyDstAddr[0]), 12);
MIC_vAppend((u8 *)&(pDevice->sRxEthHeader.h_dest[0]), 12);
dwMIC_Priority = 0;
MIC_vAppend((u8 *)&dwMIC_Priority, 4);
// 4 is Rcv buffer header, 24 is MAC Header, and 8 is IV and Ext IV.
......
This diff is collapsed.
......@@ -114,18 +114,6 @@
#define WEP_IV_MASK 0x00FFFFFF
/*--------------------- Export Types ------------------------------*/
//
// Ethernet packet
//
typedef struct tagSEthernetHeader {
u8 abyDstAddr[ETH_ALEN];
u8 abySrcAddr[ETH_ALEN];
u16 wType;
} __attribute__ ((__packed__))
SEthernetHeader, *PSEthernetHeader;
//
// 802_3 packet
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment