Enable new LPP Profile options for 5G

Change LPP Profile options from enum to bitmask
to allow for more bit options to be added.
Added two new bits for LPP Profile, User Plane 5G
and Control Plan 5G.

Change-Id: I058738e50f4bfb69f4966082890ec8b8ed8f1abc
CRs-fixed: 2605663
diff --git a/android/1.0/Gnss.cpp b/android/1.0/Gnss.cpp
index 10f1bb2..309c106 100644
--- a/android/1.0/Gnss.cpp
+++ b/android/1.0/Gnss.cpp
@@ -175,7 +175,7 @@
         }
         if (gnssConfig.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
             mPendingConfig.flags |= GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-            mPendingConfig.lppProfile = gnssConfig.lppProfile;
+            mPendingConfig.lppProfileMask = gnssConfig.lppProfileMask;
         }
         if (gnssConfig.flags & GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT) {
             mPendingConfig.flags |= GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT;
diff --git a/android/1.0/GnssConfiguration.cpp b/android/1.0/GnssConfiguration.cpp
index 73c9d5c..a7f64fa 100644
--- a/android/1.0/GnssConfiguration.cpp
+++ b/android/1.0/GnssConfiguration.cpp
@@ -80,7 +80,6 @@
         default:
             LOC_LOGE("%s]: invalid version: 0x%x.", __FUNCTION__, version);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
@@ -112,39 +111,33 @@
         default:
             LOC_LOGE("%s]: invalid mode: %d.", __FUNCTION__, mode);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
 }
 
