Skip to contentSkip to conversation

staging: vt6656: mac80211 conversion remove legacy code

PATCH New Malcolm Priestley 1 participant 35 messages Jun 25, 2014 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: vt6656: mac80211 conversion remove legacy code

Following conversion to mac80211 the following patches remove dead code.

Malcolm Priestley (34):
staging: vt6656: dead code remove zonetypes
staging: vt6656: move life time macros to rxtx.h
staging: vt6656: dpc remove dead code.
staging: vt6656: main_usb removed dead code
staging: vt6656: deadcode iwctl.c/h
staging: vt6656: wcmd remove dead code
staging: vt6656: rxtx remove dead code
staging: vt6656: dead code remove wmgr.c
staging: vt6656: dead code remove bssdb.c
staging: vt6656: dead code wpactl
staging: vt6656: dead code remove wpa2.c
staging: vt6656: remove dead code wpa
staging: vt6656: dead code remove wctl
staging: vt6656: dead code remove tkip.c/h
staging: vt6656: dead code remove micheal.c/h
staging: vt6656: dead code remove rc4.c/h
staging: vt6656: dead code remove iowpa.h
staging: vt6656: decode remove tether.c/h
staging: vt6656: remove dead code datarate
staging: vt6656: dead code remove 80211mgr.c/h
staging: vt6656: remove dead code from power.c/h
staging: vt6656: dead code remove old key functions
staging: vt6656: dead code remove tmacro.h
staging: vt6656: dead codead remove bssdb.h header
staging: vt6656: dpc remove dead code RXvMngWorkItem
staging: vt6656: Remove vnt_set_channel from device_init_registers
staging: vt6656: remove old rx receive list
staging: vt6656: dead code remove wmgr.h
staging: vt6656: remove old channel tables
staging: vt6656: dead code remove 80211hdr.h
staging: vt6656: device_init_registers remove unused variables
staging: vt6656: dead code remove variables device_set_options
staging: vt6656: device.h remove dead strutures and variables
staging: vt6656: remove unneeded config and headers

 drivers/staging/vt6656/80211hdr.h           |  324 --
 drivers/staging/vt6656/80211mgr.c           |  861 ------
 drivers/staging/vt6656/80211mgr.h           |  808 -----
 drivers/staging/vt6656/Kconfig              |    2 -
 drivers/staging/vt6656/Makefile             |   13 -
 drivers/staging/vt6656/baseband.c           |   42 +-
 drivers/staging/vt6656/baseband.h           |    1 -
 drivers/staging/vt6656/bssdb.c              | 1466 ---------
 drivers/staging/vt6656/bssdb.h              |  276 --
 drivers/staging/vt6656/card.c               |    4 -
 drivers/staging/vt6656/channel.c            |  436 ---
 drivers/staging/vt6656/channel.h            |    9 -
 drivers/staging/vt6656/country.h            |  162 -
 drivers/staging/vt6656/datarate.c           |  364 ---
 drivers/staging/vt6656/datarate.h           |   62 -
 drivers/staging/vt6656/desc.h               |    2 -
 drivers/staging/vt6656/device.h             |  275 +-
 drivers/staging/vt6656/dpc.c                |  861 +-----
 drivers/staging/vt6656/dpc.h                |    5 -
 drivers/staging/vt6656/int.c                |    2 -
 drivers/staging/vt6656/iocmd.h              |   38 -
 drivers/staging/vt6656/iowpa.h              |   75 -
 drivers/staging/vt6656/iwctl.c              | 1802 -----------
 drivers/staging/vt6656/iwctl.h              |  138 -
 drivers/staging/vt6656/key.c                |  694 -----
 drivers/staging/vt6656/key.h                |   72 +-
 drivers/staging/vt6656/mac.c                |    3 -
 drivers/staging/vt6656/mac.h                |    1 -
 drivers/staging/vt6656/main_usb.c           |  612 +---
 drivers/staging/vt6656/michael.c            |  167 -
 drivers/staging/vt6656/michael.h            |   52 -
 drivers/staging/vt6656/power.c              |  161 -
 drivers/staging/vt6656/power.h              |    7 -
 drivers/staging/vt6656/rc4.c                |   87 -
 drivers/staging/vt6656/rc4.h                |   46 -
 drivers/staging/vt6656/rf.c                 |    1 -
 drivers/staging/vt6656/rxtx.c               | 1266 --------
 drivers/staging/vt6656/rxtx.h               |    8 +-
 drivers/staging/vt6656/tether.c             |   60 -
 drivers/staging/vt6656/tether.h             |  101 -
 drivers/staging/vt6656/tkip.c               |  246 --
 drivers/staging/vt6656/tkip.h               |   45 -
 drivers/staging/vt6656/tmacro.h             |   52 -
 drivers/staging/vt6656/usbpipe.c            |    2 -
 drivers/staging/vt6656/vntconfiguration.dat |    6 -
 drivers/staging/vt6656/wcmd.c               |  844 ------
 drivers/staging/vt6656/wcmd.h               |    4 +-
 drivers/staging/vt6656/wctl.c               |  244 --
 drivers/staging/vt6656/wctl.h               |   94 -
 drivers/staging/vt6656/wmgr.c               | 4362 ---------------------------
 drivers/staging/vt6656/wmgr.h               |  397 ---
 drivers/staging/vt6656/wpa.c                |  314 --
 drivers/staging/vt6656/wpa.h                |   72 -
 drivers/staging/vt6656/wpa2.c               |  235 --
 drivers/staging/vt6656/wpa2.h               |   53 -
 drivers/staging/vt6656/wpactl.c             |  247 --
 drivers/staging/vt6656/wpactl.h             |   47 -
 57 files changed, 12 insertions(+), 18618 deletions(-)
 delete mode 100644 drivers/staging/vt6656/80211hdr.h
 delete mode 100644 drivers/staging/vt6656/80211mgr.c
 delete mode 100644 drivers/staging/vt6656/80211mgr.h
 delete mode 100644 drivers/staging/vt6656/bssdb.c
 delete mode 100644 drivers/staging/vt6656/bssdb.h
 delete mode 100644 drivers/staging/vt6656/country.h
 delete mode 100644 drivers/staging/vt6656/datarate.c
 delete mode 100644 drivers/staging/vt6656/datarate.h
 delete mode 100644 drivers/staging/vt6656/iocmd.h
 delete mode 100644 drivers/staging/vt6656/iowpa.h
 delete mode 100644 drivers/staging/vt6656/iwctl.c
 delete mode 100644 drivers/staging/vt6656/iwctl.h
 delete mode 100644 drivers/staging/vt6656/michael.c
 delete mode 100644 drivers/staging/vt6656/michael.h
 delete mode 100644 drivers/staging/vt6656/rc4.c
 delete mode 100644 drivers/staging/vt6656/rc4.h
 delete mode 100644 drivers/staging/vt6656/tether.c
 delete mode 100644 drivers/staging/vt6656/tether.h
 delete mode 100644 drivers/staging/vt6656/tkip.c
 delete mode 100644 drivers/staging/vt6656/tkip.h
 delete mode 100644 drivers/staging/vt6656/tmacro.h
 delete mode 100644 drivers/staging/vt6656/vntconfiguration.dat
 delete mode 100644 drivers/staging/vt6656/wctl.c
 delete mode 100644 drivers/staging/vt6656/wctl.h
 delete mode 100644 drivers/staging/vt6656/wmgr.c
 delete mode 100644 drivers/staging/vt6656/wmgr.h
 delete mode 100644 drivers/staging/vt6656/wpa.c
 delete mode 100644 drivers/staging/vt6656/wpa.h
 delete mode 100644 drivers/staging/vt6656/wpa2.c
 delete mode 100644 drivers/staging/vt6656/wpa2.h
 delete mode 100644 drivers/staging/vt6656/wpactl.c
 delete mode 100644 drivers/staging/vt6656/wpactl.h
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/34 staging: vt6656: dead code remove zonetypes

Remove vntconfiguration.dat, iocmd.h and country.h

Set all channels are enabled as by rf type.

mac80211 will handles zones

---
 drivers/staging/vt6656/baseband.c           |  39 +---
 drivers/staging/vt6656/card.c               |   1 -
 drivers/staging/vt6656/channel.c            | 298 ----------------------------
 drivers/staging/vt6656/country.h            | 162 ---------------
 drivers/staging/vt6656/device.h             |   3 -
 drivers/staging/vt6656/iocmd.h              |  38 ----
 drivers/staging/vt6656/main_usb.c           | 174 +---------------
 drivers/staging/vt6656/rxtx.c               |   1 -
 drivers/staging/vt6656/vntconfiguration.dat |   6 -
 drivers/staging/vt6656/wpactl.c             |   1 -
 10 files changed, 4 insertions(+), 719 deletions(-)
 delete mode 100644 drivers/staging/vt6656/country.h
 delete mode 100644 drivers/staging/vt6656/iocmd.h
 delete mode 100644 drivers/staging/vt6656/vntconfiguration.dat
drivers/staging/vt6656/baseband.c +1 -38
index d99aae5..19b8fd1 100644
@@ -899,44 +899,7 @@ int BBbVT3184Init(struct vnt_private *priv)
 	if (status != STATUS_SUCCESS)
 		return false;
 
-	/* zonetype initial */
-	priv->byOriginalZonetype = priv->abyEEPROM[EEP_OFS_ZONETYPE];
-
-	if (priv->config_file.ZoneType >= 0) {
-		if ((priv->config_file.ZoneType == 0) &&
-			(priv->abyEEPROM[EEP_OFS_ZONETYPE] != 0x00)) {
-			priv->abyEEPROM[EEP_OFS_ZONETYPE] = 0;
-			priv->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0B;
-
-			dev_dbg(&priv->usb->dev, "Init Zone Type :USA\n");
-		} else if ((priv->config_file.ZoneType == 1) &&
-			(priv->abyEEPROM[EEP_OFS_ZONETYPE] != 0x01)) {
-			priv->abyEEPROM[EEP_OFS_ZONETYPE] = 0x01;
-			priv->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0D;
-
-			dev_dbg(&priv->usb->dev, "Init Zone Type :Japan\n");
-		} else if ((priv->config_file.ZoneType == 2) &&
-			(priv->abyEEPROM[EEP_OFS_ZONETYPE] != 0x02)) {
-			priv->abyEEPROM[EEP_OFS_ZONETYPE] = 0x02;
-			priv->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0D;
-
-			dev_dbg(&priv->usb->dev, "Init Zone Type :Europe\n");
-		} else {
-			if (priv->config_file.ZoneType !=
-					priv->abyEEPROM[EEP_OFS_ZONETYPE])
-				printk("zonetype in file[%02x]\
-					 mismatch with in EEPROM[%02x]\n",
-					priv->config_file.ZoneType,
-					priv->abyEEPROM[EEP_OFS_ZONETYPE]);
-			else
-				printk("Read Zonetype file success,\
-					use default zonetype setting[%02x]\n",
-					priv->config_file.ZoneType);
-		}
-	}
-
-	if (!priv->bZoneRegExist)
-		priv->byZoneType = priv->abyEEPROM[EEP_OFS_ZONETYPE];
+	priv->byZoneType = priv->abyEEPROM[EEP_OFS_ZONETYPE];
 
 	priv->byRFType = priv->abyEEPROM[EEP_OFS_RFTYPE];
 
drivers/staging/vt6656/card.c +0 -1
index 1b3e0af..9181709 100644
@@ -55,7 +55,6 @@
 #include "power.h"
 #include "key.h"
 #include "rc4.h"
-#include "country.h"
 #include "datarate.h"
 #include "usbpipe.h"
 
drivers/staging/vt6656/channel.c +0 -298

330 lines not on this page · raw message

drivers/staging/vt6656/country.h deleted +0 -162

162 lines not on this page · raw message

