Fix the max tx power issue with 11h/d enable.

Fixes:
1) Do not update the power values during scan in case of 11h.
2) Use default power values from NV
3) Use power value either from NV or Country IE based in join req.
4) Reset the power values for 5G after disconnect.

Change-Id: I9dfa5efe5e0e937940ac903dd852ea596bbad2bc
CRs-fixed: 435807
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
old mode 100644
new mode 100755
index 1e777d9..176f68c
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -6905,6 +6905,19 @@
    WDA_TransportChannelDebug(displaySnapshot, toggleStallDetect);
 }
 
+/* ---------------------------------------------------------------------------
+    \fn     sme_ResetPowerValuesFor5G
+    \brief  Reset the power values for 5G band with NV power values.
+    \param  hHal - HAL handle for device
+    \- return NONE
+    -------------------------------------------------------------------------*/
+void sme_ResetPowerValuesFor5G (tHalHandle hHal)
+{
+    tpAniSirGlobal pMac = PMAC_STRUCT (hHal);
+    csrSaveChannelPowerForBand(pMac, eANI_BOOLEAN_TRUE);
+    csrApplyPower2Current(pMac);     // Store the channel+power info in the global place: Cfg
+}
+
 #if  defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
 /* ---------------------------------------------------------------------------
     \fn sme_UpdateRoamPrefer5GHz