Commit 17f3ced0 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: return from workqueues on fMP_DISCONNECTED

Return from work queues on flag fMP_DISCONNECTED to prevent
any scheduling threads past closing of device.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 759e9eba
...@@ -824,6 +824,9 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -824,6 +824,9 @@ void BSSvSecondCallBack(struct work_struct *work)
u32 uNonShortSlotSTACnt = 0; u32 uNonShortSlotSTACnt = 0;
u32 uLongPreambleSTACnt = 0; u32 uLongPreambleSTACnt = 0;
if (pDevice->Flags & fMP_DISCONNECTED)
return;
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
pDevice->uAssocCount = 0; pDevice->uAssocCount = 0;
......
...@@ -1339,6 +1339,9 @@ void RXvWorkItem(struct work_struct *work) ...@@ -1339,6 +1339,9 @@ void RXvWorkItem(struct work_struct *work)
int ntStatus; int ntStatus;
struct vnt_rcb *pRCB = NULL; struct vnt_rcb *pRCB = NULL;
if (pDevice->Flags & fMP_DISCONNECTED)
return;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n");
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
...@@ -1398,6 +1401,9 @@ void RXvMngWorkItem(struct work_struct *work) ...@@ -1398,6 +1401,9 @@ void RXvMngWorkItem(struct work_struct *work)
struct vnt_rx_mgmt *pRxPacket; struct vnt_rx_mgmt *pRxPacket;
int bReAllocSkb = false; int bReAllocSkb = false;
if (pDevice->Flags & fMP_DISCONNECTED)
return;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Mng Thread\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Mng Thread\n");
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
......
...@@ -286,6 +286,9 @@ void vRunCommand(struct work_struct *work) ...@@ -286,6 +286,9 @@ void vRunCommand(struct work_struct *work)
u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
u8 byData; u8 byData;
if (pDevice->Flags & fMP_DISCONNECTED)
return;
if (pDevice->dwDiagRefCount != 0) if (pDevice->dwDiagRefCount != 0)
return; return;
if (pDevice->bCmdRunning != true) if (pDevice->bCmdRunning != true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment