staging: vt6655: remove undefined TASK_LET code
PATCH 1/4 staging: vt6655: remove undefined TASK_LET code
Removing all code within and function MngWorkItem.
Signed-off-by Malcolm Priestley <[email protected]>
--- drivers/staging/vt6655/device.h | 1 - drivers/staging/vt6655/device_main.c | 6 ------ drivers/staging/vt6655/dpc.c | 24 ------------------------ drivers/staging/vt6655/dpc.h | 2 -- 4 files changed, 33 deletions(-)
drivers/staging/vt6655/device.h +0 -1
@@ -425,7 +425,6 @@ typedef struct __device_info {spinlock_t lock;//PLICE_DEBUG-> -struct tasklet_struct RxMngWorkItem;RxManagementQueue rxManeQueue;//PLICE_DEBUG<- //PLICE_DEBUG ->
drivers/staging/vt6655/device_main.c +0 -6
@@ -1704,9 +1704,6 @@ static int device_open(struct net_device *dev)vMgrTimerInit (pDevice);//PLICE_DEBUG-> -#ifdef TASK_LET -tasklet_init (&pDevice->RxMngWorkItem, (void *)MngWorkItem, (unsigned long )pDevice); -#endif #ifdef THREAD InitRxManagementQueue (pDevice); mlme_kill =0 ;
@@ -1789,9 +1786,6 @@ static int device_close(struct net_device *dev)del_timer (&pDevice->TimerSQ3Tmax3); } -#ifdef TASK_LET -tasklet_kill (&pDevice->RxMngWorkItem); -#endif netif_stop_queue (dev); pDevice->bCmdRunning = false;MACbShutdown (pDevice->PortOffset);
drivers/staging/vt6655/dpc.c +0 -24
@@ -268,23 +268,6 @@ s_vGetDASA(unsigned char *pbyRxBufferAddr, unsigned int *pcbHeaderSize, *pcbHeaderSize = cbHeaderSize; } -//PLICE_DEBUG -> - -void MngWorkItem (void *Context) -{ -PSRxMgmtPacket pRxMgmtPacket; -PSDevice pDevice = (PSDevice ) Context; - -spin_lock_irq (&pDevice->lock); -while (pDevice->rxManeQueue.packet_num !=0 ) { - pRxMgmtPacket =DeQueue (pDevice); -vMgrRxManagePacket (pDevice, pDevice->pMgmt, pRxMgmtPacket); - } -spin_unlock_irq (&pDevice->lock); -} - -//PLICE_DEBUG<- - bool device_receive_frame( PSDevice pDevice,
@@ -551,15 +534,8 @@ device_receive_frame(#ifdef THREAD EnQueue (pDevice, pRxPacket);#else - -#ifdef TASK_LET -EnQueue (pDevice, pRxPacket); -tasklet_schedule (&pDevice->RxMngWorkItem); -#else vMgrRxManagePacket ((void *)pDevice, pDevice->pMgmt, pRxPacket);#endif - -#endif //PLICE_DEBUG<- // hostap Deamon handle 802.11 management if (pDevice->bEnableHostapd) {
drivers/staging/vt6655/dpc.h +0 -2
@@ -39,6 +39,4 @@ device_receive_frame(PSRxDesc pCurrRD ); -void MngWorkItem (void *Context); -#endif // __RXTX_H__
Signature · 1 line
1.9.1
PATCH 2/4 staging: vt6655: deadcode remove undefined macro THREAD code.
Removing _RxManagementQueue, InitRxManagementQueue, MlmeThread, mlme_kill, EnQueue and DeQueue.
Signed-off-by Malcolm Priestley <[email protected]>
--- drivers/staging/vt6655/device.h | 49 +------------------------------- drivers/staging/vt6655/device_main.c | 55 ------------------------------------ drivers/staging/vt6655/dpc.c | 7 +---- 3 files changed, 2 insertions(+), 109 deletions(-)
drivers/staging/vt6655/device.h +1 -48
@@ -328,16 +328,6 @@ typedef struct tagSDeFragControlBlock {//for device_set_media_duplex #define DEVICE_LINK_CHANGE 0x00000001UL -//PLICE_DEBUG-> - -typedef struct _RxManagementQueue { -int packet_num; -int head, tail; -PSRxMgmtPacket Q[NUM ]; -}RxManagementQueue , *PSRxManagementQueue ; - -//PLICE_DEBUG<- - typedef struct __device_opt { int nRxDescs0; //Number of RX descriptors0 int nRxDescs1; //Number of RX descriptors1
@@ -424,9 +414,7 @@ typedef struct __device_info {unsigned char byRxMode;spinlock_t lock; -//PLICE_DEBUG-> -RxManagementQueue rxManeQueue; -//PLICE_DEBUG<- +//PLICE_DEBUG -> pid_t MLMEThr_pid;struct completion notify;
@@ -764,41 +752,6 @@ typedef struct __device_info {bool bCommit; }DEVICE_INFO , *PSDevice; -//PLICE_DEBUG-> - -inline static void EnQueue (PSDevice pDevice,PSRxMgmtPacket pRxMgmtPacket) -{ -if ((pDevice->rxManeQueue.tail+1 ) %NUM == pDevice->rxManeQueue.head) { -return ; - }else { - pDevice->rxManeQueue.tail = (pDevice->rxManeQueue.tail +1 ) %NUM ; - pDevice->rxManeQueue.Q[pDevice->rxManeQueue.tail] = pRxMgmtPacket; - pDevice->rxManeQueue.packet_num++; - } -} - -static inline PSRxMgmtPacket DeQueue (PSDevice pDevice) -{ -PSRxMgmtPacket pRxMgmtPacket; - -if (pDevice->rxManeQueue.tail == pDevice->rxManeQueue.head) { -printk ("Queue is Empty\n" ); -return NULL ; - }else { -int x; -//x=pDevice->rxManeQueue.head = (pDevice->rxManeQueue.head+1)%NUM; - pDevice->rxManeQueue.head = (pDevice->rxManeQueue.head+1 )%NUM ; - x = pDevice->rxManeQueue.head; - pRxMgmtPacket = pDevice->rxManeQueue.Q[x]; - pDevice->rxManeQueue.packet_num--; -return pRxMgmtPacket; - } -} - -void InitRxManagementQueue (PSDevice pDevice); - -//PLICE_DEBUG<- -static inline bool device_get_ip (PSDevice pInfo) {struct in_device *in_dev = (struct in_device *)pInfo->dev->ip_ptr;struct in_ifaddr *ifa;
drivers/staging/vt6655/device_main.c +0 -55
79 lines not on this page · raw message
drivers/staging/vt6655/dpc.c +1 -6
@@ -529,14 +529,9 @@ device_receive_frame( } pRxPacket->byRxRate =s_byGetRateIdx (*pbyRxRate); pRxPacket->byRxChannel = (*pbyRxSts) >>2 ; -//PLICE_DEBUG-> -#ifdef THREAD -EnQueue (pDevice, pRxPacket); -#else vMgrRxManagePacket ((void *)pDevice, pDevice->pMgmt, pRxPacket); -#endif -//PLICE_DEBUG<- +// hostap Deamon handle 802.11 management if (pDevice->bEnableHostapd) { skb->dev = pDevice->apdev;
Signature · 1 line
1.9.1
PATCH 3/4 staging: vt6655: dead code remove undefined macro FOR_LED_ON_NOTEBOOK code.
In reply to Malcolm PriestleyRemoving all variables associated with the code.
Signed-off-by Malcolm Priestley <[email protected]>
--- drivers/staging/vt6655/bssdb.c | 53 ------------------------------------ drivers/staging/vt6655/device_main.c | 15 ---------- 2 files changed, 68 deletions(-)
drivers/staging/vt6655/bssdb.c +0 -53
@@ -901,11 +901,6 @@ BSSvAddMulticastNode(* none. * -*/ -/* 2008-4-14 <add> by chester for led issue */ -#ifdef FOR_LED_ON_NOTEBOOK -bool cc = false; -unsigned int status; -#endif void BSSvSecondCallBack ( void *hDeviceContext
@@ -926,54 +921,6 @@ BSSvSecondCallBack( pDevice->byERPFlag &= ~(WLAN_SET_ERP_BARKER_MODE (1 ) |WLAN_SET_ERP_NONERP_PRESENT (1 )); -/* 2008-4-14 <add> by chester for led issue */ -#ifdef FOR_LED_ON_NOTEBOOK -MACvGPIOIn (pDevice->PortOffset, &pDevice->byGPIO); -if (((!(pDevice->byGPIO &GPIO0_DATA ) && (!pDevice->bHWRadioOff)) || - ((pDevice->byGPIO &GPIO0_DATA ) && pDevice->bHWRadioOff)) && - (!cc)) { - cc = true; - }else if (cc) { -if (pDevice->bHWRadioOff) { -if (!(pDevice->byGPIO &GPIO0_DATA )) { -if (status ==1 ) - goto start; - status =1 ; -CARDbRadioPowerOff (pDevice); - pMgmt->sNodeDBTable[0 ].bActive = false; - pMgmt->eCurrMode =WMAC_MODE_STANDBY ; - pMgmt->eCurrState =WMAC_STATE_IDLE ; - pDevice->bLinkPass = false; - - } -if (pDevice->byGPIO &GPIO0_DATA ) { -if (status ==2 ) - goto start; - status =2 ; -CARDbRadioPowerOn (pDevice); - } - }else { -if (pDevice->byGPIO &GPIO0_DATA ) { -if (status ==3 ) - goto start; - status =3 ; -CARDbRadioPowerOff (pDevice); - pMgmt->sNodeDBTable[0 ].bActive = false; - pMgmt->eCurrMode =WMAC_MODE_STANDBY ; - pMgmt->eCurrState =WMAC_STATE_IDLE ; - pDevice->bLinkPass = false; - - } -if (!(pDevice->byGPIO &GPIO0_DATA )) { -if (status ==4 ) - goto start; - status =4 ; -CARDbRadioPowerOn (pDevice); - } - } - } -start: -#endif if (pDevice->wUseProtectCntDown >0 ) { pDevice->wUseProtectCntDown--;
drivers/staging/vt6655/device_main.c +0 -15
@@ -691,19 +691,6 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)// Get GPIO MACvGPIOIn (pDevice->PortOffset, &pDevice->byGPIO);//2008-4-14 <add> by chester for led issue -#ifdef FOR_LED_ON_NOTEBOOK -if (pDevice->byGPIO &GPIO0_DATA ) - pDevice->bHWRadioOff = true; - -if (!(pDevice->byGPIO &GPIO0_DATA )) - pDevice->bHWRadioOff = false; - } - -if (pDevice->bRadioControlOff) -CARDbRadioPowerOff (pDevice); -else -CARDbRadioPowerOn (pDevice); -#else if (((pDevice->byGPIO &GPIO0_DATA ) && !(pDevice->byRadioCtl &EEP_RADIOCTL_INV )) || (!(pDevice->byGPIO &GPIO0_DATA ) && (pDevice->byRadioCtl &EEP_RADIOCTL_INV ))) { pDevice->bHWRadioOff = true;
@@ -711,8 +698,6 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType) }if (pDevice->bHWRadioOff || pDevice->bRadioControlOff)CARDbRadioPowerOff (pDevice); - -#endif } pMgmt->eScanType =WMAC_SCAN_PASSIVE ;// get Permanent network address
Signature · 1 line
1.9.1
PATCH 4/4 staging: vt6655: dead code remove undefined macro IO_MAP
In reply to Malcolm PriestleyThis device is always memory mapped
Signed-off-by Malcolm Priestley <[email protected]>
--- drivers/staging/vt6655/device_main.c | 10 +--------- drivers/staging/vt6655/upc.h | 34 ---------------------------------- 2 files changed, 1 insertion(+), 43 deletions(-)
drivers/staging/vt6655/device_main.c +1 -9
@@ -902,10 +902,6 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)VNSvInPortB (pDevice->PortOffset+0x4F , &value);pr_debug ("After write: value is %x\n" , value);#endif - -#ifdef IO_MAP - pDevice->PortOffset = pDevice->ioaddr; -#endif // do reset if (!MACbSoftwareReset (pDevice->PortOffset)) {pr_err (DEVICE_NAME ": Failed to access MAC hardware..\n" );
@@ -949,14 +945,10 @@ static void device_print_info(PSDevice pDevice)DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "%s: %s\n" , dev->name,get_chip_name (pDevice->chip_id));DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "%s: MAC=%pM" , dev->name, dev->dev_addr); -#ifdef IO_MAP -DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO " IO=0x%lx " , (unsigned long )pDevice->ioaddr); -DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO " IRQ=%d\n" , pDevice->dev->irq); -#else +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO " IO=0x%lx Mem=0x%lx " , (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,
drivers/staging/vt6655/upc.h +0 -34
@@ -35,38 +35,6 @@/*--------------------- Export Definitions -------------------------*/ // -// For IO mapped -// - -#ifdef IO_MAP - -#define VNSvInPortB (dwIOAddress, pbyData) \ -do { \ - *(pbyData) = inb(dwIOAddress); \ -} while (0) - -#define VNSvInPortW (dwIOAddress, pwData) \ -do { \ - *(pwData) = inw(dwIOAddress); \ -} while (0) - -#define VNSvInPortD (dwIOAddress, pdwData) \ -do { \ - *(pdwData) = inl(dwIOAddress); \ -} while (0) - -#define VNSvOutPortB (dwIOAddress, byData) \ - outb(byData, dwIOAddress) - -#define VNSvOutPortW (dwIOAddress, wData) \ - outw(wData, dwIOAddress) - -#define VNSvOutPortD (dwIOAddress, dwData) \ - outl(dwData, dwIOAddress) - -#else - -// // For memory mapped IO //
@@ -100,8 +68,6 @@ do { \writel ((unsigned long )dwData, dwIOAddress); \ }while (0 ) -#endif -// // ALWAYS IO-Mapped IO when in 16-bit/32-bit environment //
Signature · 1 line
1.9.1