diff --git a/agent/Makefile.in b/agent/Makefile.in
index 648c621..abcc0cc 100644
--- a/agent/Makefile.in
+++ b/agent/Makefile.in
@@ -48,7 +48,7 @@
 # This specifies the GIT tag in https://github.com/opencord/voltha-protos
 # repo that we need to refer to, to pick the right version of
 # openolt.proto and tech_profile.proto
-OPENOLT_PROTO_VER ?= v5.1.0
+OPENOLT_PROTO_VER ?= v5.2.1
 
 # Variables used for Inband build
 INBAND = "n"
diff --git a/agent/common/core.h b/agent/common/core.h
index 09ff890..6dba610 100644
--- a/agent/common/core.h
+++ b/agent/common/core.h
@@ -212,6 +212,7 @@
 Status EnablePonIf_(uint32_t intf_id);
 Status DisablePonIf_(uint32_t intf_id);
 Status SetStateUplinkIf_(uint32_t intf_id, bool set_state);
+uint32_t GetNniSpeed_(uint32_t intf_id);
 unsigned NumNniIf_();
 unsigned NumPonIf_();
 Status OmciMsgOut_(uint32_t intf_id, uint32_t onu_id, const std::string pkt);
@@ -246,7 +247,7 @@
 Status GetPonRxPower_(uint32_t intf_id, uint32_t onu_id, openolt::PonRxPowerData* response);
 int get_status_bcm_cli_quit(void);
 uint16_t get_dev_id(void);
-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);
 uint64_t get_flow_status(uint16_t flow_id, uint16_t flow_type, uint16_t data_id);
 
 void stats_collection();
diff --git a/agent/common/main.cc b/agent/common/main.cc
index 549bd59..ce55e4d 100644
--- a/agent/common/main.cc
+++ b/agent/common/main.cc
@@ -112,10 +112,10 @@
         status = EnablePonIf_(i);
         if (!status.ok()) {
             // raise alarm to report error in enabling PON
-            pushOltOperInd(i, "pon", "down");
+            pushOltOperInd(i, "pon", "down", 0 /*Speed will be ignored in the adapter for PONs*/ );
         }
         else
-            pushOltOperInd(i, "pon", "up");
+            pushOltOperInd(i, "pon", "up", 0 /*Speed will be ignored in the adapter for PONs*/);
     }
     sleep(2);
     // Enable all NNI interfaces.
@@ -131,13 +131,15 @@
     }
 #endif
     //only for nni-65536 mapping to intf_id 0
+    uint32_t nni_speed = GetNniSpeed_(0);
     status = SetStateUplinkIf_(0, true);
     if (!status.ok()) {
         // raise alarm to report error in enabling NNI
-        pushOltOperInd(0, "nni", "down");
+        pushOltOperInd(0, "nni", "down", nni_speed);
     }
-    else
-        pushOltOperInd(0, "nni", "up");
+    else{
+        pushOltOperInd(0, "nni", "up", nni_speed);
+    }
 
     for (int i = 1; i < argc; ++i) {
        if(strcmp(argv[i-1], "--interface") == 0 || (strcmp(argv[i-1], "--intf") == 0)) {
diff --git a/agent/src/core_api_handler.cc b/agent/src/core_api_handler.cc
index 2bdefaf..0e0bb62 100644
--- a/agent/src/core_api_handler.cc
+++ b/agent/src/core_api_handler.cc
@@ -1105,6 +1105,19 @@
     return Status::OK;
 }
 
+uint32_t GetNniSpeed_(uint32_t intf_id) {
+    bcmos_errno err = BCM_ERR_OK;
+
+    uint32_t speed;
+    err = get_nni_interface_speed((bcmolt_interface)intf_id, &speed);
+    if (err != BCM_ERR_OK) {
+        OPENOLT_LOG(WARNING, openolt_log_id, "Failed to read speed of NNI interface: %d\n", intf_id);
+        return 0; //This will cause the adapter to use the default speed value
+    }
+
+    return speed;
+}
+
 Status DisablePonIf_(uint32_t intf_id) {
     bcmos_errno err;
     bcmolt_pon_interface_cfg interface_obj;
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);
 
diff --git a/agent/src/core_utils.h b/agent/src/core_utils.h
index 72ae3bb..344ce5e 100644
--- a/agent/src/core_utils.h
+++ b/agent/src/core_utils.h
@@ -93,6 +93,7 @@
 unsigned NumNniIf_();
 unsigned NumPonIf_();
 bcmos_errno get_nni_interface_status(bcmolt_interface id, bcmolt_interface_state *state);
+bcmos_errno get_nni_interface_speed(bcmolt_interface id, uint32_t *speed);
 Status install_gem_port(int32_t intf_id, int32_t onu_id, int32_t uni_id, int32_t gemport_id, std::string board_technology);
 Status remove_gem_port(int32_t intf_id, int32_t onu_id, int32_t uni_id, int32_t gemport_id, std::string board_technology);
 Status enable_encryption_for_gem_port(int32_t intf_id, int32_t gemport_id, std::string board_technology);
diff --git a/agent/test/Makefile b/agent/test/Makefile
index 26e984a..5897ad3 100644
--- a/agent/test/Makefile
+++ b/agent/test/Makefile
@@ -21,7 +21,7 @@
 TOP_DIR=`pwd`
 OPENOLTDEVICE ?= sim
 
-OPENOLT_PROTO_VER ?= v5.1.0
+OPENOLT_PROTO_VER ?= v5.2.1
 
 ########################################################################
 ##
