diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-05-15 22:49:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-15 15:02:19 -0700 |
commit | 8783a1a4afa4e14cf134afc7838b23fcd745b996 (patch) | |
tree | 66b51e38063e6df3468dcc1163ace966dbb709fd /drivers | |
parent | 3bc552a1a0757d97cdbb04227536c101848b6a94 (diff) |
staging: vt6656: lock changes: bMgrPrepareBeaconToSend add lock.
bMgrPrepareBeaconToSend is nolonger atomic
csBeacon_xmit must be locked add spin lock.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/vt6656/wmgr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c index 0d69719a7426..cce67cdad26a 100644 --- a/drivers/staging/vt6656/wmgr.c +++ b/drivers/staging/vt6656/wmgr.c @@ -4058,6 +4058,7 @@ int bMgrPrepareBeaconToSend(struct vnt_private *pDevice, struct vnt_manager *pMgmt) { struct vnt_tx_mgmt *pTxPacket; + unsigned long flags; // pDevice->bBeaconBufReady = false; if (pDevice->bEncryptionEnable || pDevice->bEnable8021x){ @@ -4084,8 +4085,13 @@ int bMgrPrepareBeaconToSend(struct vnt_private *pDevice, (pMgmt->abyCurrBSSID[0] == 0)) return false; - csBeacon_xmit(pDevice, pTxPacket); - MACvRegBitsOn(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX); + spin_lock_irqsave(&pDevice->lock, flags); + + csBeacon_xmit(pDevice, pTxPacket); + + spin_unlock_irqrestore(&pDevice->lock, flags); + + MACvRegBitsOn(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX); return true; } |