wlan: Update the maximum transit power of an STA.

According to the spec, the local maximum transmit power for a channel
is defined as the maximum transmit powerlevel specified for the
channel in the Country element minus the local power constraint
specified for the channel in the Power Constraint element. This
fix updates the max transmit power according to the spec before
sending it to the FW.

Change-Id: I30c3ec5054651863cd200f92528b7dffa74403d1
CRS-Fixed: 679356
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index cc0e813..9b55421 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1952,6 +1952,7 @@
            psessionEntry->pLimJoinReq->bssDescription.capabilityInfo;
 
         regMax = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel ); 
+        localPowerConstraint = regMax;
         limExtractApCapability( pMac,
            (tANI_U8 *) psessionEntry->pLimJoinReq->bssDescription.ieFields,
            limGetIElenFromBssDescription(&psessionEntry->pLimJoinReq->bssDescription),
@@ -1961,12 +1962,7 @@
            , &localPowerConstraint,
            psessionEntry
            );
-        /* If power constraint is zero then update it with Region max.
-                 MaxTxpower will be the MIN of regmax and power constraint */
-        if( localPowerConstraint == 0 )
-        {
-          localPowerConstraint = regMax;
-        }
+
 #ifdef FEATURE_WLAN_ESE
             psessionEntry->maxTxPower = limGetMaxTxPower(regMax, localPowerConstraint, pMac->roam.configParam.nTxPowerCap);
 #else