drivers/staging/vt6656/device.h +0 -3
index 6696365..1b74f47 100644
@@ -481,9 +481,6 @@ struct vnt_private {
 	u8 byBBRxConf;
 
 	u8 byZoneType;
-	int bZoneRegExist;
-
-	u8 byOriginalZonetype;
 
 	int bLinkPass; /* link status: OK or fail */
 	struct vnt_cmd_card_init init_command;
drivers/staging/vt6656/iocmd.h deleted +0 -38
deleted file mode 100644
index b957e6d..0000000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: iocmd.h
- *
- * Purpose: Handles the viawget ioctl private interface functions
- *
- * Author: Lyndon Chen
- *
- * Date: May 8, 2002
- *
- */
-
-#ifndef __IOCMD_H__
-#define __IOCMD_H__
-
-typedef enum tagWZONETYPE {
-  ZoneType_USA = 0,
-  ZoneType_Japan = 1,
-  ZoneType_Europe = 2
-} WZONETYPE;
-
-#endif /* __IOCMD_H__ */
drivers/staging/vt6656/main_usb.c +3 -171

204 lines not on this page · raw message

drivers/staging/vt6656/rxtx.c +0 -1
index c3d4778..44d88e9 100644
@@ -58,7 +58,6 @@
 #include "rf.h"
 #include "datarate.h"
 #include "usbpipe.h"
-#include "iocmd.h"
 
 static int          msglevel                = MSG_LEVEL_INFO;
 
drivers/staging/vt6656/vntconfiguration.dat deleted +0 -6
deleted file mode 100644
index 933774c..0000000
@@ -1,6 +0,0 @@
-#VNT Configuration
-[start]
-ZONETYPE=EUROPE
-AUTHENMODE=12
-ENCRYPTIONMODE=34
-[end]
\ No newline at end of file
drivers/staging/vt6656/wpactl.c +0 -1
index 2b508be..3752072 100644
@@ -36,7 +36,6 @@
 #include "mac.h"
 #include "device.h"
 #include "wmgr.h"
-#include "iocmd.h"
 #include "iowpa.h"
 #include "usbpipe.h"
 #include "rf.h"
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/34 staging: vt6656: move life time macros to rxtx.h

In reply to Malcolm Priestley

DEFAULT_MGN_LIFETIME_RES_64us
DEFAULT_MSDU_LIFETIME_RES_64us

---
 drivers/staging/vt6656/rxtx.h | 3 +++
 drivers/staging/vt6656/wmgr.h | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/staging/vt6656/rxtx.h +3 -0
index 65f7e26..00a5c22 100644
@@ -33,6 +33,9 @@
 #include "wcmd.h"
 #include "baseband.h"
 
+#define DEFAULT_MGN_LIFETIME_RES_64us	125  /* 64us */
+#define DEFAULT_MSDU_LIFETIME_RES_64us  8000
+
 /* MIC HDR data header */
 struct vnt_mic_hdr {
 	u8 id;
drivers/staging/vt6656/wmgr.h +0 -2
index 26ba47d..b6610a1 100644
@@ -53,10 +53,8 @@
 #define WCMD_PASSIVE_SCAN_TIME  100 //(ms)
 
 #define DEFAULT_MSDU_LIFETIME           512  // ms
-#define DEFAULT_MSDU_LIFETIME_RES_64us  8000 // 64us
 
 #define DEFAULT_MGN_LIFETIME            8    // ms
-#define DEFAULT_MGN_LIFETIME_RES_64us   125  // 64us
 
 #define MAKE_BEACON_RESERVED            10  //(us)
 
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/34 staging: vt6656: dpc remove dead code.

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/dpc.c | 803 -------------------------------------------
 drivers/staging/vt6656/dpc.h |   3 -
 2 files changed, 806 deletions(-)
drivers/staging/vt6656/dpc.c +0 -803
index 0b9c923..daa67b8 100644
@@ -54,809 +54,6 @@
 //static int          msglevel                =MSG_LEVEL_DEBUG;
 static int          msglevel                =MSG_LEVEL_INFO;
 
-static const u8 acbyRxRate[MAX_RATE] =
-{2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
-
-static u8 s_byGetRateIdx(u8 byRate);
-
-static
-void
-s_vGetDASA(
-      u8 * pbyRxBufferAddr,
-     unsigned int *pcbHeaderSize,
-     struct ethhdr *psEthHeader
-    );
-
-static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
-	u8 *pbyRxBufferAddr, u32 cbPacketSize, int bIsWEP, int bExtIV,
-	u32 *pcbHeadSize);
-
-static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
-	u32 FrameSize, u8 *pbyRsr, u8 *pbyNewRsr, PSKeyItem *pKeyOut,
-	s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16);
-
-/*+
- *
- * Description:
- *    Translate Rcv 802.11 header to 802.3 header with Rx buffer
- *
- * Parameters:
- *  In:
- *      pDevice
- *      dwRxBufferAddr  - Address of Rcv Buffer
- *      cbPacketSize    - Rcv Packet size
- *      bIsWEP          - If Rcv with WEP
- *  Out:
- *      pcbHeaderSize   - 802.11 header size
- *
- * Return Value: None
- *
--*/
-
-static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
-	u8 *pbyRxBufferAddr, u32 cbPacketSize, int bIsWEP, int bExtIV,
-	u32 *pcbHeadSize)
-{
-	u8 *pbyRxBuffer;
-	u32 cbHeaderSize = 0;
-	u16 *pwType;
-	struct ieee80211_hdr *pMACHeader;
-	int ii;
-
-    pMACHeader = (struct ieee80211_hdr *) (pbyRxBufferAddr + cbHeaderSize);
-
-    s_vGetDASA((u8 *)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader);
-
-    if (bIsWEP) {
-        if (bExtIV) {
-            // strip IV&ExtIV , add 8 byte
-            cbHeaderSize += (WLAN_HDR_ADDR3_LEN + 8);
-        } else {
-            // strip IV , add 4 byte
-            cbHeaderSize += (WLAN_HDR_ADDR3_LEN + 4);
-        }
-    }
-    else {
-        cbHeaderSize += WLAN_HDR_ADDR3_LEN;
-    };
-
-    pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize);
-    if (ether_addr_equal(pbyRxBuffer, pDevice->abySNAP_Bridgetunnel)) {
-        cbHeaderSize += 6;
-    } else if (ether_addr_equal(pbyRxBuffer, pDevice->abySNAP_RFC1042)) {
-        cbHeaderSize += 6;
-        pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
-	if ((*pwType == cpu_to_be16(ETH_P_IPX)) ||
-	    (*pwType == cpu_to_le16(0xF380))) {
-		cbHeaderSize -= 8;
-            pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
-            if (bIsWEP) {
-                if (bExtIV) {
-                    *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8);    // 8 is IV&ExtIV
-                } else {
-                    *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 4);    // 4 is IV
-                }
-            }
-            else {
-                *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN);
-            }
-        }
-    }
-    else {
-        cbHeaderSize -= 2;
-        pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
-        if (bIsWEP) {
-            if (bExtIV) {
-                *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8);    // 8 is IV&ExtIV
-            } else {
-                *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 4);    // 4 is IV
-            }
-        }
-        else {
-            *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN);
-        }
-    }
-
-    cbHeaderSize -= (ETH_ALEN * 2);
-    pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize);
-    for (ii = 0; ii < ETH_ALEN; ii++)
-        *pbyRxBuffer++ = pDevice->sRxEthHeader.h_dest[ii];
-    for (ii = 0; ii < ETH_ALEN; ii++)
-        *pbyRxBuffer++ = pDevice->sRxEthHeader.h_source[ii];
-
-    *pcbHeadSize = cbHeaderSize;
-}
-
-static u8 s_byGetRateIdx(u8 byRate)
-{
-    u8    byRateIdx;
-
-    for (byRateIdx = 0; byRateIdx <MAX_RATE ; byRateIdx++) {
-        if (acbyRxRate[byRateIdx%MAX_RATE] == byRate)
-            return byRateIdx;
-    }
-    return 0;
-}
-
-static
-void
-s_vGetDASA (
-      u8 * pbyRxBufferAddr,
-     unsigned int *pcbHeaderSize,
-     struct ethhdr *psEthHeader
-    )
-{
-	unsigned int            cbHeaderSize = 0;
-	struct ieee80211_hdr *pMACHeader;
-	int             ii;
-
-	pMACHeader = (struct ieee80211_hdr *) (pbyRxBufferAddr + cbHeaderSize);
-
-	if ((pMACHeader->frame_control & FC_TODS) == 0) {
-		if (pMACHeader->frame_control & FC_FROMDS) {
-			for (ii = 0; ii < ETH_ALEN; ii++) {
-				psEthHeader->h_dest[ii] =
-					pMACHeader->addr1[ii];
-				psEthHeader->h_source[ii] =
-					pMACHeader->addr3[ii];
-			}
-		} else {
-			/* IBSS mode */
-			for (ii = 0; ii < ETH_ALEN; ii++) {
-				psEthHeader->h_dest[ii] =
-					pMACHeader->addr1[ii];
-				psEthHeader->h_source[ii] =
-					pMACHeader->addr2[ii];
-			}
-		}
-	} else {
-		/* Is AP mode.. */
-		if (pMACHeader->frame_control & FC_FROMDS) {
-			for (ii = 0; ii < ETH_ALEN; ii++) {
-				psEthHeader->h_dest[ii] =
-					pMACHeader->addr3[ii];
-				psEthHeader->h_source[ii] =
-					pMACHeader->addr4[ii];
-				cbHeaderSize += 6;
-			}
-		} else {
-			for (ii = 0; ii < ETH_ALEN; ii++) {
-				psEthHeader->h_dest[ii] =
-					pMACHeader->addr3[ii];
-				psEthHeader->h_source[ii] =
-					pMACHeader->addr2[ii];
-			}
-		}
-	};
-    *pcbHeaderSize = cbHeaderSize;
-}
-
-int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB,
-	unsigned long BytesToIndicate)
-{
-	struct net_device_stats *pStats = &pDevice->stats;
-	struct sk_buff *skb;
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	struct vnt_rx_mgmt *pRxPacket = &pMgmt->sRxPacket;
-	struct ieee80211_hdr *p802_11Header;
-	u8 *pbyRsr, *pbyNewRsr, *pbyRSSI, *pbyFrame;
-	u64 *pqwTSFTime;
-	u32 bDeFragRx = false;
-	u32 cbHeaderOffset, cbIVOffset;
-	u32 FrameSize;
-	u16 wEtherType = 0;
-	s32 iSANodeIndex = -1;
-	int ii;
-	u8 *pbyRxSts, *pbyRxRate, *pbySQ, *pby3SQ;
-	u32 cbHeaderSize;
-	PSKeyItem pKey = NULL;
-	u16 wRxTSC15_0 = 0;
-	u32 dwRxTSC47_16 = 0;
-	/* signed long ldBm = 0; */
-	int bIsWEP = false; int bExtIV = false;
-	u32 dwWbkStatus;
-	struct vnt_rcb *pRCBIndicate = pRCB;
-	u8 *pbyDAddress;
-	u16 *pwPLCP_Length;
-	u8 abyVaildRate[MAX_RATE]
-		= {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
-	u16 wPLCPwithPadding;
-	struct ieee80211_hdr *pMACHeader;
-	int bRxeapol_key = false;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- RXbBulkInProcessData---\n");
-
-    skb = pRCB->skb;
-
-	/* [31:16]RcvByteCount ( not include 4-byte Status ) */
-	dwWbkStatus = *((u32 *)(skb->data));
-	FrameSize = dwWbkStatus >> 16;
-	FrameSize += 4;
-
-	if (BytesToIndicate != FrameSize) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"------- WRONG Length 1\n");
-		pStats->rx_frame_errors++;
-		return false;
-	}
-
-    if ((BytesToIndicate > 2372) || (BytesToIndicate <= 40)) {
-        // Frame Size error drop this packet.
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "---------- WRONG Length 2\n");
-	pStats->rx_frame_errors++;
-        return false;
-    }
-
-    pbyDAddress = (u8 *)(skb->data);
-    pbyRxSts = pbyDAddress+4;
-    pbyRxRate = pbyDAddress+5;
-
-    //real Frame Size = USBFrameSize -4WbkStatus - 4RxStatus - 8TSF - 4RSR - 4SQ3 - ?Padding
-    //if SQ3 the range is 24~27, if no SQ3 the range is 20~23
-    //real Frame size in PLCPLength field.
-    pwPLCP_Length = (u16 *) (pbyDAddress + 6);
-    //Fix hardware bug => PLCP_Length error
-    if ( ((BytesToIndicate - (*pwPLCP_Length)) > 27) ||
-         ((BytesToIndicate - (*pwPLCP_Length)) < 24) ||
-         (BytesToIndicate < (*pwPLCP_Length)) ) {
-
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Wrong PLCP Length %x\n", (int) *pwPLCP_Length);
-	pStats->rx_frame_errors++;
-        return false;
-    }
-    for ( ii=RATE_1M;ii<MAX_RATE;ii++) {
-        if ( *pbyRxRate == abyVaildRate[ii] ) {
-            break;
-        }
-    }
-    if ( ii==MAX_RATE ) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Wrong RxRate %x\n",(int) *pbyRxRate);
-        return false;
-    }
-
-    wPLCPwithPadding = ( (*pwPLCP_Length / 4) + ( (*pwPLCP_Length % 4) ? 1:0 ) ) *4;
-
-	pqwTSFTime = (u64 *)(pbyDAddress + 8 + wPLCPwithPadding);
-  if(pDevice->byBBType == BB_TYPE_11G)  {
-      pby3SQ = pbyDAddress + 8 + wPLCPwithPadding + 12;
-      pbySQ = pby3SQ;
-    }
-  else {
-   pbySQ = pbyDAddress + 8 + wPLCPwithPadding + 8;
-   pby3SQ = pbySQ;
-  }
-    pbyNewRsr = pbyDAddress + 8 + wPLCPwithPadding + 9;
-    pbyRSSI = pbyDAddress + 8 + wPLCPwithPadding + 10;
-    pbyRsr = pbyDAddress + 8 + wPLCPwithPadding + 11;
-
-    FrameSize = *pwPLCP_Length;
-
-    pbyFrame = pbyDAddress + 8;
-
-    pMACHeader = (struct ieee80211_hdr *) pbyFrame;
-
-//mike add: to judge if current AP is activated?
-    if ((pMgmt->eCurrMode == WMAC_MODE_STANDBY) ||
-        (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)) {
-       if (pMgmt->sNodeDBTable[0].bActive) {
-	 if (ether_addr_equal(pMgmt->abyCurrBSSID, pMACHeader->addr2)) {
-	    if (pMgmt->sNodeDBTable[0].uInActiveCount != 0)
-                  pMgmt->sNodeDBTable[0].uInActiveCount = 0;
-           }
-       }
-    }
-
-    if (!is_multicast_ether_addr(pMACHeader->addr1)) {
-        if (WCTLbIsDuplicate(&(pDevice->sDupRxCache), (struct ieee80211_hdr *) pbyFrame)) {
-            return false;
-        }
-
-	if (!ether_addr_equal(pDevice->abyCurrentNetAddr, pMACHeader->addr1)) {
-		return false;
-        }
-    }
-
-    // Use for TKIP MIC
-    s_vGetDASA(pbyFrame, &cbHeaderSize, &pDevice->sRxEthHeader);
-
-    if (ether_addr_equal((u8 *)pDevice->sRxEthHeader.h_source,
-			 pDevice->abyCurrentNetAddr))
-        return false;
-
-    if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) || (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA)) {
-        if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) {
-            p802_11Header = (struct ieee80211_hdr *) (pbyFrame);
-            // get SA NodeIndex
-            if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(p802_11Header->addr2), &iSANodeIndex)) {
-                pMgmt->sNodeDBTable[iSANodeIndex].ulLastRxJiffer = jiffies;
-                pMgmt->sNodeDBTable[iSANodeIndex].uInActiveCount = 0;
-            }
-        }
-    }
-
-    if (IS_FC_WEP(pbyFrame)) {
-        bool     bRxDecryOK = false;
-
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n");
-        bIsWEP = true;
-
-	bRxDecryOK = s_bHandleRxEncryption(pDevice, pbyFrame, FrameSize,
-		pbyRsr, pbyNewRsr, &pKey, &bExtIV, &wRxTSC15_0, &dwRxTSC47_16);
-
-        if (bRxDecryOK) {
-            if ((*pbyNewRsr & NEWRSR_DECRYPTOK) == 0) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV Fail\n");
-                if ( (pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
-                    (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) ||
-                    (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) ||
-                    (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
-                    (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {
-                }
-                return false;
-            }
-        } else {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WEP Func Fail\n");
-            return false;
-        }
-        if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_CCMP))
-            FrameSize -= 8;         // Message Integrity Code
-        else
-            FrameSize -= 4;         // 4 is ICV
-    }
-
-    //
-    // RX OK
-    //
-    /* remove the FCS/CRC length */
-    FrameSize -= ETH_FCS_LEN;
-
-    if ( !(*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) && // unicast address
-        (IS_FRAGMENT_PKT((pbyFrame)))
-        ) {
-        // defragment
-        bDeFragRx = WCTLbHandleFragment(pDevice, (struct ieee80211_hdr *) (pbyFrame), FrameSize, bIsWEP, bExtIV);
-        if (bDeFragRx) {
-            // defrag complete
-            // TODO skb, pbyFrame
-            skb = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb;
-            FrameSize = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength;
-            pbyFrame = skb->data + 8;
-        }
-        else {
-            return false;
-        }
-    }
-
-    //
-    // Management & Control frame Handle
-    //
-    if ((IS_TYPE_DATA((pbyFrame))) == false) {
-        // Handle Control & Manage Frame
-
-        if (IS_TYPE_MGMT((pbyFrame))) {
-            u8 * pbyData1;
-            u8 * pbyData2;
-
-            pRxPacket = &(pRCB->sMngPacket);
-            pRxPacket->p80211Header = (PUWLAN_80211HDR)(pbyFrame);
-            pRxPacket->cbMPDULen = FrameSize;
-            pRxPacket->uRSSI = *pbyRSSI;
-            pRxPacket->bySQ = *pbySQ;
-		pRxPacket->qwLocalTSF = cpu_to_le64(*pqwTSFTime);
-            if (bIsWEP) {
-                // strip IV
-                pbyData1 = WLAN_HDR_A3_DATA_PTR(pbyFrame);
-                pbyData2 = WLAN_HDR_A3_DATA_PTR(pbyFrame) + 4;
-                for (ii = 0; ii < (FrameSize - 4); ii++) {
-                    *pbyData1 = *pbyData2;
-                     pbyData1++;
-                     pbyData2++;
-                }
-            }
-
-            pRxPacket->byRxRate = s_byGetRateIdx(*pbyRxRate);
-
-            if ( *pbyRxSts == 0 ) {
-                //Discard beacon packet which channel is 0
-                if ( (WLAN_GET_FC_FSTYPE((pRxPacket->p80211Header->sA3.wFrameCtl)) == WLAN_FSTYPE_BEACON) ||
-                     (WLAN_GET_FC_FSTYPE((pRxPacket->p80211Header->sA3.wFrameCtl)) == WLAN_FSTYPE_PROBERESP) ) {
-			return false;
-                }
-            }
-            pRxPacket->byRxChannel = (*pbyRxSts) >> 2;
-
-            //
-            // Insert the RCB in the Recv Mng list
-            //
-            EnqueueRCB(pDevice->FirstRecvMngList, pDevice->LastRecvMngList, pRCBIndicate);
-            pDevice->NumRecvMngList++;
-            if ( bDeFragRx == false) {
-                pRCB->Ref++;
-            }
-            if (pDevice->bIsRxMngWorkItemQueued == false) {
-                pDevice->bIsRxMngWorkItemQueued = true;
-		schedule_work(&pDevice->rx_mng_work_item);
-            }
-
-        }
-        else {
-            // Control Frame
-        };
-        return false;
-    }
-    else {
-        if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-            //In AP mode, hw only check addr1(BSSID or RA) if equal to local MAC.
-            if ( !(*pbyRsr & RSR_BSSIDOK)) {
-                if (bDeFragRx) {
-                    if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-                        DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                        pDevice->dev->name);
-                    }
-                }
-                return false;
-            }
-        }
-        else {
-            // discard DATA packet while not associate || BSSID error
-            if ((pDevice->bLinkPass == false) ||
-                !(*pbyRsr & RSR_BSSIDOK)) {
-                if (bDeFragRx) {
-                    if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-                        DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                        pDevice->dev->name);
-                    }
-                }
-                return false;
-            }
-   //mike add:station mode check eapol-key challenge--->
-   	  {
-   	    u8  Protocol_Version;    //802.1x Authentication
-	    u8  Packet_Type;           //802.1x Authentication
-	    u8  Descriptor_type;
-             u16 Key_info;
-              if (bIsWEP)
-                  cbIVOffset = 8;
-              else
-                  cbIVOffset = 0;
-              wEtherType = (skb->data[cbIVOffset + 8 + 24 + 6] << 8) |
-                          skb->data[cbIVOffset + 8 + 24 + 6 + 1];
-	      Protocol_Version = skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1];
-	      Packet_Type = skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1];
-	     if (wEtherType == ETH_P_PAE) {         //Protocol Type in LLC-Header
-                  if(((Protocol_Version==1) ||(Protocol_Version==2)) &&
-		     (Packet_Type==3)) {  //802.1x OR eapol-key challenge frame receive
-                        bRxeapol_key = true;
-		      Descriptor_type = skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2];
-		      Key_info = (skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2+1]<<8) |skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2+2] ;
-		      if(Descriptor_type==2) {    //RSN
-                         //  printk("WPA2_Rx_eapol-key_info<-----:%x\n",Key_info);
-		      }
-		     else  if(Descriptor_type==254) {
-                        //  printk("WPA_Rx_eapol-key_info<-----:%x\n",Key_info);
-		     }
-                  }
-	      }
-   	  }
-    //mike add:station mode check eapol-key challenge<---
-        }
-    }
-
-// Data frame Handle
-
-    if (pDevice->bEnablePSMode) {
-        if (IS_FC_MOREDATA((pbyFrame))) {
-            if (*pbyRsr & RSR_ADDROK) {
-                //PSbSendPSPOLL((PSDevice)pDevice);
-            }
-        }
-        else {
-            if (pMgmt->bInTIMWake == true) {
-                pMgmt->bInTIMWake = false;
-            }
-        }
-    }
-
-    // ++++++++ For BaseBand Algorithm +++++++++++++++
-    pDevice->uCurrRSSI = *pbyRSSI;
-    pDevice->byCurrSQ = *pbySQ;
-
-    // todo
-/*
-    if ((*pbyRSSI != 0) &&
-        (pMgmt->pCurrBSS!=NULL)) {
-        RFvRSSITodBm(pDevice, *pbyRSSI, &ldBm);
-        // Monitor if RSSI is too strong.
-        pMgmt->pCurrBSS->byRSSIStatCnt++;
-        pMgmt->pCurrBSS->byRSSIStatCnt %= RSSI_STAT_COUNT;
-        pMgmt->pCurrBSS->ldBmAverage[pMgmt->pCurrBSS->byRSSIStatCnt] = ldBm;
-	for (ii = 0; ii < RSSI_STAT_COUNT; ii++) {
-		if (pMgmt->pCurrBSS->ldBmAverage[ii] != 0) {
-			pMgmt->pCurrBSS->ldBmMAX =
-				max(pMgmt->pCurrBSS->ldBmAverage[ii], ldBm);
-		}
-        }
-    }
-*/
-
-    if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) {
-        if (bIsWEP) {
-            FrameSize -= 8;  //MIC
-        }
-    }
-
-    //--------------------------------------------------------------------------------
-    // Soft MIC
-    if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) {
-        if (bIsWEP) {
-            u32 *          pdwMIC_L;
-            u32 *          pdwMIC_R;
-            u32           dwMIC_Priority;
-            u32           dwMICKey0 = 0, dwMICKey1 = 0;
-            u32           dwLocalMIC_L = 0;
-            u32           dwLocalMIC_R = 0;
-
-            if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-                dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[24]));
-                dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[28]));
-            }
-            else {
-                if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
-                    dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[16]));
-                    dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[20]));
-                } else if ((pKey->dwKeyIndex & BIT28) == 0) {
-                    dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[16]));
-                    dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[20]));
-                } else {
-                    dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[24]));
-                    dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[28]));
-                }
-            }
-
-            MIC_vInit(dwMICKey0, dwMICKey1);
-            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.
-            MIC_vAppend((u8 *)(skb->data + 8 + WLAN_HDR_ADDR3_LEN + 8),
-                        FrameSize - WLAN_HDR_ADDR3_LEN - 8);
-            MIC_vGetMIC(&dwLocalMIC_L, &dwLocalMIC_R);
-            MIC_vUnInit();
-
-            pdwMIC_L = (u32 *)(skb->data + 8 + FrameSize);
-            pdwMIC_R = (u32 *)(skb->data + 8 + FrameSize + 4);
-
-            if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) ||
-                (pDevice->bRxMICFail == true)) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n");
-                pDevice->bRxMICFail = false;
-                if (bDeFragRx) {
-                    if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-                        DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                            pDevice->dev->name);
-                    }
-                }
-				//send event to wpa_supplicant
-				//if(pDevice->bWPASuppWextEnabled == true)
-				{
-					union iwreq_data wrqu;
-					struct iw_michaelmicfailure ev;
-					int keyidx = pbyFrame[cbHeaderSize+3] >> 6; //top two-bits
-					memset(&ev, 0, sizeof(ev));
-					ev.flags = keyidx & IW_MICFAILURE_KEY_ID;
-					if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
-							(pMgmt->eCurrState == WMAC_STATE_ASSOC) &&
-								(*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) == 0) {
-						ev.flags |= IW_MICFAILURE_PAIRWISE;
-					} else {
-						ev.flags |= IW_MICFAILURE_GROUP;
-					}
-
-					ev.src_addr.sa_family = ARPHRD_ETHER;
-					memcpy(ev.src_addr.sa_data, pMACHeader->addr2, ETH_ALEN);
-					memset(&wrqu, 0, sizeof(wrqu));
-					wrqu.data.length = sizeof(ev);
-			PRINT_K("wireless_send_event--->IWEVMICHAELMICFAILURE\n");
-					wireless_send_event(pDevice->dev, IWEVMICHAELMICFAILURE, &wrqu, (char *)&ev);
-
-				}
-
-                return false;
-
-            }
-        }
-    } //---end of SOFT MIC-----------------------------------------------------------------------
-
-    // ++++++++++ Reply Counter Check +++++++++++++
-
-    if ((pKey != NULL) && ((pKey->byCipherSuite == KEY_CTL_TKIP) ||
-                           (pKey->byCipherSuite == KEY_CTL_CCMP))) {
-        if (bIsWEP) {
-            u16        wLocalTSC15_0 = 0;
-            u32       dwLocalTSC47_16 = 0;
-	    unsigned long long       RSC = 0;
-            // endian issues
-	    RSC = *((unsigned long long *) &(pKey->KeyRSC));
-            wLocalTSC15_0 = (u16) RSC;
-            dwLocalTSC47_16 = (u32) (RSC>>16);
-
-            RSC = dwRxTSC47_16;
-            RSC <<= 16;
-            RSC += wRxTSC15_0;
-		memcpy(&(pKey->KeyRSC), &RSC,  sizeof(u64));
-
-		if (pDevice->vnt_mgmt.eCurrMode == WMAC_MODE_ESS_STA &&
-			pDevice->vnt_mgmt.eCurrState == WMAC_STATE_ASSOC) {
-			/* check RSC */
-                if ( (wRxTSC15_0 < wLocalTSC15_0) &&
-                     (dwRxTSC47_16 <= dwLocalTSC47_16) &&
-                     !((dwRxTSC47_16 == 0) && (dwLocalTSC47_16 == 0xFFFFFFFF))) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC is illegal~~!\n ");
-
-                    if (bDeFragRx) {
-                        if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-                            DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                                pDevice->dev->name);
-                        }
-                    }
-                    return false;
-                }
-            }
-        }
-    } // ----- End of Reply Counter Check --------------------------
-
-    s_vProcessRxMACHeader(pDevice, (u8 *)(skb->data+8), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset);
-    FrameSize -= cbHeaderOffset;
-    cbHeaderOffset += 8;        // 8 is Rcv buffer header
-
-    // Null data, framesize = 12
-    if (FrameSize < 12)
-        return false;
-
-	skb->data += cbHeaderOffset;
-	skb->tail += cbHeaderOffset;
-    skb_put(skb, FrameSize);
-    skb->protocol=eth_type_trans(skb, skb->dev);
-    skb->ip_summed=CHECKSUM_NONE;
-    pStats->rx_bytes +=skb->len;
-    pStats->rx_packets++;
-    netif_rx(skb);
-    if (bDeFragRx) {
-        if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-            DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                pDevice->dev->name);
-        }
-        return false;
-    }
-
-    return true;
-}
-
-static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
-	u32 FrameSize, u8 *pbyRsr, u8 *pbyNewRsr, PSKeyItem *pKeyOut,
-	s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16)
-{
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	u32 PayloadLen = FrameSize;
-	u8 *pbyIV;
-	u8 byKeyIdx;
-	PSKeyItem pKey = NULL;
-	u8 byDecMode = KEY_CTL_WEP;
-
-    *pwRxTSC15_0 = 0;
-    *pdwRxTSC47_16 = 0;
-
-    pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
-    if ( WLAN_GET_FC_TODS(*(u16 *)pbyFrame) &&
-         WLAN_GET_FC_FROMDS(*(u16 *)pbyFrame) ) {
-         pbyIV += 6;             // 6 is 802.11 address4
-         PayloadLen -= 6;
-    }
-    byKeyIdx = (*(pbyIV+3) & 0xc0);
-    byKeyIdx >>= 6;
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\nKeyIdx: %d\n", byKeyIdx);
-
-    if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
-        (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) ||
-        (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) ||
-        (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
-        (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {
-        if (((*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) == 0) &&
-            (pMgmt->byCSSPK != KEY_CTL_NONE)) {
-            // unicast pkt use pairwise key
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt\n");
-            if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == true) {
-                if (pMgmt->byCSSPK == KEY_CTL_TKIP)
-                    byDecMode = KEY_CTL_TKIP;
-                else if (pMgmt->byCSSPK == KEY_CTL_CCMP)
-                    byDecMode = KEY_CTL_CCMP;
-            }
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt: %d, %p\n", byDecMode, pKey);
-        } else {
-            // use group key
-            KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, byKeyIdx, &pKey);
-            if (pMgmt->byCSSGK == KEY_CTL_TKIP)
-                byDecMode = KEY_CTL_TKIP;
-            else if (pMgmt->byCSSGK == KEY_CTL_CCMP)
-                byDecMode = KEY_CTL_CCMP;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"group pkt: %d, %d, %p\n", byKeyIdx, byDecMode, pKey);
-        }
-    }
-    // our WEP only support Default Key
-    if (pKey == NULL) {
-        // use default group key
-        KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, byKeyIdx, &pKey);
-        if (pMgmt->byCSSGK == KEY_CTL_TKIP)
-            byDecMode = KEY_CTL_TKIP;
-        else if (pMgmt->byCSSGK == KEY_CTL_CCMP)
-            byDecMode = KEY_CTL_CCMP;
-    }
-    *pKeyOut = pKey;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"AES:%d %d %d\n", pMgmt->byCSSPK, pMgmt->byCSSGK, byDecMode);
-
-    if (pKey == NULL) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n");
-        return false;
-    }
-    if (byDecMode != pKey->byCipherSuite) {
-        *pKeyOut = NULL;
-        return false;
-    }
-    if (byDecMode == KEY_CTL_WEP) {
-        // handle WEP
-        if ((pDevice->byLocalID <= REV_ID_VT3253_A1) ||
-		(((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true)) {
-            // Software WEP
-            // 1. 3253A
-            // 2. WEP 256
-
-            PayloadLen -= (WLAN_HDR_ADDR3_LEN + 4 + 4); // 24 is 802.11 header,4 is IV, 4 is crc
-            memcpy(pDevice->abyPRNG, pbyIV, 3);
-            memcpy(pDevice->abyPRNG + 3, pKey->abyKey, pKey->uKeyLength);
-            rc4_init(&pDevice->SBox, pDevice->abyPRNG, pKey->uKeyLength + 3);
-            rc4_encrypt(&pDevice->SBox, pbyIV+4, pbyIV+4, PayloadLen);
-
-            if (ETHbIsBufferCrc32Ok(pbyIV+4, PayloadLen)) {
-                *pbyNewRsr |= NEWRSR_DECRYPTOK;
-            }
-        }
-    } else if ((byDecMode == KEY_CTL_TKIP) ||
-               (byDecMode == KEY_CTL_CCMP)) {
-        // TKIP/AES
-
-        PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc
-        *pdwRxTSC47_16 = cpu_to_le32(*(u32 *)(pbyIV + 4));
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %x\n", *pdwRxTSC47_16);
-        if (byDecMode == KEY_CTL_TKIP) {
-            *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV));
-        } else {
-            *pwRxTSC15_0 = cpu_to_le16(*(u16 *)pbyIV);
-        }
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0);
-
-        if ((byDecMode == KEY_CTL_TKIP) &&
-            (pDevice->byLocalID <= REV_ID_VT3253_A1)) {
-            // Software TKIP
-            // 1. 3253 A
-            struct ieee80211_hdr *pMACHeader = (struct ieee80211_hdr *) (pbyFrame);
-            TKIPvMixKey(pKey->abyKey, pMACHeader->addr2, *pwRxTSC15_0, *pdwRxTSC47_16, pDevice->abyPRNG);
-            rc4_init(&pDevice->SBox, pDevice->abyPRNG, TKIP_KEY_LEN);
-            rc4_encrypt(&pDevice->SBox, pbyIV+8, pbyIV+8, PayloadLen);
-            if (ETHbIsBufferCrc32Ok(pbyIV+8, PayloadLen)) {
-                *pbyNewRsr |= NEWRSR_DECRYPTOK;
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV OK!\n");
-            } else {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV FAIL!!!\n");
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PayloadLen = %d\n", PayloadLen);
-            }
-        }
-    }// end of TKIP/AES
-
-    if ((*(pbyIV+3) & 0x20) != 0)
-        *pbExtIV = true;
-    return true;
-}
-
 void RXvWorkItem(struct work_struct *work)
 {
 	struct vnt_private *priv =
drivers/staging/vt6656/dpc.h +0 -3
index 45da7b2..0afd882 100644
@@ -38,9 +38,6 @@ void RXvMngWorkItem(struct work_struct *work);
 
 void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb);
 
-int RXbBulkInProcessData(struct vnt_private *, struct vnt_rcb *pRCB,
-	unsigned long BytesToIndicate);
-
 int vnt_rx_data(struct vnt_private *, struct vnt_rcb *,
 	unsigned long bytes_recieved);
 
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/34 staging: vt6656: main_usb removed dead code

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/device.h   |   2 -
 drivers/staging/vt6656/main_usb.c | 371 --------------------------------------
 drivers/staging/vt6656/wcmd.c     |   1 -
 3 files changed, 374 deletions(-)
