diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2013-10-14 19:51:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-15 09:42:12 -0700 |
commit | 17f3ced05f5ae20c619103df9718af597cf83ac4 (patch) | |
tree | 5413e09b5de5d72151b997d5ad75f9c8e79d0b1f /drivers/staging/vt6656 | |
parent | 759e9eba4380420ee6c33873cde1b503d5962154 (diff) | |
download | linux-17f3ced05f5ae20c619103df9718af597cf83ac4.tar.bz2 |
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: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r-- | drivers/staging/vt6656/bssdb.c | 3 | ||||
-rw-r--r-- | drivers/staging/vt6656/dpc.c | 6 | ||||
-rw-r--r-- | drivers/staging/vt6656/wcmd.c | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c index ae0438a43ea5..e120eb2f47e9 100644 --- a/drivers/staging/vt6656/bssdb.c +++ b/drivers/staging/vt6656/bssdb.c @@ -824,6 +824,9 @@ void BSSvSecondCallBack(struct work_struct *work) u32 uNonShortSlotSTACnt = 0; u32 uLongPreambleSTACnt = 0; + if (pDevice->Flags & fMP_DISCONNECTED) + return; + spin_lock_irq(&pDevice->lock); pDevice->uAssocCount = 0; diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 82d7c1d09ef6..75dc92d64056 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -1339,6 +1339,9 @@ void RXvWorkItem(struct work_struct *work) int ntStatus; struct vnt_rcb *pRCB = NULL; + if (pDevice->Flags & fMP_DISCONNECTED) + return; + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n"); spin_lock_irq(&pDevice->lock); @@ -1398,6 +1401,9 @@ void RXvMngWorkItem(struct work_struct *work) struct vnt_rx_mgmt *pRxPacket; int bReAllocSkb = false; + if (pDevice->Flags & fMP_DISCONNECTED) + return; + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Mng Thread\n"); spin_lock_irq(&pDevice->lock); diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index debb87a6aba7..95d2960bd1a1 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -286,6 +286,9 @@ void vRunCommand(struct work_struct *work) u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; u8 byData; + if (pDevice->Flags & fMP_DISCONNECTED) + return; + if (pDevice->dwDiagRefCount != 0) return; if (pDevice->bCmdRunning != true) |