88 #include <linux/slab.h>
101 static int mlme_kill;
104 #define DEVICE_PARAM(N,D)
111 #define RX_DESC_MIN0 16
112 #define RX_DESC_MAX0 128
113 #define RX_DESC_DEF0 32
114 DEVICE_PARAM(RxDescriptors0,
"Number of receive descriptors0");
116 #define RX_DESC_MIN1 16
117 #define RX_DESC_MAX1 128
118 #define RX_DESC_DEF1 32
119 DEVICE_PARAM(RxDescriptors1,
"Number of receive descriptors1");
121 #define TX_DESC_MIN0 16
122 #define TX_DESC_MAX0 128
123 #define TX_DESC_DEF0 32
124 DEVICE_PARAM(TxDescriptors0,
"Number of transmit descriptors0");
126 #define TX_DESC_MIN1 16
127 #define TX_DESC_MAX1 128
128 #define TX_DESC_DEF1 64
129 DEVICE_PARAM(TxDescriptors1,
"Number of transmit descriptors1");
132 #define IP_ALIG_DEF 0
139 DEVICE_PARAM(IP_byte_align,
"Enable IP header dword aligned");
142 #define INT_WORKS_DEF 20
143 #define INT_WORKS_MIN 10
144 #define INT_WORKS_MAX 64
146 DEVICE_PARAM(int_works,
"Number of packets per interrupt services");
148 #define CHANNEL_MIN 1
149 #define CHANNEL_MAX 14
150 #define CHANNEL_DEF 6
160 #define PREAMBLE_TYPE_DEF 1
165 #define RTS_THRESH_MIN 512
166 #define RTS_THRESH_MAX 2347
167 #define RTS_THRESH_DEF 2347
172 #define FRAG_THRESH_MIN 256
173 #define FRAG_THRESH_MAX 2346
174 #define FRAG_THRESH_DEF 2346
179 #define DATA_RATE_MIN 0
180 #define DATA_RATE_MAX 13
181 #define DATA_RATE_DEF 13
201 #define OP_MODE_DEF 0
217 #define PS_MODE_DEF 0
222 #define SHORT_RETRY_MIN 0
223 #define SHORT_RETRY_MAX 31
224 #define SHORT_RETRY_DEF 8
227 DEVICE_PARAM(ShortRetryLimit,
"Short frame retry limits");
229 #define LONG_RETRY_MIN 0
230 #define LONG_RETRY_MAX 15
231 #define LONG_RETRY_DEF 4
234 DEVICE_PARAM(LongRetryLimit,
"long frame retry limits");
242 #define BBP_TYPE_MIN 0
243 #define BBP_TYPE_MAX 2
244 #define BBP_TYPE_DEF 2
255 #define X80211h_MODE_DEF 0
264 #define DIVERSITY_ANT_DEF 0
266 DEVICE_PARAM(bDiversityANTEnable,
"ANT diversity mode");
274 static int device_nics =0;
279 {
VT3253,
"VIA Networking Solomon-A/B/G Wireless LAN Adapter ",
294 static void device_free_info(
PSDevice pDevice);
296 static void device_print_info(
PSDevice pDevice);
298 static void device_init_diversity_timer(
PSDevice pDevice);
301 static irqreturn_t device_intr(
int irq,
void*dev_instance);
309 static int viawget_resume(
struct pci_dev *pcid);
318 static void device_init_rd0_ring(
PSDevice pDevice);
319 static void device_init_rd1_ring(
PSDevice pDevice);
320 static void device_init_defrag_cb(
PSDevice pDevice);
321 static void device_init_td0_ring(
PSDevice pDevice);
322 static void device_init_td1_ring(
PSDevice pDevice);
326 static bool device_release_WPADEV(
PSDevice pDevice);
329 static int device_rx_srv(
PSDevice pDevice,
unsigned int uIdx);
330 static int device_tx_srv(
PSDevice pDevice,
unsigned int uIdx);
334 static void device_free_td0_ring(
PSDevice pDevice);
335 static void device_free_td1_ring(
PSDevice pDevice);
336 static void device_free_rd0_ring(
PSDevice pDevice);
337 static void device_free_rd1_ring(
PSDevice pDevice);
338 static void device_free_rings(
PSDevice pDevice);
339 static void device_free_frag_buf(
PSDevice pDevice);
340 static int Config_FileGetParameter(
unsigned char *
string,
350 static char* get_chip_name(
int chip_id)
353 for (i = 0; chip_info_table[
i].
name !=
NULL; i++)
354 if (chip_info_table[i].chip_id == chip_id)
356 return chip_info_table[
i].
name;
361 PSDevice pDevice = pci_get_drvdata(pcid);
365 device_free_info(pDevice);
401 static void device_get_options(
PSDevice pDevice,
int index,
char* devname)
427 device_set_options(
PSDevice pDevice) {
429 unsigned char abyBroadcastAddr[
ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
430 unsigned char abySNAP_RFC1042[
ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
431 unsigned char abySNAP_Bridgetunnel[
ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
478 static void s_vCompleteCurrentMeasure (
PSDevice pDevice,
unsigned char byResult)
481 unsigned long dwDuration = 0;
482 unsigned char byRPI0 = 0;
484 for(ii=1;ii<8;ii++) {
485 pDevice->
dwRPIs[ii] *= 255;
488 pDevice->
dwRPIs[ii] /= dwDuration;
490 byRPI0 += pDevice->
abyRPIs[ii];
492 pDevice->
abyRPIs[0] = (0xFF - byRPI0);
526 unsigned char byValue;
527 unsigned char byValue1;
528 unsigned char byCCKPwrdBm = 0;
529 unsigned char byOFDMPwrdBm = 0;
540 pDevice->
bCCK =
true;
541 pDevice->
bAES =
false;
557 spin_lock_irq(&pDevice->
lock);
560 spin_unlock_irq(&pDevice->
lock);
602 if((byValue1&0x08)==0)
640 if ((zonetype == 0)&&
646 else if((zonetype == 1)&&
651 else if((zonetype == 2)&&
663 printk(
"Read Zonetype file success,use default zonetype setting[%02x]\n",zonetype);
716 for(ii=11;ii<14;ii++) {
789 #ifdef FOR_LED_ON_NOTEBOOK
834 netif_stop_queue(pDevice->
dev);
841 static void device_init_diversity_timer(
PSDevice pDevice) {
862 static bool device_release_WPADEV(
PSDevice pDevice)
875 skb_reset_mac_header(pDevice->
skb);
897 .ndo_open = device_open,
898 .ndo_stop = device_close,
899 .ndo_do_ioctl = device_ioctl,
900 .ndo_get_stats = device_get_stats,
901 .ndo_start_xmit = device_xmit,
902 .ndo_set_rx_mode = device_set_multi,
908 static bool bFirst =
true;
921 pDevice = (
PSDevice) netdev_priv(dev);
938 vt6655_init_info(pcid, &pDevice, pChip_info);
941 root_device_dev =
dev;
944 device_free_info(pDevice);
950 printk(
"Before get pci_info memaddr is %x\n",pDevice->
memaddr);
952 if (device_get_pci_info(pDevice,pcid) ==
false) {
954 device_free_info(pDevice);
975 for (i=0;address[
i];i++)
978 pci_read_config_dword(pcid, address[i], &bar);
979 printk(
"bar %d is %x\n",i,bar);
982 printk(
"bar %d not implemented\n",i);
989 len = len & ~(len - 1);
991 printk(
"IO space: len in IO %x, BAR %d\n", len, i);
995 len = bar & 0xFFFFFFF0;
998 printk(
"len in MEM %x, BAR %d\n", len, i);
1015 device_free_info(pDevice);
1025 device_free_info(pDevice);
1031 unsigned char value;
1034 printk(
"Before write: value is %x\n",value);
1038 printk(
"After write: value is %x\n",value);
1049 device_free_info(pDevice);
1056 device_get_options(pDevice, device_nics-1, dev->
name);
1057 device_set_options(pDevice);
1063 pDevice->tx_80211 = device_dma0_tx_80211;
1076 device_free_info(pDevice);
1079 device_print_info(pDevice);
1080 pci_set_drvdata(pcid, pDevice);
1085 static void device_print_info(
PSDevice pDevice)
1109 if (pDevice_Infos ==
NULL) {
1110 pDevice_Infos =*ppDevice;
1115 p->
next = *ppDevice;
1116 (*ppDevice)->
prev =
p;
1119 (*ppDevice)->pcid = pcid;
1120 (*ppDevice)->chip_id = pChip_info->
chip_id;
1121 (*ppDevice)->io_size = pChip_info->
io_size;
1122 (*ppDevice)->nTxQueues = pChip_info->
nTxQueue;
1123 (*ppDevice)->multicast_limit =32;
1128 static bool device_get_pci_info(
PSDevice pDevice,
struct pci_dev* pcid) {
1132 unsigned int cis_addr;
1134 unsigned char pci_config[256];
1135 unsigned char value =0x00;
1138 memset(pci_config,0x00,256);
1158 pDevice->
pcid = pcid;
1173 for (ii=0;ii<0xFF;ii++)
1175 pci_read_config_byte(pcid,ii,&value);
1176 pci_config[ii] =
value;
1178 for (ii=0,j=1;ii<0x100;ii++,j++)
1182 printk(
"%x:",pci_config[ii]);
1187 printk(
"%x:",pci_config[ii]);
1194 static void device_free_info(
PSDevice pDevice) {
1200 device_release_WPADEV(pDevice);
1205 printk(
"unregister wpadev fail?\n");
1207 if (pDevice_Infos==
NULL)
1210 for (ptr=pDevice_Infos;ptr && (ptr!=pDevice);ptr=ptr->
next)
1214 if (ptr==pDevice_Infos)
1215 pDevice_Infos=ptr->
next;
1217 ptr->prev->next=ptr->next;
1238 if (pDevice->
pcid) {
1239 pci_set_drvdata(pDevice->
pcid,
NULL);
1243 static bool device_init_rings(
PSDevice pDevice) {
1255 if (vir_pool ==
NULL) {
1341 static void device_free_rings(
PSDevice pDevice) {
1362 static void device_init_rd0_ring(
PSDevice pDevice) {
1368 for (i = 0; i < pDevice->
sOpts.
nRxDescs0; i ++, curr +=
sizeof(SRxDesc)) {
1370 pDesc->pRDInfo = alloc_rd_info();
1372 if (!device_alloc_rx_buf(pDevice, pDesc)) {
1374 pDevice->
dev->name);
1378 pDesc->next_desc =
cpu_to_le32(curr +
sizeof(SRxDesc));
1387 static void device_init_rd1_ring(
PSDevice pDevice) {
1393 for (i = 0; i < pDevice->
sOpts.
nRxDescs1; i ++, curr +=
sizeof(SRxDesc)) {
1395 pDesc->pRDInfo = alloc_rd_info();
1397 if (!device_alloc_rx_buf(pDevice, pDesc)) {
1399 pDevice->
dev->name);
1403 pDesc->next_desc =
cpu_to_le32(curr +
sizeof(SRxDesc));
1412 static void device_init_defrag_cb(
PSDevice pDevice) {
1421 pDevice->
dev->name);
1431 static void device_free_rd0_ring(
PSDevice pDevice) {
1441 dev_kfree_skb(pRDInfo->
skb);
1443 kfree((
void *)pDesc->pRDInfo);
1448 static void device_free_rd1_ring(
PSDevice pDevice) {
1459 dev_kfree_skb(pRDInfo->
skb);
1461 kfree((
void *)pDesc->pRDInfo);
1466 static void device_free_frag_buf(
PSDevice pDevice) {
1475 dev_kfree_skb(pDeF->
skb);
1481 static void device_init_td0_ring(
PSDevice pDevice) {
1487 for (i = 0; i < pDevice->
sOpts.
nTxDescs[0]; i++, curr +=
sizeof(STxDesc)) {
1489 pDesc->pTDInfo = alloc_td_info();
1497 pDesc->next_desc =
cpu_to_le32(curr+
sizeof(STxDesc));
1506 static void device_init_td1_ring(
PSDevice pDevice) {
1513 for (i = 0; i < pDevice->
sOpts.
nTxDescs[1]; i++, curr+=
sizeof(STxDesc)) {
1515 pDesc->pTDInfo = alloc_td_info();
1523 pDesc->next_desc =
cpu_to_le32(curr+
sizeof(STxDesc));
1533 static void device_free_td0_ring(
PSDevice pDevice) {
1544 dev_kfree_skb(pTDInfo->
skb);
1546 kfree((
void *)pDesc->pTDInfo);
1550 static void device_free_td1_ring(
PSDevice pDevice) {
1562 dev_kfree_skb(pTDInfo->
skb);
1564 kfree((
void *)pDesc->pTDInfo);
1573 static int device_rx_srv(
PSDevice pDevice,
unsigned int uIdx) {
1578 for (pRD = pDevice->
pCurrRD[uIdx];
1585 if (!device_alloc_rx_buf(pDevice,pRD)) {
1587 "%s: can not allocate rx buf\n", pDevice->
dev->name);
1613 pRDInfo->
skb->dev = pDevice->
dev;
1614 pRDInfo->
skb_dma = pci_map_single(pDevice->
pcid, skb_tail_pointer(pRDInfo->
skb),
1616 *((
unsigned int *) &(pRD->m_rd0RD0)) = 0;
1634 pDeF->
skb->dev = pDevice->
dev;
1641 static int device_tx_srv(
PSDevice pDevice,
unsigned int uIdx) {
1645 unsigned char byTsr0;
1646 unsigned char byTsr1;
1647 unsigned int uFrameSize, uFIFOHeaderSize;
1651 unsigned int uNodeIndex;
1655 for (pTD = pDevice->
apTailTD[uIdx]; pDevice->
iTDUsed[uIdx] >0; pTD = pTD->next) {
1662 byTsr0 = pTD->m_td0TD0.byTSR0;
1663 byTsr1 = pTD->m_td0TD0.byTSR1;
1666 if (pTD->m_td1TD1.byTCR &
TCR_STP) {
1669 uFIFOHeaderSize = pTD->pTDInfo->dwHeaderLength;
1670 uFrameSize = pTD->pTDInfo->dwReqCount - uFIFOHeaderSize;
1677 (
unsigned char *)(pTD->pTDInfo->buf + uFIFOHeaderSize),
1683 (
unsigned char *)(pTD->pTDInfo->buf),
1690 (
int)uIdx, byTsr1, byTsr0);
1696 pStats->
tx_bytes += pTD->pTDInfo->skb->len;
1700 (
int)uIdx, byTsr1, byTsr0);
1707 if (pDevice->bEnableHostapd) {
1709 skb = pTD->pTDInfo->skb;
1710 skb->
dev = pDevice->apdev;
1711 skb_reset_mac_header(skb);
1714 memset(skb->cb, 0,
sizeof(skb->cb));
1719 if (byTsr1 & TSR1_TERR) {
1722 (
int)uIdx, byTsr1, byTsr0);
1730 unsigned short wAID;
1731 unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
1733 skb = pTD->pTDInfo->skb;
1740 pMgmt->
abyPSTxMap[wAID >> 3] |= byMask[wAID & 7];
1750 device_free_tx_buf(pDevice,pTD);
1763 if (netif_queue_stopped(pDevice->
dev) && (bFull==
false)){
1764 netif_wake_queue(pDevice->
dev);
1775 static void device_error(
PSDevice pDevice,
unsigned short status) {
1779 "%s: Hardware fatal error.\n",
1780 pDevice->
dev->name);
1781 netif_stop_queue(pDevice->
dev);
1843 spin_lock_irq(&pDevice->
lock);
1846 pRxMgmtPacket = DeQueue(pDevice);
1853 spin_unlock_irq(&pDevice->
lock);
1873 static int device_open(
struct net_device *dev) {
1876 #ifdef WPA_SM_Transtatus
1881 if (!device_init_rings(pDevice)) {
1889 #ifdef WPA_SM_Transtatus
1891 wpa_Result.
proto = 0;
1898 device_init_rd0_ring(pDevice);
1899 device_init_rd1_ring(pDevice);
1900 device_init_defrag_cb(pDevice);
1901 device_init_td0_ring(pDevice);
1902 device_init_td1_ring(pDevice);
1907 device_init_diversity_timer(pDevice);
1920 if (IS_ERR(mlme_task)) {
1921 printk(
"thread create fail\n");
1943 device_set_multi(pDevice->
dev);
1949 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1964 (
unsigned long)(pDevice->
byKeyIndex | (1 << 31)),
1995 static int device_close(
struct net_device *dev) {
2022 netif_stop_queue(dev);
2031 device_free_td0_ring(pDevice);
2032 device_free_td1_ring(pDevice);
2033 device_free_rd0_ring(pDevice);
2034 device_free_rd1_ring(pDevice);
2035 device_free_frag_buf(pDevice);
2036 device_free_rings(pDevice);
2041 device_release_WPADEV(pDevice);
2053 unsigned char *pbMPDU;
2054 unsigned int cbMPDULen = 0;
2058 spin_lock_irq(&pDevice->
lock);
2063 spin_unlock_irq(&pDevice->
lock);
2069 spin_unlock_irq(&pDevice->
lock);
2073 cbMPDULen = skb->
len;
2078 spin_unlock_irq(&pDevice->
lock);
2089 unsigned int cbFrameBodySize;
2090 unsigned int uMACfragNum;
2091 unsigned char byPktType;
2092 bool bNeedEncryption =
false;
2094 unsigned int cbHeaderSize;
2128 cbFrameBodySize += 8;
2181 bNeedEncryption =
true;
2183 if (pDevice->bEnableHostWEP) {
2184 pTransmitKey = &STempKey;
2197 &pDevice->
sTxEthHeader, (
unsigned char *)skb->
data, pTransmitKey, uNodeIndex,
2210 for (ii = 0; ii < uMACfragNum; ii++) {
2215 if (ii == (uMACfragNum - 1))
2217 pHeadTD = pHeadTD->next;
2222 pLastTD->pTDInfo->skb =
skb;
2223 pLastTD->pTDInfo->byFlags = 0;
2240 unsigned int uNodeIndex = 0;
2241 unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
2242 unsigned short wAID;
2243 unsigned int uMACfragNum = 1;
2244 unsigned int cbFrameBodySize;
2245 unsigned char byPktType;
2246 unsigned int cbHeaderSize;
2247 bool bNeedEncryption =
false;
2251 bool bTKIP_UseGTK =
false;
2252 bool bNeedDeAuth =
false;
2253 unsigned char *pbyBSSID;
2254 bool bNodeExist =
false;
2258 spin_lock_irq(&pDevice->
lock);
2261 spin_unlock_irq(&pDevice->
lock);
2267 spin_unlock_irq(&pDevice->
lock);
2275 spin_unlock_irq(&pDevice->
lock);
2278 if (is_multicast_ether_addr((
unsigned char *)(skb->
data))) {
2286 spin_unlock_irq(&pDevice->
lock);
2296 pMgmt->
abyPSTxMap[wAID >> 3] |= byMask[wAID & 7];
2299 spin_unlock_irq(&pDevice->
lock);
2314 if (bNodeExist ==
false) {
2317 spin_unlock_irq(&pDevice->
lock);
2331 cbFrameBodySize += 8;
2336 bNeedEncryption =
true;
2346 bTKIP_UseGTK =
true;
2358 for (ii = 0; ii< 6; ii++)
2369 pTransmitKey =
NULL;
2376 bTKIP_UseGTK =
true;
2382 if (pDevice->bEnableHostWEP) {
2385 pTransmitKey = &STempKey;
2403 spin_unlock_irq(&pDevice->
lock);
2407 if (pTransmitKey !=
NULL) {
2488 if (bNeedEncryption ==
true) {
2491 bNeedEncryption =
false;
2494 if (pTransmitKey ==
NULL) {
2498 if (bTKIP_UseGTK ==
true) {
2503 bNeedEncryption =
true;
2513 if (pDevice->bEnableHostWEP) {
2514 if ((uNodeIndex != 0) &&
2517 bNeedEncryption =
true;
2522 if (pTransmitKey ==
NULL) {
2525 spin_unlock_irq(&pDevice->
lock);
2540 &pDevice->
sTxEthHeader, (
unsigned char *)skb->
data, pTransmitKey, uNodeIndex,
2552 for (ii = 0; ii < uMACfragNum; ii++) {
2557 if (ii == uMACfragNum - 1)
2559 pHeadTD = pHeadTD->next;
2564 pLastTD->pTDInfo->skb =
skb;
2565 pLastTD->pTDInfo->byFlags = 0;
2571 netif_stop_queue(dev);
2587 unsigned char Protocol_Version;
2588 unsigned char Packet_Type;
2589 unsigned char Descriptor_type;
2590 unsigned short Key_info;
2591 bool bTxeapol_key =
false;
2597 if(((Protocol_Version==1) ||(Protocol_Version==2)) &&
2599 bTxeapol_key =
true;
2600 if((Descriptor_type==254)||(Descriptor_type==2)) {
2601 if(!(Key_info &
BIT3) &&
2602 (Key_info &
BIT8) && (Key_info &
BIT9)) {
2604 if(Descriptor_type==254)
2608 printk(
"Authentication completed!!\n");
2620 spin_unlock_irq(&pDevice->
lock);
2625 static irqreturn_t device_intr(
int irq,
void *dev_instance) {
2630 unsigned long dwMIBCounter=0;
2632 unsigned char byOrgPageSel=0;
2634 unsigned char byData = 0;
2641 if (pDevice->
dwIsr == 0)
2644 if (pDevice->
dwIsr == 0xffffffff) {
2662 spin_lock_irq(&pDevice->
lock);
2666 if (byOrgPageSel == 1) {
2678 while (pDevice->
dwIsr != 0) {
2683 if (pDevice->
dwIsr & ISR_FETALERR){
2687 device_error(pDevice, pDevice->
dwIsr);
2710 for(ii=0;ii<8;ii++) {
2745 s_vCompleteCurrentMeasure(pDevice, 0);
2790 if (ldBm < pDevice->ldBmThreshold[ii]) {
2906 if (byOrgPageSel == 1) {
2910 spin_unlock_irq(&pDevice->
lock);
2917 static unsigned const ethernet_polynomial = 0x04c11db7
U;
2922 while(--length >= 0) {
2923 unsigned char current_octet = *data++;
2925 for (bit = 0; bit < 8; bit++, current_octet >>= 1) {
2927 ((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0);
2934 static int Config_FileGetParameter(
unsigned char *
string,
2937 unsigned char buf1[100];
2938 int source_len =
strlen(source);
2952 unsigned char tmpbuffer[20];
2971 printk(
"Config_FileOperation:open file fail?\n");
2976 if(!(filp->
f_op) || !(filp->
f_op->read) ||!(filp->
f_op->write)) {
2977 printk(
"file %s cann't readable or writable?\n",config_path);
2984 printk(
"allocate mem for file fail?\n");
2989 if(filp->
f_op->read(filp, buffer, 1024, &filp->
f_pos)<0) {
2990 printk(
"read file error?\n");
2995 if(Config_FileGetParameter(
"ZONETYPE",tmpbuffer,buffer)!=
true) {
2996 printk(
"get parameter error?\n");
3001 if(
memcmp(tmpbuffer,
"USA",3)==0) {
3004 else if(
memcmp(tmpbuffer,
"JAPAN",5)==0) {
3007 else if(
memcmp(tmpbuffer,
"EUROPE",5)==0) {
3012 printk(
"Unknown Zonetype[%s]?\n",tmpbuffer);
3019 printk(
"Config_FileOperation:close file fail\n");
3034 static void device_set_multi(
struct net_device *dev) {
3058 memset(mc_filter, 0,
sizeof(mc_filter));
3061 mc_filter[bit_nr >> 5] |=
cpu_to_le32(1 << (bit_nr & 31));
3085 return &pDevice->
stats;
3099 if (pMgmt ==
NULL) {
3149 if (wrq->
u.
essid.pointer)
3247 }
else if (wrq->
u.
encoding.length != 0) {
3336 if (wrq->
u.
data.pointer) {
3365 #endif // WIRELESS_SPY
3384 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
3437 #endif // #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
3455 if((((
PSCmdRequest)rq)->wCmdCode !=WLAN_CMD_SET_EVT) &&
3499 netif_stop_queue(pDevice->
dev);
3500 spin_lock_irq(&pDevice->
lock);
3502 spin_unlock_irq(&pDevice->
lock);
3506 spin_lock_irq(&pDevice->
lock);
3510 netif_stop_queue(pDevice->
dev);
3511 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
3517 spin_unlock_irq(&pDevice->
lock);
3554 .id_table = vt6655_pci_id_table,
3555 .probe = vt6655_probe,
3556 .remove = vt6655_remove,
3558 .suspend = viawget_suspend,
3559 .resume = viawget_resume,
3563 static int __init vt6655_init_module(
void)
3570 ret = pci_register_driver(&device_driver);
3579 static void __exit vt6655_cleanup_module(
void)
3605 if (pci_get_drvdata(pdev))
3618 PSDevice pDevice=pci_get_drvdata(pcid);
3621 netif_stop_queue(pDevice->
dev);
3622 spin_lock_irq(&pDevice->
lock);
3637 spin_unlock_irq(&pDevice->
lock);
3642 viawget_resume(
struct pci_dev *pcid)
3644 PSDevice pDevice=pci_get_drvdata(pcid);
3650 power_status = pci_enable_wake(pcid, 0, 0);
3652 if (netif_running(pDevice->
dev)) {
3653 spin_lock_irq(&pDevice->
lock);
3674 spin_unlock_irq(&pDevice->
lock);