drivers/staging/vt6656/device.h +0 -2
index 1b74f47..c2e495b 100644
@@ -754,8 +754,6 @@ struct vnt_private {
 
 #define MP_IS_READY(_M)        (((_M)->Flags & fMP_DISCONNECTED) == 0)
 
-int device_alloc_frag_buf(struct vnt_private *, PSDeFragControlBlock pDeF);
-void vnt_configure_filter(struct vnt_private *);
 int vnt_init(struct vnt_private *priv);
 
 #endif
drivers/staging/vt6656/main_usb.c +0 -371

400 lines not on this page · raw message

drivers/staging/vt6656/wcmd.c +0 -1
index 81a6683..4d7d5b1 100644
@@ -899,7 +899,6 @@ void vRunCommand(struct work_struct *work)
 		break;
 
 	case WLAN_CMD_CONFIGURE_FILTER_START:
-		vnt_configure_filter(pDevice);
 		break;
 	default:
 		break;
Signature · 1 line
1.9.1
#5 lore raw

PATCH 5/34 staging: vt6656: deadcode iwctl.c/h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/Makefile   |    1 -
 drivers/staging/vt6656/iwctl.c    | 1802 -------------------------------------
 drivers/staging/vt6656/iwctl.h    |  138 ---
 drivers/staging/vt6656/main_usb.c |    2 -
 4 files changed, 1943 deletions(-)
 delete mode 100644 drivers/staging/vt6656/iwctl.c
 delete mode 100644 drivers/staging/vt6656/iwctl.h
drivers/staging/vt6656/Makefile +0 -1
index b5ec483..0c5628c 100644
@@ -23,7 +23,6 @@ vt6656_stage-y +=	main_usb.o \
 			tkip.o \
 			michael.o \
 			rf.o \
-			iwctl.o \
 			wpactl.o \
 			usbpipe.o \
 			channel.o \
drivers/staging/vt6656/iwctl.c deleted +0 -1802

1,802 lines not on this page · raw message

drivers/staging/vt6656/iwctl.h deleted +0 -138

138 lines not on this page · raw message

drivers/staging/vt6656/main_usb.c +0 -2
index f3b0890..0d71430 100644
@@ -59,7 +59,6 @@
 #include "rxtx.h"
 #include "bssdb.h"
 #include "wpactl.h"
-#include "iwctl.h"
 #include "dpc.h"
 #include "datarate.h"
 #include "rf.h"
@@ -192,7 +191,6 @@ static const long frequency_list[] = {
     5700, 5745, 5765, 5785, 5805, 5825
 	};
 
-static const struct iw_handler_def	iwctl_handler_def;
 */
 
 static int vt6656_probe(struct usb_interface *intf,
Signature · 1 line
1.9.1
#6 lore raw

PATCH 6/34 staging: vt6656: wcmd remove dead code

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/wcmd.c | 833 ------------------------------------------
 1 file changed, 833 deletions(-)
drivers/staging/vt6656/wcmd.c +0 -833
index 4d7d5b1..a777841 100644
@@ -57,207 +57,8 @@
 static int msglevel = MSG_LEVEL_INFO;
 //static int msglevel = MSG_LEVEL_DEBUG;
 
-static void s_vProbeChannel(struct vnt_private *);
-
-static struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *,
-	struct vnt_manager *pMgmt, u8 *pScanBSSID, PWLAN_IE_SSID pSSID,
-	PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates);
-
 static int s_bCommandComplete(struct vnt_private *);
 
-static int s_bClearBSSID_SCAN(struct vnt_private *);
-
-/*
- * Description:
- *      Stop AdHoc beacon during scan process
- *
- * Parameters:
- *  In:
- *      pDevice     - Pointer to the adapter
- *  Out:
- *      none
- *
- * Return Value: none
- *
- */
-
-static void vAdHocBeaconStop(struct vnt_private *pDevice)
-{
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	int bStop;
-
-	/*
-	 * temporarily stop Beacon packet for AdHoc Server
-	 * if all of the following coditions are met:
-	 *  (1) STA is in AdHoc mode
-	 *  (2) VT3253 is programmed as automatic Beacon Transmitting
-	 *  (3) One of the following conditions is met
-	 *      (3.1) AdHoc channel is in B/G band and the
-	 *      current scan channel is in A band
-	 *      or
-	 *      (3.2) AdHoc channel is in A mode
-	 */
-	bStop = false;
-	if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
-	    (pMgmt->eCurrState >= WMAC_STATE_STARTED)) {
-		if ((pMgmt->uIBSSChannel <=  CB_MAX_CHANNEL_24G) &&
-		    (pMgmt->uScanChannel > CB_MAX_CHANNEL_24G)) {
-			bStop = true;
-		}
-		if (pMgmt->uIBSSChannel >  CB_MAX_CHANNEL_24G)
-			bStop = true;
-	}
-
-	if (bStop) {
-		//PMESG(("STOP_BEACON: IBSSChannel = %u, ScanChannel = %u\n",
-		//        pMgmt->uIBSSChannel, pMgmt->uScanChannel));
-		vnt_mac_reg_bits_off(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
-	}
-
-} /* vAdHocBeaconStop */
-
-/*
- * Description:
- *      Restart AdHoc beacon after scan process complete
- *
- * Parameters:
- *  In:
- *      pDevice     - Pointer to the adapter
- *  Out:
- *      none
- *
- * Return Value: none
- *
- */
-static void vAdHocBeaconRestart(struct vnt_private *pDevice)
-{
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-    /*
-     * Restart Beacon packet for AdHoc Server
-     * if all of the following coditions are met:
-     *  (1) STA is in AdHoc mode
-     *  (2) VT3253 is programmed as automatic Beacon Transmitting
-     */
-	if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
-	    (pMgmt->eCurrState >= WMAC_STATE_STARTED)) {
-		//PMESG(("RESTART_BEACON\n"));
-		vnt_mac_reg_bits_on(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
-	}
-
-}
-
-/*+
- *
- * Routine Description:
- *   Prepare and send probe request management frames.
- *
- *
- * Return Value:
- *    none.
- *
--*/
-
-static void s_vProbeChannel(struct vnt_private *pDevice)
-{
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	struct vnt_tx_mgmt *pTxPacket;
-	u8 abyCurrSuppRatesG[] = {WLAN_EID_SUPP_RATES,
-			8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
-			/* 1M,   2M,   5M,   11M,  18M,  24M,  36M,  54M*/
-	u8 abyCurrExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES,
-			4, 0x0C, 0x12, 0x18, 0x60};
-			/* 6M,   9M,   12M,  48M*/
-	u8 abyCurrSuppRatesA[] = {WLAN_EID_SUPP_RATES,
-			8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
-	u8 abyCurrSuppRatesB[] = {WLAN_EID_SUPP_RATES,
-			4, 0x02, 0x04, 0x0B, 0x16};
-	u8 *pbyRate;
-	int ii;
-
-	if (pDevice->byBBType == BB_TYPE_11A)
-		pbyRate = &abyCurrSuppRatesA[0];
-	else if (pDevice->byBBType == BB_TYPE_11B)
-		pbyRate = &abyCurrSuppRatesB[0];
-	else
-		pbyRate = &abyCurrSuppRatesG[0];
-
-	// build an assocreq frame and send it
-	pTxPacket = s_MgrMakeProbeRequest
-		    (
-		     pDevice,
-		     pMgmt,
-		     pMgmt->abyScanBSSID,
-		     (PWLAN_IE_SSID)pMgmt->abyScanSSID,
-		     (PWLAN_IE_SUPP_RATES)pbyRate,
-		     (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRatesG
-		     );
-
-	if (pTxPacket != NULL) {
-		for (ii = 0; ii < 1; ii++) {
-			if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request sending fail..\n");
-			} else {
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request is sending..\n");
-			}
-		}
-	}
-
-}
-
-/*+
- *
- * Routine Description:
- *  Constructs an probe request frame
- *
- *
- * Return Value:
- *    A ptr to Tx frame or NULL on allocation failure
- *
--*/
-
-static struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice,
-	struct vnt_manager *pMgmt, u8 *pScanBSSID, PWLAN_IE_SSID pSSID,
-	PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
-{
-	struct vnt_tx_mgmt *pTxPacket = NULL;
-	WLAN_FR_PROBEREQ sFrame;
-
-	pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-	memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-		+ WLAN_PROBEREQ_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-		+ sizeof(struct vnt_tx_mgmt));
-	sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-	sFrame.len = WLAN_PROBEREQ_FR_MAXLEN;
-	vMgrEncodeProbeRequest(&sFrame);
-	sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-		(
-		 WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-		 WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PROBEREQ)
-		 ));
-	memcpy(sFrame.pHdr->sA3.abyAddr1, pScanBSSID, WLAN_ADDR_LEN);
-	memcpy(sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-	memcpy(sFrame.pHdr->sA3.abyAddr3, pScanBSSID, WLAN_BSSID_LEN);
-	// Copy the SSID, pSSID->len=0 indicate broadcast SSID
-	sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len);
-	sFrame.len += pSSID->len + WLAN_IEHDR_LEN;
-	memcpy(sFrame.pSSID, pSSID, pSSID->len + WLAN_IEHDR_LEN);
-	sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-	sFrame.len += pCurrRates->len + WLAN_IEHDR_LEN;
-	memcpy(sFrame.pSuppRates, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN);
-	// Copy the extension rate set
-	if (pDevice->byBBType == BB_TYPE_11G) {
-		sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-		sFrame.len += pCurrExtSuppRates->len + WLAN_IEHDR_LEN;
-		memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, pCurrExtSuppRates->len + WLAN_IEHDR_LEN);
-	}
-	pTxPacket->cbMPDULen = sFrame.len;
-	pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-	return pTxPacket;
-}
-
 static void
 vCommandTimerWait(struct vnt_private *pDevice, unsigned long MSecond)
 {
@@ -269,16 +70,7 @@ void vRunCommand(struct work_struct *work)
 {
 	struct vnt_private *pDevice =
 		container_of(work, struct vnt_private, run_command_work.work);
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	PWLAN_IE_SSID pItemSSID;
-	PWLAN_IE_SSID pItemSSIDCurr;
-	CMD_STATUS Status;
-	struct sk_buff  *skb;
-	union iwreq_data wrqu;
-	int ii;
-	u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
 	u8 byData;
-	unsigned long flags;
 
 	if (pDevice->Flags & fMP_DISCONNECTED)
 		return;
@@ -301,533 +93,6 @@ void vRunCommand(struct work_struct *work)
 		}
 
 		break;
-	case WLAN_CMD_SCAN_START:
-
-		pDevice->byReAssocCount = 0;
-		if (pDevice->bRadioOff == true)
-			break;
-
-		if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)
-			break;
-
-		pItemSSID = (PWLAN_IE_SSID)pMgmt->abyScanSSID;
-
-		if (pMgmt->uScanChannel == 0)
-			pMgmt->uScanChannel = pDevice->byMinChannel;
-		if (pMgmt->uScanChannel > pDevice->byMaxChannel) {
-			pDevice->eCommandState = WLAN_CMD_SCAN_END;
-			break;
-		} else {
-			if (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel)) {
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Invalid channel pMgmt->uScanChannel = %d\n", pMgmt->uScanChannel);
-				pMgmt->uScanChannel++;
-				break;
-			}
-			if (pMgmt->uScanChannel == pDevice->byMinChannel) {
-				// pMgmt->eScanType = WMAC_SCAN_ACTIVE;          //mike mark
-				pMgmt->abyScanBSSID[0] = 0xFF;
-				pMgmt->abyScanBSSID[1] = 0xFF;
-				pMgmt->abyScanBSSID[2] = 0xFF;
-				pMgmt->abyScanBSSID[3] = 0xFF;
-				pMgmt->abyScanBSSID[4] = 0xFF;
-				pMgmt->abyScanBSSID[5] = 0xFF;
-				pItemSSID->byElementID = WLAN_EID_SSID;
-				// clear bssid list
-				/* BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass); */
-				pMgmt->eScanState = WMAC_IS_SCANNING;
-				pDevice->byScanBBType = pDevice->byBBType;  //lucas
-				pDevice->bStopDataPkt = true;
-				// Turn off RCR_BSSID filter every time
-				vnt_mac_reg_bits_off(pDevice, MAC_REG_RCR, RCR_BSSID);
-				pDevice->byRxMode &= ~RCR_BSSID;
-			}
-			//lucas
-			vAdHocBeaconStop(pDevice);
-			if ((pDevice->byBBType != BB_TYPE_11A) &&
-			    (pMgmt->uScanChannel > CB_MAX_CHANNEL_24G)) {
-				pDevice->byBBType = BB_TYPE_11A;
-				vnt_set_bss_mode(pDevice);
-			} else if ((pDevice->byBBType == BB_TYPE_11A) &&
-				   (pMgmt->uScanChannel <= CB_MAX_CHANNEL_24G)) {
-				pDevice->byBBType = BB_TYPE_11G;
-				vnt_set_bss_mode(pDevice);
-			}
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning....  channel: [%d]\n", pMgmt->uScanChannel);
-			// Set channel
-			vnt_set_channel(pDevice, pMgmt->uScanChannel);
-			// Set Baseband to be more sensitive.
-
-			BBvSetShortSlotTime(pDevice);
-			BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
-			BBvUpdatePreEDThreshold(pDevice, true);
-
-			pMgmt->uScanChannel++;
-
-			while (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel) &&
-				pMgmt->uScanChannel <= pDevice->byMaxChannel){
-				pMgmt->uScanChannel++;
-			}
-
-			if (pMgmt->uScanChannel > pDevice->byMaxChannel) {
-				// Set Baseband to be not sensitive and rescan
-				pDevice->eCommandState = WLAN_CMD_SCAN_END;
-			}
-			if ((pMgmt->b11hEnable == false) ||
-			    (pMgmt->uScanChannel < CB_MAX_CHANNEL_24G)) {
-				s_vProbeChannel(pDevice);
-				vCommandTimerWait((void *) pDevice, 100);
-				return;
-			} else {
-				vCommandTimerWait((void *) pDevice, WCMD_PASSIVE_SCAN_TIME);
-				return;
-			}
-		}
-
-		break;
-
-	case WLAN_CMD_SCAN_END:
-
-		// Set Baseband's sensitivity back.
-		if (pDevice->byBBType != pDevice->byScanBBType) {
-			pDevice->byBBType = pDevice->byScanBBType;
-			vnt_set_bss_mode(pDevice);
-		}
-
-		BBvSetShortSlotTime(pDevice);
-		BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
-		BBvUpdatePreEDThreshold(pDevice, false);
-
-		// Set channel back
-		vAdHocBeaconRestart(pDevice);
-		// Set channel back
-		vnt_set_channel(pDevice, pMgmt->uCurrChannel);
-		// Set Filter
-		if (pMgmt->bCurrBSSIDFilterOn) {
-			vnt_mac_reg_bits_on(pDevice, MAC_REG_RCR, RCR_BSSID);
-			pDevice->byRxMode |= RCR_BSSID;
-		}
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel);
-		pMgmt->uScanChannel = 0;
-		pMgmt->eScanState = WMAC_NO_SCANNING;
-		pDevice->bStopDataPkt = false;
-
-		/*send scan event to wpa_Supplicant*/
-		PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n");
-		memset(&wrqu, 0, sizeof(wrqu));
-		wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL);
-
-		break;
-
-	case WLAN_CMD_DISASSOCIATE_START:
-		pDevice->byReAssocCount = 0;
-		if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
-		    (pMgmt->eCurrState != WMAC_STATE_ASSOC)) {
-			break;
-		} else {
-			pDevice->bwextstep0 = false;
-			pDevice->bwextstep1 = false;
-			pDevice->bwextstep2 = false;
-			pDevice->bwextstep3 = false;
-			pDevice->bWPASuppWextEnabled = false;
-			pDevice->fWPA_Authened = false;
-
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send Disassociation Packet..\n");
-			// reason = 8 : disassoc because sta has left
-			vMgrDisassocBeginSta((void *) pDevice,
-					     pMgmt,
-					     pMgmt->abyCurrBSSID,
-					     (8),
-					     &Status);
-			pDevice->bLinkPass = false;
-
-			vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
-
-			// unlock command busy
-			pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
-			pItemSSID->len = 0;
-			memset(pItemSSID->abySSID, 0, WLAN_SSID_MAXLEN);
-			pMgmt->eCurrState = WMAC_STATE_IDLE;
-			pMgmt->sNodeDBTable[0].bActive = false;
-//			pDevice->bBeaconBufReady = false;
-		}
-		netif_stop_queue(pDevice->dev);
-		if (pDevice->bNeedRadioOFF == true)
-			vnt_radio_power_off(pDevice);
-
-		break;
-
-	case WLAN_CMD_SSID_START:
-
-		pDevice->byReAssocCount = 0;
-		if (pDevice->bRadioOff == true)
-			break;
-
-		memcpy(pMgmt->abyAdHocSSID, pMgmt->abyDesireSSID,
-		       ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len + WLAN_IEHDR_LEN);
-
-		pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
-		pItemSSIDCurr = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: desire ssid = %s\n", pItemSSID->abySSID);
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: curr ssid = %s\n", pItemSSIDCurr->abySSID);
-
-		if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Cmd pMgmt->eCurrState == WMAC_STATE_ASSOC\n");
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSID->len =%d\n", pItemSSID->len);
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSIDCurr->len = %d\n", pItemSSIDCurr->len);
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" desire ssid = %s\n", pItemSSID->abySSID);
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" curr ssid = %s\n", pItemSSIDCurr->abySSID);
-		}
-
-		if ((pMgmt->eCurrState == WMAC_STATE_ASSOC) ||
-		    ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED))) {
-			if (pItemSSID->len == pItemSSIDCurr->len) {
-				if (!memcmp(pItemSSID->abySSID,
-					pItemSSIDCurr->abySSID, pItemSSID->len))
-					break;
-			}
-			netif_stop_queue(pDevice->dev);
-			pDevice->bLinkPass = false;
-
-			vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
-		}
-		// set initial state
-		pMgmt->eCurrState = WMAC_STATE_IDLE;
-		pMgmt->eCurrMode = WMAC_MODE_STANDBY;
-		vnt_disable_power_saving(pDevice);
-		BSSvClearNodeDBTable(pDevice, 0);
-		vMgrJoinBSSBegin((void *) pDevice, &Status);
-		// if Infra mode
-		if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
-			// Call mgr to begin the deauthentication
-			// reason = (3) because sta has left ESS
-			if (pMgmt->eCurrState >= WMAC_STATE_AUTH) {
-				vMgrDeAuthenBeginSta((void *)pDevice,
-						     pMgmt,
-						     pMgmt->abyCurrBSSID,
-						     (3),
-						     &Status);
-			}
-			// Call mgr to begin the authentication
-			vMgrAuthenBeginSta((void *) pDevice, pMgmt, &Status);
-			if (Status == CMD_STATUS_SUCCESS) {
-				pDevice->byLinkWaitCount = 0;
-				pDevice->eCommandState = WLAN_AUTHENTICATE_WAIT;
-				vCommandTimerWait((void *) pDevice, AUTHENTICATE_TIMEOUT);
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Set eCommandState = WLAN_AUTHENTICATE_WAIT\n");
-				return;
-			}
-		}
-		// if Adhoc mode
-		else if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-			if (pMgmt->eCurrState == WMAC_STATE_JOINTED) {
-				if (netif_queue_stopped(pDevice->dev))
-					netif_wake_queue(pDevice->dev);
-				pDevice->bLinkPass = true;
-
-				vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-				pMgmt->sNodeDBTable[0].bActive = true;
-				pMgmt->sNodeDBTable[0].uInActiveCount = 0;
-			} else {
-				// start own IBSS
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "CreateOwn IBSS by CurrMode = IBSS_STA\n");
-				vMgrCreateOwnIBSS((void *) pDevice, &Status);
-				if (Status != CMD_STATUS_SUCCESS) {
-					DBG_PRT(MSG_LEVEL_DEBUG,
-						KERN_INFO "WLAN_CMD_IBSS_CREATE fail!\n");
-				}
-				BSSvAddMulticastNode(pDevice);
-			}
-			s_bClearBSSID_SCAN(pDevice);
-		}
-		// if SSID not found
-		else if (pMgmt->eCurrMode == WMAC_MODE_STANDBY) {
-			if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA ||
-			    pMgmt->eConfigMode == WMAC_CONFIG_AUTO) {
-				// start own IBSS
-				DBG_PRT(MSG_LEVEL_DEBUG,
-					KERN_INFO "CreateOwn IBSS by CurrMode = STANDBY\n");
-				vMgrCreateOwnIBSS((void *) pDevice, &Status);
-				if (Status != CMD_STATUS_SUCCESS) {
-					DBG_PRT(MSG_LEVEL_DEBUG,
-						KERN_INFO "WLAN_CMD_IBSS_CREATE fail!\n");
-				}
-				BSSvAddMulticastNode(pDevice);
-				s_bClearBSSID_SCAN(pDevice);
-/*
-				pDevice->bLinkPass = true;
-				if (netif_queue_stopped(pDevice->dev)){
-					netif_wake_queue(pDevice->dev);
-				}
-				s_bClearBSSID_SCAN(pDevice);
-*/
-			} else {
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n");
-				// if(pDevice->bWPASuppWextEnabled == true)
-				{
-					union iwreq_data  wrqu;
-					memset(&wrqu, 0, sizeof(wrqu));
-					wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-					PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated:vMgrJoinBSSBegin Fail !!)\n");
-					wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
-				}
-			}
-		}
-		break;
-
-	case WLAN_AUTHENTICATE_WAIT:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_AUTHENTICATE_WAIT\n");
-		if (pMgmt->eCurrState == WMAC_STATE_AUTH) {
-			pDevice->byLinkWaitCount = 0;
-			// Call mgr to begin the association
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_AUTH\n");
-			vMgrAssocBeginSta((void *) pDevice, pMgmt, &Status);
-			if (Status == CMD_STATUS_SUCCESS) {
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState = WLAN_ASSOCIATE_WAIT\n");
-				pDevice->byLinkWaitCount = 0;
-				pDevice->eCommandState = WLAN_ASSOCIATE_WAIT;
-				vCommandTimerWait((void *) pDevice, ASSOCIATE_TIMEOUT);
-				return;
-			}
-		} else if (pMgmt->eCurrState < WMAC_STATE_AUTHPENDING) {
-			printk("WLAN_AUTHENTICATE_WAIT:Authen Fail???\n");
-		} else if (pDevice->byLinkWaitCount <= 4) {
-			//mike add:wait another 2 sec if authenticated_frame delay!
-			pDevice->byLinkWaitCount++;
-			printk("WLAN_AUTHENTICATE_WAIT:wait %d times!!\n", pDevice->byLinkWaitCount);
-			vCommandTimerWait((void *) pDevice, AUTHENTICATE_TIMEOUT/2);
-			return;
-		}
-		pDevice->byLinkWaitCount = 0;
-
-		break;
-
-	case WLAN_ASSOCIATE_WAIT:
-		if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n");
-			if (pDevice->ePSMode != WMAC_POWER_CAM) {
-				vnt_enable_power_saving(pDevice,
-						pMgmt->wListenInterval);
-			}
-/*
-			if (pMgmt->eAuthenMode >= WMAC_AUTH_WPA) {
-				KeybRemoveAllKey(pDevice, &(pDevice->sKey), pDevice->abyBSSID);
-			}
-*/
-			pDevice->byLinkWaitCount = 0;
-			pDevice->byReAssocCount = 0;
-			pDevice->bLinkPass = true;
-
-			vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-			s_bClearBSSID_SCAN(pDevice);
-
-			if (netif_queue_stopped(pDevice->dev))
-				netif_wake_queue(pDevice->dev);
-
-		} else if (pMgmt->eCurrState < WMAC_STATE_ASSOCPENDING) {
-			printk("WLAN_ASSOCIATE_WAIT:Association Fail???\n");
-		} else if (pDevice->byLinkWaitCount <= 4) {
-			//mike add:wait another 2 sec if associated_frame delay!
-			pDevice->byLinkWaitCount++;
-			printk("WLAN_ASSOCIATE_WAIT:wait %d times!!\n", pDevice->byLinkWaitCount);
-			vCommandTimerWait((void *) pDevice, ASSOCIATE_TIMEOUT/2);
-			return;
-		}
-
-		break;
-
-	case WLAN_CMD_AP_MODE_START:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_AP_MODE_START\n");
-
-		if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
-			cancel_delayed_work_sync(&pDevice->second_callback_work);
-			pMgmt->eCurrState = WMAC_STATE_IDLE;
-			pMgmt->eCurrMode = WMAC_MODE_STANDBY;
-			pDevice->bLinkPass = false;
-
-			vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
-
-			BSSvClearNodeDBTable(pDevice, 0);
-
-			pDevice->uAssocCount = 0;
-			pMgmt->eCurrState = WMAC_STATE_IDLE;
-			pDevice->bFixRate = false;
-
-			vMgrCreateOwnIBSS((void *) pDevice, &Status);
-			if (Status != CMD_STATUS_SUCCESS) {
-				DBG_PRT(MSG_LEVEL_DEBUG,
-					KERN_INFO "vMgrCreateOwnIBSS fail!\n");
-			}
-			// always turn off unicast bit
-			vnt_mac_reg_bits_off(pDevice, MAC_REG_RCR, RCR_UNICAST);
-			pDevice->byRxMode &= ~RCR_UNICAST;
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode);
-			BSSvAddMulticastNode(pDevice);
-			if (netif_queue_stopped(pDevice->dev))
-				netif_wake_queue(pDevice->dev);
-			pDevice->bLinkPass = true;
-
-			vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-			schedule_delayed_work(&pDevice->second_callback_work, HZ);
-		}
-		break;
-
-	case WLAN_CMD_TX_PSPACKET_START:
-		// DTIM Multicast tx
-		if (pMgmt->sNodeDBTable[0].bRxPSPoll) {
-			while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[0].sTxPSQueue)) != NULL) {
-				if (skb_queue_empty(&pMgmt->sNodeDBTable[0].sTxPSQueue)) {
-					pMgmt->abyPSTxMap[0] &= ~byMask[0];
-					pDevice->bMoreData = false;
-				} else {
-					pDevice->bMoreData = true;
-				}
-
-				spin_lock_irqsave(&pDevice->lock, flags);
-
-				if (nsDMA_tx_packet(pDevice, skb) != 0)
-					DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Multicast ps tx fail\n");
-
-				spin_unlock_irqrestore(&pDevice->lock, flags);
-
-				pMgmt->sNodeDBTable[0].wEnQueueCnt--;
-			}
-		}
-
-		// PS nodes tx
-		for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) {
-			if (pMgmt->sNodeDBTable[ii].bActive &&
-			    pMgmt->sNodeDBTable[ii].bRxPSPoll) {
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d Enqueu Cnt= %d\n",
-						ii, pMgmt->sNodeDBTable[ii].wEnQueueCnt);
-				while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) != NULL) {
-					if (skb_queue_empty(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) {
-						// clear tx map
-						pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[ii].wAID >> 3] &=
-									~byMask[pMgmt->sNodeDBTable[ii].wAID & 7];
-						pDevice->bMoreData = false;
-					} else {
-						pDevice->bMoreData = true;
-					}
-
-					spin_lock_irqsave(&pDevice->lock, flags);
-
-					if (nsDMA_tx_packet(pDevice, skb) != 0)
-						DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "sta ps tx fail\n");
-
-					spin_unlock_irqrestore(&pDevice->lock, flags);
-
-					pMgmt->sNodeDBTable[ii].wEnQueueCnt--;
-					// check if sta ps enable, wait next pspoll
-					// if sta ps disable, send all pending buffers.
-					if (pMgmt->sNodeDBTable[ii].bPSEnable)
-						break;
-				}
-				if (skb_queue_empty(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) {
-					// clear tx map
-					pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[ii].wAID >> 3] &=
-							~byMask[pMgmt->sNodeDBTable[ii].wAID & 7];
-					DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d PS queue clear\n", ii);
-				}
-				pMgmt->sNodeDBTable[ii].bRxPSPoll = false;
-			}
-		}
-		break;
-
-	case WLAN_CMD_RADIO_START:
-
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n");
-//		if (pDevice->bRadioCmd == true)
-//			CARDbRadioPowerOn(pDevice);
-//		else
-//			CARDbRadioPowerOff(pDevice);
-		{
-			int ntStatus = STATUS_SUCCESS;
-			u8            byTmp;
-
-			ntStatus = vnt_control_in(pDevice,
-					MESSAGE_TYPE_READ,
-					MAC_REG_GPIOCTL1,
-					MESSAGE_REQUEST_MACREG,
-					1,
-					&byTmp);
-
-			if (ntStatus != STATUS_SUCCESS)
-				break;
-			if ((byTmp & GPIO3_DATA) == 0) {
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_RADIO_START_OFF........................\n");
-				// Old commands are useless.
-				// empty command Q
-				pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
-				pDevice->uCmdDequeueIdx = 0;
-				pDevice->uCmdEnqueueIdx = 0;
-				//0415pDevice->bCmdRunning = false;
-				pDevice->bCmdClear = true;
-				pDevice->bStopTx0Pkt = false;
-				pDevice->bStopDataPkt = true;
-
-				pDevice->byKeyIndex = 0;
-				pDevice->bTransmitKey = false;
-
-				KeyvInitTable(pDevice, &pDevice->sKey);
-
-				pMgmt->byCSSPK = KEY_CTL_NONE;
-				pMgmt->byCSSGK = KEY_CTL_NONE;
-
-				if (pDevice->bLinkPass == true) {
-					// reason = 8 : disassoc because sta has left
-					vMgrDisassocBeginSta((void *) pDevice,
-							pMgmt,
-							pMgmt->abyCurrBSSID,
-							(8),
-							&Status);
-					pDevice->bLinkPass = false;
-					// unlock command busy
-					pMgmt->eCurrState = WMAC_STATE_IDLE;
-					pMgmt->sNodeDBTable[0].bActive = false;
-					// if(pDevice->bWPASuppWextEnabled == true)
-					{
-						union iwreq_data  wrqu;
-						memset(&wrqu, 0, sizeof(wrqu));
-						wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-						PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n");
-						wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
-					}
-				}
-				pDevice->bwextstep0 = false;
-				pDevice->bwextstep1 = false;
-				pDevice->bwextstep2 = false;
-				pDevice->bwextstep3 = false;
-				pDevice->bWPASuppWextEnabled = false;
-				//clear current SSID
-				pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
-				pItemSSID->len = 0;
-				memset(pItemSSID->abySSID, 0, WLAN_SSID_MAXLEN);
-				//clear desired SSID
-				pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
-				pItemSSID->len = 0;
-				memset(pItemSSID->abySSID, 0, WLAN_SSID_MAXLEN);
-
-				netif_stop_queue(pDevice->dev);
-				vnt_radio_power_off(pDevice);
-				vnt_mac_reg_bits_on(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
-
-				vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_OFF);
-
-				pDevice->bHWRadioOff = true;
-			} else {
-				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_RADIO_START_ON........................\n");
-				pDevice->bHWRadioOff = false;
-				vnt_radio_power_on(pDevice);
-				vnt_mac_reg_bits_off(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
-
-				vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_ON);
-			}
-		}
-
-		break;
 
 	case WLAN_CMD_CHANGE_BBSENSITIVITY_START:
 
@@ -911,8 +176,6 @@ void vRunCommand(struct work_struct *work)
 
 static int s_bCommandComplete(struct vnt_private *pDevice)
 {
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	PWLAN_IE_SSID pSSID;
 	int bRadioCmd = false;
 	int bForceSCAN = true;
 
@@ -923,7 +186,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
 		return true;
 	} else {
 		pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
-		pSSID = (PWLAN_IE_SSID)pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].abyCmdDesireSSID;
 		bRadioCmd = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bRadioCmd;
 		bForceSCAN = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bForceSCAN;
 		ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
@@ -934,40 +196,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
 			pDevice->eCommandState = WLAN_CMD_INIT_MAC80211_START;
 			break;
 
