Commit 97641ca2 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: lock changes: vRunCommand nsDMA_tx_packet

vRunCommand is nolonger atomic add lock for nsDMA_tx_packet.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8783a1a4
...@@ -279,6 +279,7 @@ void vRunCommand(struct work_struct *work) ...@@ -279,6 +279,7 @@ void vRunCommand(struct work_struct *work)
int ii; int ii;
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;
unsigned long flags;
if (pDevice->Flags & fMP_DISCONNECTED) if (pDevice->Flags & fMP_DISCONNECTED)
return; return;
...@@ -667,9 +668,13 @@ void vRunCommand(struct work_struct *work) ...@@ -667,9 +668,13 @@ void vRunCommand(struct work_struct *work)
pDevice->bMoreData = true; pDevice->bMoreData = true;
} }
spin_lock_irqsave(&pDevice->lock, flags);
if (nsDMA_tx_packet(pDevice, skb) != 0) if (nsDMA_tx_packet(pDevice, skb) != 0)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Multicast ps tx fail\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Multicast ps tx fail\n");
spin_unlock_irqrestore(&pDevice->lock, flags);
pMgmt->sNodeDBTable[0].wEnQueueCnt--; pMgmt->sNodeDBTable[0].wEnQueueCnt--;
} }
} }
...@@ -690,9 +695,13 @@ void vRunCommand(struct work_struct *work) ...@@ -690,9 +695,13 @@ void vRunCommand(struct work_struct *work)
pDevice->bMoreData = true; pDevice->bMoreData = true;
} }
spin_lock_irqsave(&pDevice->lock, flags);
if (nsDMA_tx_packet(pDevice, skb) != 0) if (nsDMA_tx_packet(pDevice, skb) != 0)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "sta ps tx fail\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "sta ps tx fail\n");
spin_unlock_irqrestore(&pDevice->lock, flags);
pMgmt->sNodeDBTable[ii].wEnQueueCnt--; pMgmt->sNodeDBTable[ii].wEnQueueCnt--;
// check if sta ps enable, wait next pspoll // check if sta ps enable, wait next pspoll
// if sta ps disable, send all pending buffers. // if sta ps disable, send all pending buffers.
......
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