[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/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);