-		case WLAN_CMD_BSSID_SCAN:
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n");
-			pDevice->eCommandState = WLAN_CMD_SCAN_START;
-			pMgmt->uScanChannel = 0;
-			if (pSSID->len != 0)
-				memcpy(pMgmt->abyScanSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-			else
-				memset(pMgmt->abyScanSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-/*
-			if ((bForceSCAN == false) && (pDevice->bLinkPass == true)) {
-				if ((pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) &&
-				    ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) {
-					pDevice->eCommandState = WLAN_CMD_IDLE;
-				}
-			}
-*/
-			break;
-		case WLAN_CMD_SSID:
-			pDevice->eCommandState = WLAN_CMD_SSID_START;
-			if (pSSID->len > WLAN_SSID_MAXLEN)
-				pSSID->len = WLAN_SSID_MAXLEN;
-			if (pSSID->len != 0)
-				memcpy(pMgmt->abyDesireSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SSID_START\n");
-			break;
-		case WLAN_CMD_DISASSOCIATE:
-			pDevice->eCommandState = WLAN_CMD_DISASSOCIATE_START;
-			break;
-		case WLAN_CMD_RX_PSPOLL:
-			pDevice->eCommandState = WLAN_CMD_TX_PSPACKET_START;
-			break;
-		case WLAN_CMD_RUN_AP:
-			pDevice->eCommandState = WLAN_CMD_AP_MODE_START;
-			break;
 		case WLAN_CMD_RADIO:
 			pDevice->eCommandState = WLAN_CMD_RADIO_START;
 			pDevice->bRadioCmd = bRadioCmd;
@@ -992,10 +220,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
 			pDevice->eCommandState = WLAN_CMD_CHANGE_ANTENNA_START;
 			break;
 
-		case WLAN_CMD_REMOVE_ALLKEY:
-			pDevice->eCommandState = WLAN_CMD_REMOVE_ALLKEY_START;
-			break;
-
 		case WLAN_CMD_MAC_DISPOWERSAVING:
 			pDevice->eCommandState = WLAN_CMD_MAC_DISPOWERSAVING_START;
 			break;
@@ -1004,11 +228,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
 			pDevice->eCommandState = WLAN_CMD_11H_CHSW_START;
 			break;
 
-		case WLAN_CMD_CONFIGURE_FILTER:
-			pDevice->eCommandState =
-						WLAN_CMD_CONFIGURE_FILTER_START;
-			break;
-
 		default:
 			break;
 		}
@@ -1029,26 +248,6 @@ int bScheduleCommand(struct vnt_private *pDevice,
 	memset(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, 0 , WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
 	if (pbyItem0 != NULL) {
 		switch (eCommand) {
-		case WLAN_CMD_BSSID_SCAN:
-			pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = false;
-			memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID,
-				pbyItem0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-			break;
-
-		case WLAN_CMD_SSID:
-			memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID,
-				pbyItem0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-			break;
-
-		case WLAN_CMD_DISASSOCIATE:
-			pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bNeedRadioOFF = *((int *)pbyItem0);
-			break;
-/*
-		case WLAN_CMD_DEAUTH:
-			pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((u16 *)pbyItem0);
-			break;
-*/
-
 		case WLAN_CMD_RADIO:
 			pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bRadioCmd = *((int *)pbyItem0);
 			break;
@@ -1068,38 +267,6 @@ int bScheduleCommand(struct vnt_private *pDevice,
 
 }
 
-/*
- * Description:
- *      Clear BSSID_SCAN cmd in CMD Queue
- *
- * Parameters:
- *  In:
- *      hDeviceContext  - Pointer to the adapter
- *      eCommand        - Command
- *  Out:
- *      none
- *
- * Return Value: true if success; otherwise false
- *
- */
-static int s_bClearBSSID_SCAN(struct vnt_private *pDevice)
-{
-	unsigned int uCmdDequeueIdx = pDevice->uCmdDequeueIdx;
-	unsigned int ii;
-
-	if ((pDevice->cbFreeCmdQueue < CMD_Q_SIZE) && (uCmdDequeueIdx != pDevice->uCmdEnqueueIdx)) {
-		for (ii = 0; ii < (CMD_Q_SIZE - pDevice->cbFreeCmdQueue); ii++) {
-			if (pDevice->eCmdQueue[uCmdDequeueIdx].eCmd == WLAN_CMD_BSSID_SCAN)
-				pDevice->eCmdQueue[uCmdDequeueIdx].eCmd = WLAN_CMD_IDLE;
-			ADD_ONE_WITH_WRAP_AROUND(uCmdDequeueIdx, CMD_Q_SIZE);
-			if (uCmdDequeueIdx == pDevice->uCmdEnqueueIdx)
-				break;
-		}
-	}
-	return true;
-}
-
-//mike add:reset command timer
 void vResetCommandTimer(struct vnt_private *pDevice)
 {
 	pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
Signature · 1 line
1.9.1
#7 lore raw

PATCH 7/34 staging: vt6656: rxtx remove dead code

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/power.c |    8 -
 drivers/staging/vt6656/rxtx.c  | 1259 ----------------------------------------
 drivers/staging/vt6656/rxtx.h  |    5 -
 drivers/staging/vt6656/wmgr.c  |   19 -
 4 files changed, 1291 deletions(-)
drivers/staging/vt6656/power.c +0 -8
index ace0cba..1bdbefc 100644
@@ -217,9 +217,6 @@ void PSvSendPSPOLL(struct vnt_private *pDevice)
 	pTxPacket->cbPayloadLen = 0;
 
 	/* log failure if sending failed */
-	if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING)
-		DBG_PRT(MSG_LEVEL_DEBUG,
-			KERN_INFO "Send PS-Poll packet failed..\n");
 }
 
 /*
@@ -273,11 +270,6 @@ int PSbSendNullPacket(struct vnt_private *pDevice)
 	pTxPacket->cbMPDULen = WLAN_HDR_ADDR3_LEN;
 	pTxPacket->cbPayloadLen = 0;
 	/* log error if sending failed */
-	if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-		DBG_PRT(MSG_LEVEL_DEBUG,
-			KERN_INFO "Send Null Packet failed !\n");
-		return false;
-	}
 	return true;
 }
 
drivers/staging/vt6656/rxtx.c +0 -1259

1,295 lines not on this page · raw message

drivers/staging/vt6656/rxtx.h +0 -5
index 00a5c22..847c055 100644
@@ -253,11 +253,6 @@ struct vnt_beacon_buffer {
 	struct ieee80211_mgmt mgmt_hdr;
 } __packed;
 
-void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
-int nsDMA_tx_packet(struct vnt_private *, struct sk_buff *skb);
-CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
-CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
-
 int vnt_tx_packet(struct vnt_private *, struct sk_buff *);
 int vnt_beacon_make(struct vnt_private *, struct ieee80211_vif *);
 int vnt_beacon_enable(struct vnt_private *, struct ieee80211_vif *,
drivers/staging/vt6656/wmgr.c +0 -19
index a1b5307..c76f928 100644
@@ -280,7 +280,6 @@ void vMgrAssocBeginSta(struct vnt_private *pDevice,
 
     if (pTxPacket != NULL ){
         // send the frame
-        *pStatus = csMgmt_xmit(pDevice, pTxPacket);
         if (*pStatus == CMD_STATUS_PENDING) {
             pMgmt->eCurrState = WMAC_STATE_ASSOCPENDING;
             *pStatus = CMD_STATUS_SUCCESS;
@@ -349,7 +348,6 @@ void vMgrReAssocBeginSta(struct vnt_private *pDevice,
 
     if (pTxPacket != NULL ){
         // send the frame
-        *pStatus = csMgmt_xmit(pDevice, pTxPacket);
         if (*pStatus != CMD_STATUS_PENDING) {
             DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Reassociation tx failed.\n");
         }
@@ -408,7 +406,6 @@ void vMgrDisassocBeginSta(struct vnt_private *pDevice,
     pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
 
     // send the frame
-    *pStatus = csMgmt_xmit(pDevice, pTxPacket);
     if (*pStatus == CMD_STATUS_PENDING) {
         pMgmt->eCurrState = WMAC_STATE_IDLE;
         *pStatus = CMD_STATUS_SUCCESS;
@@ -541,7 +538,6 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice,
                 );
     if (pTxPacket != NULL ){
         /* send the frame */
-        Status = csMgmt_xmit(pDevice, pTxPacket);
         if (Status != CMD_STATUS_PENDING) {
             DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Assoc response tx failed\n");
         }
@@ -685,7 +681,6 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice,
 
     if (pTxPacket != NULL ){
         /* send the frame */
-        Status = csMgmt_xmit(pDevice, pTxPacket);
         if (Status != CMD_STATUS_PENDING) {
             DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:ReAssoc response tx failed\n");
         }
@@ -869,7 +864,6 @@ void vMgrAuthenBeginSta(struct vnt_private *pDevice,
     pTxPacket->cbMPDULen = sFrame.len;
     pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
 
-    *pStatus = csMgmt_xmit(pDevice, pTxPacket);
     if (*pStatus == CMD_STATUS_PENDING){
         pMgmt->eCurrState = WMAC_STATE_AUTHPENDING;
         *pStatus = CMD_STATUS_SUCCESS;
@@ -920,7 +914,6 @@ void vMgrDeAuthenBeginSta(struct vnt_private *pDevice,
     pTxPacket->cbMPDULen = sFrame.len;
     pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
 
-    *pStatus = csMgmt_xmit(pDevice, pTxPacket);
     if (*pStatus == CMD_STATUS_PENDING){
         *pStatus = CMD_STATUS_SUCCESS;
     }
@@ -1069,9 +1062,6 @@ static void s_vMgrRxAuthenSequence_1(struct vnt_private *pDevice,
     pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
     // send the frame
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_1 tx.. \n");
-    if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_1 tx failed.\n");
-    }
     return;
 }
 
@@ -1149,9 +1139,6 @@ static void s_vMgrRxAuthenSequence_2(struct vnt_private *pDevice,
                 pTxPacket->cbMPDULen = sFrame.len;
                 pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
                 // send the frame
-                if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Auth_reply sequence_2 tx failed.\n");
-                }
                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Auth_reply sequence_2 tx ...\n");
             }
             else {
@@ -1247,9 +1234,6 @@ reply:
     pTxPacket->cbMPDULen = sFrame.len;
     pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
     // send the frame
-    if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_4 tx failed.\n");
-    }
     return;
 
 }
@@ -3853,7 +3837,6 @@ static void s_vMgrRxProbeRequest(struct vnt_private *pDevice,
                     );
         if (pTxPacket != NULL ){
             /* send the frame */
-            Status = csMgmt_xmit(pDevice, pTxPacket);
             if (Status != CMD_STATUS_PENDING) {
                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Probe response tx failed\n");
             }
@@ -4055,8 +4038,6 @@ int bMgrPrepareBeaconToSend(struct vnt_private *pDevice,
 
 	spin_lock_irqsave(&pDevice->lock, flags);
 
-	csBeacon_xmit(pDevice, pTxPacket);
-
 	spin_unlock_irqrestore(&pDevice->lock, flags);
 
 	vnt_mac_reg_bits_on(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
Signature · 1 line
1.9.1
#8 lore raw

PATCH 8/34 staging: vt6656: dead code remove wmgr.c

In reply to Malcolm Priestley

The header will removed later

---
 drivers/staging/vt6656/Makefile |    1 -
 drivers/staging/vt6656/bssdb.c  |    4 -
 drivers/staging/vt6656/dpc.c    |    1 -
 drivers/staging/vt6656/wmgr.c   | 4343 ---------------------------------------
 drivers/staging/vt6656/wmgr.h   |   44 -
 5 files changed, 4393 deletions(-)
 delete mode 100644 drivers/staging/vt6656/wmgr.c
drivers/staging/vt6656/Makefile +0 -1
index 0c5628c..255a2ad 100644
@@ -9,7 +9,6 @@ vt6656_stage-y +=	main_usb.o \
 			wctl.o  \
 			80211mgr.o \
 			wcmd.o\
-			wmgr.o \
 			bssdb.o \
 			wpa2.o \
 			rxtx.o \
drivers/staging/vt6656/bssdb.c +0 -4
index 997a20e..603b9ce 100644
@@ -432,10 +432,6 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
 			     ((PWLAN_IE_SSID) pMgmt->abyDesireSSID)->abySSID,
 			     pSSID->len)) {
 
-			bAdd_PMKID_Candidate((void *) pDevice,
-					 pBSSList->abyBSSID,
-					 &pBSSList->sRSNCapObj);
-
 			if (pDevice->bLinkPass == true &&
 			    pMgmt->eCurrState == WMAC_STATE_ASSOC &&
 			    (KeybGetTransmitKey(&(pDevice->sKey),
drivers/staging/vt6656/dpc.c +0 -1
index daa67b8..9570dc6 100644
@@ -147,7 +147,6 @@ void RXvMngWorkItem(struct work_struct *work)
             break;
         }
         pRxPacket = &(pRCB->sMngPacket);
-	vMgrRxManagePacket(pDevice, &pDevice->vnt_mgmt, pRxPacket);
         pRCB->Ref--;
 	if (pRCB->Ref == 0) {
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeMng %d %d\n",
drivers/staging/vt6656/wmgr.c deleted +0 -4343

2,976 lines not on this page · raw message

drivers/staging/vt6656/wmgr.h +0 -44

44 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.9.1

Part of the diff is not shown here. View the raw message.

#9 lore raw

PATCH 9/34 staging: vt6656: dead code remove bssdb.c

In reply to Malcolm Priestley

The header will be remove later

---
 drivers/staging/vt6656/Makefile |    1 -
 drivers/staging/vt6656/bssdb.c  | 1462 ---------------------------------------
 drivers/staging/vt6656/bssdb.h  |   64 --
 3 files changed, 1527 deletions(-)
 delete mode 100644 drivers/staging/vt6656/bssdb.c
drivers/staging/vt6656/Makefile +0 -1
index 255a2ad..28cdb4f 100644
@@ -9,7 +9,6 @@ vt6656_stage-y +=	main_usb.o \
 			wctl.o  \
 			80211mgr.o \
 			wcmd.o\
-			bssdb.o \
 			wpa2.o \
 			rxtx.o \
 			dpc.o \
drivers/staging/vt6656/bssdb.c deleted +0 -1462

1,462 lines not on this page · raw message

drivers/staging/vt6656/bssdb.h +0 -64

69 lines not on this page · raw message

Signature · 1 line
1.9.1
#10 lore raw

PATCH 10/34 staging: vt6656: dead code wpactl

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/Makefile   |   1 -
 drivers/staging/vt6656/main_usb.c |   1 -
 drivers/staging/vt6656/wpactl.c   | 246 --------------------------------------
 drivers/staging/vt6656/wpactl.h   |  47 --------
 4 files changed, 295 deletions(-)
 delete mode 100644 drivers/staging/vt6656/wpactl.c
 delete mode 100644 drivers/staging/vt6656/wpactl.h
drivers/staging/vt6656/Makefile +0 -1
index 28cdb4f..466534e 100644
@@ -21,7 +21,6 @@ vt6656_stage-y +=	main_usb.o \
 			tkip.o \
 			michael.o \
 			rf.o \
-			wpactl.o \
 			usbpipe.o \
 			channel.o \
 			firmware.o \
drivers/staging/vt6656/main_usb.c +0 -1
index 0d71430..f4cbeb3 100644
@@ -58,7 +58,6 @@
 #include "wcmd.h"
 #include "rxtx.h"
 #include "bssdb.h"
-#include "wpactl.h"
 #include "dpc.h"
 #include "datarate.h"
 #include "rf.h"
drivers/staging/vt6656/wpactl.c deleted +0 -246

246 lines not on this page · raw message

drivers/staging/vt6656/wpactl.h deleted +0 -47

47 lines not on this page · raw message

Signature · 1 line
1.9.1
#11 lore raw

PATCH 11/34 staging: vt6656: dead code remove wpa2.c

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/Makefile |   1 -
 drivers/staging/vt6656/wmgr.h   |   2 -
 drivers/staging/vt6656/wpa2.c   | 235 ----------------------------------------
 drivers/staging/vt6656/wpa2.h   |  53 ---------
 4 files changed, 291 deletions(-)
 delete mode 100644 drivers/staging/vt6656/wpa2.c
 delete mode 100644 drivers/staging/vt6656/wpa2.h
drivers/staging/vt6656/Makefile +0 -1
index 466534e..5ac0dbd 100644
@@ -9,7 +9,6 @@ vt6656_stage-y +=	main_usb.o \
 			wctl.o  \
 			80211mgr.o \
 			wcmd.o\
-			wpa2.o \
 			rxtx.o \
 			dpc.o \
 			power.o \
drivers/staging/vt6656/wmgr.h +0 -2
index 34c2803..2439068 100644
@@ -38,7 +38,6 @@
 #include "80211hdr.h"
 #include "wcmd.h"
 #include "bssdb.h"
-#include "wpa2.h"
 #include "card.h"
 
 // Scan time
@@ -324,7 +323,6 @@ struct vnt_manager {
 	KnownNodeDB sNodeDBTable[MAX_NODE_NUM + 1];
 
 	/* WPA2 PMKID Cache */
-	SPMKIDCache gsPMKIDCache;
 	int bRoaming;
 
 	/* associate info */
drivers/staging/vt6656/wpa2.c deleted +0 -235

235 lines not on this page · raw message

drivers/staging/vt6656/wpa2.h deleted +0 -53

53 lines not on this page · raw message

Signature · 1 line
1.9.1
#12 lore raw

PATCH 12/34 staging: vt6656: remove dead code wpa

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/80211mgr.c |  11 --
 drivers/staging/vt6656/Makefile   |   1 -
 drivers/staging/vt6656/wpa.c      | 314 --------------------------------------
 drivers/staging/vt6656/wpa.h      |  72 ---------
 4 files changed, 398 deletions(-)
 delete mode 100644 drivers/staging/vt6656/wpa.c
 delete mode 100644 drivers/staging/vt6656/wpa.h
drivers/staging/vt6656/80211mgr.c +0 -11
index 61edb51..48baef9 100644
@@ -54,7 +54,6 @@
 #include "tether.h"
 #include "80211mgr.h"
 #include "80211hdr.h"
-#include "wpa.h"
 
 static int          msglevel                = MSG_LEVEL_INFO;
 /*static int          msglevel                =MSG_LEVEL_DEBUG;*/
@@ -158,10 +157,6 @@ vMgrDecodeBeacon(
                 pFrame->pRSN = (PWLAN_IE_RSN)pItem;
             break;
         case WLAN_EID_RSN_WPA:
-            if (pFrame->pRSNWPA == NULL) {
-                if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
-                    pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
-            }
             break;
 
         case WLAN_EID_ERP:
@@ -325,8 +320,6 @@ vMgrDecodeAssocRequest(
             break;
         case WLAN_EID_RSN_WPA:
             if (pFrame->pRSNWPA == NULL) {
-                if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
-                    pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
             }
             break;
         case WLAN_EID_EXTSUPP_RATES:
@@ -491,8 +484,6 @@ vMgrDecodeReassocRequest(
             break;
         case WLAN_EID_RSN_WPA:
 		if (pFrame->pRSNWPA == NULL)
-                if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
-                    pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
             break;
 
         case WLAN_EID_EXTSUPP_RATES:
@@ -673,8 +664,6 @@ vMgrDecodeProbeResponse(
             break;
         case WLAN_EID_RSN_WPA:
             if (pFrame->pRSNWPA == NULL) {
-                if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
-                    pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
             }
             break;
         case WLAN_EID_ERP:
drivers/staging/vt6656/Makefile +0 -1
index 5ac0dbd..1be7d60 100644
@@ -15,7 +15,6 @@ vt6656_stage-y +=	main_usb.o \
 			datarate.o \
 			rc4.o \
 			tether.o \
-			wpa.o \
 			key.o \
 			tkip.o \
 			michael.o \
drivers/staging/vt6656/wpa.c deleted +0 -314

314 lines not on this page · raw message

drivers/staging/vt6656/wpa.h deleted +0 -72

72 lines not on this page · raw message

Signature · 1 line
1.9.1
#13 lore raw

PATCH 13/34 staging: vt6656: dead code remove wctl

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/Makefile   |   1 -
 drivers/staging/vt6656/dpc.c      |   1 -
 drivers/staging/vt6656/main_usb.c |   1 -
 drivers/staging/vt6656/rxtx.c     |   1 -
 drivers/staging/vt6656/wcmd.c     |   1 -
 drivers/staging/vt6656/wctl.c     | 244 --------------------------------------
 drivers/staging/vt6656/wctl.h     |  94 ---------------
 7 files changed, 343 deletions(-)
 delete mode 100644 drivers/staging/vt6656/wctl.c
 delete mode 100644 drivers/staging/vt6656/wctl.h
drivers/staging/vt6656/Makefile +0 -1
index 1be7d60..08d313d 100644
@@ -6,7 +6,6 @@ vt6656_stage-y +=	main_usb.o \
 			card.o  \
 			mac.o   \
 			baseband.o \
-			wctl.o  \
 			80211mgr.o \
 			wcmd.o\
 			rxtx.o \
drivers/staging/vt6656/dpc.c +0 -1
index 9570dc6..03242dd 100644
@@ -45,7 +45,6 @@
 #include "baseband.h"
 #include "michael.h"
 #include "tkip.h"
-#include "wctl.h"
 #include "rf.h"
 #include "iowpa.h"
 #include "datarate.h"
drivers/staging/vt6656/main_usb.c +0 -1
index f4cbeb3..b9915a2 100644
@@ -53,7 +53,6 @@
 #include "mac.h"
 #include "tether.h"
 #include "wmgr.h"
-#include "wctl.h"
 #include "power.h"
 #include "wcmd.h"
 #include "rxtx.h"
drivers/staging/vt6656/rxtx.c +0 -1
index feffd97..e138900 100644
@@ -51,7 +51,6 @@
 #include "mac.h"
 #include "michael.h"
 #include "tkip.h"
-#include "wctl.h"
 #include "rf.h"
 #include "datarate.h"
 #include "usbpipe.h"
drivers/staging/vt6656/wcmd.c +0 -1
index a777841..00bed8c 100644
@@ -46,7 +46,6 @@
 #include "wcmd.h"
 #include "wmgr.h"
 #include "power.h"
-#include "wctl.h"
 #include "baseband.h"
 #include "usbpipe.h"
 #include "rxtx.h"
drivers/staging/vt6656/wctl.c deleted +0 -244

244 lines not on this page · raw message

drivers/staging/vt6656/wctl.h deleted +0 -94

94 lines not on this page · raw message

Signature · 1 line
1.9.1
#14 lore raw

PATCH 14/34 staging: vt6656: dead code remove tkip.c/h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/Makefile |   1 -
 drivers/staging/vt6656/dpc.c    |   1 -
 drivers/staging/vt6656/rxtx.c   |   1 -
 drivers/staging/vt6656/tkip.c   | 246 ----------------------------------------
 drivers/staging/vt6656/tkip.h   |  45 --------
 5 files changed, 294 deletions(-)
 delete mode 100644 drivers/staging/vt6656/tkip.c
 delete mode 100644 drivers/staging/vt6656/tkip.h
drivers/staging/vt6656/Makefile +0 -1
index 08d313d..ad39400 100644
@@ -15,7 +15,6 @@ vt6656_stage-y +=	main_usb.o \
 			rc4.o \
 			tether.o \
 			key.o \
-			tkip.o \
 			michael.o \
 			rf.o \
 			usbpipe.o \
drivers/staging/vt6656/dpc.c +0 -1
index 03242dd..167520f 100644
@@ -44,7 +44,6 @@
 #include "mac.h"
 #include "baseband.h"
 #include "michael.h"
-#include "tkip.h"
 #include "rf.h"
 #include "iowpa.h"
 #include "datarate.h"
drivers/staging/vt6656/rxtx.c +0 -1
index e138900..b286072 100644
@@ -50,7 +50,6 @@
 #include "bssdb.h"
 #include "mac.h"
 #include "michael.h"
-#include "tkip.h"
 #include "rf.h"
 #include "datarate.h"
 #include "usbpipe.h"
drivers/staging/vt6656/tkip.c deleted +0 -246

246 lines not on this page · raw message

drivers/staging/vt6656/tkip.h deleted +0 -45

45 lines not on this page · raw message

Signature · 1 line
1.9.1
#15 lore raw

PATCH 15/34 staging: vt6656: dead code remove micheal.c/h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/Makefile  |   1 -
 drivers/staging/vt6656/dpc.c     |   1 -
 drivers/staging/vt6656/michael.c | 167 ---------------------------------------
 drivers/staging/vt6656/michael.h |  52 ------------
 drivers/staging/vt6656/rxtx.c    |   1 -
 5 files changed, 222 deletions(-)
 delete mode 100644 drivers/staging/vt6656/michael.c
 delete mode 100644 drivers/staging/vt6656/michael.h
drivers/staging/vt6656/Makefile +0 -1
index ad39400..ca1c425 100644
@@ -15,7 +15,6 @@ vt6656_stage-y +=	main_usb.o \
 			rc4.o \
 			tether.o \
 			key.o \
-			michael.o \
 			rf.o \
 			usbpipe.o \
 			channel.o \
drivers/staging/vt6656/dpc.c +0 -1
index 167520f..fe4b6ac 100644
@@ -43,7 +43,6 @@
 #include "bssdb.h"
 #include "mac.h"
 #include "baseband.h"
-#include "michael.h"
 #include "rf.h"
 #include "iowpa.h"
 #include "datarate.h"
drivers/staging/vt6656/michael.c deleted +0 -167

167 lines not on this page · raw message

drivers/staging/vt6656/michael.h deleted +0 -52

52 lines not on this page · raw message

drivers/staging/vt6656/rxtx.c +0 -1
index b286072..ab80c46 100644
@@ -49,7 +49,6 @@
 #include "card.h"
 #include "bssdb.h"
 #include "mac.h"
-#include "michael.h"
 #include "rf.h"
 #include "datarate.h"
 #include "usbpipe.h"
Signature · 1 line
1.9.1
#16 lore raw

PATCH 16/34 staging: vt6656: dead code remove rc4.c/h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/Makefile |  1 -
 drivers/staging/vt6656/card.c   |  1 -
 drivers/staging/vt6656/device.h |  2 -
 drivers/staging/vt6656/rc4.c    | 87 -----------------------------------------
 drivers/staging/vt6656/rc4.h    | 46 ----------------------
 5 files changed, 137 deletions(-)
 delete mode 100644 drivers/staging/vt6656/rc4.c
 delete mode 100644 drivers/staging/vt6656/rc4.h
drivers/staging/vt6656/Makefile +0 -1
index ca1c425..2e0361b 100644
@@ -12,7 +12,6 @@ vt6656_stage-y +=	main_usb.o \
 			dpc.o \
 			power.o \
 			datarate.o \
-			rc4.o \
 			tether.o \
 			key.o \
 			rf.o \
drivers/staging/vt6656/card.c +0 -1
index 9181709..6652633 100644
@@ -54,7 +54,6 @@
 #include "rf.h"
 #include "power.h"
 #include "key.h"
-#include "rc4.h"
 #include "datarate.h"
 #include "usbpipe.h"
 
drivers/staging/vt6656/device.h +0 -2
index c2e495b..c5b5b9f 100644
@@ -77,7 +77,6 @@
 #include "tether.h"
 #include "wmgr.h"
 #include "wcmd.h"
-#include "rc4.h"
 #include "desc.h"
 #include "key.h"
 #include "card.h"
@@ -640,7 +639,6 @@ struct vnt_private {
 	SKeyManagement sKey;
 	u32 dwIVCounter;
 
-	RC4Ext SBox;
 	u8 abyPRNG[WLAN_WEPMAX_KEYLEN+3];
 	u8 byKeyIndex;
 
drivers/staging/vt6656/rc4.c deleted +0 -87

87 lines not on this page · raw message

drivers/staging/vt6656/rc4.h deleted +0 -46

46 lines not on this page · raw message

Signature · 1 line
1.9.1
#17 lore raw

PATCH 17/34 staging: vt6656: dead code remove iowpa.h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/dpc.c      |  1 -
 drivers/staging/vt6656/iowpa.h    | 75 ---------------------------------------
 drivers/staging/vt6656/main_usb.c |  1 -
 drivers/staging/vt6656/wcmd.c     |  1 -
 4 files changed, 78 deletions(-)
 delete mode 100644 drivers/staging/vt6656/iowpa.h
drivers/staging/vt6656/dpc.c +0 -1
index fe4b6ac..a0d52d7 100644
@@ -44,7 +44,6 @@
 #include "mac.h"
 #include "baseband.h"
 #include "rf.h"
-#include "iowpa.h"
 #include "datarate.h"
 #include "usbpipe.h"
 
drivers/staging/vt6656/iowpa.h deleted +0 -75

75 lines not on this page · raw message

drivers/staging/vt6656/main_usb.c +0 -1
index b9915a2..4a412d9 100644
@@ -64,7 +64,6 @@
 #include "usbpipe.h"
 #include "channel.h"
 #include "int.h"
-#include "iowpa.h"
 
 /* static int msglevel = MSG_LEVEL_DEBUG; */
 static int          msglevel                =MSG_LEVEL_INFO;
drivers/staging/vt6656/wcmd.c +0 -1
index 00bed8c..d063229 100644
@@ -51,7 +51,6 @@
 #include "rxtx.h"
 #include "rf.h"
 #include "channel.h"
-#include "iowpa.h"
 
 static int msglevel = MSG_LEVEL_INFO;
 //static int msglevel = MSG_LEVEL_DEBUG;
Signature · 1 line
1.9.1
#18 lore raw

PATCH 18/34 staging: vt6656: decode remove tether.c/h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/80211mgr.c |   1 -
 drivers/staging/vt6656/Makefile   |   1 -
 drivers/staging/vt6656/baseband.c |   1 -
 drivers/staging/vt6656/baseband.h |   1 -
 drivers/staging/vt6656/desc.h     |   2 -
 drivers/staging/vt6656/device.h   |   1 -
 drivers/staging/vt6656/dpc.c      |   1 -
 drivers/staging/vt6656/key.h      |   1 -
 drivers/staging/vt6656/mac.c      |   1 -
 drivers/staging/vt6656/main_usb.c |   1 -
 drivers/staging/vt6656/rxtx.c     |   1 -
 drivers/staging/vt6656/tether.c   |  60 ----------------------
 drivers/staging/vt6656/tether.h   | 101 --------------------------------------
 13 files changed, 173 deletions(-)
 delete mode 100644 drivers/staging/vt6656/tether.c
 delete mode 100644 drivers/staging/vt6656/tether.h
drivers/staging/vt6656/80211mgr.c +0 -1
index 48baef9..09bfe24 100644
@@ -51,7 +51,6 @@
 
 #include "device.h"
 #include "tmacro.h"
-#include "tether.h"
 #include "80211mgr.h"
 #include "80211hdr.h"
 
drivers/staging/vt6656/Makefile +0 -1
index 2e0361b..0f33000 100644
@@ -12,7 +12,6 @@ vt6656_stage-y +=	main_usb.o \
 			dpc.o \
 			power.o \
 			datarate.o \
-			tether.o \
 			key.o \
 			rf.o \
 			usbpipe.o \
drivers/staging/vt6656/baseband.c +0 -1
index 19b8fd1..80240e4 100644
@@ -36,7 +36,6 @@
  */
 
 #include "tmacro.h"
-#include "tether.h"
 #include "mac.h"
 #include "baseband.h"
 #include "rf.h"
drivers/staging/vt6656/baseband.h +0 -1
index 4160695..c73244b 100644
@@ -33,7 +33,6 @@
 #ifndef __BASEBAND_H__
 #define __BASEBAND_H__
 
-#include "tether.h"
 #include "device.h"
 
 #define PREAMBLE_LONG   0
drivers/staging/vt6656/desc.h +0 -2
index 617d479..f79af85 100644
@@ -34,8 +34,6 @@
 #include <linux/types.h>
 #include <linux/mm.h>
 
-#include "tether.h"
-
 /* max transmit or receive buffer size */
 #define CB_MAX_BUF_SIZE     2900U       /* NOTE: must be multiple of 4 */
 
drivers/staging/vt6656/device.h +0 -1
index c5b5b9f..b6ae34f 100644
@@ -74,7 +74,6 @@
  */
 
 #include "80211hdr.h"
-#include "tether.h"
 #include "wmgr.h"
 #include "wcmd.h"
 #include "desc.h"
drivers/staging/vt6656/dpc.c +0 -1
index a0d52d7..60230f2 100644
@@ -38,7 +38,6 @@
 #include "dpc.h"
 #include "device.h"
 #include "rxtx.h"
-#include "tether.h"
 #include "card.h"
 #include "bssdb.h"
 #include "mac.h"
drivers/staging/vt6656/key.h +0 -1
index 7b8c960..4303c54 100644
@@ -30,7 +30,6 @@
 #ifndef __KEY_H__
 #define __KEY_H__
 
-#include "tether.h"
 #include "80211mgr.h"
 
 #define MAX_GROUP_KEY       4
drivers/staging/vt6656/mac.c +0 -1
index a60240c..755ac56 100644
@@ -31,7 +31,6 @@
  */
 
 #include "tmacro.h"
-#include "tether.h"
 #include "desc.h"
 #include "mac.h"
 #include "80211hdr.h"
drivers/staging/vt6656/main_usb.c +0 -1
index 4a412d9..d9e766b 100644
@@ -51,7 +51,6 @@
 #include "card.h"
 #include "baseband.h"
 #include "mac.h"
-#include "tether.h"
 #include "wmgr.h"
 #include "power.h"
 #include "wcmd.h"
drivers/staging/vt6656/rxtx.c +0 -1
index ab80c46..57c2b94 100644
@@ -45,7 +45,6 @@
 
 #include "device.h"
 #include "rxtx.h"
-#include "tether.h"
 #include "card.h"
 #include "bssdb.h"
 #include "mac.h"
drivers/staging/vt6656/tether.c deleted +0 -60

60 lines not on this page · raw message

drivers/staging/vt6656/tether.h deleted +0 -101

101 lines not on this page · raw message

Signature · 1 line
1.9.1
#19 lore raw

PATCH 19/34 staging: vt6656: remove dead code datarate

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/Makefile   |   1 -
 drivers/staging/vt6656/baseband.c |   1 -
 drivers/staging/vt6656/card.c     |   1 -
 drivers/staging/vt6656/channel.c  |   1 -
 drivers/staging/vt6656/datarate.c | 364 --------------------------------------
 drivers/staging/vt6656/datarate.h |  62 -------
 drivers/staging/vt6656/dpc.c      |   1 -
 drivers/staging/vt6656/main_usb.c |   1 -
 drivers/staging/vt6656/rf.c       |   1 -
 drivers/staging/vt6656/rxtx.c     |   1 -
 10 files changed, 434 deletions(-)
 delete mode 100644 drivers/staging/vt6656/datarate.c
 delete mode 100644 drivers/staging/vt6656/datarate.h
drivers/staging/vt6656/Makefile +0 -1
index 0f33000..92c6aa7 100644
@@ -11,7 +11,6 @@ vt6656_stage-y +=	main_usb.o \
 			rxtx.o \
 			dpc.o \
 			power.o \
-			datarate.o \
 			key.o \
 			rf.o \
 			usbpipe.o \
drivers/staging/vt6656/baseband.c +0 -1
index 80240e4..e67502e 100644
@@ -40,7 +40,6 @@
 #include "baseband.h"
 #include "rf.h"
 #include "usbpipe.h"
-#include "datarate.h"
 
 static u8 abyVT3184_AGC[] = {
     0x00,   //0
drivers/staging/vt6656/card.c +0 -1
index 6652633..9a3e3ce 100644
@@ -54,7 +54,6 @@
 #include "rf.h"
 #include "power.h"
 #include "key.h"
-#include "datarate.h"
 #include "usbpipe.h"
 
 //const u16 cwRXBCNTSFOff[MAX_RATE] =
drivers/staging/vt6656/channel.c +0 -1
index 3317b77..db1451e 100644
@@ -36,7 +36,6 @@
 
 #include <linux/kernel.h>
 #include "device.h"
-#include "datarate.h"
 #include "channel.h"
 #include "rf.h"
 
drivers/staging/vt6656/datarate.c deleted +0 -364

364 lines not on this page · raw message

drivers/staging/vt6656/datarate.h deleted +0 -62

62 lines not on this page · raw message

drivers/staging/vt6656/dpc.c +0 -1
index 60230f2..f40d6b4 100644
@@ -43,7 +43,6 @@
 #include "mac.h"
 #include "baseband.h"
 #include "rf.h"
-#include "datarate.h"
 #include "usbpipe.h"
 
 //static int          msglevel                =MSG_LEVEL_DEBUG;
drivers/staging/vt6656/main_usb.c +0 -1
index d9e766b..26fac20 100644
@@ -57,7 +57,6 @@
 #include "rxtx.h"
 #include "bssdb.h"
 #include "dpc.h"
-#include "datarate.h"
 #include "rf.h"
 #include "firmware.h"
 #include "usbpipe.h"
drivers/staging/vt6656/rf.c +0 -1
index 6bfd272..8c2c2bd 100644
@@ -39,7 +39,6 @@
 #include "rf.h"
 #include "baseband.h"
 #include "usbpipe.h"
-#include "datarate.h"
 
 #define BY_AL2230_REG_LEN     23 //24bit
 #define CB_AL2230_INIT_SEQ    15
drivers/staging/vt6656/rxtx.c +0 -1
index 57c2b94..492d9c3 100644
@@ -49,7 +49,6 @@
 #include "bssdb.h"
 #include "mac.h"
 #include "rf.h"
-#include "datarate.h"
 #include "usbpipe.h"
 
 static int          msglevel                = MSG_LEVEL_INFO;
Signature · 1 line
1.9.1
#20 lore raw

PATCH 20/34 staging: vt6656: dead code remove 80211mgr.c/h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/80211mgr.c | 849 --------------------------------------
 drivers/staging/vt6656/80211mgr.h | 808 ------------------------------------
 drivers/staging/vt6656/Makefile   |   1 -
 drivers/staging/vt6656/bssdb.h    |   1 -
 drivers/staging/vt6656/key.h      |   2 +-
 drivers/staging/vt6656/wcmd.h     |   2 +-
 drivers/staging/vt6656/wmgr.h     |   2 -
 7 files changed, 2 insertions(+), 1663 deletions(-)
 delete mode 100644 drivers/staging/vt6656/80211mgr.c
 delete mode 100644 drivers/staging/vt6656/80211mgr.h
drivers/staging/vt6656/80211mgr.c deleted +0 -849
deleted file mode 100644
index 09bfe24..0000000
@@ -1,849 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: 80211mgr.c
- *
- * Purpose: Handles the 802.11 management support functions
- *
- * Author: Lyndon Chen
- *
- * Date: May 8, 2002
- *
- * Functions:
- *      vMgrEncodeBeacon - Encode the Beacon frame
- *      vMgrDecodeBeacon - Decode the Beacon frame
- *      vMgrEncodeDisassociation - Encode the Disassociation frame
- *      vMgrDecodeDisassociation - Decode the Disassociation frame
- *      vMgrEncodeAssocRequest - Encode the Association request frame
- *      vMgrDecodeAssocRequest - Decode the Association request frame
- *      vMgrEncodeAssocResponse - Encode the Association response frame
- *      vMgrDecodeAssocResponse - Decode the Association response frame
- *      vMgrEncodeReAssocRequest - Encode the ReAssociation request frame
- *      vMgrDecodeReAssocRequest - Decode the ReAssociation request frame
- *      vMgrEncodeProbeRequest - Encode the Probe request frame
- *      vMgrDecodeProbeRequest - Decode the Probe request frame
- *      vMgrEncodeProbeResponse - Encode the Probe response frame
- *      vMgrDecodeProbeResponse - Decode the Probe response frame
- *      vMgrEncodeAuthen - Encode the Authentication frame
- *      vMgrDecodeAuthen - Decode the Authentication frame
- *      vMgrEncodeDeauthen - Encode the DeAuthentication frame
- *      vMgrDecodeDeauthen - Decode the DeAuthentication frame
- *      vMgrEncodeReassocResponse - Encode the Reassociation response frame
- *
- * Revision History:
- *
- */
-
-#include "device.h"
-#include "tmacro.h"
-#include "80211mgr.h"
-#include "80211hdr.h"
-
-static int          msglevel                = MSG_LEVEL_INFO;
-/*static int          msglevel                =MSG_LEVEL_DEBUG;*/
-
-/*+
- *
- * Routine Description:
- * Encode Beacon frame body offset
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeBeacon(
-      PWLAN_FR_BEACON  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-	/* Fixed Fields */
-	pFrame->pqwTimestamp =
-		(u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) +
-			WLAN_BEACON_OFF_TS);
-    pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_BEACON_OFF_BCN_INT);
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_BEACON_OFF_CAPINFO);
-
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_BEACON_OFF_SSID;
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- * Decode Beacon frame body offset
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeBeacon(
-      PWLAN_FR_BEACON  pFrame
-    )
-{
-    PWLAN_IE        pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-	/* Fixed Fields */
-	pFrame->pqwTimestamp =
-		(u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) +
-			WLAN_BEACON_OFF_TS);
-    pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_BEACON_OFF_BCN_INT);
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_BEACON_OFF_CAPINFO);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)((u8 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)))
-                       + WLAN_BEACON_OFF_SSID);
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-        case WLAN_EID_FH_PARMS:
-            /* pFrame->pFHParms = (PWLAN_IE_FH_PARMS)pItem; */
-            break;
-        case WLAN_EID_DS_PARMS:
-            if (pFrame->pDSParms == NULL)
-                pFrame->pDSParms = (PWLAN_IE_DS_PARMS)pItem;
-            break;
-        case WLAN_EID_CF_PARMS:
-            if (pFrame->pCFParms == NULL)
-                pFrame->pCFParms = (PWLAN_IE_CF_PARMS)pItem;
-            break;
-        case WLAN_EID_IBSS_PARMS:
-            if (pFrame->pIBSSParms == NULL)
-                pFrame->pIBSSParms = (PWLAN_IE_IBSS_PARMS)pItem;
-            break;
-        case WLAN_EID_TIM:
-            if (pFrame->pTIM == NULL)
-                pFrame->pTIM = (PWLAN_IE_TIM)pItem;
-            break;
-
-        case WLAN_EID_RSN:
-            if (pFrame->pRSN == NULL) 
-                pFrame->pRSN = (PWLAN_IE_RSN)pItem;
-            break;
-        case WLAN_EID_RSN_WPA:
-            break;
-
-        case WLAN_EID_ERP:
-            if (pFrame->pERP == NULL)
-                pFrame->pERP = (PWLAN_IE_ERP)pItem;
-            break;
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_COUNTRY:      /* 7 */
-            if (pFrame->pIE_Country == NULL)
-                pFrame->pIE_Country = (PWLAN_IE_COUNTRY)pItem;
-            break;
-
-        case WLAN_EID_PWR_CONSTRAINT:   /* 32 */
-            if (pFrame->pIE_PowerConstraint == NULL)
-                pFrame->pIE_PowerConstraint = (PWLAN_IE_PW_CONST)pItem;
-            break;
-
-        case WLAN_EID_CH_SWITCH:    /* 37 */
-            if (pFrame->pIE_CHSW == NULL)
-                pFrame->pIE_CHSW = (PWLAN_IE_CH_SW)pItem;
-            break;
-
-        case WLAN_EID_QUIET:        /* 40 */
-            if (pFrame->pIE_Quiet == NULL)
-                pFrame->pIE_Quiet = (PWLAN_IE_QUIET)pItem;
-            break;
-
-        case WLAN_EID_IBSS_DFS:
-            if (pFrame->pIE_IBSSDFS == NULL)
-                pFrame->pIE_IBSSDFS = (PWLAN_IE_IBSS_DFS)pItem;
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in beacon decode.\n", pItem->byElementID);
-                break;
-
-        }
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Disassociation
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeDisassociation(
-      PWLAN_FR_DISASSOC  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_DISASSOC_OFF_REASON);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_DISASSOC_OFF_REASON + sizeof(*(pFrame->pwReason));
-}
-
-/*+
- *
- * Routine Description:
- *  Decode Disassociation
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeDisassociation(
-      PWLAN_FR_DISASSOC  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_DISASSOC_OFF_REASON);
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Association Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeAssocRequest(
-      PWLAN_FR_ASSOCREQ  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCREQ_OFF_CAP_INFO);
-    pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_ASSOCREQ_OFF_LISTEN_INT);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_ASSOCREQ_OFF_LISTEN_INT + sizeof(*(pFrame->pwListenInterval));
-}
-
-/*+
- *
- * Routine Description: (AP)
- *  Decode Association Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeAssocRequest(
-      PWLAN_FR_ASSOCREQ  pFrame
-    )
-{
-    PWLAN_IE   pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCREQ_OFF_CAP_INFO);
-    pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCREQ_OFF_LISTEN_INT);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                            + WLAN_ASSOCREQ_OFF_SSID);
-
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_RSN:
-            if (pFrame->pRSN == NULL)
-                pFrame->pRSN = (PWLAN_IE_RSN)pItem;
-            break;
-        case WLAN_EID_RSN_WPA:
-            if (pFrame->pRSNWPA == NULL) {
-            }
-            break;
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in assocreq decode.\n",
-                    pItem->byElementID);
-            break;
-        }
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description: (AP)
- *  Encode Association Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeAssocResponse(
-      PWLAN_FR_ASSOCRESP  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCRESP_OFF_CAP_INFO);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_ASSOCRESP_OFF_STATUS);
-    pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                            + WLAN_ASSOCRESP_OFF_AID);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_ASSOCRESP_OFF_AID
-                  + sizeof(*(pFrame->pwAid));
-}
-
-/*+
- *
- * Routine Description:
- *  Decode Association Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeAssocResponse(
-     PWLAN_FR_ASSOCRESP  pFrame
-     )
-{
-    PWLAN_IE   pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCRESP_OFF_CAP_INFO);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_ASSOCRESP_OFF_STATUS);
-    pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                            + WLAN_ASSOCRESP_OFF_AID);
-
-    /* Information elements */
-    pFrame->pSuppRates  = (PWLAN_IE_SUPP_RATES)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                           + WLAN_ASSOCRESP_OFF_SUPP_RATES);
-
-    pItem = (PWLAN_IE)(pFrame->pSuppRates);
-    pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
-
-    if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
-        pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem);
-	} else
-        pFrame->pExtSuppRates = NULL;
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Reassociation Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeReassocRequest(
-      PWLAN_FR_REASSOCREQ  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_REASSOCREQ_OFF_CAP_INFO);
-    pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                      + WLAN_REASSOCREQ_OFF_LISTEN_INT);
-    pFrame->pAddrCurrAP = (PIEEE_ADDR)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_REASSOCREQ_OFF_CURR_AP);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_REASSOCREQ_OFF_CURR_AP + sizeof(*(pFrame->pAddrCurrAP));
-}
-
-/*+
- *
- * Routine Description: (AP)
- *  Decode Reassociation Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeReassocRequest(
-      PWLAN_FR_REASSOCREQ  pFrame
-     )
-{
-    PWLAN_IE   pItem;
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_REASSOCREQ_OFF_CAP_INFO);
-    pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                      + WLAN_REASSOCREQ_OFF_LISTEN_INT);
-    pFrame->pAddrCurrAP = (PIEEE_ADDR)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_REASSOCREQ_OFF_CURR_AP);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                       + WLAN_REASSOCREQ_OFF_SSID);
-
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_RSN:
-            if (pFrame->pRSN == NULL)
-                pFrame->pRSN = (PWLAN_IE_RSN)pItem;
-            break;
-        case WLAN_EID_RSN_WPA:
-		if (pFrame->pRSNWPA == NULL)
-            break;
-
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in reassocreq decode.\n",
-                        pItem->byElementID);
-            break;
-        }
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Probe Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeProbeRequest(
-     PWLAN_FR_PROBEREQ  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-    pFrame->len = WLAN_HDR_ADDR3_LEN;
-}
-
-/*+
- *
- * Routine Description:
- *  Decode Probe Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeProbeRequest(
-     PWLAN_FR_PROBEREQ  pFrame
-     )
-{
-    PWLAN_IE   pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)));
-
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Bad EID=%dd in probereq\n", pItem->byElementID);
-            break;
-        }
-
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 +  pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Probe Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeProbeResponse(
-     PWLAN_FR_PROBERESP  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-	/* Fixed Fields */
-	pFrame->pqwTimestamp =
-		(u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) +
-			WLAN_PROBERESP_OFF_TS);
-    pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_PROBERESP_OFF_BCN_INT);
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_PROBERESP_OFF_CAP_INFO);
-
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_PROBERESP_OFF_CAP_INFO +
-                  sizeof(*(pFrame->pwCapInfo));
-}
-
-/*+
- *
- * Routine Description:
- *  Decode Probe Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeProbeResponse(
-     PWLAN_FR_PROBERESP  pFrame
-    )
-{
-    PWLAN_IE    pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-	/* Fixed Fields */
-	pFrame->pqwTimestamp =
-		(u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) +
-			WLAN_PROBERESP_OFF_TS);
-    pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_PROBERESP_OFF_BCN_INT);
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_PROBERESP_OFF_CAP_INFO);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                       + WLAN_PROBERESP_OFF_SSID);
-
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-        case WLAN_EID_FH_PARMS:
-            break;
-        case WLAN_EID_DS_PARMS:
-            if (pFrame->pDSParms == NULL)
-                pFrame->pDSParms = (PWLAN_IE_DS_PARMS)pItem;
-            break;
-        case WLAN_EID_CF_PARMS:
-            if (pFrame->pCFParms == NULL)
-                pFrame->pCFParms = (PWLAN_IE_CF_PARMS)pItem;
-            break;
-        case WLAN_EID_IBSS_PARMS:
-            if (pFrame->pIBSSParms == NULL)
-                pFrame->pIBSSParms = (PWLAN_IE_IBSS_PARMS)pItem;
-            break;
-
-        case WLAN_EID_RSN:
-            if (pFrame->pRSN == NULL)
-                pFrame->pRSN = (PWLAN_IE_RSN)pItem;
-            break;
-        case WLAN_EID_RSN_WPA:
-            if (pFrame->pRSNWPA == NULL) {
-            }
-            break;
-        case WLAN_EID_ERP:
-            if (pFrame->pERP == NULL)
-                pFrame->pERP = (PWLAN_IE_ERP)pItem;
-            break;
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_COUNTRY:      /* 7 */
-            if (pFrame->pIE_Country == NULL)
-                pFrame->pIE_Country = (PWLAN_IE_COUNTRY)pItem;
-            break;
-
-        case WLAN_EID_PWR_CONSTRAINT:   /* 32 */
-            if (pFrame->pIE_PowerConstraint == NULL)
-                pFrame->pIE_PowerConstraint = (PWLAN_IE_PW_CONST)pItem;
-            break;
-
-        case WLAN_EID_CH_SWITCH:    /* 37 */
-            if (pFrame->pIE_CHSW == NULL)
-                pFrame->pIE_CHSW = (PWLAN_IE_CH_SW)pItem;
-            break;
-
-        case WLAN_EID_QUIET:        /* 40 */
-            if (pFrame->pIE_Quiet == NULL)
-                pFrame->pIE_Quiet = (PWLAN_IE_QUIET)pItem;
-            break;
-
-        case WLAN_EID_IBSS_DFS:
-            if (pFrame->pIE_IBSSDFS == NULL)
-                pFrame->pIE_IBSSDFS = (PWLAN_IE_IBSS_DFS)pItem;
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Bad EID=%dd in proberesp\n", pItem->byElementID);
-            break;
-        }
-
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 +  pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description:
- *     Encode Authentication frame
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeAuthen(
-      PWLAN_FR_AUTHEN  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwAuthAlgorithm = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                      + WLAN_AUTHEN_OFF_AUTH_ALG);
-    pFrame->pwAuthSequence = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                     + WLAN_AUTHEN_OFF_AUTH_SEQ);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_AUTHEN_OFF_STATUS);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_AUTHEN_OFF_STATUS + sizeof(*(pFrame->pwStatus));
-}
-
-/*+
- *
- * Routine Description:
- *   Decode Authentication
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeAuthen(
-      PWLAN_FR_AUTHEN  pFrame
-    )
-{
-    PWLAN_IE    pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwAuthAlgorithm = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                      + WLAN_AUTHEN_OFF_AUTH_ALG);
-    pFrame->pwAuthSequence = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                     + WLAN_AUTHEN_OFF_AUTH_SEQ);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_AUTHEN_OFF_STATUS);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                       + WLAN_AUTHEN_OFF_CHALLENGE);
-
-    if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_CHALLENGE))
-        pFrame->pChallenge = (PWLAN_IE_CHALLENGE)pItem;
-}
-
-/*+
- *
- * Routine Description:
- *   Encode Authentication
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeDeauthen(
-      PWLAN_FR_DEAUTHEN  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_DEAUTHEN_OFF_REASON);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_DEAUTHEN_OFF_REASON + sizeof(*(pFrame->pwReason));
-}
-
-/*+
- *
- * Routine Description:
- *   Decode Deauthentication
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeDeauthen(
-      PWLAN_FR_DEAUTHEN  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_DEAUTHEN_OFF_REASON);
-}
-
-/*+
- *
- * Routine Description: (AP)
- *   Encode Reassociation Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeReassocResponse(
-      PWLAN_FR_REASSOCRESP  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_REASSOCRESP_OFF_CAP_INFO);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_REASSOCRESP_OFF_STATUS);
-    pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                            + WLAN_REASSOCRESP_OFF_AID);
-
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_REASSOCRESP_OFF_AID + sizeof(*(pFrame->pwAid));
-}
drivers/staging/vt6656/80211mgr.h deleted +0 -808

808 lines not on this page · raw message

drivers/staging/vt6656/Makefile +0 -1
index 92c6aa7..3dbe1f8 100644
@@ -6,7 +6,6 @@ vt6656_stage-y +=	main_usb.o \
 			card.o  \
 			mac.o   \
 			baseband.o \
-			80211mgr.o \
 			wcmd.o\
 			rxtx.o \
 			dpc.o \
drivers/staging/vt6656/bssdb.h +0 -1
index d415965..6cfa8af 100644
@@ -32,7 +32,6 @@
 
 #include <linux/skbuff.h>
 #include "80211hdr.h"
-#include "80211mgr.h"
 #include "card.h"
 
 #define MAX_NODE_NUM             64
drivers/staging/vt6656/key.h +1 -1
index 4303c54..779a97a 100644
@@ -30,7 +30,7 @@
 #ifndef __KEY_H__
 #define __KEY_H__
 
-#include "80211mgr.h"
+#include "device.h"
 
 #define MAX_GROUP_KEY       4
 #define MAX_KEY_TABLE       11
drivers/staging/vt6656/wcmd.h +1 -1
index 894eea1..91351c6 100644
@@ -30,7 +30,7 @@
 #define __WCMD_H__
 
 #include "80211hdr.h"
-#include "80211mgr.h"
+#include "device.h"
 
 #define AUTHENTICATE_TIMEOUT   1000 //ms
 #define ASSOCIATE_TIMEOUT      1000 //ms
drivers/staging/vt6656/wmgr.h +0 -2
index 2439068..f16dfe0 100644
@@ -34,7 +34,6 @@
 #ifndef __WMGR_H__
 #define __WMGR_H__
 
-#include "80211mgr.h"
 #include "80211hdr.h"
 #include "wcmd.h"
 #include "bssdb.h"
@@ -332,7 +331,6 @@ struct vnt_manager {
 	int b11hEnable;
 	int bSwitchChannel;
 	u8 byNewChannel;
-	PWLAN_IE_MEASURE_REP    pCurrMeasureEIDRep;
 	u32 uLengthOfRepEIDs;
 	u8 abyCurrentMSRReq[sizeof(struct vnt_tx_mgmt)
 		+ WLAN_A3FR_MAXLEN];
Signature · 1 line
1.9.1
#21 lore raw

PATCH 21/34 staging: vt6656: remove dead code from power.c/h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/power.c | 153 -----------------------------------------
 drivers/staging/vt6656/power.h |   7 --
 2 files changed, 160 deletions(-)
drivers/staging/vt6656/power.c +0 -153
index 1bdbefc..dbda303 100644
@@ -28,9 +28,6 @@
  * Functions:
  *      vnt_enable_power_saving - Enable Power Saving Mode
  *      PSvDiasblePowerSaving - Disable Power Saving Mode
- *      PSbConsiderPowerDown - Decide if we can Power Down
- *      PSvSendPSPOLL - Send PS-POLL packet
- *      PSbSendNullPacket - Send Null packet
  *      vnt_next_tbtt_wakeup - Decide if we need to wake up at next Beacon
  *
  * Revision History:
@@ -39,7 +36,6 @@
 
 #include "mac.h"
 #include "device.h"
-#include "wmgr.h"
 #include "power.h"
 #include "wcmd.h"
 #include "rxtx.h"
@@ -127,155 +123,6 @@ void vnt_disable_power_saving(struct vnt_private *priv)
 /*
  *
  * Routine Description:
- * Consider to power down when no more packets to tx or rx.
- *
- * Return Value:
- *    true, if power down success
- *    false, if fail
- */
-
-int PSbConsiderPowerDown(struct vnt_private *pDevice, int bCheckRxDMA,
-	int bCheckCountToWakeUp)
-{
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	u8 byData;
-
-	/* check if already in Doze mode */
-	vnt_control_in_u8(pDevice, MESSAGE_REQUEST_MACREG,
-					MAC_REG_PSCTL, &byData);
-
-	if ((byData & PSCTL_PS) != 0)
-		return true;
-
-	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
-		/* check if in TIM wake period */
-		if (pMgmt->bInTIMWake)
-			return false;
-	}
-
-	/* check scan state */
-	if (pDevice->bCmdRunning)
-		return false;
-
-	/* Tx Burst */
-	if (pDevice->bPSModeTxBurst)
-		return false;
-
-	/* Froce PSEN on */
-	vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);
-
-	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
-		if (bCheckCountToWakeUp && (pMgmt->wCountToWakeUp == 0
-			|| pMgmt->wCountToWakeUp == 1)) {
-				return false;
-		}
-	}
-
-	pDevice->bPSRxBeacon = true;
-
-	/* no Tx, no Rx isr, now go to Doze */
-	vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n");
-	return true;
-}
-
-/*
- *
- * Routine Description:
- * Send PS-POLL packet
- *
- * Return Value:
- *    None.
- *
- */
-
-void PSvSendPSPOLL(struct vnt_private *pDevice)
-{
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	struct vnt_tx_mgmt *pTxPacket = NULL;
-
-	memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt)
-		+ WLAN_HDR_ADDR2_LEN);
-	pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool;
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-		+ sizeof(struct vnt_tx_mgmt));
-
-	pTxPacket->p80211Header->sA2.wFrameCtl = cpu_to_le16(
-		(
-			WLAN_SET_FC_FTYPE(WLAN_TYPE_CTL) |
-			WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PSPOLL) |
-			WLAN_SET_FC_PWRMGT(0)
-		));
-
-	pTxPacket->p80211Header->sA2.wDurationID =
-		pMgmt->wCurrAID | BIT14 | BIT15;
-	memcpy(pTxPacket->p80211Header->sA2.abyAddr1, pMgmt->abyCurrBSSID,
-		WLAN_ADDR_LEN);
-	memcpy(pTxPacket->p80211Header->sA2.abyAddr2, pMgmt->abyMACAddr,
-		WLAN_ADDR_LEN);
-	pTxPacket->cbMPDULen = WLAN_HDR_ADDR2_LEN;
-	pTxPacket->cbPayloadLen = 0;
-
-	/* log failure if sending failed */
-}
-
-/*
- *
- * Routine Description:
- * Send NULL packet to AP for notification power state of STA
- *
- * Return Value:
- *    None.
- *
- */
-
-int PSbSendNullPacket(struct vnt_private *pDevice)
-{
-	struct vnt_tx_mgmt *pTxPacket = NULL;
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-	u16 flags = 0;
-
-	if (pDevice->bLinkPass == false)
-		return false;
-
-	if (pDevice->bEnablePSMode == false && pDevice->tx_trigger == false)
-		return false;
-
-	memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt)
-		+ WLAN_NULLDATA_FR_MAXLEN);
-	pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool;
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-		+ sizeof(struct vnt_tx_mgmt));
-
-	flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
-			WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL);
-
-	if (pDevice->bEnablePSMode)
-		flags |= WLAN_SET_FC_PWRMGT(1);
-	else
-		flags |= WLAN_SET_FC_PWRMGT(0);
-
-	pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags);
-
-	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA)
-		pTxPacket->p80211Header->sA3.wFrameCtl |=
-			cpu_to_le16((u16)WLAN_SET_FC_TODS(1));
-
-	memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID,
-		WLAN_ADDR_LEN);
-	memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr,
-		WLAN_ADDR_LEN);
-	memcpy(pTxPacket->p80211Header->sA3.abyAddr3, pMgmt->abyCurrBSSID,
-		WLAN_BSSID_LEN);
-	pTxPacket->cbMPDULen = WLAN_HDR_ADDR3_LEN;
-	pTxPacket->cbPayloadLen = 0;
-	/* log error if sending failed */
-	return true;
-}
-
-/*
- *
- * Routine Description:
  * Check if Next TBTT must wake up
  *
  * Return Value:
drivers/staging/vt6656/power.h +0 -7
index 313f077..bd9de77 100644
@@ -33,15 +33,8 @@
 #define     PS_FAST_INTERVAL         1         // Fast power saving listen interval
 #define     PS_MAX_INTERVAL          4         // MAX power saving listen interval
 
-/*  PSDevice pDevice */
-/*  PSDevice hDeviceContext */
-
-int PSbConsiderPowerDown(struct vnt_private *, int bCheckRxDMA,
-	int bCheckCountToWakeUp);
 void vnt_disable_power_saving(struct vnt_private *);
 void vnt_enable_power_saving(struct vnt_private *, u16);
