]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: vt6656: lock changes: vDMA0_tx_80211
authorMalcolm Priestley <tvboxspy@gmail.com>
Thu, 15 May 2014 21:49:16 +0000 (22:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 22:02:19 +0000 (15:02 -0700)
vDMA0_tx_80211 is atomically called.

RFbSetPower can not be called atomically.

If wCurrentRate is different to pDevice->wCurrentRate call
bScheduleCommand WLAN_CMD_SETPOWER.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/rxtx.c

index c6ac263a7cb91970a4c196c6b7ba91f159ce7ed8..7287467c3affb1e4eb92c98639a39d92df5bf26d 100644 (file)
@@ -1781,11 +1781,11 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb)
     // 2004.11.11 Kyle -- Using OFDM power to tx MngPkt will decrease the connection capability.
     //                    And cmd timer will wait data pkt TX finish before scanning so it's OK
     //                    to set power here.
-    if (pMgmt->eScanState != WMAC_NO_SCANNING) {
-        RFbSetPower(pDevice, wCurrentRate, pDevice->byCurrentCh);
-    } else {
-        RFbSetPower(pDevice, wCurrentRate, pMgmt->uCurrChannel);
-    }
+       if (wCurrentRate != pDevice->wCurrentRate) {
+               pDevice->wCurrentRate = wCurrentRate;
+
+               bScheduleCommand(pDevice, WLAN_CMD_SETPOWER, NULL);
+       }
 
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vDMA0_tx_80211: p80211Header->sA3.wFrameCtl = %x \n", p80211Header->sA3.wFrameCtl);