VOL-306 :driver changes to fetch PON statistics
Change-Id: I3130e4ee035b9ff7a520b6506a0424da83f0a60d
diff --git a/src/asfvolt16_driver.h b/src/asfvolt16_driver.h
index 6f5a884..6871e2b 100755
--- a/src/asfvolt16_driver.h
+++ b/src/asfvolt16_driver.h
@@ -71,7 +71,8 @@
extern uint32_t asfvolt16_bal_cfg_clear(BalKey *key);
extern uint32_t asfvolt16_bal_cfg_get(BalKey *key, BalCfg *cfg);
extern void asfvolt16_send_omci_msg(uint16_t olt_no, uint32_t onu_nu, char* packet_to_send);
-extern uint32_t asfvolt16_bal_stats_get(BalIntfType intf_type, uint32_t intf_id, BalInterfaceStatData *statData);
+extern uint32_t asfvolt16_bal_stats_get(BalIntfType intf_type, uint32_t intf_id, BalInterfaceStatData *statData,
+ BalInterfaceKey *statKey);
grpc_c_client_t *client;
#endif /* DRIVERAPP_ASFVOLT16_DRIVER */
diff --git a/src/bal_stats_hdlr.c b/src/bal_stats_hdlr.c
index 0c0de39..6c20e44 100755
--- a/src/bal_stats_hdlr.c
+++ b/src/bal_stats_hdlr.c
@@ -24,7 +24,8 @@
* interface type(NNI/PON/EPON 1G/EPON 10G) *
* port number *
********************************************************************/
-uint32_t asfvolt16_bal_stats_get(BalIntfType intf_type, uint32_t intf_id, BalInterfaceStatData *statData)
+uint32_t asfvolt16_bal_stats_get(BalIntfType intf_type, uint32_t intf_id, BalInterfaceStatData *statData,
+ BalInterfaceKey *statKey)
{
bcmbal_interface_stat interface_stats;
@@ -56,6 +57,13 @@
if(err == BCM_ERR_OK)
{
+ /*interface key*/
+ statKey->has_intf_id = BAL_STAT_PRES;
+ statKey->intf_id = interface_stats.key.intf_id;
+ statKey->has_intf_type = BAL_STAT_PRES;
+ statKey->intf_type = interface_stats.key.intf_type;
+
+ /*interface stat data*/
statData->has_rx_bytes = BAL_STAT_PRES;
statData->rx_bytes = interface_stats.data.rx_bytes;
statData->has_rx_packets = BAL_STAT_PRES;