[VOL-3774] Remove hardcording of NNI port speed

Change-Id: I1c1e50403ac0faabed31ed11be2b59a863c62cb9
diff --git a/agent/src/core_utils.cc b/agent/src/core_utils.cc
index df0b7a1..af3f7ad 100644
--- a/agent/src/core_utils.cc
+++ b/agent/src/core_utils.cc
@@ -778,7 +778,7 @@
    return field_val;
 }
 
-Status pushOltOperInd(uint32_t intf_id, const char *type, const char *state)
+Status pushOltOperInd(uint32_t intf_id, const char *type, const char *state, uint32_t speed)
 {
     ::openolt::Indication ind;
     ::openolt::IntfOperIndication* intf_oper_ind = new ::openolt::IntfOperIndication;
@@ -786,6 +786,7 @@
     intf_oper_ind->set_type(type);
     intf_oper_ind->set_intf_id(intf_id);
     intf_oper_ind->set_oper_state(state);
+    intf_oper_ind->set_speed(speed);
     ind.set_allocated_intf_oper_ind(intf_oper_ind);
     oltIndQ.push(ind);
     return Status::OK;
@@ -998,6 +999,20 @@
     return err;
 }
 
+bcmos_errno get_nni_interface_speed(bcmolt_interface id, uint32_t *speed)
+{
+    bcmos_errno err;
+    bcmolt_nni_interface_key nni_key;
+    bcmolt_nni_interface_cfg nni_cfg;
+    nni_key.id = id;
+
+    BCMOLT_CFG_INIT(&nni_cfg, nni_interface, nni_key);
+    BCMOLT_FIELD_SET_PRESENT(&nni_cfg.data, nni_interface_cfg_data, speed);
+    err = bcmolt_cfg_get(dev_id, &nni_cfg.hdr);
+    *speed = nni_cfg.data.speed;
+    return err;
+}
+
 Status install_gem_port(int32_t intf_id, int32_t onu_id, int32_t uni_id, int32_t gemport_id, std::string board_technology) {
     gemport_status_map_key_tuple gem_status_key(intf_id, onu_id, uni_id, gemport_id);