-void PSvSendPSPOLL(struct vnt_private *);
-int PSbSendNullPacket(struct vnt_private *);
 int vnt_next_tbtt_wakeup(struct vnt_private *);
 
 #endif /* __POWER_H__ */
Signature · 1 line
1.9.1
#22 lore raw

PATCH 22/34 staging: vt6656: dead code remove old key functions

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/device.h |   1 -
 drivers/staging/vt6656/key.c    | 694 ----------------------------------------
 drivers/staging/vt6656/key.h    |  69 ----
 drivers/staging/vt6656/wcmd.c   |   4 -
 4 files changed, 768 deletions(-)
drivers/staging/vt6656/device.h +0 -1
index b6ae34f..a145081 100644
@@ -635,7 +635,6 @@ struct vnt_private {
 	NDIS_802_11_WEP_STATUS eEncryptionStatus;
 	int  bTransmitKey;
 	NDIS_802_11_WEP_STATUS eOldEncryptionStatus;
-	SKeyManagement sKey;
 	u32 dwIVCounter;
 
 	u8 abyPRNG[WLAN_WEPMAX_KEYLEN+3];
drivers/staging/vt6656/key.c +0 -694

709 lines not on this page · raw message

drivers/staging/vt6656/key.h +0 -69

87 lines not on this page · raw message

drivers/staging/vt6656/wcmd.c +0 -4
index d063229..106c4c4 100644
@@ -139,10 +139,6 @@ void vRunCommand(struct work_struct *work)
 		}
 		break;
 
