summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6655/device_main.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-03-18 20:55:41 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 11:16:17 -0700
commit96d69e201bbdb05c363e899138f9f42bc8ad8f88 (patch)
treef3ba7f8c5436cfbce1617f415febbd681fe78fd4 /drivers/staging/vt6655/device_main.c
parentbda2a44e2a015535f08aecd5c98e263098db9e75 (diff)
staging: vt6655: Remove unnecessary blank lines
Remove a bunch of useless vertical whitespace. Convert 3 or more consecutive newlines to 2. Remove blank lines after open brace and before close brace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/device_main.c')
-rw-r--r--drivers/staging/vt6655/device_main.c163
1 files changed, 0 insertions, 163 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 143d050a5dfb..be4f6c2ca3ff 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -128,7 +128,6 @@ DEVICE_PARAM(TxDescriptors0, "Number of transmit descriptors0");
#define TX_DESC_DEF1 64
DEVICE_PARAM(TxDescriptors1, "Number of transmit descriptors1");
-
#define IP_ALIG_DEF 0
/* IP_byte_align[] is used for IP header unsigned long byte aligned
0: indicate the IP header won't be unsigned long byte aligned.(Default) .
@@ -138,7 +137,6 @@ DEVICE_PARAM(TxDescriptors1, "Number of transmit descriptors1");
*/
DEVICE_PARAM(IP_byte_align, "Enable IP header dword aligned");
-
#define INT_WORKS_DEF 20
#define INT_WORKS_MIN 10
#define INT_WORKS_MAX 64
@@ -151,7 +149,6 @@ DEVICE_PARAM(int_works, "Number of packets per interrupt services");
DEVICE_PARAM(Channel, "Channel number");
-
/* PreambleType[] is the preamble length used for transmit.
0: indicate allows long preamble type
1: indicate allows short preamble type
@@ -161,21 +158,18 @@ DEVICE_PARAM(Channel, "Channel number");
DEVICE_PARAM(PreambleType, "Preamble Type");
-
#define RTS_THRESH_MIN 512
#define RTS_THRESH_MAX 2347
#define RTS_THRESH_DEF 2347
DEVICE_PARAM(RTSThreshold, "RTS threshold");
-
#define FRAG_THRESH_MIN 256
#define FRAG_THRESH_MAX 2346
#define FRAG_THRESH_DEF 2346
DEVICE_PARAM(FragThreshold, "Fragmentation threshold");
-
#define DATA_RATE_MIN 0
#define DATA_RATE_MAX 13
#define DATA_RATE_DEF 13
@@ -208,7 +202,6 @@ DEVICE_PARAM(OPMode, "Infrastruct, adhoc, AP mode ");
2: indicate AP mode used
*/
-
/* PSMode[]
0: indicate disable power saving mode
1: indicate enable power saving mode
@@ -218,22 +211,18 @@ DEVICE_PARAM(OPMode, "Infrastruct, adhoc, AP mode ");
DEVICE_PARAM(PSMode, "Power saving mode");
-
#define SHORT_RETRY_MIN 0
#define SHORT_RETRY_MAX 31
#define SHORT_RETRY_DEF 8
-
DEVICE_PARAM(ShortRetryLimit, "Short frame retry limits");
#define LONG_RETRY_MIN 0
#define LONG_RETRY_MAX 15
#define LONG_RETRY_DEF 4
-
DEVICE_PARAM(LongRetryLimit, "long frame retry limits");
-
/* BasebandType[] baseband type selected
0: indicate 802.11a type
1: indicate 802.11b type
@@ -245,8 +234,6 @@ DEVICE_PARAM(LongRetryLimit, "long frame retry limits");
DEVICE_PARAM(BasebandType, "baseband type");
-
-
/* 80211hEnable[]
0: indicate disable 802.11h
1: indicate enable 802.11h
@@ -265,12 +252,10 @@ DEVICE_PARAM(b80211hEnable, "802.11h mode");
DEVICE_PARAM(bDiversityANTEnable, "ANT diversity mode");
-
//
// Static vars definitions
//
-
static int device_nics = 0;
static PSDevice pDevice_Infos = NULL;
static struct net_device *root_device_dev = NULL;
@@ -288,7 +273,6 @@ DEFINE_PCI_DEVICE_TABLE(vt6655_pci_id_table) = {
/*--------------------- Static Functions --------------------------*/
-
static int vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent);
static void vt6655_init_info(struct pci_dev *pcid, PSDevice *ppDevice, PCHIP_INFO);
static void device_free_info(PSDevice pDevice);
@@ -314,7 +298,6 @@ struct notifier_block device_notifier = {
};
#endif
-
static void device_init_rd0_ring(PSDevice pDevice);
static void device_init_rd1_ring(PSDevice pDevice);
static void device_init_defrag_cb(PSDevice pDevice);
@@ -340,13 +323,10 @@ static void device_free_frag_buf(PSDevice pDevice);
static int Config_FileGetParameter(unsigned char *string,
unsigned char *dest, unsigned char *source);
-
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
-
-
static char *get_chip_name(int chip_id)
{
int i;
@@ -363,7 +343,6 @@ static void vt6655_remove(struct pci_dev *pcid)
if (pDevice == NULL)
return;
device_free_info(pDevice);
-
}
/*
@@ -425,12 +404,10 @@ static void device_get_options(PSDevice pDevice, int index, char *devname)
static void
device_set_options(PSDevice pDevice) {
-
unsigned char abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
unsigned char abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
unsigned char 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);
@@ -460,7 +437,6 @@ device_set_options(PSDevice pDevice) {
pDevice->wCTSDuration = 0;
pDevice->byPreambleType = 0;
-
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " uChannel= %d\n", (int)pDevice->uChannel);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " byOpMode= %d\n", (int)pDevice->byOpMode);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " ePSMode= %d\n", (int)pDevice->ePSMode);
@@ -511,11 +487,8 @@ static void s_vCompleteCurrentMeasure(PSDevice pDevice, unsigned char byResult)
);
CARDbStartMeasure(pDevice, pDevice->pCurrMeasureEID++, pDevice->uNumOfMeasureEIDs);
}
-
}
-
-
//
// Initialisation of MAC & BBP registers
//
@@ -679,7 +652,6 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
// Load power Table
-
for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
pDevice->abyCCKPwrTbl[ii + 1] = SROMbyReadEmbedded(pDevice->PortOffset, (unsigned char)(ii + EEP_OFS_CCK_PWR_TBL));
if (pDevice->abyCCKPwrTbl[ii + 1] == 0) {
@@ -704,7 +676,6 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
}
}
-
// Load OFDM A Power Table
for (ii = 0; ii < CB_MAX_CHANNEL_5G; ii++) { //RobertYu:20041224, bug using CB_MAX_CHANNEL
pDevice->abyOFDMPwrTbl[ii + CB_MAX_CHANNEL_24G + 1] = SROMbyReadEmbedded(pDevice->PortOffset, (unsigned char)(ii + EEP_OFS_OFDMA_PWR_TBL));
@@ -712,14 +683,12 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
}
init_channel_table((void *)pDevice);
-
if (pDevice->byLocalID > REV_ID_VT3253_B1) {
MACvSelectPage1(pDevice->PortOffset);
VNSvOutPortB(pDevice->PortOffset + MAC_REG_MSRCTL + 1, (MSRCTL1_TXPWR | MSRCTL1_CSAPAREN));
MACvSelectPage0(pDevice->PortOffset);
}
-
// use relative tx timeout and 802.11i D4
MACvWordRegBitsOn(pDevice->PortOffset, MAC_REG_CFG, (CFG_TKIPOPT | CFG_NOTXTIMEOUT));
@@ -812,14 +781,9 @@ MACvReceive1(pDevice->PortOffset);
MACvStart(pDevice->PortOffset);
netif_stop_queue(pDevice->dev);
-
-
}
-
-
static void device_init_diversity_timer(PSDevice pDevice) {
-
init_timer(&pDevice->TimerSQ3Tmax1);
pDevice->TimerSQ3Tmax1.data = (unsigned long) pDevice;
pDevice->TimerSQ3Tmax1.function = (TimerFunction)TimerSQ3CallBack;
@@ -838,7 +802,6 @@ static void device_init_diversity_timer(PSDevice pDevice) {
return;
}
-
static bool device_release_WPADEV(PSDevice pDevice)
{
viawget_wpa_header *wpahdr;
@@ -895,7 +858,6 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
return -ENODEV;
}
-
dev = alloc_etherdev(sizeof(DEVICE_INFO));
pDevice = (PSDevice) netdev_priv(dev);
@@ -977,7 +939,6 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
}
#endif
-
#endif
#ifdef DEBUG
@@ -992,9 +953,6 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
return -ENODEV;
}
-
-
-
rc = pci_request_regions(pcid, DEVICE_NAME);
if (rc) {
printk(KERN_ERR DEVICE_NAME ": Failed to find PCI device\n");
@@ -1014,8 +972,6 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
printk("After write: value is %x\n", value);
#endif
-
-
#ifdef IO_MAP
pDevice->PortOffset = pDevice->ioaddr;
#endif
@@ -1054,7 +1010,6 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
device_print_info(pDevice);
pci_set_drvdata(pcid, pDevice);
return 0;
-
}
static void device_print_info(PSDevice pDevice)
@@ -1071,12 +1026,10 @@ static void device_print_info(PSDevice pDevice)
(unsigned long)pDevice->ioaddr, (unsigned long)pDevice->PortOffset);
DBG_PRT(MSG_LEVEL_INFO, KERN_INFO " IRQ=%d \n", pDevice->dev->irq);
#endif
-
}
static void vt6655_init_info(struct pci_dev *pcid, PSDevice *ppDevice,
PCHIP_INFO pChip_info) {
-
PSDevice p;
memset(*ppDevice, 0, sizeof(DEVICE_INFO));
@@ -1100,7 +1053,6 @@ static void vt6655_init_info(struct pci_dev *pcid, PSDevice *ppDevice,
}
static bool device_get_pci_info(PSDevice pDevice, struct pci_dev *pcid) {
-
u16 pci_cmd;
u8 b;
unsigned int cis_addr;
@@ -1209,7 +1161,6 @@ static void device_free_info(PSDevice pDevice) {
static bool device_init_rings(PSDevice pDevice) {
void *vir_pool;
-
/*allocate all RD/TD rings a single pool*/
vir_pool = pci_alloc_consistent(pDevice->pcid,
pDevice->sOpts.nRxDescs0 * sizeof(SRxDesc) +
@@ -1234,7 +1185,6 @@ static bool device_init_rings(PSDevice pDevice) {
pDevice->aRD1Ring = vir_pool +
pDevice->sOpts.nRxDescs0 * sizeof(SRxDesc);
-
pDevice->rd0_pool_dma = pDevice->pool_dma;
pDevice->rd1_pool_dma = pDevice->rd0_pool_dma +
pDevice->sOpts.nRxDescs0 * sizeof(SRxDesc);
@@ -1271,7 +1221,6 @@ static bool device_init_rings(PSDevice pDevice) {
pDevice->td1_pool_dma = pDevice->td0_pool_dma +
pDevice->sOpts.nTxDescs[0] * sizeof(STxDesc);
-
// vir_pool: pvoid type
pDevice->apTD0Rings = vir_pool
+ pDevice->sOpts.nRxDescs0 * sizeof(SRxDesc)
@@ -1282,11 +1231,9 @@ static bool device_init_rings(PSDevice pDevice) {
+ pDevice->sOpts.nRxDescs1 * sizeof(SRxDesc)
+ pDevice->sOpts.nTxDescs[0] * sizeof(STxDesc);
-
pDevice->tx1_bufs = pDevice->tx0_bufs +
pDevice->sOpts.nTxDescs[0] * PKT_BUF_SZ;
-
pDevice->tx_beacon_bufs = pDevice->tx1_bufs +
pDevice->sOpts.nTxDescs[1] * PKT_BUF_SZ;
@@ -1296,16 +1243,13 @@ static bool device_init_rings(PSDevice pDevice) {
pDevice->tx_bufs_dma1 = pDevice->tx_bufs_dma0 +
pDevice->sOpts.nTxDescs[0] * PKT_BUF_SZ;
-
pDevice->tx_beacon_dma = pDevice->tx_bufs_dma1 +
pDevice->sOpts.nTxDescs[1] * PKT_BUF_SZ;
-
return true;
}
static void device_free_rings(PSDevice pDevice) {
-
pci_free_consistent(pDevice->pcid,
pDevice->sOpts.nRxDescs0 * sizeof(SRxDesc) +
pDevice->sOpts.nRxDescs1 * sizeof(SRxDesc) +
@@ -1349,7 +1293,6 @@ static void device_init_rd0_ring(PSDevice pDevice) {
pDevice->pCurrRD[0] = &(pDevice->aRD0Ring[0]);
}
-
static void device_init_rd1_ring(PSDevice pDevice) {
int i;
dma_addr_t curr = pDevice->rd1_pool_dma;
@@ -1374,7 +1317,6 @@ static void device_init_rd1_ring(PSDevice pDevice) {
pDevice->pCurrRD[1] = &(pDevice->aRD1Ring[0]);
}
-
static void device_init_defrag_cb(PSDevice pDevice) {
int i;
PSDeFragControlBlock pDeF;
@@ -1391,9 +1333,6 @@ static void device_init_defrag_cb(PSDevice pDevice) {
pDevice->cbFreeDFCB = pDevice->cbDFCB;
}
-
-
-
static void device_free_rd0_ring(PSDevice pDevice) {
int i;
@@ -1408,13 +1347,11 @@ static void device_free_rd0_ring(PSDevice pDevice) {
kfree((void *)pDesc->pRDInfo);
}
-
}
static void device_free_rd1_ring(PSDevice pDevice) {
int i;
-
for (i = 0; i < pDevice->sOpts.nRxDescs1; i++) {
PSRxDesc pDesc = &(pDevice->aRD1Ring[i]);
PDEVICE_RD_INFO pRDInfo = pDesc->pRDInfo;
@@ -1426,7 +1363,6 @@ static void device_free_rd1_ring(PSDevice pDevice) {
kfree((void *)pDesc->pRDInfo);
}
-
}
static void device_free_frag_buf(PSDevice pDevice) {
@@ -1434,14 +1370,12 @@ static void device_free_frag_buf(PSDevice pDevice) {
int i;
for (i = 0; i < CB_MAX_RX_FRAG; i++) {
-
pDeF = &(pDevice->sRxDFCB[i]);
if (pDeF->skb)
dev_kfree_skb(pDeF->skb);
}
-
}
static void device_init_td0_ring(PSDevice pDevice) {
@@ -1466,7 +1400,6 @@ static void device_init_td0_ring(PSDevice pDevice) {
if (i > 0)
pDevice->apTD0Rings[i-1].next_desc = cpu_to_le32(pDevice->td0_pool_dma);
pDevice->apTailTD[0] = pDevice->apCurrTD[0] = &(pDevice->apTD0Rings[0]);
-
}
static void device_init_td1_ring(PSDevice pDevice) {
@@ -1494,8 +1427,6 @@ static void device_init_td1_ring(PSDevice pDevice) {
pDevice->apTailTD[1] = pDevice->apCurrTD[1] = &(pDevice->apTD1Rings[0]);
}
-
-
static void device_free_td0_ring(PSDevice pDevice) {
int i;
for (i = 0; i < pDevice->sOpts.nTxDescs[0]; i++) {
@@ -1529,18 +1460,14 @@ static void device_free_td1_ring(PSDevice pDevice) {
kfree((void *)pDesc->pTDInfo);
}
-
}
-
-
/*-----------------------------------------------------------------*/
static int device_rx_srv(PSDevice pDevice, unsigned int uIdx) {
PSRxDesc pRD;
int works = 0;
-
for (pRD = pDevice->pCurrRD[uIdx];
pRD->m_rd0RD0.f1Owner == OWNED_BY_HOST;
pRD = pRD->next) {
@@ -1563,12 +1490,9 @@ static int device_rx_srv(PSDevice pDevice, unsigned int uIdx) {
return works;
}
-
static bool device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pRD) {
-
PDEVICE_RD_INFO pRDInfo = pRD->pRDInfo;
-
pRDInfo->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
if (pRDInfo->skb == NULL)
return false;
@@ -1586,10 +1510,7 @@ static bool device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pRD) {
return true;
}
-
-
bool device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF) {
-
pDeF->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
if (pDeF->skb == NULL)
return false;
@@ -1599,8 +1520,6 @@ bool device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF) {
return true;
}
-
-
static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
PSTxDesc pTD;
bool bFull = false;
@@ -1614,9 +1533,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
unsigned int uNodeIndex;
PSMgmtObject pMgmt = pDevice->pMgmt;
-
for (pTD = pDevice->apTailTD[uIdx]; pDevice->iTDUsed[uIdx] > 0; pTD = pTD->next) {
-
if (pTD->m_td0TD0.f1Owner == OWNED_BY_NIC)
break;
if (works++ > 15)
@@ -1627,7 +1544,6 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
//Only the status of first TD in the chain is correct
if (pTD->m_td1TD1.byTCR & TCR_STP) {
-
if ((pTD->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB) != 0) {
uFIFOHeaderSize = pTD->pTDInfo->dwHeaderLength;
uFrameSize = pTD->pTDInfo->dwReqCount - uFIFOHeaderSize;
@@ -1640,7 +1556,6 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
(unsigned char *)(pTD->pTDInfo->buf + uFIFOHeaderSize),
uFrameSize, uIdx);
-
BSSvUpdateNodeTxCounter(pDevice,
byTsr0, byTsr1,
(unsigned char *)(pTD->pTDInfo->buf),
@@ -1714,7 +1629,6 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
}
}
-
if (uIdx == TYPE_AC0DMA) {
// RESERV_AC0DMA reserved for relay
@@ -1727,15 +1641,12 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
}
}
-
pDevice->apTailTD[uIdx] = pTD;
return works;
}
-
static void device_error(PSDevice pDevice, unsigned short status) {
-
if (status & ISR_FETALERR) {
DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
"%s: Hardware fatal error.\n",
@@ -1747,7 +1658,6 @@ static void device_error(PSDevice pDevice, unsigned short status) {
MACbShutdown(pDevice->PortOffset);
return;
}
-
}
static void device_free_tx_buf(PSDevice pDevice, PSTxDesc pDesc) {
@@ -1768,8 +1678,6 @@ static void device_free_tx_buf(PSDevice pDevice, PSTxDesc pDesc) {
pTDInfo->byFlags = 0;
}
-
-
//PLICE_DEBUG ->
void InitRxManagementQueue(PSDevice pDevice)
{
@@ -1778,10 +1686,6 @@ void InitRxManagementQueue(PSDevice pDevice)
}
//PLICE_DEBUG<-
-
-
-
-
//PLICE_DEBUG ->
int MlmeThread(
void *Context)
@@ -1794,7 +1698,6 @@ int MlmeThread(
//i = 0;
#if 1
while (1) {
-
//down(&pDevice->mlme_semaphore);
// pRxMgmtPacket = DeQueue(pDevice);
#if 1
@@ -1817,11 +1720,8 @@ int MlmeThread(
#endif
return 0;
-
}
-
-
static int device_open(struct net_device *dev) {
PSDevice pDevice = (PSDevice)netdev_priv(dev);
int i;
@@ -1854,7 +1754,6 @@ static int device_open(struct net_device *dev) {
device_init_td1_ring(pDevice);
// VNTWIFIvSet11h(pDevice->pMgmt, pDevice->b11hEnable);
-
if (pDevice->bDiversityRegCtlON) {
device_init_diversity_timer(pDevice);
}
@@ -1877,13 +1776,8 @@ static int device_open(struct net_device *dev) {
mlme_kill = 1;
#endif
-
-
//wait_for_completion(&pDevice->notify);
-
-
-
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n");
device_init_registers(pDevice, DEVICE_INIT_COLD);
MACvReadEtherAddress(pDevice->PortOffset, pDevice->abyCurrentNetAddr);
@@ -1935,7 +1829,6 @@ static int device_open(struct net_device *dev) {
return 0;
}
-
static int device_close(struct net_device *dev) {
PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -1990,14 +1883,11 @@ static int device_close(struct net_device *dev) {
return 0;
}
-
-
static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
PSDevice pDevice = netdev_priv(dev);
unsigned char *pbMPDU;
unsigned int cbMPDULen = 0;
-
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211\n");
spin_lock_irq(&pDevice->lock);
@@ -2022,11 +1912,8 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
spin_unlock_irq(&pDevice->lock);
return 0;
-
}
-
-
bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeIndex) {
PSMgmtObject pMgmt = pDevice->pMgmt;
PSTxDesc pHeadTD, pLastTD;
@@ -2040,7 +1927,6 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
SKeyItem STempKey;
// unsigned char byKeyIndex = 0;
-
if (pDevice->bStopTx0Pkt == true) {
dev_kfree_skb_irq(skb);
return false;
@@ -2079,7 +1965,6 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
}
byPktType = (unsigned char)pDevice->byPacketType;
-
if (pDevice->bFixRate) {
if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
if (pDevice->uConnectionRate >= RATE_11M) {
@@ -2106,7 +1991,6 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dma0: pDevice->wCurrentRate = %d \n", pDevice->wCurrentRate);
-
if (pDevice->wCurrentRate <= RATE_11M) {
byPktType = PK_TYPE_11B;
} else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
@@ -2169,7 +2053,6 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
MACvTransmit0(pDevice->PortOffset);
-
return true;
}
@@ -2195,8 +2078,6 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
unsigned char *pbyBSSID;
bool bNodeExist = false;
-
-
spin_lock_irq(&pDevice->lock);
if (pDevice->bLinkPass == false) {
dev_kfree_skb_irq(skb);
@@ -2210,7 +2091,6 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
return 0;
}
-
if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
if (pDevice->uAssocCount == 0) {
dev_kfree_skb_irq(skb);
@@ -2265,7 +2145,6 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
pHeadTD->m_td1TD1.byTCR = (TCR_EDP|TCR_STP);
-
memcpy(pDevice->sTxEthHeader.abyDstAddr, (unsigned char *)(skb->data), ETH_HLEN);
cbFrameBodySize = skb->len - ETH_HLEN;
// 802.1H
@@ -2273,7 +2152,6 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
cbFrameBodySize += 8;
}
-
if (pDevice->bEncryptionEnable == true) {
bNeedEncryption = true;
// get Transmit key
@@ -2294,7 +2172,6 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
break;
}
} else if (pDevice->pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-
pbyBSSID = pDevice->sTxEthHeader.abyDstAddr; //TO_DS = 0 and FROM_DS = 0 --> 802.11 MAC Address1
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG "IBSS Serach Key: \n");
for (ii = 0; ii < 6; ii++)
@@ -2402,7 +2279,6 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
&(pDevice->byTopCCKBasicRate),
&(pDevice->byTopOFDMBasicRate));
-
}
}
@@ -2464,7 +2340,6 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
}
}
-
vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff, bNeedEncryption,
cbFrameBodySize, TYPE_AC0DMA, pHeadTD,
&pDevice->sTxEthHeader, (unsigned char *)skb->data, pTransmitKey, uNodeIndex,
@@ -2545,7 +2420,6 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
spin_unlock_irq(&pDevice->lock);
return 0;
-
}
static irqreturn_t device_intr(int irq, void *dev_instance) {
@@ -2561,7 +2435,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
int ii = 0;
// unsigned char byRSSI;
-
MACvReadISR(pDevice->PortOffset, &pDevice->dwIsr);
if (pDevice->dwIsr == 0)
@@ -2601,7 +2474,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
// update ISR counter
STAvUpdate802_11Counter(&pDevice->s802_11Counter, &pDevice->scStatistic , dwMIBCounter);
while (pDevice->dwIsr != 0) {
-
STAvUpdateIsrStatCounter(&pDevice->scStatistic, pDevice->dwIsr);
MACvWriteISR(pDevice->PortOffset, pDevice->dwIsr);
@@ -2613,7 +2485,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
}
if (pDevice->byLocalID > REV_ID_VT3253_B1) {
-
if (pDevice->dwIsr & ISR_MEASURESTART) {
// 802.11h measure start
pDevice->byOrgChannel = pDevice->byCurrentCh;
@@ -2743,7 +2614,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if ((pDevice->eOPMode == OP_MODE_AP) ||
(pDevice->eOPMode == OP_MODE_ADHOC)) {
-
MACvOneShotTimer1MicroSec(pDevice->PortOffset,
(pMgmt->wIBSSBeaconPeriod - MAKE_BEACON_RESERVED) << 10);
}
@@ -2755,7 +2625,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
}
if (pDevice->dwIsr & ISR_BNTX) {
-
if (pDevice->eOPMode == OP_MODE_ADHOC) {
pDevice->bIsBeaconBufReadySet = false;
pDevice->cbBeaconBufReadySetCnt = 0;
@@ -2805,7 +2674,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
max_count += device_tx_srv(pDevice, TYPE_AC0DMA);
}
if (pDevice->dwIsr & ISR_SOFTTIMER) {
-
}
if (pDevice->dwIsr & ISR_SOFTTIMER1) {
if (pDevice->eOPMode == OP_MODE_AP) {
@@ -2837,7 +2705,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
return IRQ_RETVAL(handled);
}
-
static unsigned const ethernet_polynomial = 0x04c11db7U;
static inline u32 ether_crc(int length, unsigned char *data)
{
@@ -2950,8 +2817,6 @@ error2:
return result;
}
-
-
static void device_set_multi(struct net_device *dev) {
PSDevice pDevice = (PSDevice)netdev_priv(dev);
@@ -2959,7 +2824,6 @@ static void device_set_multi(struct net_device *dev) {
u32 mc_filter[2];
struct netdev_hw_addr *ha;
-
VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byRxMode));
if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */
@@ -2997,15 +2861,12 @@ static void device_set_multi(struct net_device *dev) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byRxMode = %x\n", pDevice->byRxMode);
}
-
static struct net_device_stats *device_get_stats(struct net_device *dev) {
PSDevice pDevice = (PSDevice)netdev_priv(dev);
return &pDevice->stats;
}
-
-
static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
PSDevice pDevice = (PSDevice)netdev_priv(dev);
@@ -3014,14 +2875,12 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
PSMgmtObject pMgmt = pDevice->pMgmt;
PSCmdRequest pReq;
-
if (pMgmt == NULL) {
rc = -EFAULT;
return rc;
}
switch (cmd) {
-
case SIOCGIWNAME:
rc = iwctl_giwname(dev, NULL, (char *)&(wrq->u.name), NULL);
break;
@@ -3059,7 +2918,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
}
break;
-
// Get current network name (ESSID)
case SIOCGIWESSID:
@@ -3080,13 +2938,11 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
rc = iwctl_siwap(dev, NULL, &(wrq->u.ap_addr), NULL);
break;
-
// Get current Access Point (BSSID)
case SIOCGIWAP:
rc = iwctl_giwap(dev, NULL, &(wrq->u.ap_addr), NULL);
break;
-
// Set desired station name
case SIOCSIWNICKN:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWNICKN \n");
@@ -3149,8 +3005,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
char abyKey[WLAN_WEP232_KEYLEN];
if (wrq->u.encoding.pointer) {
-
-
if (wrq->u.encoding.length > WLAN_WEP232_KEYLEN) {
rc = -E2BIG;
break;
@@ -3230,13 +3084,11 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
rc = iwctl_giwpower(dev, NULL, &(wrq->u.power), NULL);
break;
-
case SIOCSIWPOWER:
rc = iwctl_siwpower(dev, NULL, &(wrq->u.power), NULL);
break;
-
case SIOCGIWSENS:
rc = iwctl_giwsens(dev, NULL, &(wrq->u.sens), NULL);
@@ -3263,7 +3115,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
}
break;
-
#ifdef WIRELESS_SPY
// Set the spy list
case SIOCSIWSPY:
@@ -3296,7 +3147,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
*/
break;
-
//2008-0409-07, <Add> by Einsn Liu
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
case SIOCSIWAUTH:
@@ -3390,7 +3240,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
case IOCTL_CMD_HOSTAPD:
-
rc = vt6655_hostap_ioctl(pDevice, &wrq->u.data);
break;
@@ -3407,7 +3256,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
rc = -EOPNOTSUPP;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Ioctl command not support..%x\n", cmd);
-
}
if (pDevice->bCommit) {
@@ -3437,7 +3285,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
return rc;
}
-
static int ethtool_ioctl(struct net_device *dev, void *useraddr)
{
u32 ethcmd;
@@ -3479,7 +3326,6 @@ static int __init vt6655_init_module(void)
{
int ret;
-
// ret=pci_module_init(&device_driver);
//ret = pcie_port_service_register(&device_driver);
ret = pci_register_driver(&device_driver);
@@ -3493,19 +3339,15 @@ static int __init vt6655_init_module(void)
static void __exit vt6655_cleanup_module(void)
{
-
-
#ifdef CONFIG_PM
unregister_reboot_notifier(&device_notifier);
#endif
pci_unregister_driver(&device_driver);
-
}
module_init(vt6655_init_module);
module_exit(vt6655_cleanup_module);
-
#ifdef CONFIG_PM
static int
device_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
@@ -3560,7 +3402,6 @@ viawget_resume(struct pci_dev *pcid)
PSMgmtObject pMgmt = pDevice->pMgmt;
int power_status; // to silence the compiler
-
power_status = pci_set_power_state(pcid, 0);
power_status = pci_enable_wake(pcid, 0, 0);
pci_restore_state(pcid);
@@ -3591,7 +3432,3 @@ viawget_resume(struct pci_dev *pcid)
}
#endif
-
-
-
-