aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-09-20 11:20:09 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-09-20 11:22:32 +0200
commiteeae77634560de084767dfc651a0a14f5d7d95a8 (patch)
treeb7ed39a730ab2335f09122cccd6e5d4bcbfc259a
parent0e3083daf597cb34e12693f7ed9bcc006406f085 (diff)
PTCCH: skip Tx DL idle blocks when possible
Same was already done for PDTCH in previous commits. Let's now apply same bits to PTCCH. Related: SYS#4919 Change-Id: If6617964e67fc35eeee1791b06e13bf63ac88f73
-rw-r--r--src/pcu_l1_if.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 25c19333..1600da03 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -531,6 +531,22 @@ int pcu_rx_rts_req_ptcch(struct gprs_rlcmac_bts *bts, uint8_t trx, uint8_t ts,
if (!pdch->m_is_enabled)
return -EAGAIN;
+ /* If there's no TBF attached to this PDCH, we can skip Tx of PTCCH
+ * since there's nothing worthy of being transmitted. This way BTS can
+ * identify idle blocks and send nothing or dumy blocks with reduced
+ * energy for the sake of energy saving.
+ */
+ const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF)
+ + pdch->num_tbfs(GPRS_RLCMAC_UL_TBF);
+ bool skip_idle = (num_tbfs == 0);
+#ifdef ENABLE_DIRECT_PHY
+ /* In DIRECT_PHY mode we want to always submit something to L1 in
+ * TRX0, since BTS is not preparing dummy bursts on idle TS for us: */
+ skip_idle = skip_idle && trx != 0;
+#endif
+ if (skip_idle)
+ return 0;
+
pcu_l1if_tx_ptcch(bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr,
pdch->ptcch_msg, GSM_MACBLOCK_LEN);
return 0;