-Return<bool> GnssConfiguration::setLppProfile(uint8_t lppProfile) {
+Return<bool> GnssConfiguration::setLppProfile(uint8_t lppProfileMask) {
     if (mGnss == nullptr) {
         LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__);
         return false;
     }
 
-    GnssConfig config;
-    memset(&config, 0, sizeof(GnssConfig));
+    GnssConfig config = {};
     config.size = sizeof(GnssConfig);
     config.flags = GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-    switch (lppProfile) {
-        case 0:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE;
-            break;
-        case 1:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_USER_PLANE;
-            break;
-        case 2:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE;
-            break;
-        case 3:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_USER_PLANE_AND_CONTROL_PLANE;
-            break;
-        default:
-            LOC_LOGE("%s]: invalid lppProfile: %d.", __FUNCTION__, lppProfile);
-            return false;
-            break;
+    config.lppProfileMask = GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE; //default
+
+    if (lppProfileMask & (1<<0)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_USER_PLANE_BIT;
+    }
+    if (lppProfileMask & (1<<1)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_BIT;
+    }
+    if (lppProfileMask & (1<<2)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_USER_PLANE_OVER_NR5G_SA_BIT;
+    }
+    if (lppProfileMask & (1<<3)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_OVER_NR5G_SA_BIT;
     }
 
     return mGnss->updateConfiguration(config);
@@ -203,7 +196,6 @@
         default:
             LOC_LOGE("%s]: invalid lock: %d.", __FUNCTION__, lock);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
diff --git a/android/1.0/GnssConfiguration.h b/android/1.0/GnssConfiguration.h
index 1629e06..d0e2ba8 100644
--- a/android/1.0/GnssConfiguration.h
+++ b/android/1.0/GnssConfiguration.h
@@ -53,7 +53,7 @@
     Return<bool> setSuplVersion(uint32_t version) override;
     Return<bool> setSuplMode(uint8_t mode) override;
     Return<bool> setSuplEs(bool enabled) override;
-    Return<bool> setLppProfile(uint8_t lppProfile) override;
+    Return<bool> setLppProfile(uint8_t lppProfileMask) override;
     Return<bool> setGlonassPositioningProtocol(uint8_t protocol) override;
     Return<bool> setEmergencySuplPdn(bool enable) override;
     Return<bool> setGpsLock(uint8_t lock) override;
diff --git a/android/1.1/Gnss.cpp b/android/1.1/Gnss.cpp
index 27a5be6..12f5522 100644
--- a/android/1.1/Gnss.cpp
+++ b/android/1.1/Gnss.cpp
@@ -216,7 +216,7 @@
         }
         if (gnssConfig.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
             mPendingConfig.flags |= GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-            mPendingConfig.lppProfile = gnssConfig.lppProfile;
+            mPendingConfig.lppProfileMask = gnssConfig.lppProfileMask;
         }
         if (gnssConfig.flags & GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT) {
             mPendingConfig.flags |= GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT;
diff --git a/android/1.1/GnssConfiguration.cpp b/android/1.1/GnssConfiguration.cpp
index 708e2c1..ad255d1 100644
--- a/android/1.1/GnssConfiguration.cpp
+++ b/android/1.1/GnssConfiguration.cpp
@@ -80,7 +80,6 @@
         default:
             LOC_LOGE("%s]: invalid version: 0x%x.", __FUNCTION__, version);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
@@ -112,39 +111,33 @@
         default:
             LOC_LOGE("%s]: invalid mode: %d.", __FUNCTION__, mode);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
 }
 
-Return<bool> GnssConfiguration::setLppProfile(uint8_t lppProfile) {
+Return<bool> GnssConfiguration::setLppProfile(uint8_t lppProfileMask) {
     if (mGnss == nullptr) {
         LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__);
         return false;
     }
 
-    GnssConfig config;
-    memset(&config, 0, sizeof(GnssConfig));
+    GnssConfig config = {};
     config.size = sizeof(GnssConfig);
     config.flags = GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-    switch (lppProfile) {
-        case 0:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE;
-            break;
-        case 1:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_USER_PLANE;
-            break;
-        case 2:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE;
-            break;
-        case 3:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_USER_PLANE_AND_CONTROL_PLANE;
-            break;
-        default:
-            LOC_LOGE("%s]: invalid lppProfile: %d.", __FUNCTION__, lppProfile);
-            return false;
-            break;
+    config.lppProfileMask = GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE; //default
+
+    if (lppProfileMask & (1<<0)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_USER_PLANE_BIT;
+    }
+    if (lppProfileMask & (1<<1)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_BIT;
+    }
+    if (lppProfileMask & (1<<2)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_USER_PLANE_OVER_NR5G_SA_BIT;
+    }
+    if (lppProfileMask & (1<<3)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_OVER_NR5G_SA_BIT;
     }
 
     return mGnss->updateConfiguration(config);
@@ -203,7 +196,6 @@
         default:
             LOC_LOGE("%s]: invalid lock: %d.", __FUNCTION__, lock);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
diff --git a/android/1.1/GnssConfiguration.h b/android/1.1/GnssConfiguration.h
index 96681b6..daea159 100644
--- a/android/1.1/GnssConfiguration.h
+++ b/android/1.1/GnssConfiguration.h
@@ -53,7 +53,7 @@
     Return<bool> setSuplVersion(uint32_t version) override;
     Return<bool> setSuplMode(uint8_t mode) override;
     Return<bool> setSuplEs(bool enabled) override;
-    Return<bool> setLppProfile(uint8_t lppProfile) override;
+    Return<bool> setLppProfile(uint8_t lppProfileMask) override;
     Return<bool> setGlonassPositioningProtocol(uint8_t protocol) override;
     Return<bool> setEmergencySuplPdn(bool enable) override;
     Return<bool> setGpsLock(uint8_t lock) override;
diff --git a/android/2.0/Gnss.cpp b/android/2.0/Gnss.cpp
index 21c36fa..c419360 100644
--- a/android/2.0/Gnss.cpp
+++ b/android/2.0/Gnss.cpp
@@ -237,7 +237,7 @@
         }
         if (gnssConfig.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
             mPendingConfig.flags |= GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-            mPendingConfig.lppProfile = gnssConfig.lppProfile;
+            mPendingConfig.lppProfileMask = gnssConfig.lppProfileMask;
         }
         if (gnssConfig.flags & GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT) {
             mPendingConfig.flags |= GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT;
diff --git a/android/2.0/GnssConfiguration.cpp b/android/2.0/GnssConfiguration.cpp
index 069c036..55a70dc 100644
--- a/android/2.0/GnssConfiguration.cpp
+++ b/android/2.0/GnssConfiguration.cpp
@@ -70,7 +70,6 @@
         default:
             LOC_LOGE("%s]: invalid version: 0x%x.", __FUNCTION__, version);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
@@ -102,13 +101,12 @@
         default:
             LOC_LOGE("%s]: invalid mode: %d.", __FUNCTION__, mode);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
 }
 
-Return<bool> GnssConfiguration::setLppProfile(uint8_t lppProfile) {
+Return<bool> GnssConfiguration::setLppProfile(uint8_t lppProfileMask) {
     if (mGnss == nullptr) {
         LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__);
         return false;
@@ -117,23 +115,19 @@
     GnssConfig config = {};
     config.size = sizeof(GnssConfig);
     config.flags = GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-    switch (lppProfile) {
-        case 0:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE;
-            break;
-        case 1:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_USER_PLANE;
-            break;
-        case 2:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE;
-            break;
-        case 3:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_USER_PLANE_AND_CONTROL_PLANE;
-            break;
-        default:
-            LOC_LOGE("%s]: invalid lppProfile: %d.", __FUNCTION__, lppProfile);
-            return false;
-            break;
+    config.lppProfileMask = GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE; //default
+
+    if (lppProfileMask & (1<<0)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_USER_PLANE_BIT;
+    }
+    if (lppProfileMask & (1<<1)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_BIT;
+    }
+    if (lppProfileMask & (1<<2)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_USER_PLANE_OVER_NR5G_SA_BIT;
+    }
+    if (lppProfileMask & (1<<3)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_OVER_NR5G_SA_BIT;
     }
 
     return mGnss->updateConfiguration(config);
@@ -192,7 +186,6 @@
     default:
         LOC_LOGE("%s]: invalid lock: %d.", __FUNCTION__, lock);
         return false;
-        break;
     }
 
     mGnss->updateConfiguration(config);
diff --git a/android/2.0/GnssConfiguration.h b/android/2.0/GnssConfiguration.h
index 202a9fd..c3de2c9 100644
--- a/android/2.0/GnssConfiguration.h
+++ b/android/2.0/GnssConfiguration.h
@@ -52,7 +52,7 @@
     Return<bool> setSuplVersion(uint32_t version) override;
     Return<bool> setSuplMode(uint8_t mode) override;
     Return<bool> setSuplEs(bool enabled) override;
-    Return<bool> setLppProfile(uint8_t lppProfile) override;
+    Return<bool> setLppProfile(uint8_t lppProfileMask) override;
     Return<bool> setGlonassPositioningProtocol(uint8_t protocol) override;
     Return<bool> setEmergencySuplPdn(bool enable) override;
     Return<bool> setGpsLock(uint8_t lock) override;
diff --git a/android/2.1/Gnss.cpp b/android/2.1/Gnss.cpp
index d17f108..f6be815 100644
--- a/android/2.1/Gnss.cpp
+++ b/android/2.1/Gnss.cpp
@@ -244,7 +244,7 @@
         }
         if (gnssConfig.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
             mPendingConfig.flags |= GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-            mPendingConfig.lppProfile = gnssConfig.lppProfile;
+            mPendingConfig.lppProfileMask = gnssConfig.lppProfileMask;
         }
         if (gnssConfig.flags & GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT) {
             mPendingConfig.flags |= GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT;
diff --git a/android/2.1/GnssConfiguration.cpp b/android/2.1/GnssConfiguration.cpp
old mode 100755
new mode 100644
index 4d1be32..b6077ae
--- a/android/2.1/GnssConfiguration.cpp
+++ b/android/2.1/GnssConfiguration.cpp
@@ -70,7 +70,6 @@
         default:
             LOC_LOGE("%s]: invalid version: 0x%x.", __FUNCTION__, version);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
@@ -102,13 +101,12 @@
         default:
             LOC_LOGE("%s]: invalid mode: %d.", __FUNCTION__, mode);
             return false;
-            break;
     }
 
     return mGnss->updateConfiguration(config);
 }
 
-Return<bool> GnssConfiguration::setLppProfile(uint8_t lppProfile) {
+Return<bool> GnssConfiguration::setLppProfile(uint8_t lppProfileMask) {
     if (mGnss == nullptr) {
         LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__);
         return false;
@@ -117,23 +115,19 @@
     GnssConfig config = {};
     config.size = sizeof(GnssConfig);
     config.flags = GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-    switch (lppProfile) {
-        case 0:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE;
-            break;
-        case 1:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_USER_PLANE;
-            break;
-        case 2:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE;
-            break;
-        case 3:
-            config.lppProfile = GNSS_CONFIG_LPP_PROFILE_USER_PLANE_AND_CONTROL_PLANE;
-            break;
-        default:
-            LOC_LOGE("%s]: invalid lppProfile: %d.", __FUNCTION__, lppProfile);
-            return false;
-            break;
+    config.lppProfileMask = GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE; //default
+
+    if (lppProfileMask & (1<<0)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_USER_PLANE_BIT;
+    }
+    if (lppProfileMask & (1<<1)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_BIT;
+    }
+    if (lppProfileMask & (1<<2)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_USER_PLANE_OVER_NR5G_SA_BIT;
+    }
+    if (lppProfileMask & (1<<3)) {
+        config.lppProfileMask |= GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_OVER_NR5G_SA_BIT;
     }
 
     return mGnss->updateConfiguration(config);
@@ -192,7 +186,6 @@
     default:
         LOC_LOGE("%s]: invalid lock: %d.", __FUNCTION__, lock);
         return false;
-        break;
     }
 
     mGnss->updateConfiguration(config);
diff --git a/android/2.1/GnssConfiguration.h b/android/2.1/GnssConfiguration.h
old mode 100755
new mode 100644
index 9d6bff4..f000dbd
--- a/android/2.1/GnssConfiguration.h
+++ b/android/2.1/GnssConfiguration.h
@@ -54,7 +54,7 @@
     Return<bool> setSuplVersion(uint32_t version) override;
     Return<bool> setSuplMode(uint8_t mode) override;
     Return<bool> setSuplEs(bool enabled) override;
-    Return<bool> setLppProfile(uint8_t lppProfile) override;
+    Return<bool> setLppProfile(uint8_t lppProfileMask) override;
     Return<bool> setGlonassPositioningProtocol(uint8_t protocol) override;
     Return<bool> setEmergencySuplPdn(bool enable) override;
     Return<bool> setGpsLock(uint8_t lock) override;
diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp
index 6af2ca9..144e975 100644
--- a/core/LocApiBase.cpp
+++ b/core/LocApiBase.cpp
@@ -670,7 +670,7 @@
 DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
 
 LocationError LocApiBase::
-    setLPPConfigSync(GnssConfigLppProfile /*profile*/)
+    setLPPConfigSync(GnssConfigLppProfileMask /*profileMask*/)
 DEFAULT_IMPL(LOCATION_ERROR_SUCCESS)
 
 
@@ -715,9 +715,6 @@
 GnssConfigSuplVersion LocApiBase::convertSuplVersion(const uint32_t /*suplVersion*/)
 DEFAULT_IMPL(GNSS_CONFIG_SUPL_VERSION_1_0_0)
 
-GnssConfigLppProfile LocApiBase::convertLppProfile(const uint32_t /*lppProfile*/)
-DEFAULT_IMPL(GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE)
-
 GnssConfigLppeControlPlaneMask LocApiBase::convertLppeCp(const uint32_t /*lppeControlPlaneMask*/)
 DEFAULT_IMPL(0)
 
diff --git a/core/LocApiBase.h b/core/LocApiBase.h
index ab99d90..035c078 100644
--- a/core/LocApiBase.h
+++ b/core/LocApiBase.h
@@ -223,7 +223,7 @@
     virtual void informNiResponse(GnssNiResponse userResponse, const void* passThroughData);
     virtual LocationError setSUPLVersionSync(GnssConfigSuplVersion version);
     virtual enum loc_api_adapter_err setNMEATypesSync(uint32_t typesMask);
-    virtual LocationError setLPPConfigSync(GnssConfigLppProfile profile);
+    virtual LocationError setLPPConfigSync(GnssConfigLppProfileMask profileMask);
     virtual enum loc_api_adapter_err setSensorPropertiesSync(
             bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk,
             bool accelBiasVarianceRandomWalk_valid, float accelBiasVarianceRandomWalk,
@@ -239,7 +239,6 @@
     virtual LocationError setLPPeProtocolCpSync(GnssConfigLppeControlPlaneMask lppeCP);
     virtual LocationError setLPPeProtocolUpSync(GnssConfigLppeUserPlaneMask lppeUP);
     virtual GnssConfigSuplVersion convertSuplVersion(const uint32_t suplVersion);
-    virtual GnssConfigLppProfile convertLppProfile(const uint32_t lppProfile);
     virtual GnssConfigLppeControlPlaneMask convertLppeCp(const uint32_t lppeControlPlaneMask);
     virtual GnssConfigLppeUserPlaneMask convertLppeUp(const uint32_t lppeUserPlaneMask);
     virtual LocationError setEmergencyExtensionWindowSync(const uint32_t emergencyExtensionSeconds);
diff --git a/etc/gps.conf b/etc/gps.conf
index beb9bb4..f7e0972 100644
--- a/etc/gps.conf
+++ b/etc/gps.conf
@@ -74,10 +74,12 @@
 ####################################
 #  LTE Positioning Profile Settings
 ####################################
+# LPP_PROFILE is a bit mask
 # 0: Enable RRLP on LTE(Default)
-# 1: Enable LPP_User_Plane on LTE
-# 2: Enable LPP_Control_Plane
-# 3: Enable both LPP_User_Plane and LPP_Control_Plane
+# 0x1: LPP User Plane
+# 0x2: LPP Control Plane
+# 0x4: LPP User Plane for NR5G
+# 0x8: LPP Control Plane for NR5G
 LPP_PROFILE = 2
 
 ####################################
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index 97ecb73..0024347 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -664,22 +664,6 @@
     }
 }
 
-inline uint32_t
-GnssAdapter::convertLppProfile(const GnssConfigLppProfile lppProfile)
-{
-    switch (lppProfile) {
-        case GNSS_CONFIG_LPP_PROFILE_USER_PLANE:
-            return 1;
-        case GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE:
-            return 2;
-        case GNSS_CONFIG_LPP_PROFILE_USER_PLANE_AND_CONTROL_PLANE:
-            return 3;
-        case GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE:
-        default:
-            return 0;
-    }
-}
-
 uint32_t
 GnssAdapter::convertLppeCp(const GnssConfigLppeControlPlaneMask lppeControlPlaneMask)
 {
@@ -906,12 +890,9 @@
             GNSS_CONFIG_FLAGS_SUPL_VERSION_VALID_BIT |
             GNSS_CONFIG_FLAGS_AGLONASS_POSITION_PROTOCOL_VALID_BIT |
             GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT;
-    gnssConfigRequested.suplVersion =
-            mLocApi->convertSuplVersion(gpsConf.SUPL_VER);
-    gnssConfigRequested.lppProfile =
-            mLocApi->convertLppProfile(gpsConf.LPP_PROFILE);
-    gnssConfigRequested.aGlonassPositionProtocolMask =
-            gpsConf.A_GLONASS_POS_PROTOCOL_SELECT;
+    gnssConfigRequested.suplVersion = mLocApi->convertSuplVersion(gpsConf.SUPL_VER);
+    gnssConfigRequested.lppProfileMask = gpsConf.LPP_PROFILE;
+    gnssConfigRequested.aGlonassPositionProtocolMask = gpsConf.A_GLONASS_POS_PROTOCOL_SELECT;
     if (gpsConf.LPPE_CP_TECHNOLOGY) {
         gnssConfigRequested.flags |= GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT;
         gnssConfigRequested.lppeControlPlaneMask =
@@ -1121,7 +1102,7 @@
     if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
         if (gnssConfigNeedEngineUpdate.flags &
                 GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
-            err = mLocApi->setLPPConfigSync(gnssConfigRequested.lppProfile);
+            err = mLocApi->setLPPConfigSync(gnssConfigRequested.lppProfileMask);
             if (index < count) {
                 errsList[index] = err;
             }
@@ -1342,8 +1323,8 @@
                 index++;
             }
             if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
-                uint32_t newLppProfile = mAdapter.convertLppProfile(gnssConfigRequested.lppProfile);
-                ContextBase::mGps_conf.LPP_PROFILE = newLppProfile;
+                uint32_t newLppProfileMask = gnssConfigRequested.lppProfileMask;
+                ContextBase::mGps_conf.LPP_PROFILE = newLppProfileMask;
                 index++;
             }
             if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT) {
diff --git a/gnss/GnssAdapter.h b/gnss/GnssAdapter.h
index 2494e84..171e0df 100644
--- a/gnss/GnssAdapter.h
+++ b/gnss/GnssAdapter.h
@@ -524,7 +524,6 @@
 
     /*==== CONVERSION ===================================================================*/
     static uint32_t convertSuplVersion(const GnssConfigSuplVersion suplVersion);
-    static uint32_t convertLppProfile(const GnssConfigLppProfile lppProfile);
     static uint32_t convertEP4ES(const GnssConfigEmergencyPdnForEmergencySupl);
     static uint32_t convertSuplEs(const GnssConfigSuplEmergencyServices suplEmergencyServices);
     static uint32_t convertLppeCp(const GnssConfigLppeControlPlaneMask lppeControlPlaneMask);
diff --git a/location/LocationDataTypes.h b/location/LocationDataTypes.h
index 5fed7dd..fa378aa 100644
--- a/location/LocationDataTypes.h
+++ b/location/LocationDataTypes.h
@@ -295,12 +295,14 @@
 } GnssConfigSuplVersion;
 
 // LTE Positioning Profile
+typedef uint16_t GnssConfigLppProfileMask;
 typedef enum {
-    GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE = 0,              // RRLP on LTE (Default)
-    GNSS_CONFIG_LPP_PROFILE_USER_PLANE,                   // LPP User Plane (UP) on LTE
-    GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE,                // LPP_Control_Plane (CP)
-    GNSS_CONFIG_LPP_PROFILE_USER_PLANE_AND_CONTROL_PLANE, // Both LPP UP and CP
-} GnssConfigLppProfile;
+    GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE = 0,                         // RRLP on LTE (Default)
+    GNSS_CONFIG_LPP_PROFILE_USER_PLANE_BIT                 = (1<<0), // LPP User Plane (UP) on LTE
+    GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_BIT              = (1<<1), // LPP_Control_Plane (CP)
+    GNSS_CONFIG_LPP_PROFILE_USER_PLANE_OVER_NR5G_SA_BIT    = (1<<2), // LPP User Plane (UP) on LTE
+    GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE_OVER_NR5G_SA_BIT = (1<<3), // LPP_Control_Plane (CP)
+} GnssConfigLppProfileBits;
 
 // Technology for LPPe Control Plane
 typedef uint16_t GnssConfigLppeControlPlaneMask;
@@ -1429,7 +1431,7 @@
     GnssConfigGpsLock gpsLock;
     GnssConfigSuplVersion suplVersion;
     GnssConfigSetAssistanceServer assistanceServer;
-    GnssConfigLppProfile lppProfile;
+    GnssConfigLppProfileMask lppProfileMask;
     GnssConfigLppeControlPlaneMask lppeControlPlaneMask;
     GnssConfigLppeUserPlaneMask lppeUserPlaneMask;
     GnssConfigAGlonassPositionProtocolMask aGlonassPositionProtocolMask;
@@ -1447,7 +1449,7 @@
                 gpsLock == config.gpsLock &&
                 suplVersion == config.suplVersion &&
                 assistanceServer.equals(config.assistanceServer) &&
-                lppProfile == config.lppProfile &&
+                lppProfileMask == config.lppProfileMask &&
                 lppeControlPlaneMask == config.lppeControlPlaneMask &&
                 lppeUserPlaneMask == config.lppeUserPlaneMask &&
                 aGlonassPositionProtocolMask == config.aGlonassPositionProtocolMask &&