-	case WLAN_CMD_REMOVE_ALLKEY_START:
-		KeybRemoveAllKey(pDevice, &(pDevice->sKey), pDevice->abyBSSID);
-		break;
-
 	case WLAN_CMD_MAC_DISPOWERSAVING_START:
 		vnt_control_in_u8(pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_PSCTL, &byData);
 		if ((byData & PSCTL_PS) != 0) {
Signature · 1 line
1.9.1
#23 lore raw

PATCH 23/34 staging: vt6656: dead code remove tmacro.h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/baseband.c |  1 -
 drivers/staging/vt6656/card.c     |  1 -
 drivers/staging/vt6656/int.c      |  1 -
 drivers/staging/vt6656/mac.c      |  1 -
 drivers/staging/vt6656/mac.h      |  1 -
 drivers/staging/vt6656/tmacro.h   | 52 ---------------------------------------
 drivers/staging/vt6656/wcmd.c     |  1 -
 7 files changed, 58 deletions(-)
 delete mode 100644 drivers/staging/vt6656/tmacro.h
drivers/staging/vt6656/baseband.c +0 -1
index e67502e..f4060a9 100644
@@ -35,7 +35,6 @@
  *
  */
 
-#include "tmacro.h"
 #include "mac.h"
 #include "baseband.h"
 #include "rf.h"
drivers/staging/vt6656/card.c +0 -1
index 9a3e3ce..2ef45ca 100644
@@ -46,7 +46,6 @@
  */
 
 #include "device.h"
-#include "tmacro.h"
 #include "card.h"
 #include "baseband.h"
 #include "mac.h"
drivers/staging/vt6656/int.c +0 -1
index b717ace..5961f159 100644
@@ -33,7 +33,6 @@
  */
 
 #include "int.h"
-#include "tmacro.h"
 #include "mac.h"
 #include "power.h"
 #include "bssdb.h"
drivers/staging/vt6656/mac.c +0 -1
index 755ac56..27fad2e 100644
@@ -30,7 +30,6 @@
  * Revision History:
  */
 
-#include "tmacro.h"
 #include "desc.h"
 #include "mac.h"
 #include "80211hdr.h"
drivers/staging/vt6656/mac.h +0 -1
index eac2be7..3e17457 100644
@@ -35,7 +35,6 @@
 #define __MAC_H__
 
 #include "device.h"
-#include "tmacro.h"
 
 #define REV_ID_VT3253_A0    0x00
 #define REV_ID_VT3253_A1    0x01
drivers/staging/vt6656/tmacro.h deleted +0 -52

52 lines not on this page · raw message

drivers/staging/vt6656/wcmd.c +0 -1
index 106c4c4..b190857 100644
@@ -38,7 +38,6 @@
  *
  */
 
-#include "tmacro.h"
 #include "device.h"
 #include "mac.h"
 #include "card.h"
Signature · 1 line
1.9.1
#24 lore raw

PATCH 24/34 staging: vt6656: dead codead remove bssdb.h header

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/bssdb.h    | 211 --------------------------------------
 drivers/staging/vt6656/dpc.c      |   1 -
 drivers/staging/vt6656/int.c      |   1 -
 drivers/staging/vt6656/main_usb.c |   1 -
 drivers/staging/vt6656/rxtx.c     |   1 -
 drivers/staging/vt6656/wmgr.h     |   7 --
 6 files changed, 222 deletions(-)
 delete mode 100644 drivers/staging/vt6656/bssdb.h
drivers/staging/vt6656/bssdb.h deleted +0 -211
deleted file mode 100644
index 6cfa8af..0000000
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: bssdb.h
- *
- * Purpose: Handles the Basic Service Set & Node Database functions
- *
- * Author: Lyndon Chen
- *
- * Date: July 16, 2002
- *
- */
-
-#ifndef __BSSDB_H__
-#define __BSSDB_H__
-
-#include <linux/skbuff.h>
-#include "80211hdr.h"
-#include "card.h"
-
-#define MAX_NODE_NUM             64
-#define MAX_BSS_NUM              42
-#define LOST_BEACON_COUNT        10   /* 10 sec, XP defined */
-#define MAX_PS_TX_BUF            32   // sta max power saving tx buf
-#define ADHOC_LOST_BEACON_COUNT  30   // 30 sec, beacon lost for adhoc only
-#define MAX_INACTIVE_COUNT       300  // 300 sec, inactive STA node refresh
-
-#define USE_PROTECT_PERIOD       10   // 10 sec, Use protect mode check period
-#define ERP_RECOVER_COUNT        30   // 30 sec, ERP support callback check
-#define BSS_CLEAR_COUNT           1
-
-#define RSSI_STAT_COUNT          10
-#define MAX_CHECK_RSSI_COUNT     8
-
-// STA dwflags
-#define WLAN_STA_AUTH            BIT0
-#define WLAN_STA_ASSOC           BIT1
-#define WLAN_STA_PS              BIT2
-#define WLAN_STA_TIM             BIT3
-// permanent; do not remove entry on expiration
-#define WLAN_STA_PERM            BIT4
-// If 802.1X is used, this flag is
-// controlling whether STA is authorized to
-// send and receive non-IEEE 802.1X frames
-#define WLAN_STA_AUTHORIZED      BIT5
-
-#define MAX_WPA_IE_LEN      64
-
-//
-// IEEE 802.11 Structures and definitions
-//
-
-typedef struct tagSERPObject {
-    bool    bERPExist;
-    u8    byERP;
-} ERPObject, *PERPObject;
-
-typedef struct tagSRSNCapObject {
-    bool    bRSNCapExist;
-    u16    wRSNCap;
-} SRSNCapObject, *PSRSNCapObject;
-
-// BSS info(AP)
-typedef struct tagKnownBSS {
-    // BSS info
-    bool            bActive;
-    u8            abyBSSID[WLAN_BSSID_LEN];
-    unsigned int            uChannel;
-    u8            abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-    u8            abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-    unsigned int            uRSSI;
-    u8            bySQ;
-    u16            wBeaconInterval;
-    u16            wCapInfo;
-    u8            abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-    u8            byRxRate;
-
-//    u16            wATIMWindow;
-    u8            byRSSIStatCnt;
-    signed long            ldBmMAX;
-    signed long            ldBmAverage[RSSI_STAT_COUNT];
-    signed long            ldBmAverRange;
-    //For any BSSID selection improvment
-    bool            bSelected;
-
-    //++ WPA informations
-    bool            bWPAValid;
-    u8            byGKType;
-    u8            abyPKType[4];
-    u16            wPKCount;
-    u8            abyAuthType[4];
-    u16            wAuthCount;
-    u8            byDefaultK_as_PK;
-    u8            byReplayIdx;
-    //--
-
-    //++ WPA2 informations
-    bool            bWPA2Valid;
-    u8            byCSSGK;
-    u16            wCSSPKCount;
-    u8            abyCSSPK[4];
-    u16            wAKMSSAuthCount;
-    u8            abyAKMSSAuthType[4];
-
-    //++  wpactl
-    u8            byWPAIE[MAX_WPA_IE_LEN];
-    u8            byRSNIE[MAX_WPA_IE_LEN];
-    u16            wWPALen;
-    u16            wRSNLen;
-
-    // Clear count
-    unsigned int            uClearCount;
-//    u8            abyIEs[WLAN_BEACON_FR_MAXLEN];
-    unsigned int            uIELength;
-	u64 qwBSSTimestamp;
-	u64 qwLocalTSF;/* local TSF timer */
-
-    CARD_PHY_TYPE   eNetworkTypeInUse;
-
-    ERPObject       sERP;
-    SRSNCapObject   sRSNCapObj;
-    u8            abyIEs[1024];   // don't move this field !!
-
-} __attribute__ ((__packed__))
-KnownBSS , *PKnownBSS;
-
-typedef enum tagNODE_STATE {
-    NODE_FREE,
-    NODE_AGED,
-    NODE_KNOWN,
-    NODE_AUTH,
-    NODE_ASSOC
-} NODE_STATE, *PNODE_STATE;
-
-// STA node info
-typedef struct tagKnownNodeDB {
-    // STA info
-    bool            bActive;
-    u8            abyMACAddr[WLAN_ADDR_LEN];
-    u8            abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
-    u8            abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
-    u16            wTxDataRate;
-    bool            bShortPreamble;
-    bool            bERPExist;
-    bool            bShortSlotTime;
-    unsigned int            uInActiveCount;
-    u16            wMaxBasicRate;     //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp.
-    u16            wMaxSuppRate;      //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon.
-    u16            wSuppRate;
-    u8            byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode
-    u8            byTopCCKBasicRate; //Records the highest basic rate in CCK mode
-
-    // For AP mode
-    struct sk_buff_head sTxPSQueue;
-    u16            wCapInfo;
-    u16            wListenInterval;
-    u16            wAID;
-    NODE_STATE      eNodeState;
-    bool            bPSEnable;
-    bool            bRxPSPoll;
-    u8            byAuthSequence;
-    unsigned long           ulLastRxJiffer;
-    u8            bySuppRate;
-    u32           dwFlags;
-    u16            wEnQueueCnt;
-
-    bool            bOnFly;
-    unsigned long long       KeyRSC;
-    u8            byKeyIndex;
-    u32           dwKeyIndex;
-    u8            byCipherSuite;
-    u32           dwTSC47_16;
-    u16            wTSC15_0;
-    unsigned int            uWepKeyLength;
-    u8            abyWepKey[WLAN_WEPMAX_KEYLEN];
-    //
-    // Auto rate fallback vars
-    bool            bIsInFallback;
-    unsigned int            uAverageRSSI;
-    unsigned int            uRateRecoveryTimeout;
-    unsigned int            uRatePollTimeout;
-    unsigned int            uTxFailures;
-    unsigned int            uTxAttempts;
-
-    unsigned int            uTxRetry;
-    unsigned int            uFailureRatio;
-    unsigned int            uRetryRatio;
-    unsigned int            uTxOk[MAX_RATE+1];
-    unsigned int            uTxFail[MAX_RATE+1];
-    unsigned int            uTimeCount;
-
-} KnownNodeDB, *PKnownNodeDB;
-
-
-#endif /* __BSSDB_H__ */
drivers/staging/vt6656/dpc.c +0 -1
index f40d6b4..65a3a70 100644
@@ -39,7 +39,6 @@
 #include "device.h"
 #include "rxtx.h"
 #include "card.h"
-#include "bssdb.h"
 #include "mac.h"
 #include "baseband.h"
 #include "rf.h"
drivers/staging/vt6656/int.c +0 -1
index 5961f159..23d045c 100644
@@ -35,7 +35,6 @@
 #include "int.h"
 #include "mac.h"
 #include "power.h"
-#include "bssdb.h"
 #include "usbpipe.h"
 
 static int msglevel = MSG_LEVEL_INFO; /* MSG_LEVEL_DEBUG */
drivers/staging/vt6656/main_usb.c +0 -1
index 26fac20..feecd51 100644
@@ -55,7 +55,6 @@
 #include "power.h"
 #include "wcmd.h"
 #include "rxtx.h"
-#include "bssdb.h"
 #include "dpc.h"
 #include "rf.h"
 #include "firmware.h"
drivers/staging/vt6656/rxtx.c +0 -1
index 492d9c3..7c9f232 100644
@@ -46,7 +46,6 @@
 #include "device.h"
 #include "rxtx.h"
 #include "card.h"
-#include "bssdb.h"
 #include "mac.h"
 #include "rf.h"
 #include "usbpipe.h"
drivers/staging/vt6656/wmgr.h +0 -7
index f16dfe0..a140e160 100644
@@ -36,7 +36,6 @@
 
 #include "80211hdr.h"
 #include "wcmd.h"
-#include "bssdb.h"
 #include "card.h"
 
 // Scan time
@@ -221,7 +220,6 @@ struct vnt_manager {
 	WMAC_BSS_STATE eCurrState; /* MAC current BSS state */
 	WMAC_BSS_STATE eLastState; /* MAC last BSS state */
 
-	PKnownBSS pCurrBSS;
 	u8 byCSSGK;
 	u8 byCSSPK;
 
@@ -257,7 +255,6 @@ struct vnt_manager {
 	u32 uIBSSChannel;
 	u8 abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
 	u8 byAPBBType;
-	u8 abyWPAIE[MAX_WPA_IE_LEN];
 	u16 wWPAIELen;
 
 	u32 uAssocCount;
@@ -295,7 +292,6 @@ struct vnt_manager {
 	u8 byPSPacketPool[sizeof(struct vnt_tx_mgmt)
 		+ WLAN_NULLDATA_FR_MAXLEN];
 	int bRxBeaconInTBTTWake;
-	u8 abyPSTxMap[MAX_NODE_NUM + 1];
 
 	/* management command related */
 	u32 uCmdBusy;
@@ -310,16 +306,13 @@ struct vnt_manager {
 	struct vnt_rx_mgmt sRxPacket;
 
 	/* link list of known bss's (scan results) */
-	KnownBSS sBSSList[MAX_BSS_NUM];
 	/* link list of same bss's */
-	KnownBSS pSameBSS[6];
 	int Cisco_cckm;
 	u8 Roam_dbm;
 
 	/* table list of known node */
 	/* sNodeDBList[0] is reserved for AP under Infra mode */
 	/* sNodeDBList[0] is reserved for Multicast under adhoc/AP mode */
-	KnownNodeDB sNodeDBTable[MAX_NODE_NUM + 1];
 
 	/* WPA2 PMKID Cache */
 	int bRoaming;
Signature · 1 line
1.9.1
#25 lore raw

PATCH 25/34 staging: vt6656: dpc remove dead code RXvMngWorkItem

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/dpc.c | 46 --------------------------------------------
 drivers/staging/vt6656/dpc.h |  2 --
 2 files changed, 48 deletions(-)
drivers/staging/vt6656/dpc.c +0 -46
index 65a3a70..ceeb3ee 100644
@@ -112,52 +112,6 @@ void RXvFreeRCB(struct vnt_rcb *rcb, int re_alloc_skb)
 			priv->NumRecvFreeList, priv->NumRecvMngList);
 }
 
-void RXvMngWorkItem(struct work_struct *work)
-{
-	struct vnt_private *pDevice =
-		container_of(work, struct vnt_private, rx_mng_work_item);
-	struct vnt_rcb *pRCB = NULL;
-	struct vnt_rx_mgmt *pRxPacket;
-	int bReAllocSkb = false;
-	unsigned long flags;
-
-	if (pDevice->Flags & fMP_DISCONNECTED)
-		return;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Mng Thread\n");
-
-    while (pDevice->NumRecvMngList!=0)
-    {
-	spin_lock_irqsave(&pDevice->lock, flags);
-
-        pRCB = pDevice->FirstRecvMngList;
-        pDevice->NumRecvMngList--;
-        DequeueRCB(pDevice->FirstRecvMngList, pDevice->LastRecvMngList);
-
-	spin_unlock_irqrestore(&pDevice->lock, flags);
-
-        if(!pRCB){
-            break;
-        }
-        pRxPacket = &(pRCB->sMngPacket);
-        pRCB->Ref--;
-	if (pRCB->Ref == 0) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeMng %d %d\n",
-			pDevice->NumRecvFreeList, pDevice->NumRecvMngList);
-
-		spin_lock_irqsave(&pDevice->lock, flags);
-
-		RXvFreeRCB(pRCB, bReAllocSkb);
-
-		spin_unlock_irqrestore(&pDevice->lock, flags);
-	} else {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Rx Mng Only we have the right to free RCB\n");
-        }
-    }
-
-	pDevice->bIsRxMngWorkItemQueued = false;
-}
-
 int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
 	unsigned long bytes_received)
 {
drivers/staging/vt6656/dpc.h +0 -2
index 0afd882..1df2ae8 100644
@@ -34,8 +34,6 @@
 
 void RXvWorkItem(struct work_struct *work);
 
-void RXvMngWorkItem(struct work_struct *work);
-
 void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb);
 
 int vnt_rx_data(struct vnt_private *, struct vnt_rcb *,
Signature · 1 line
1.9.1
#26 lore raw

PATCH 26/34 staging: vt6656: Remove vnt_set_channel from device_init_registers

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/main_usb.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/staging/vt6656/main_usb.c +0 -7
index feecd51..56bdf9d 100644
@@ -242,7 +242,6 @@ device_set_options(struct vnt_private *pDevice) {
  */
 static int device_init_registers(struct vnt_private *pDevice)
 {
-	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
 	struct vnt_cmd_card_init *init_cmd = &pDevice->init_command;
 	struct vnt_rsp_card_init *init_rsp = &pDevice->init_response;
 	u8 abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
@@ -468,12 +467,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 		}
 	}
 
-	pMgmt->eScanType = WMAC_SCAN_PASSIVE;
-	pMgmt->uCurrChannel = pDevice->uChannel;
-	pMgmt->uIBSSChannel = pDevice->uChannel;
-
-	vnt_set_channel(pDevice, pMgmt->uCurrChannel);
-
 	/* get permanent network address */
 	memcpy(pDevice->abyPermanentNetAddr, init_rsp->net_addr, 6);
 	memcpy(pDevice->abyCurrentNetAddr,
Signature · 1 line
1.9.1
#27 lore raw

PATCH 27/34 staging: vt6656: remove old rx receive list

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/device.h   | 5 +----
 drivers/staging/vt6656/dpc.c      | 4 ++--
 drivers/staging/vt6656/main_usb.c | 2 --
 3 files changed, 3 insertions(+), 8 deletions(-)
drivers/staging/vt6656/device.h +1 -4
index a145081..5be96ae9 100644
@@ -245,7 +245,6 @@ struct vnt_rcb {
 	signed long Ref;
 	void *pDevice;
 	struct urb *pUrb;
-	struct vnt_rx_mgmt sMngPacket;
 	struct sk_buff *skb;
 	int bBoolInUse;
 };
@@ -454,9 +453,7 @@ struct vnt_private {
 	struct vnt_rcb *FirstRecvFreeList;
 	struct vnt_rcb *LastRecvFreeList;
 	u32 NumRecvFreeList;
-	struct vnt_rcb *FirstRecvMngList;
-	struct vnt_rcb *LastRecvMngList;
-	u32 NumRecvMngList;
+
 	int bIsRxWorkItemQueued;
 	int bIsRxMngWorkItemQueued;
 	unsigned long ulRcvRefCount; /* packets that have not returned back */
drivers/staging/vt6656/dpc.c +2 -2
index ceeb3ee..5ac5bcd 100644
@@ -108,8 +108,8 @@ void RXvFreeRCB(struct vnt_rcb *rcb, int re_alloc_skb)
 		schedule_work(&priv->read_work_item);
 	}
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d %d\n",
-			priv->NumRecvFreeList, priv->NumRecvMngList);
+	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d\n",
+			priv->NumRecvFreeList);
 }
 
 int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
