diff options
author | Andres More <more.andres@gmail.com> | 2010-08-04 19:12:34 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-31 11:31:25 -0700 |
commit | 203e4615ee9d9fa8d3506b9d0ef30095e4d5bc90 (patch) | |
tree | c3a50e0d6df304652a983972cbe1467ad195b491 /drivers/staging/vt6656/rxtx.c | |
parent | bd5dc30e3ee68f0aa6c1e282d88740f2d1fa909a (diff) |
staging: vt6656: removed custom definitions of Ethernet packet types
Removed some unused definitions of Ethernet packet types, also replaced
two of them with in-kernel counterparts from include/linux/if_ether.h
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6656/rxtx.c')
-rw-r--r-- | drivers/staging/vt6656/rxtx.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index e30077e6e108..bbdc127a987d 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -1701,10 +1701,11 @@ s_bPacketToWirelessUsb( // 802.1H if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) { - if (pDevice->dwDiagRefCount == 0) { - if ( (psEthHeader->wType == TYPE_PKT_IPX) || - (psEthHeader->wType == cpu_to_le16(0xF380))) { - memcpy((PBYTE) (pbyPayloadHead), &abySNAP_Bridgetunnel[0], 6); + if (pDevice->dwDiagRefCount == 0) { + if ((psEthHeader->wType == cpu_to_le16(ETH_P_IPX)) || + (psEthHeader->wType == cpu_to_le16(0xF380))) { + memcpy((PBYTE) (pbyPayloadHead), + abySNAP_Bridgetunnel, 6); } else { memcpy((PBYTE) (pbyPayloadHead), &abySNAP_RFC1042[0], 6); } @@ -2840,9 +2841,10 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb) 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 + if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) { + /* 802.1x OR eapol-key challenge frame transfer */ + if (((Protocol_Version == 1) || (Protocol_Version == 2)) && + (Packet_Type == 3)) { bTxeapol_key = TRUE; if(!(Key_info & BIT3) && //WPA or RSN group-key challenge (Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key @@ -2988,7 +2990,7 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb) } } - if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) { + if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) { if (pDevice->byBBType != BB_TYPE_11A) { pDevice->wCurrentRate = RATE_1M; pDevice->byACKRate = RATE_1M; @@ -3016,8 +3018,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb) if (bNeedEncryption == TRUE) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType)); - if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) { - bNeedEncryption = FALSE; + if ((pDevice->sTxEthHeader.wType) == cpu_to_le16(ETH_P_PAE)) { + bNeedEncryption = FALSE; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType)); if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { if (pTransmitKey == NULL) { |