wlan: maxTxPower should fall between the range

A new function added which caps the value of maxTxPower
between 13 to 19

CRs-fixed: 438160
Change-Id: If63f594c929fded97d6a4e989789ee2ea068b522
diff --git a/CORE/MAC/src/pe/rrm/rrmApi.c b/CORE/MAC/src/pe/rrm/rrmApi.c
index 5b9e453..6c8ac82 100644
--- a/CORE/MAC/src/pe/rrm/rrmApi.c
+++ b/CORE/MAC/src/pe/rrm/rrmApi.c
@@ -71,6 +71,20 @@
 #include "rrmGlobal.h"
 #include "rrmApi.h"
 
+tANI_U8
+rrmGetMinOfMaxTxPower(tPowerdBm regMax, tPowerdBm apTxPower)
+{
+    tANI_U8 maxTxPower = 0;
+    tANI_U8 txPower = VOS_MIN( regMax , (apTxPower) );
+    if((txPower >= RRM_MIN_TX_PWR_CAP) && (txPower <= RRM_MAX_TX_PWR_CAP))
+        maxTxPower =  txPower;
+    else if (txPower < RRM_MIN_TX_PWR_CAP)
+        maxTxPower = RRM_MIN_TX_PWR_CAP;
+    else
+        maxTxPower = RRM_MAX_TX_PWR_CAP;
+
+    return maxTxPower;
+}
 
 // --------------------------------------------------------------------
 /**