drivers/staging/vt6656/main_usb.c +0 -2
index 56bdf9d..66f9a54 100644
@@ -634,8 +634,6 @@ static bool device_alloc_bufs(struct vnt_private *priv)
 
 	priv->FirstRecvFreeList = NULL;
 	priv->LastRecvFreeList = NULL;
-	priv->FirstRecvMngList = NULL;
-	priv->LastRecvMngList = NULL;
 	priv->NumRecvFreeList = 0;
 
 	rcb = (struct vnt_rcb *)priv->pRCBMem;
Signature · 1 line
1.9.1
#28 lore raw

PATCH 28/34 staging: vt6656: dead code remove wmgr.h

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/device.h   |  37 +----
 drivers/staging/vt6656/main_usb.c |   5 -
 drivers/staging/vt6656/wcmd.c     |   1 -
 drivers/staging/vt6656/wmgr.h     | 340 --------------------------------------
 4 files changed, 1 insertion(+), 382 deletions(-)
 delete mode 100644 drivers/staging/vt6656/wmgr.h
drivers/staging/vt6656/device.h +1 -36
index 5be96ae9..2f9009b 100644
@@ -74,7 +74,6 @@
  */
 
 #include "80211hdr.h"
-#include "wmgr.h"
 #include "wcmd.h"
 #include "desc.h"
 #include "key.h"
@@ -328,31 +327,6 @@ typedef enum _NDIS_802_11_STATUS_TYPE
 	Ndis802_11StatusTypeMax, /* not a real type, defined as upper bound */
 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
 
