lms: Drop rx_underruns rate ctr, add tx_drop_* rate ctr

After discussion in [1] and further look at the code, it became obvios
rx_underrun events are not happening in general for any SDR (don't
exist), so let's drop that counter. Instead, add Tx Dropped Packet counters,
which were not accounted prior to this commit.

[1] https://github.com/osmocom/osmo-trx/commit/bde55afd29fc9aae10eb11f6515821afa39b772d

Change-Id: Iff1535c219a4695a511d383d7c4b06ef6eff959d
diff --git a/CommonLibs/trx_rate_ctr.cpp b/CommonLibs/trx_rate_ctr.cpp
index 43e4189..a9ef88c 100644
--- a/CommonLibs/trx_rate_ctr.cpp
+++ b/CommonLibs/trx_rate_ctr.cpp
@@ -93,20 +93,22 @@
 };
 
 const struct value_string trx_chan_ctr_names[] = {
-	{ TRX_CTR_RX_UNDERRUNS,	"rx_underruns" },
 	{ TRX_CTR_RX_OVERRUNS,	"rx_overruns" },
 	{ TRX_CTR_TX_UNDERRUNS,	"tx_underruns" },
 	{ TRX_CTR_RX_DROP_EV,	"rx_drop_events" },
 	{ TRX_CTR_RX_DROP_SMPL,	"rx_drop_samples" },
+	{ TRX_CTR_TX_DROP_EV,	"tx_drop_events" },
+	{ TRX_CTR_TX_DROP_SMPL,	"tx_drop_samples" },
 	{ 0, NULL }
 };
 
 static const struct rate_ctr_desc trx_chan_ctr_desc[] = {
-	[TRX_CTR_RX_UNDERRUNS]		= { "device:rx_underruns",	"Number of Rx underruns" },
-	[TRX_CTR_RX_OVERRUNS]		= { "device:rx_overruns",	"Number of Rx overruns" },
-	[TRX_CTR_TX_UNDERRUNS]		= { "device:tx_underruns",	"Number of Tx underruns" },
+	[TRX_CTR_RX_OVERRUNS]		= { "device:rx_overruns",	"Number of Rx overruns in FIFO queue" },
+	[TRX_CTR_TX_UNDERRUNS]		= { "device:tx_underruns",	"Number of Tx underruns in FIFO queue" },
 	[TRX_CTR_RX_DROP_EV]		= { "device:rx_drop_events",	"Number of times Rx samples were dropped by HW" },
 	[TRX_CTR_RX_DROP_SMPL]		= { "device:rx_drop_samples",	"Number of Rx samples dropped by HW" },
+	[TRX_CTR_TX_DROP_EV]		= { "device:tx_drop_events",	"Number of times Tx samples were dropped by HW" },
+	[TRX_CTR_TX_DROP_SMPL]		= { "device:tx_drop_samples",	"Number of Tx samples dropped by HW" }
 };
 
 static const struct rate_ctr_group_desc trx_chan_ctr_group_desc = {
@@ -126,8 +128,6 @@
 		if (ctrs_pending[chan].chan == PENDING_CHAN_NONE)
 			continue;
 		LOGCHAN(chan, DMAIN, INFO) << "rate_ctr update";
-		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_UNDERRUNS];
-		rate_ctr_add(ctr, ctrs_pending[chan].rx_underruns - ctr->current);
 		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_OVERRUNS];
 		rate_ctr_add(ctr, ctrs_pending[chan].rx_overruns - ctr->current);
 		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TX_UNDERRUNS];
@@ -136,6 +136,10 @@
 		rate_ctr_add(ctr, ctrs_pending[chan].rx_dropped_events - ctr->current);
 		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_DROP_SMPL];
 		rate_ctr_add(ctr, ctrs_pending[chan].rx_dropped_samples - ctr->current);
+		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TX_DROP_EV];
+		rate_ctr_add(ctr, ctrs_pending[chan].tx_dropped_events - ctr->current);
+		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TX_DROP_SMPL];
+		rate_ctr_add(ctr, ctrs_pending[chan].tx_dropped_samples - ctr->current);
 
 		/* Mark as done */
 		ctrs_pending[chan].chan = PENDING_CHAN_NONE;