diff options
author | Charles Clément <caratorn@gmail.com> | 2010-05-14 19:37:33 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-17 16:28:00 -0700 |
commit | 96fe9ee2c2dfe3268961f3873ea6098b9b9f27c2 (patch) | |
tree | dfe1c43975d442f5948ceb31d3d3e36201ec3504 /drivers/staging/vt6655/device_main.c | |
parent | Staging: vt6655: use ETH_ALEN macro instead of custom one (diff) | |
download | linux-dev-96fe9ee2c2dfe3268961f3873ea6098b9b9f27c2.tar.xz linux-dev-96fe9ee2c2dfe3268961f3873ea6098b9b9f27c2.zip |
Staging: vt6655: use ETH_HLEN macro instead of custom one
Replaced custom header length definition U_HEADER_LEN by ETH_HLEN
from <linux/if_ether.h>. Also remove unused U_TYPE_LEN.
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655/device_main.c')
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 301efc5cbe0d..25894a201b2b 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -2152,8 +2152,8 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex) { pHeadTD->m_td1TD1.byTCR = (TCR_EDP|TCR_STP); - memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)(skb->data), U_HEADER_LEN); - cbFrameBodySize = skb->len - U_HEADER_LEN; + memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)(skb->data), ETH_HLEN); + cbFrameBodySize = skb->len - ETH_HLEN; // 802.1H if (ntohs(pDevice->sTxEthHeader.wType) > MAX_DATA_LEN) { @@ -2356,8 +2356,8 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { pHeadTD->m_td1TD1.byTCR = (TCR_EDP|TCR_STP); - memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)(skb->data), U_HEADER_LEN); - cbFrameBodySize = skb->len - U_HEADER_LEN; + memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)(skb->data), ETH_HLEN); + cbFrameBodySize = skb->len - ETH_HLEN; // 802.1H if (ntohs(pDevice->sTxEthHeader.wType) > MAX_DATA_LEN) { cbFrameBodySize += 8; @@ -2636,10 +2636,10 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); BYTE Descriptor_type; WORD Key_info; BOOL bTxeapol_key = FALSE; - Protocol_Version = skb->data[U_HEADER_LEN]; - Packet_Type = skb->data[U_HEADER_LEN+1]; - Descriptor_type = skb->data[U_HEADER_LEN+1+1+2]; - Key_info = (skb->data[U_HEADER_LEN+1+1+2+1] << 8)|(skb->data[U_HEADER_LEN+1+1+2+2]); + Protocol_Version = skb->data[ETH_HLEN]; + Packet_Type = skb->data[ETH_HLEN+1]; + Descriptor_type = skb->data[ETH_HLEN+1+1+2]; + Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]); if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) { if(((Protocol_Version==1) ||(Protocol_Version==2)) && (Packet_Type==3)) { //802.1x OR eapol-key challenge frame transfer |