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

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: default avatarAndres More <more.andres@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bd5dc30e
...@@ -200,10 +200,9 @@ s_vProcessRxMACHeader ( ...@@ -200,10 +200,9 @@ s_vProcessRxMACHeader (
} else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) { } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
cbHeaderSize += 6; cbHeaderSize += 6;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
if ((*pwType!= TYPE_PKT_IPX) && (*pwType != cpu_to_le16(0xF380))) { if ((*pwType == cpu_to_le16(ETH_P_IPX)) ||
} (*pwType == cpu_to_le16(0xF380))) {
else { cbHeaderSize -= 8;
cbHeaderSize -= 8;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
if (bIsWEP) { if (bIsWEP) {
if (bExtIV) { if (bExtIV) {
......
...@@ -1701,10 +1701,11 @@ s_bPacketToWirelessUsb( ...@@ -1701,10 +1701,11 @@ s_bPacketToWirelessUsb(
// 802.1H // 802.1H
if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) { if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) {
if (pDevice->dwDiagRefCount == 0) { if (pDevice->dwDiagRefCount == 0) {
if ( (psEthHeader->wType == TYPE_PKT_IPX) || if ((psEthHeader->wType == cpu_to_le16(ETH_P_IPX)) ||
(psEthHeader->wType == cpu_to_le16(0xF380))) { (psEthHeader->wType == cpu_to_le16(0xF380))) {
memcpy((PBYTE) (pbyPayloadHead), &abySNAP_Bridgetunnel[0], 6); memcpy((PBYTE) (pbyPayloadHead),
abySNAP_Bridgetunnel, 6);
} else { } else {
memcpy((PBYTE) (pbyPayloadHead), &abySNAP_RFC1042[0], 6); memcpy((PBYTE) (pbyPayloadHead), &abySNAP_RFC1042[0], 6);
} }
...@@ -2840,9 +2841,10 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb) ...@@ -2840,9 +2841,10 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
Packet_Type = skb->data[ETH_HLEN+1]; Packet_Type = skb->data[ETH_HLEN+1];
Descriptor_type = skb->data[ETH_HLEN+1+1+2]; 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]); 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 (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
if(((Protocol_Version==1) ||(Protocol_Version==2)) && /* 802.1x OR eapol-key challenge frame transfer */
(Packet_Type==3)) { //802.1x OR eapol-key challenge frame transfer if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
(Packet_Type == 3)) {
bTxeapol_key = TRUE; bTxeapol_key = TRUE;
if(!(Key_info & BIT3) && //WPA or RSN group-key challenge if(!(Key_info & BIT3) && //WPA or RSN group-key challenge
(Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key (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) ...@@ -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) { if (pDevice->byBBType != BB_TYPE_11A) {
pDevice->wCurrentRate = RATE_1M; pDevice->wCurrentRate = RATE_1M;
pDevice->byACKRate = RATE_1M; pDevice->byACKRate = RATE_1M;
...@@ -3016,8 +3018,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb) ...@@ -3016,8 +3018,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
if (bNeedEncryption == TRUE) { if (bNeedEncryption == TRUE) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) { if ((pDevice->sTxEthHeader.wType) == cpu_to_le16(ETH_P_PAE)) {
bNeedEncryption = FALSE; bNeedEncryption = FALSE;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType)); 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 ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
if (pTransmitKey == NULL) { if (pTransmitKey == NULL) {
......
...@@ -42,22 +42,8 @@ ...@@ -42,22 +42,8 @@
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
#define TYPE_PKT_IP 0x0800 //
#define TYPE_PKT_ARP 0x0806 //
#define TYPE_PKT_RARP 0x8035 //
#define TYPE_PKT_IPX 0x8137 //
#define TYPE_PKT_802_1x 0x888e
#define TYPE_PKT_PreAuth 0x88C7
#define TYPE_PKT_PING_M_REQ 0x8011 // master reguest
#define TYPE_PKT_PING_S_GNT 0x8022 // slave grant
#define TYPE_PKT_PING_M 0x8077 // pingpong master packet
#define TYPE_PKT_PING_S 0x8088 // pingpong slave packet
#define TYPE_PKT_WOL_M_REQ 0x8033 // WOL waker request
#define TYPE_PKT_WOL_S_GNT 0x8044 // WOL sleeper grant
#define TYPE_MGMT_PROBE_RSP 0x5000 #define TYPE_MGMT_PROBE_RSP 0x5000
#define TYPE_PKT_VNT_DIAG 0x8011 // Diag Pkt
#define TYPE_PKT_VNT_PER 0x8888 // Diag PER Pkt
// //
// wFrameCtl field in the S802_11Header // wFrameCtl field in the S802_11Header
// //
...@@ -94,23 +80,9 @@ ...@@ -94,23 +80,9 @@
// //
// NOTE.... // NOTE....
// in network byte order, high byte is going first // in network byte order, high byte is going first
#define TYPE_PKT_IP 0x0008 //
#define TYPE_PKT_ARP 0x0608 //
#define TYPE_PKT_RARP 0x3580 //
#define TYPE_PKT_IPX 0x3781 //
#define TYPE_PKT_802_1x 0x8e88
#define TYPE_PKT_PreAuth 0xC788
#define TYPE_PKT_PING_M_REQ 0x1180 // master reguest
#define TYPE_PKT_PING_S_GNT 0x2280 // slave grant
#define TYPE_PKT_PING_M 0x7780 // pingpong master packet
#define TYPE_PKT_PING_S 0x8880 // pingpong slave packet
#define TYPE_PKT_WOL_M_REQ 0x3380 // WOL waker request
#define TYPE_PKT_WOL_S_GNT 0x4480 // WOL sleeper grant
#define TYPE_MGMT_PROBE_RSP 0x0050 #define TYPE_MGMT_PROBE_RSP 0x0050
#define TYPE_PKT_VNT_DIAG 0x1180 // Diag Pkt
#define TYPE_PKT_VNT_PER 0x8888 // Diag PER Pkt
// //
// wFrameCtl field in the S802_11Header // wFrameCtl field in the S802_11Header
// //
......
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