[VOL-2960] Set correct default power level mode for GPON ONUs

- Power Level Mode for ITU GPON interface is set to its default value (i.e. 0)
  since it is set to 2 by default.

Change-Id: Ib3c2b26536b5153b0dda15984077a75bce060213
diff --git a/VERSION b/VERSION
index 7bf4b6a..e30309f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.4.6
+2.4.7
diff --git a/agent/src/core_api_handler.cc b/agent/src/core_api_handler.cc
index 54f7e0d..3267c6c 100644
--- a/agent/src/core_api_handler.cc
+++ b/agent/src/core_api_handler.cc
@@ -888,6 +888,14 @@
     BCMOLT_MSG_FIELD_SET(&interface_obj, itu.automatic_onu_deactivation.ack_timeout, true);
     BCMOLT_MSG_FIELD_SET(&interface_obj, itu.automatic_onu_deactivation.sfi, true);
     BCMOLT_MSG_FIELD_SET(&interface_obj, itu.automatic_onu_deactivation.loki, true);
+
+    // On GPON, power level mode is not set to its default value (i.e. 0) as documented in Broadcom documentation.
+    // Instead, it is set to 2 which means -6 dbM attenuation. Therefore, we explicitly set it to the default value below.
+    if (board_technology == "GPON") {
+        BCMOLT_MSG_FIELD_SET(&interface_obj, itu.gpon.power_level.pls_maximum_allocation_size, BCMOLT_PON_POWER_LEVEL_PLS_MAXIMUM_ALLOCATION_SIZE_DEFAULT);
+        BCMOLT_MSG_FIELD_SET(&interface_obj, itu.gpon.power_level.mode, BCMOLT_PON_POWER_LEVEL_MODE_DEFAULT);
+    }
+
     BCMOLT_FIELD_SET(&pon_interface_set_state.data, pon_interface_set_pon_interface_state_data,
         operation, BCMOLT_INTERFACE_OPERATION_ACTIVE_WORKING);
 
diff --git a/agent/test/inc/bcmos_common_test.h b/agent/test/inc/bcmos_common_test.h
index 391b444..cef45c5 100644
--- a/agent/test/inc/bcmos_common_test.h
+++ b/agent/test/inc/bcmos_common_test.h
@@ -25,5 +25,7 @@
 extern void* bcmos_calloc(uint32_t size);
 #define BCMOLT_INTERFACE_TYPE_EPON_1_G 3
 #define BCMOLT_INTERFACE_TYPE_EPON_10_G 4
+#define BCMOLT_PON_POWER_LEVEL_PLS_MAXIMUM_ALLOCATION_SIZE_DEFAULT 10
+#define BCMOLT_PON_POWER_LEVEL_MODE_DEFAULT 0
 
 #endif // BCMOS_COMMON_TEST_H_