-/* added new types for PMKID Candidate lists */
-typedef struct _PMKID_CANDIDATE {
-    NDIS_802_11_MAC_ADDRESS BSSID;
-    unsigned long Flags;
-} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
-
-typedef struct _BSSID_INFO
-{
-    NDIS_802_11_MAC_ADDRESS BSSID;
-    NDIS_802_11_PMKID_VALUE PMKID;
-} BSSID_INFO, *PBSSID_INFO;
-
-typedef struct tagSPMKID {
-    unsigned long Length;
-    unsigned long BSSIDInfoCount;
-    BSSID_INFO BSSIDInfo[MAX_BSSIDINFO_4_PMKID];
-} SPMKID, *PSPMKID;
-
-typedef struct tagSPMKIDCandidateEvent {
-    NDIS_802_11_STATUS_TYPE     StatusType;
-	unsigned long Version;       /* Version of the structure */
-	unsigned long NumCandidates; /* No. of pmkid candidates */
-    PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
-} SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
-
 /* The receive duplicate detection cache entry */
 typedef struct tagSCacheEntry{
 	__le16 wFmSequence;
@@ -489,9 +463,6 @@ struct vnt_private {
 	unsigned long SendContextsInUse;
 	unsigned long RcvBuffersInUse;
 
-	/* 802.11 management */
-	struct vnt_manager vnt_mgmt;
-
 	u64 qwCurrTSF;
 	u32 cbBulkInMax;
 	int bPSRxBeacon;
@@ -564,7 +535,6 @@ struct vnt_private {
 	enum nl80211_iftype op_mode;
 
 	int bBSSIDFilter;
-	u16 wMaxTransmitMSDULifetime;
 	u8 abyBSSID[ETH_ALEN];
 	u8 abyDesireBSSID[ETH_ALEN];
 
@@ -584,10 +554,9 @@ struct vnt_private {
 
 	/* Power save */
 	u16 current_aid;
-	int bEnablePSMode;
 	u16 wListenInterval;
 	int bPWBitOn;
-	WMAC_POWER_MODE ePSMode;
+
 	unsigned long ulPSModeWaitTx;
 	int bPSModeTxBurst;
 
@@ -682,10 +651,6 @@ struct vnt_private {
 	u8 abySNAP_RFC1042[ETH_ALEN];
 	u8 abySNAP_Bridgetunnel[ETH_ALEN];
 
-	/* Pre-Authentication & PMK cache */
-	SPMKID gsPMKID;
-	SPMKIDCandidateEvent gsPMKIDCandidate;
-
 	/* for 802.11h */
 	int b11hEnable;
 
drivers/staging/vt6656/main_usb.c +0 -5
index 66f9a54..fecdf77 100644
@@ -51,7 +51,6 @@
 #include "card.h"
 #include "baseband.h"
 #include "mac.h"
-#include "wmgr.h"
 #include "power.h"
 #include "wcmd.h"
 #include "rxtx.h"
@@ -223,9 +222,7 @@ device_set_options(struct vnt_private *pDevice) {
     pDevice->wFragmentationThreshold = FRAG_THRESH_DEF;
     pDevice->byShortRetryLimit = SHORT_RETRY_DEF;
     pDevice->byLongRetryLimit = LONG_RETRY_DEF;
-    pDevice->wMaxTransmitMSDULifetime = DEFAULT_MSDU_LIFETIME;
     pDevice->byShortPreamble = PREAMBLE_TYPE_DEF;
-    pDevice->ePSMode = PS_MODE_DEF;
     pDevice->b11hEnable = X80211h_MODE_DEF;
     pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED;
     pDevice->uConnectionRate = DATA_RATE_DEF;
@@ -1162,8 +1159,6 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
 	INIT_DELAYED_WORK(&priv->run_command_work, vRunCommand);
 	INIT_WORK(&priv->read_work_item, RXvWorkItem);
 
-	priv->vnt_mgmt.pAdapter = priv;
-
 	usb_set_intfdata(intf, priv);
 
 	wiphy = priv->hw->wiphy;
drivers/staging/vt6656/wcmd.c +0 -1
index b190857..7c81034 100644
@@ -43,7 +43,6 @@
 #include "card.h"
 #include "80211hdr.h"
 #include "wcmd.h"
-#include "wmgr.h"
 #include "power.h"
 #include "baseband.h"
 #include "usbpipe.h"
drivers/staging/vt6656/wmgr.h deleted +0 -340

340 lines not on this page · raw message

Signature · 1 line
1.9.1
#29 lore raw

PATCH 29/34 staging: vt6656: remove old channel tables

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/channel.c  | 137 --------------------------------------
 drivers/staging/vt6656/channel.h  |   9 ---
 drivers/staging/vt6656/main_usb.c |   2 -
 3 files changed, 148 deletions(-)
drivers/staging/vt6656/channel.c +0 -137
index db1451e..5202633 100644
@@ -34,147 +34,10 @@
  *
  */
 
-#include <linux/kernel.h>
 #include "device.h"
 #include "channel.h"
 #include "rf.h"
 
-static SChannelTblElement sChannelTbl[CB_MAX_CHANNEL+1] =
-{
-  {0,   0,    false},
-  {1,   2412, true},
-  {2,   2417, true},
-  {3,   2422, true},
-  {4,   2427, true},
-  {5,   2432, true},
-  {6,   2437, true},
-  {7,   2442, true},
-  {8,   2447, true},
-  {9,   2452, true},
-  {10,  2457, true},
-  {11,  2462, true},
-  {12,  2467, true},
-  {13,  2472, true},
-  {14,  2484, true},
-  {183, 4915, true}, //15
-  {184, 4920, true}, //16
-  {185, 4925, true}, //17
-  {187, 4935, true}, //18
-  {188, 4940, true}, //19
-  {189, 4945, true}, //20
-  {192, 4960, true}, //21
-  {196, 4980, true}, //22
-  {7,   5035, true}, //23
-  {8,   5040, true}, //24
-  {9,   5045, true}, //25
-  {11,  5055, true}, //26
-  {12,  5060, true}, //27
-  {16,  5080, true}, //28
-  {34,  5170, true}, //29
-  {36,  5180, true}, //30
-  {38,  5190, true}, //31
-  {40,  5200, true}, //32
-  {42,  5210, true}, //33
-  {44,  5220, true}, //34
-  {46,  5230, true}, //35
-  {48,  5240, true}, //36
-  {52,  5260, true}, //37
-  {56,  5280, true}, //38
-  {60,  5300, true}, //39
-  {64,  5320, true}, //40
-  {100, 5500, true}, //41
-  {104, 5520, true}, //42
-  {108, 5540, true}, //43
-  {112, 5560, true}, //44
-  {116, 5580, true}, //45
-  {120, 5600, true}, //46
-  {124, 5620, true}, //47
-  {128, 5640, true}, //48
-  {132, 5660, true}, //49
-  {136, 5680, true}, //50
-  {140, 5700, true}, //51
-  {149, 5745, true}, //52
-  {153, 5765, true}, //53
-  {157, 5785, true}, //54
-  {161, 5805, true}, //55
-  {165, 5825, true}  //56
-};
-
-
-/************************************************************************
- * Country Channel Valid
- *  Input:  CountryCode, ChannelNum
- *          ChanneIndex is defined as VT3253 MAC channel:
- *              1   = 2.4G channel 1
- *              2   = 2.4G channel 2
- *              ...
- *              14  = 2.4G channel 14
- *              15  = 4.9G channel 183
- *              16  = 4.9G channel 184
- *              .....
- *  Output: true if the specified 5GHz band is allowed to be used.
-            False otherwise.
-// 4.9G => Ch 183, 184, 185, 187, 188, 189, 192, 196 (Value:15 ~ 22)
-
-// 5G => Ch 7, 8, 9, 11, 12, 16, 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64,
-// 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 (Value 23 ~ 56)
- ************************************************************************/
-bool
-ChannelValid(unsigned int CountryCode, unsigned int ChannelIndex)
-{
-    bool    bValid;
-
-    bValid = false;
-    /*
-     * If Channel Index is invalid, return invalid
-     */
-    if ((ChannelIndex > CB_MAX_CHANNEL) ||
-        (ChannelIndex == 0))
-    {
-        bValid = false;
-        goto exit;
-    }
-
-    bValid = sChannelTbl[ChannelIndex].bValid;
-
-exit:
-    return (bValid);
-
-} /* end ChannelValid */
-
-void CHvInitChannelTable(struct vnt_private *pDevice)
-{
-	bool bMultiBand = false;
-	int ii;
-
-    for (ii = 1; ii <= CB_MAX_CHANNEL; ii++)
-	sChannelTbl[ii].bValid = false;
-
-    switch (pDevice->byRFType) {
-        case RF_AL2230:
-        case RF_AL2230S:
-        case RF_VT3226:
-        case RF_VT3226D0:
-            bMultiBand = false;
-            break;
-        case RF_AIROHA7230:
-        case RF_VT3342A0:
-        default :
-            bMultiBand = true;
-            break;
-    }
-
-        if (bMultiBand == true) {
-		for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
-			sChannelTbl[ii+1].bValid = true;
-		}
-        } else {
-		for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
-			sChannelTbl[ii+1].bValid = true;
-		}
-        }
-}
-
 static struct ieee80211_rate vnt_rates_bg[] = {
 	{ .bitrate = 10,  .hw_value = RATE_1M },
 	{ .bitrate = 20,  .hw_value = RATE_2M },
drivers/staging/vt6656/channel.h +0 -9
index 0d52225..21c0808 100644
@@ -32,15 +32,6 @@
 
 #include "device.h"
 
-typedef struct tagSChannelTblElement {
-    u8    byChannelNumber;
-    unsigned int    uFrequency;
-    bool    bValid;
-} SChannelTblElement, *PSChannelTblElement;
-
-bool    ChannelValid(unsigned int CountryCode, unsigned int ChannelNum);
-void    CHvInitChannelTable(struct vnt_private *pDevice);
-
 void vnt_init_bands(struct vnt_private *);
 
 #endif  /* _CHANNEL_H_ */
drivers/staging/vt6656/main_usb.c +0 -2
index fecdf77..5ce0caa 100644
@@ -323,8 +323,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 			pDevice->wCurrentRate = RATE_54M;
 	}
 
-	CHvInitChannelTable(pDevice);
-
 	pDevice->byTopOFDMBasicRate = RATE_24M;
 	pDevice->byTopCCKBasicRate = RATE_1M;
 
Signature · 1 line
1.9.1
#30 lore raw

PATCH 30/34 staging: vt6656: dead code remove 80211hdr.h

In reply to Malcolm Priestley

Remove all variables that are dead with this header

---
 drivers/staging/vt6656/80211hdr.h | 324 --------------------------------------
 drivers/staging/vt6656/device.h   |   3 -
 drivers/staging/vt6656/mac.c      |   1 -
 drivers/staging/vt6656/wcmd.c     |   2 -
 drivers/staging/vt6656/wcmd.h     |   2 -
 5 files changed, 332 deletions(-)
 delete mode 100644 drivers/staging/vt6656/80211hdr.h
drivers/staging/vt6656/80211hdr.h deleted +0 -324
deleted file mode 100644
index 1e778ba..0000000
@@ -1,324 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: 80211hdr.h
- *
- * Purpose: 802.11 MAC headers related pre-defines and macros.
- *
- * Author: Lyndon Chen
- *
- * Date: Apr 8, 2002
- */
-
-#ifndef __80211HDR_H__
-#define __80211HDR_H__
-
-/* bit type */
-#define BIT0	0x00000001
-#define BIT1	0x00000002
-#define BIT2	0x00000004
-#define BIT3	0x00000008
-#define BIT4	0x00000010
-#define BIT5	0x00000020
-#define BIT6	0x00000040
-#define BIT7	0x00000080
-#define BIT8	0x00000100
-#define BIT9	0x00000200
-#define BIT10	0x00000400
-#define BIT11	0x00000800
-#define BIT12	0x00001000
-#define BIT13	0x00002000
-#define BIT14	0x00004000
-#define BIT15	0x00008000
-#define BIT16	0x00010000
-#define BIT17	0x00020000
-#define BIT18	0x00040000
-#define BIT19	0x00080000
-#define BIT20	0x00100000
-#define BIT21	0x00200000
-#define BIT22	0x00400000
-#define BIT23	0x00800000
-#define BIT24	0x01000000
-#define BIT25	0x02000000
-#define BIT26	0x04000000
-#define BIT27	0x08000000
-#define BIT28	0x10000000
-#define BIT29	0x20000000
-#define BIT30	0x40000000
-#define BIT31	0x80000000
-
-/* 802.11 frame related, defined as 802.11 spec */
-#define WLAN_ADDR_LEN               6
-#define WLAN_CRC_LEN                4
-#define WLAN_CRC32_LEN              4
-#define WLAN_FCS_LEN                4
-#define WLAN_BSSID_LEN              6
-#define WLAN_BSS_TS_LEN             8
-#define WLAN_HDR_ADDR2_LEN          16
-#define WLAN_HDR_ADDR3_LEN          24
-#define WLAN_HDR_ADDR4_LEN          30
-#define WLAN_IEHDR_LEN              2
-#define WLAN_SSID_MAXLEN            32
-#define WLAN_RATES_MAXLEN           16
-#define WLAN_RATES_MAXLEN_11B       4
-#define WLAN_RSN_MAXLEN             32
-#define WLAN_DATA_MAXLEN            2312
-#define WLAN_A3FR_MAXLEN            (WLAN_HDR_ADDR3_LEN \
-				     + WLAN_DATA_MAXLEN \
-				     + WLAN_CRC_LEN)
-
-#define WLAN_BEACON_FR_MAXLEN       WLAN_A3FR_MAXLEN
-#define WLAN_ATIM_FR_MAXLEN         (WLAN_HDR_ADDR3_LEN + 0)
-#define WLAN_NULLDATA_FR_MAXLEN     (WLAN_HDR_ADDR3_LEN + 0)
-#define WLAN_DISASSOC_FR_MAXLEN     (WLAN_HDR_ADDR3_LEN + 2)
-#define WLAN_ASSOCREQ_FR_MAXLEN     WLAN_A3FR_MAXLEN
-#define WLAN_ASSOCRESP_FR_MAXLEN    WLAN_A3FR_MAXLEN
-#define WLAN_REASSOCREQ_FR_MAXLEN   WLAN_A3FR_MAXLEN
-#define WLAN_REASSOCRESP_FR_MAXLEN  WLAN_A3FR_MAXLEN
-#define WLAN_PROBEREQ_FR_MAXLEN     WLAN_A3FR_MAXLEN
-#define WLAN_PROBERESP_FR_MAXLEN    WLAN_A3FR_MAXLEN
-#define WLAN_AUTHEN_FR_MAXLEN       WLAN_A3FR_MAXLEN
-#define WLAN_DEAUTHEN_FR_MAXLEN     (WLAN_HDR_ADDR3_LEN + 2)
-
-#define WLAN_WEP_NKEYS              4
-#define WLAN_WEP40_KEYLEN           5
-#define WLAN_WEP104_KEYLEN          13
-#define WLAN_WEP232_KEYLEN          29
-#define WLAN_WEPMAX_KEYLEN          32
-#define WLAN_CHALLENGE_IE_MAXLEN    255
-#define WLAN_CHALLENGE_IE_LEN       130
-#define WLAN_CHALLENGE_LEN          128
-#define WLAN_WEP_IV_LEN             4
-#define WLAN_WEP_ICV_LEN            4
-#define WLAN_FRAGS_MAX              16
-
-/* Frame Type */
-#define WLAN_TYPE_MGR 0x00
-#define WLAN_TYPE_CTL  0x01
-#define WLAN_TYPE_DATA 0x02
-
-#define WLAN_FTYPE_MGMT 0x00
-#define WLAN_FTYPE_CTL  0x01
-#define WLAN_FTYPE_DATA 0x02
-
-/* Frame Subtypes */
-#define WLAN_FSTYPE_ASSOCREQ        0x00
-#define WLAN_FSTYPE_ASSOCRESP       0x01
-#define WLAN_FSTYPE_REASSOCREQ      0x02
-#define WLAN_FSTYPE_REASSOCRESP     0x03
-#define WLAN_FSTYPE_PROBEREQ        0x04
-#define WLAN_FSTYPE_PROBERESP       0x05
-#define WLAN_FSTYPE_BEACON          0x08
-#define WLAN_FSTYPE_ATIM            0x09
-#define WLAN_FSTYPE_DISASSOC        0x0a
-#define WLAN_FSTYPE_AUTHEN          0x0b
-#define WLAN_FSTYPE_DEAUTHEN        0x0c
-#define WLAN_FSTYPE_ACTION          0x0d
-
-/* Control */
-#define WLAN_FSTYPE_PSPOLL          0x0a
-#define WLAN_FSTYPE_RTS             0x0b
-#define WLAN_FSTYPE_CTS             0x0c
-#define WLAN_FSTYPE_ACK             0x0d
-#define WLAN_FSTYPE_CFEND           0x0e
-#define WLAN_FSTYPE_CFENDCFACK      0x0f
-
-/* Data */
-#define WLAN_FSTYPE_DATAONLY        0x00
-#define WLAN_FSTYPE_DATA_CFACK      0x01
-#define WLAN_FSTYPE_DATA_CFPOLL     0x02
-#define WLAN_FSTYPE_DATA_CFACK_CFPOLL   0x03
-#define WLAN_FSTYPE_NULL            0x04
-#define WLAN_FSTYPE_CFACK           0x05
-#define WLAN_FSTYPE_CFPOLL          0x06
-#define WLAN_FSTYPE_CFACK_CFPOLL    0x07
-
-#ifdef __BIG_ENDIAN
-
-/* GET & SET Frame Control bit */
-#define WLAN_GET_FC_PRVER(n)    (((u16)(n) >> 8) & (BIT0 | BIT1))
-#define WLAN_GET_FC_FTYPE(n)    ((((u16)(n) >> 8) & (BIT2 | BIT3)) >> 2)
-#define WLAN_GET_FC_FSTYPE(n)   ((((u16)(n) >> 8) \
-				  & (BIT4|BIT5|BIT6|BIT7)) >> 4)
-#define WLAN_GET_FC_TODS(n)     ((((u16)(n) << 8) & (BIT8)) >> 8)
-#define WLAN_GET_FC_FROMDS(n)   ((((u16)(n) << 8) & (BIT9)) >> 9)
-#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n) << 8) & (BIT10)) >> 10)
-#define WLAN_GET_FC_RETRY(n)    ((((u16)(n) << 8) & (BIT11)) >> 11)
-#define WLAN_GET_FC_PWRMGT(n)   ((((u16)(n) << 8) & (BIT12)) >> 12)
-#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n) << 8) & (BIT13)) >> 13)
-#define WLAN_GET_FC_ISWEP(n)    ((((u16)(n) << 8) & (BIT14)) >> 14)
-#define WLAN_GET_FC_ORDER(n)    ((((u16)(n) << 8) & (BIT15)) >> 15)
-
-/* Sequence Field bit */
-#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3))
-#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n) >> 8) \
-				 & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
-
-/* Capability Field bit */
-#define WLAN_GET_CAP_INFO_ESS(n)           (((n) >> 8) & BIT0)
-#define WLAN_GET_CAP_INFO_IBSS(n)          ((((n) >> 8) & BIT1) >> 1)
-#define WLAN_GET_CAP_INFO_CFPOLLABLE(n)    ((((n) >> 8) & BIT2) >> 2)
-#define WLAN_GET_CAP_INFO_CFPOLLREQ(n)     ((((n) >> 8) & BIT3) >> 3)
-#define WLAN_GET_CAP_INFO_PRIVACY(n)       ((((n) >> 8) & BIT4) >> 4)
-#define WLAN_GET_CAP_INFO_SHORTPREAMBLE(n) ((((n) >> 8) & BIT5) >> 5)
-#define WLAN_GET_CAP_INFO_PBCC(n)          ((((n) >> 8) & BIT6) >> 6)
-#define WLAN_GET_CAP_INFO_AGILITY(n)       ((((n) >> 8) & BIT7) >> 7)
-#define WLAN_GET_CAP_INFO_SPECTRUMMNG(n)   ((((n))      & BIT8) >> 10)
-#define WLAN_GET_CAP_INFO_SHORTSLOTTIME(n) ((((n))      & BIT10) >> 10)
-#define WLAN_GET_CAP_INFO_DSSSOFDM(n)      ((((n))      & BIT13) >> 13)
-#define WLAN_GET_CAP_INFO_GRPACK(n)        ((((n))      & BIT14) >> 14)
-
-#else
-
-/* GET & SET Frame Control bit */
-#define WLAN_GET_FC_PRVER(n)    (((u16)(n)) & (BIT0 | BIT1))
-#define WLAN_GET_FC_FTYPE(n)    ((((u16)(n)) & (BIT2 | BIT3)) >> 2)
-#define WLAN_GET_FC_FSTYPE(n)   ((((u16)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
-#define WLAN_GET_FC_TODS(n)     ((((u16)(n)) & (BIT8)) >> 8)
-#define WLAN_GET_FC_FROMDS(n)   ((((u16)(n)) & (BIT9)) >> 9)
-#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT10)) >> 10)
-#define WLAN_GET_FC_RETRY(n)    ((((u16)(n)) & (BIT11)) >> 11)
-#define WLAN_GET_FC_PWRMGT(n)   ((((u16)(n)) & (BIT12)) >> 12)
-#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT13)) >> 13)
-#define WLAN_GET_FC_ISWEP(n)    ((((u16)(n)) & (BIT14)) >> 14)
-#define WLAN_GET_FC_ORDER(n)    ((((u16)(n)) & (BIT15)) >> 15)
-
-/* Sequence Field bit */
-#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT0|BIT1|BIT2|BIT3))
-#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
-
-/* Capability Field bit */
-#define WLAN_GET_CAP_INFO_ESS(n)           ((n) & BIT0)
-#define WLAN_GET_CAP_INFO_IBSS(n)          (((n) & BIT1) >> 1)
-#define WLAN_GET_CAP_INFO_CFPOLLABLE(n)    (((n) & BIT2) >> 2)
-#define WLAN_GET_CAP_INFO_CFPOLLREQ(n)     (((n) & BIT3) >> 3)
-#define WLAN_GET_CAP_INFO_PRIVACY(n)       (((n) & BIT4) >> 4)
-#define WLAN_GET_CAP_INFO_SHORTPREAMBLE(n) (((n) & BIT5) >> 5)
-#define WLAN_GET_CAP_INFO_PBCC(n)          (((n) & BIT6) >> 6)
-#define WLAN_GET_CAP_INFO_AGILITY(n)       (((n) & BIT7) >> 7)
-#define WLAN_GET_CAP_INFO_SPECTRUMMNG(n)   (((n) & BIT8) >> 10)
-#define WLAN_GET_CAP_INFO_SHORTSLOTTIME(n) (((n) & BIT10) >> 10)
-#define WLAN_GET_CAP_INFO_DSSSOFDM(n)      (((n) & BIT13) >> 13)
-#define WLAN_GET_CAP_INFO_GRPACK(n)        (((n) & BIT14) >> 14)
-
-#endif /* #ifdef __BIG_ENDIAN */
-
-#define WLAN_SET_CAP_INFO_ESS(n)           (n)
-#define WLAN_SET_CAP_INFO_IBSS(n)          ((n) << 1)
-#define WLAN_SET_CAP_INFO_CFPOLLABLE(n)    ((n) << 2)
-#define WLAN_SET_CAP_INFO_CFPOLLREQ(n)     ((n) << 3)
-#define WLAN_SET_CAP_INFO_PRIVACY(n)       ((n) << 4)
-#define WLAN_SET_CAP_INFO_SHORTPREAMBLE(n) ((n) << 5)
-#define WLAN_SET_CAP_INFO_SPECTRUMMNG(n)   ((n) << 8)
-#define WLAN_SET_CAP_INFO_PBCC(n)          ((n) << 6)
-#define WLAN_SET_CAP_INFO_AGILITY(n)       ((n) << 7)
-#define WLAN_SET_CAP_INFO_SHORTSLOTTIME(n) ((n) << 10)
-#define WLAN_SET_CAP_INFO_DSSSOFDM(n)      ((n) << 13)
-#define WLAN_SET_CAP_INFO_GRPACK(n)        ((n) << 14)
-
-#define WLAN_SET_FC_PRVER(n)    ((u16)(n))
-#define WLAN_SET_FC_FTYPE(n)    (((u16)(n)) << 2)
-#define WLAN_SET_FC_FSTYPE(n)   (((u16)(n)) << 4)
-#define WLAN_SET_FC_TODS(n)     (((u16)(n)) << 8)
-#define WLAN_SET_FC_FROMDS(n)   (((u16)(n)) << 9)
-#define WLAN_SET_FC_MOREFRAG(n) (((u16)(n)) << 10)
-#define WLAN_SET_FC_RETRY(n)    (((u16)(n)) << 11)
-#define WLAN_SET_FC_PWRMGT(n)   (((u16)(n)) << 12)
-#define WLAN_SET_FC_MOREDATA(n) (((u16)(n)) << 13)
-#define WLAN_SET_FC_ISWEP(n)    (((u16)(n)) << 14)
-#define WLAN_SET_FC_ORDER(n)    (((u16)(n)) << 15)
-
-#define WLAN_SET_SEQ_FRGNUM(n) ((u16)(n))
-#define WLAN_SET_SEQ_SEQNUM(n) (((u16)(n)) << 4)
-
-/* ERP Field bit */
-
-#define WLAN_GET_ERP_NONERP_PRESENT(n)     ((n) & BIT0)
-#define WLAN_GET_ERP_USE_PROTECTION(n)     (((n) & BIT1) >> 1)
-#define WLAN_GET_ERP_BARKER_MODE(n)        (((n) & BIT2) >> 2)
-
-#define WLAN_SET_ERP_NONERP_PRESENT(n)     (n)
-#define WLAN_SET_ERP_USE_PROTECTION(n)     ((n) << 1)
-#define WLAN_SET_ERP_BARKER_MODE(n)        ((n) << 2)
-
-/* Support & Basic Rates field */
-#define WLAN_MGMT_IS_BASICRATE(b)    ((b) & BIT7)
-#define WLAN_MGMT_GET_RATE(b)        ((b) & ~BIT7)
-
-/* TIM field */
-#define WLAN_MGMT_IS_MULTICAST_TIM(b)   ((b) & BIT0)
-#define WLAN_MGMT_GET_TIM_OFFSET(b)     (((b) & ~BIT0) >> 1)
-
-/* 3-Addr & 4-Addr */
-#define WLAN_HDR_A3_DATA_PTR(p) (((u8 *)(p)) + WLAN_HDR_ADDR3_LEN)
-#define WLAN_HDR_A4_DATA_PTR(p) (((u8 *)(p)) + WLAN_HDR_ADDR4_LEN)
-
-/* IEEE ADDR */
-#define IEEE_ADDR_UNIVERSAL         0x02
-#define IEEE_ADDR_GROUP             0x01
-
-typedef struct {
-    u8            abyAddr[6];
-} IEEE_ADDR, *PIEEE_ADDR;
-
-/* 802.11 Header Format */
-
-typedef struct tagWLAN_80211HDR_A2 {
-
-    u16    wFrameCtl;
-    u16    wDurationID;
-    u8    abyAddr1[WLAN_ADDR_LEN];
-    u8    abyAddr2[WLAN_ADDR_LEN];
-
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A2, *PWLAN_80211HDR_A2;
-
-typedef struct tagWLAN_80211HDR_A3 {
-
-    u16    wFrameCtl;
-    u16    wDurationID;
-    u8    abyAddr1[WLAN_ADDR_LEN];
-    u8    abyAddr2[WLAN_ADDR_LEN];
-    u8    abyAddr3[WLAN_ADDR_LEN];
-    u16    wSeqCtl;
-
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A3, *PWLAN_80211HDR_A3;
-
-typedef struct tagWLAN_80211HDR_A4 {
-
-    u16    wFrameCtl;
-    u16    wDurationID;
-    u8    abyAddr1[WLAN_ADDR_LEN];
-    u8    abyAddr2[WLAN_ADDR_LEN];
-    u8    abyAddr3[WLAN_ADDR_LEN];
-    u16    wSeqCtl;
-    u8    abyAddr4[WLAN_ADDR_LEN];
-
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A4, *PWLAN_80211HDR_A4;
-
-typedef union tagUWLAN_80211HDR {
-
-    WLAN_80211HDR_A2        sA2;
-    WLAN_80211HDR_A3        sA3;
-    WLAN_80211HDR_A4        sA4;
-
-} UWLAN_80211HDR, *PUWLAN_80211HDR;
-
-#endif /* __80211HDR_H__ */
drivers/staging/vt6656/device.h +0 -3
index 2f9009b..d9fc32c 100644
@@ -73,7 +73,6 @@
  * device specific
  */
 
-#include "80211hdr.h"
 #include "wcmd.h"
 #include "desc.h"
 #include "key.h"
@@ -603,11 +602,9 @@ struct vnt_private {
 	NDIS_802_11_WEP_STATUS eOldEncryptionStatus;
 	u32 dwIVCounter;
 
-	u8 abyPRNG[WLAN_WEPMAX_KEYLEN+3];
 	u8 byKeyIndex;
 
 	u32 uKeyLength;
-	u8 abyKey[WLAN_WEP232_KEYLEN];
 	unsigned long key_entry_inuse;
 
 	/* for AP mode */
drivers/staging/vt6656/mac.c +0 -1
index 27fad2e..641d77b 100644
@@ -32,7 +32,6 @@
 
 #include "desc.h"
 #include "mac.h"
-#include "80211hdr.h"
 #include "usbpipe.h"
 
 /*
drivers/staging/vt6656/wcmd.c +0 -2
index 7c81034..b62726f 100644
@@ -41,7 +41,6 @@
 #include "device.h"
 #include "mac.h"
 #include "card.h"
-#include "80211hdr.h"
 #include "wcmd.h"
 #include "power.h"
 #include "baseband.h"
@@ -237,7 +236,6 @@ int bScheduleCommand(struct vnt_private *pDevice,
 		return false;
 	pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand;
 	pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true;
-	memset(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, 0 , WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
 	if (pbyItem0 != NULL) {
 		switch (eCommand) {
 		case WLAN_CMD_RADIO:
drivers/staging/vt6656/wcmd.h +0 -2
index 91351c6..1e5b739 100644
@@ -29,7 +29,6 @@
 #ifndef __WCMD_H__
 #define __WCMD_H__
 
-#include "80211hdr.h"
 #include "device.h"
 
 #define AUTHENTICATE_TIMEOUT   1000 //ms
@@ -70,7 +69,6 @@ typedef enum tagCMD_STATUS {
 
 typedef struct tagCMD_ITEM {
     CMD_CODE eCmd;
-    u8     abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
     bool     bNeedRadioOFF;
     bool     bRadioCmd;
     bool     bForceSCAN;
Signature · 1 line
1.9.1
#31 lore raw

PATCH 31/34 staging: vt6656: device_init_registers remove unused variables

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/main_usb.c | 14 --------------
 1 file changed, 14 deletions(-)
drivers/staging/vt6656/main_usb.c +0 -14
index 5ce0caa..6479ced 100644
@@ -241,10 +241,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 {
 	struct vnt_cmd_card_init *init_cmd = &pDevice->init_command;
 	struct vnt_rsp_card_init *init_rsp = &pDevice->init_response;
-	u8 abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-	u8 abySNAP_RFC1042[ETH_ALEN] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
-	u8 abySNAP_Bridgetunnel[ETH_ALEN]
-		= {0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8};
 	u8 byAntenna;
 	int ii;
 	int ntStatus = STATUS_SUCCESS;
@@ -254,10 +250,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "---->INIbInitAdapter. [%d][%d]\n",
 				DEVICE_INIT_COLD, pDevice->byPacketType);
 
-	memcpy(pDevice->abyBroadcastAddr, abyBroadcastAddr, ETH_ALEN);
-	memcpy(pDevice->abySNAP_RFC1042, abySNAP_RFC1042, ETH_ALEN);
-	memcpy(pDevice->abySNAP_Bridgetunnel, abySNAP_Bridgetunnel, ETH_ALEN);
-
 	if (!vnt_check_firmware_version(pDevice)) {
 		if (vnt_download_firmware(pDevice) == true) {
 			if (vnt_firmware_branch_to_sram(pDevice) == false) {
@@ -412,14 +404,8 @@ static int device_init_registers(struct vnt_private *pDevice)
 	pDevice->byAutoFBCtrl = AUTO_FB_0;
 
 	/* default Auto Mode */
-	/* pDevice->NetworkType = Ndis802_11Automode; */
-	pDevice->eConfigPHYMode = PHY_TYPE_AUTO;
 	pDevice->byBBType = BB_TYPE_11G;
 
-	/* get channel range */
-	pDevice->byMinChannel = 1;
-	pDevice->byMaxChannel = CB_MAX_CHANNEL;
-
 	/* get RFType */
 	pDevice->byRFType = init_rsp->rf_type;
 
Signature · 1 line
1.9.1
#32 lore raw

PATCH 32/34 staging: vt6656: dead code remove variables device_set_options

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/main_usb.c | 23 -----------------------
 1 file changed, 23 deletions(-)
drivers/staging/vt6656/main_usb.c +0 -23
index 6479ced..b49effa 100644
@@ -206,27 +206,12 @@ static void usb_device_reset(struct vnt_private *pDevice);
 
 static void
 device_set_options(struct vnt_private *pDevice) {
-
-    u8    abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-    u8    abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
-    u8 abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
-
-    memcpy(pDevice->abyBroadcastAddr, abyBroadcastAddr, ETH_ALEN);
-    memcpy(pDevice->abySNAP_RFC1042, abySNAP_RFC1042, ETH_ALEN);
-    memcpy(pDevice->abySNAP_Bridgetunnel, abySNAP_Bridgetunnel, ETH_ALEN);
-
     pDevice->cbTD = TX_DESC_DEF0;
     pDevice->cbRD = RX_DESC_DEF0;
     pDevice->uChannel = CHANNEL_DEF;
-    pDevice->wRTSThreshold = RTS_THRESH_DEF;
-    pDevice->wFragmentationThreshold = FRAG_THRESH_DEF;
     pDevice->byShortRetryLimit = SHORT_RETRY_DEF;
     pDevice->byLongRetryLimit = LONG_RETRY_DEF;
-    pDevice->byShortPreamble = PREAMBLE_TYPE_DEF;
-    pDevice->b11hEnable = X80211h_MODE_DEF;
     pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED;
-    pDevice->uConnectionRate = DATA_RATE_DEF;
-    if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = true;
     pDevice->byBBType = BBP_TYPE_DEF;
     pDevice->byPacketType = pDevice->byBBType;
     pDevice->byAutoFBCtrl = AUTO_FB_0;
@@ -306,14 +291,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 	/* only used in 11g type, sync with ERP IE */
 	pDevice->bNonERPPresent = false;
 	pDevice->bBarkerPreambleMd = false;
-	if (pDevice->bFixRate) {
-		pDevice->wCurrentRate = (u16)pDevice->uConnectionRate;
-	} else {
-		if (pDevice->byBBType == BB_TYPE_11B)
-			pDevice->wCurrentRate = RATE_11M;
-		else
-			pDevice->wCurrentRate = RATE_54M;
-	}
 
 	pDevice->byTopOFDMBasicRate = RATE_24M;
 	pDevice->byTopCCKBasicRate = RATE_1M;
Signature · 1 line
1.9.1
#33 lore raw

PATCH 33/34 staging: vt6656: device.h remove dead strutures and variables

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/device.h   | 220 --------------------------------------
 drivers/staging/vt6656/main_usb.c |   6 --
 drivers/staging/vt6656/usbpipe.c  |   2 -
 3 files changed, 228 deletions(-)
drivers/staging/vt6656/device.h +0 -220
index d9fc32c..9d4c5e7 100644
@@ -188,14 +188,7 @@
 /* USB registers */
 #define USB_REG4			0x604
 
-#ifndef RUN_AT
-#define RUN_AT(x)                       (jiffies+(x))
-#endif
-
-#define PRIVATE_Message                 0
-
 #define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); }
-#define PRINT_K(p, args...) { if (PRIVATE_Message) printk(p, ##args); }
 
 typedef enum __device_msg_level {
 	MSG_LEVEL_ERR = 0,            /* Errors causing abnormal operation */
@@ -266,16 +259,6 @@ struct vnt_tx_pkt_info {
 	u8 dest_addr[ETH_ALEN];
 };
 
-/* structure got from configuration file as user-desired default settings */
-typedef struct _DEFAULT_CONFIG {
-	signed int    ZoneType;
-	signed int    eConfigMode;
-	signed int    eAuthenMode;        /* open/wep/wpa */
-	signed int    bShareKeyAlgorithm; /* open-open/{open,wep}-sharekey */
-	signed int    keyidx;             /* wepkey index */
-	signed int    eEncryptionStatus;
-} DEFAULT_CONFIG, *PDEFAULT_CONFIG;
-
 /*
  * Structure to keep track of USB interrupt packets
  */
@@ -293,69 +276,6 @@ typedef enum __DEVICE_NDIS_STATUS {
     STATUS_PENDING,
 } DEVICE_NDIS_STATUS, *PDEVICE_NDIS_STATUS;
 
-#define MAX_BSSIDINFO_4_PMKID   16
-#define MAX_PMKIDLIST           5
-/* flags for PMKID Candidate list structure */
-#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED	0x01
-
-/* PMKID Structures */
-typedef unsigned char   NDIS_802_11_PMKID_VALUE[16];
-
-typedef enum _NDIS_802_11_WEP_STATUS
-{
-    Ndis802_11WEPEnabled,
-    Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
-    Ndis802_11WEPDisabled,
-    Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
-    Ndis802_11WEPKeyAbsent,
-    Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
-    Ndis802_11WEPNotSupported,
-    Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
-    Ndis802_11Encryption2Enabled,
-    Ndis802_11Encryption2KeyAbsent,
-    Ndis802_11Encryption3Enabled,
-    Ndis802_11Encryption3KeyAbsent
-} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
-  NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
-
-typedef enum _NDIS_802_11_STATUS_TYPE
-{
-	Ndis802_11StatusType_Authentication,
-	Ndis802_11StatusType_MediaStreamMode,
-	Ndis802_11StatusType_PMKID_CandidateList,
-	Ndis802_11StatusTypeMax, /* not a real type, defined as upper bound */
-} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
-
-/* The receive duplicate detection cache entry */
-typedef struct tagSCacheEntry{
-	__le16 wFmSequence;
-	u8 abyAddr2[ETH_ALEN];
-	__le16 wFrameCtl;
-} SCacheEntry, *PSCacheEntry;
-
-typedef struct tagSCache{
-/* The receive cache is updated circularly.  The next entry to be written is
- * indexed by the "InPtr".
- */
-	unsigned int uInPtr; /* Place to use next */
-    SCacheEntry     asCacheEntry[DUPLICATE_RX_CACHE_LENGTH];
-} SCache, *PSCache;
-
-#define CB_MAX_RX_FRAG                 64
-/*
- * DeFragment Control Block, used for collecting fragments prior to reassembly
- */
-typedef struct tagSDeFragControlBlock
-{
-    u16            wSequence;
-    u16            wFragNum;
-    u8            abyAddr2[ETH_ALEN];
-	unsigned int            uLifetime;
-    struct sk_buff* skb;
-    u8 *           pbyRxBuffer;
-    unsigned int            cbFrameLength;
-    bool            bInUse;
-} SDeFragControlBlock, *PSDeFragControlBlock;
 
 /* flags for options */
 #define     DEVICE_FLAGS_UNPLUG          0x00000001UL
@@ -363,20 +283,6 @@ typedef struct tagSDeFragControlBlock
 /* flags for driver status */
 #define     DEVICE_FLAGS_OPENED          0x00010000UL
 
-typedef struct __device_opt {
-	int nRxDescs0;  /* number of RX descriptors 0 */
-	int nTxDescs0;  /* number of TX descriptors 0, 1, 2, 3 */
-	int rts_thresh; /* RTS threshold */
-    int         frag_thresh;
-    int         OpMode;
-    int         data_rate;
-    int         channel_num;
-    int         short_retry;
-    int         long_retry;
-    int         bbp_type;
-    u32         flags;
-} OPTIONS, *POPTIONS;
-
 struct vnt_private {
 	/* mac80211 */
 	struct ieee80211_hw *hw;
@@ -384,37 +290,22 @@ struct vnt_private {
 	u8 mac_hw;
 	/* netdev */
 	struct usb_device *usb;
-	struct net_device *dev;
 	struct net_device_stats stats;
 
-	OPTIONS sOpts;
-
 	struct work_struct read_work_item;
-	struct work_struct rx_mng_work_item;
 
 	u64 tsf_time;
 	u8 rx_rate;
 
 	u32 rx_buf_sz;
 	int mc_list_count;
-	int multicast_limit;
-	u8 byRxMode;
 
 	spinlock_t lock;
 	struct mutex usb_lock;
 
-	u32 rx_bytes;
-
 	u32 flags;
 	unsigned long Flags;
 
-	SCache sDupRxCache;
-
-	SDeFragControlBlock sRxDFCB[CB_MAX_RX_FRAG];
-	u32 cbDFCB;
-	u32 cbFreeDFCB;
-	u32 uCurrentDFCBIdx;
-
 	/* USB */
 	struct urb *pInterruptURB;
 	u32 int_interval;
@@ -428,8 +319,6 @@ struct vnt_private {
 	u32 NumRecvFreeList;
 
 	int bIsRxWorkItemQueued;
-	int bIsRxMngWorkItemQueued;
-	unsigned long ulRcvRefCount; /* packets that have not returned back */
 
 	/* Variables to track resources for the BULK Out Pipe */
 	struct vnt_usb_send_context *apTD[CB_MAX_TX_DESC];
@@ -439,9 +328,6 @@ struct vnt_private {
 	/* Variables to track resources for the Interrupt In Pipe */
 	struct vnt_interrupt_buffer int_buf;
 
-	/* default config from file by user setting */
-	DEFAULT_CONFIG config_file;
-
 	/* Version control */
 	u16 wFirmwareVersion;
 	u8 byLocalID;
@@ -450,7 +336,6 @@ struct vnt_private {
 
 	u8 byZoneType;
 
-	int bLinkPass; /* link status: OK or fail */
 	struct vnt_cmd_card_init init_command;
 	struct vnt_rsp_card_init init_response;
 	u8 abyCurrentNetAddr[ETH_ALEN];
@@ -458,17 +343,10 @@ struct vnt_private {
 
 	int bExistSWNetAddr;
 
-	/* Maintain statistical debug info. */
-	unsigned long SendContextsInUse;
-	unsigned long RcvBuffersInUse;
-
 	u64 qwCurrTSF;
-	u32 cbBulkInMax;
-	int bPSRxBeacon;
 
 	/* 802.11 MAC specific */
 	u32 uCurrRSSI;
-	u8 byCurrSQ;
 
 	/* Antenna Diversity */
 	int bTxRxAntInv;
@@ -488,13 +366,6 @@ struct vnt_private {
 	u32 uCwMin; /* Current CwMin */
 	u32 uCwMax; /* CwMax is fixed on 1023 */
 
-	/* PHY parameter */
-	u8  bySIFS;
-	u8  byDIFS;
-	u8  byEIFS;
-	u8  bySlot;
-	u8  byCWMaxMin;
-
 	/* Rate */
 	u8 byBBType; /* 0: 11A, 1:11B, 2:11G */
 	u8 byPacketType; /* 0:11a 1:11b 2:11gb 3:11ga */
@@ -504,14 +375,7 @@ struct vnt_private {
 
 	u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE];  /*u32 alignment */
 
-	u8 byMinChannel;
-	u8 byMaxChannel;
-	u32 uConnectionRate;
-
 	u8 byPreambleType;
-	u8 byShortPreamble;
-	/* CARD_PHY_TYPE */
-	u8 eConfigPHYMode;
 
 	/* For RF Power table */
 	u8 byCCKPwr;
@@ -526,57 +390,28 @@ struct vnt_private {
 	u16 tx_rate_fb0;
 	u16 tx_rate_fb1;
 
-	u16 wRTSThreshold;
-	u16 wFragmentationThreshold;
 	u8 byShortRetryLimit;
 	u8 byLongRetryLimit;
 
 	enum nl80211_iftype op_mode;
 
-	int bBSSIDFilter;
-	u8 abyBSSID[ETH_ALEN];
-	u8 abyDesireBSSID[ETH_ALEN];
-
-	u32 dwMaxReceiveLifetime;  /* dot11MaxReceiveLifetime */
-
-	int bEncryptionEnable;
 	int bShortSlotTime;
-	int bProtectMode;
-	int bNonERPPresent;
 	int bBarkerPreambleMd;
 
-	u8 byERPFlag;
-	u16 wUseProtectCntDown;
-
 	int bRadioControlOff;
 	int bRadioOff;
 
 	/* Power save */
 	u16 current_aid;
-	u16 wListenInterval;
-	int bPWBitOn;
-
-	unsigned long ulPSModeWaitTx;
-	int bPSModeTxBurst;
 
 	/* Beacon releated */
 	u16 wSeqCounter;
-	int bBeaconBufReady;
-	int bBeaconSent;
-	int bFixRate;
-	u8 byCurrentCh;
 
 	CMD_STATE eCommandState;
 
 	CMD_CODE eCommand;
-	int bBeaconTx;
-	u8 byScanBBType;
 
-	int bStopBeacon;
 	int bStopDataPkt;
-	int bStopTx0Pkt;
-	u32 uAutoReConnectTime;
-	u32 uIsroamingTime;
 
 	/* 802.11 counter */
 
@@ -588,37 +423,10 @@ struct vnt_private {
 	int bCmdClear;
 	int bNeedRadioOFF;
 
-	int bEnableRoaming;
-	int bIsRoaming;
-	int bFastRoaming;
-	u8 bSameBSSMaxNum;
-	u8 bSameBSSCurNum;
-	int bRoaming;
-	int b11hEable;
-
-	/* Encryption */
-	NDIS_802_11_WEP_STATUS eEncryptionStatus;
-	int  bTransmitKey;
-	NDIS_802_11_WEP_STATUS eOldEncryptionStatus;
-	u32 dwIVCounter;
-
-	u8 byKeyIndex;
-
-	u32 uKeyLength;
 	unsigned long key_entry_inuse;
 
-	/* for AP mode */
-	u32 uAssocCount;
-	int bMoreData;
-
-	/* QoS */
-	int bGrpAckPolicy;
-
 	u8 byAutoFBCtrl;
 
-	int bTxMICFail;
-	int bRxMICFail;
-
 	/* For Update BaseBand VGA Gain Offset */
 	u32 uBBVGADiffCount;
 	u8 byBBVGANew;
@@ -633,42 +441,14 @@ struct vnt_private {
 
 	/* command timer */
 	struct delayed_work run_command_work;
-	/* One second callback */
-	struct delayed_work second_callback_work;
 
 	u8 tx_data_time_out;
-	bool tx_trigger;
-	int fWPA_Authened; /*is WPA/WPA-PSK or WPA2/WPA2-PSK authen?? */
-	u8 byReAssocCount;
-	u8 byLinkWaitCount;
-
-	struct ethhdr sTxEthHeader;
-	struct ethhdr sRxEthHeader;
-	u8 abyBroadcastAddr[ETH_ALEN];
-	u8 abySNAP_RFC1042[ETH_ALEN];
-	u8 abySNAP_Bridgetunnel[ETH_ALEN];
-
-	/* for 802.11h */
-	int b11hEnable;
 
 	int bChannelSwitch;
 	u8 byNewChannel;
 	u8 byChannelSwitchCount;
 
-	/* WPA supplicant daemon */
-	int bWPADEVUp;
-	int bwextstep0;
-	int bwextstep1;
-	int bwextstep2;
-	int bwextstep3;
-	int bWPASuppWextEnabled;
-
-	u32 uChannel;
-
 	struct iw_statistics wstats; /* wireless stats */
-
-	int bCommit;
-
 };
 
 #define EnqueueRCB(_Head, _Tail, _RCB)                  \
drivers/staging/vt6656/main_usb.c +0 -6
index b49effa..86d9470 100644
@@ -208,7 +208,6 @@ static void
 device_set_options(struct vnt_private *pDevice) {
     pDevice->cbTD = TX_DESC_DEF0;
     pDevice->cbRD = RX_DESC_DEF0;
-    pDevice->uChannel = CHANNEL_DEF;
     pDevice->byShortRetryLimit = SHORT_RETRY_DEF;
     pDevice->byLongRetryLimit = LONG_RETRY_DEF;
     pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED;
@@ -287,11 +286,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 
 	/* do MACbSoftwareReset in MACvInitialize */
 
-	pDevice->bProtectMode = false;
-	/* only used in 11g type, sync with ERP IE */
-	pDevice->bNonERPPresent = false;
-	pDevice->bBarkerPreambleMd = false;
-
 	pDevice->byTopOFDMBasicRate = RATE_24M;
 	pDevice->byTopCCKBasicRate = RATE_1M;
 
drivers/staging/vt6656/usbpipe.c +0 -2
index fd8776c..6a7e692 100644
@@ -338,8 +338,6 @@ int PIPEnsSendBulkOut(struct vnt_private *priv,
 	int status;
 	struct urb *urb;
 
-	priv->bPWBitOn = false;
-
 	if (!(MP_IS_READY(priv) && priv->Flags & fMP_POST_WRITES)) {
 		context->in_use = false;
 		return STATUS_RESOURCES;
Signature · 1 line
1.9.1
#34 lore raw

PATCH 34/34 staging: vt6656: remove unneeded config and headers

In reply to Malcolm Priestley

Remove WIRELESS_EXT and WEXT_PRIV

remove net/iw_handler.h, linux/etherdevice.h and net/cfg80211.h

---
 drivers/staging/vt6656/Kconfig  | 2 --
 drivers/staging/vt6656/device.h | 3 ---
 2 files changed, 5 deletions(-)
drivers/staging/vt6656/Kconfig +0 -2
index 839db3a..b602ef1 100644
@@ -1,8 +1,6 @@
 config VT6656
 	tristate "VIA Technologies VT6656 support"
 	depends on MAC80211 && USB && WLAN && m
-	select WIRELESS_EXT
-	select WEXT_PRIV
 	select FW_LOADER
 	---help---
 	This is a vendor-written driver for VIA VT6656.
drivers/staging/vt6656/device.h +0 -3
index 9d4c5e7..0bba96f 100644
@@ -35,12 +35,9 @@
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/firmware.h>
-#include <linux/etherdevice.h>
 #include <linux/suspend.h>
 #include <linux/if_arp.h>
 #include <linux/wireless.h>
-#include <net/iw_handler.h>
-#include <net/cfg80211.h>
 #include <linux/timer.h>
 #include <linux/usb.h>
 #include <linux/crc32.h>
Signature · 1 line
1.9.1