aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/vt6656/dpc.c7
-rw-r--r--drivers/staging/vt6656/rxtx.c22
-rw-r--r--drivers/staging/vt6656/tether.h34
3 files changed, 18 insertions, 45 deletions
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 8ec07142743..98158ccadfe 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -200,10 +200,9 @@ s_vProcessRxMACHeader (
200 } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) { 200 } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
201 cbHeaderSize += 6; 201 cbHeaderSize += 6;
202 pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); 202 pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
203 if ((*pwType!= TYPE_PKT_IPX) && (*pwType != cpu_to_le16(0xF380))) { 203 if ((*pwType == cpu_to_le16(ETH_P_IPX)) ||
204 } 204 (*pwType == cpu_to_le16(0xF380))) {
205 else { 205 cbHeaderSize -= 8;
206 cbHeaderSize -= 8;
207 pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); 206 pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
208 if (bIsWEP) { 207 if (bIsWEP) {
209 if (bExtIV) { 208 if (bExtIV) {
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index e30077e6e10..bbdc127a987 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -1701,10 +1701,11 @@ s_bPacketToWirelessUsb(
1701 1701
1702 // 802.1H 1702 // 802.1H
1703 if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) { 1703 if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) {
1704 if (pDevice->dwDiagRefCount == 0) { 1704 if (pDevice->dwDiagRefCount == 0) {
1705 if ( (psEthHeader->wType == TYPE_PKT_IPX) || 1705 if ((psEthHeader->wType == cpu_to_le16(ETH_P_IPX)) ||
1706 (psEthHeader->wType == cpu_to_le16(0xF380))) { 1706 (psEthHeader->wType == cpu_to_le16(0xF380))) {
1707 memcpy((PBYTE) (pbyPayloadHead), &abySNAP_Bridgetunnel[0], 6); 1707 memcpy((PBYTE) (pbyPayloadHead),
1708 abySNAP_Bridgetunnel, 6);
1708 } else { 1709 } else {
1709 memcpy((PBYTE) (pbyPayloadHead), &abySNAP_RFC1042[0], 6); 1710 memcpy((PBYTE) (pbyPayloadHead), &abySNAP_RFC1042[0], 6);
1710 } 1711 }
@@ -2840,9 +2841,10 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
2840 Packet_Type = skb->data[ETH_HLEN+1]; 2841 Packet_Type = skb->data[ETH_HLEN+1];
2841 Descriptor_type = skb->data[ETH_HLEN+1+1+2]; 2842 Descriptor_type = skb->data[ETH_HLEN+1+1+2];
2842 Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]); 2843 Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]);
2843 if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) { 2844 if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
2844 if(((Protocol_Version==1) ||(Protocol_Version==2)) && 2845 /* 802.1x OR eapol-key challenge frame transfer */
2845 (Packet_Type==3)) { //802.1x OR eapol-key challenge frame transfer 2846 if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
2847 (Packet_Type == 3)) {
2846 bTxeapol_key = TRUE; 2848 bTxeapol_key = TRUE;
2847 if(!(Key_info & BIT3) && //WPA or RSN group-key challenge 2849 if(!(Key_info & BIT3) && //WPA or RSN group-key challenge
2848 (Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key 2850 (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 } 2990 }
2989 } 2991 }
2990 2992
2991 if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) { 2993 if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
2992 if (pDevice->byBBType != BB_TYPE_11A) { 2994 if (pDevice->byBBType != BB_TYPE_11A) {
2993 pDevice->wCurrentRate = RATE_1M; 2995 pDevice->wCurrentRate = RATE_1M;
2994 pDevice->byACKRate = RATE_1M; 2996 pDevice->byACKRate = RATE_1M;
@@ -3016,8 +3018,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
3016 3018
3017 if (bNeedEncryption == TRUE) { 3019 if (bNeedEncryption == TRUE) {
3018 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType)); 3020 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
3019 if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) { 3021 if ((pDevice->sTxEthHeader.wType) == cpu_to_le16(ETH_P_PAE)) {
3020 bNeedEncryption = FALSE; 3022 bNeedEncryption = FALSE;
3021 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType)); 3023 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType));
3022 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { 3024 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
3023 if (pTransmitKey == NULL) { 3025 if (pTransmitKey == NULL) {
diff --git a/drivers/staging/vt6656/tether.h b/drivers/staging/vt6656/tether.h
index be87020d532..4ec05237469 100644
--- a/drivers/staging/vt6656/tether.h
+++ b/drivers/staging/vt6656/tether.h
@@ -42,22 +42,8 @@
42 42
43#ifdef __BIG_ENDIAN 43#ifdef __BIG_ENDIAN
44 44
45#define TYPE_PKT_IP 0x0800 //
46#define TYPE_PKT_ARP 0x0806 //
47#define TYPE_PKT_RARP 0x8035 //
48#define TYPE_PKT_IPX 0x8137 //
49#define TYPE_PKT_802_1x 0x888e
50#define TYPE_PKT_PreAuth 0x88C7
51
52#define TYPE_PKT_PING_M_REQ 0x8011 // master reguest
53#define TYPE_PKT_PING_S_GNT 0x8022 // slave grant
54#define TYPE_PKT_PING_M 0x8077 // pingpong master packet
55#define TYPE_PKT_PING_S 0x8088 // pingpong slave packet
56#define TYPE_PKT_WOL_M_REQ 0x8033 // WOL waker request
57#define TYPE_PKT_WOL_S_GNT 0x8044 // WOL sleeper grant
58#define TYPE_MGMT_PROBE_RSP 0x5000 45#define TYPE_MGMT_PROBE_RSP 0x5000
59#define TYPE_PKT_VNT_DIAG 0x8011 // Diag Pkt 46
60#define TYPE_PKT_VNT_PER 0x8888 // Diag PER Pkt
61// 47//
62// wFrameCtl field in the S802_11Header 48// wFrameCtl field in the S802_11Header
63// 49//
@@ -94,23 +80,9 @@
94// 80//
95// NOTE.... 81// NOTE....
96// in network byte order, high byte is going first 82// in network byte order, high byte is going first
97#define TYPE_PKT_IP 0x0008 // 83
98#define TYPE_PKT_ARP 0x0608 //
99#define TYPE_PKT_RARP 0x3580 //
100#define TYPE_PKT_IPX 0x3781 //
101
102#define TYPE_PKT_802_1x 0x8e88
103#define TYPE_PKT_PreAuth 0xC788
104
105#define TYPE_PKT_PING_M_REQ 0x1180 // master reguest
106#define TYPE_PKT_PING_S_GNT 0x2280 // slave grant
107#define TYPE_PKT_PING_M 0x7780 // pingpong master packet
108#define TYPE_PKT_PING_S 0x8880 // pingpong slave packet
109#define TYPE_PKT_WOL_M_REQ 0x3380 // WOL waker request
110#define TYPE_PKT_WOL_S_GNT 0x4480 // WOL sleeper grant
111#define TYPE_MGMT_PROBE_RSP 0x0050 84#define TYPE_MGMT_PROBE_RSP 0x0050
112#define TYPE_PKT_VNT_DIAG 0x1180 // Diag Pkt 85
113#define TYPE_PKT_VNT_PER 0x8888 // Diag PER Pkt
114// 86//
115// wFrameCtl field in the S802_11Header 87// wFrameCtl field in the S802_11Header
116// 88//