summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-08-31 20:15:01 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-08-31 20:15:17 +0700
commit93fcb40174a940ca9cd1eeb001c10375e2702255 (patch)
treee40132d516e241a4a6375527a182310bf0aa3d4a
parenta93785bf437c45131aad0bac52b7c3f3db9ecee3 (diff)
[HACK] l1gprs: always send (empty) DATA.indfixeria/l1gprs_hack
This is a quick hack to ensure constant stream of RTS.ind emitted by the modem application (which is using DATA.ind for that). Change-Id: I529f46d8d4b2e9c0a607d91e318d9d7c009b7603 Related: OS#5500
-rw-r--r--include/l1ctl_proto.h7
-rw-r--r--src/shared/l1gprs.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h
index f0bc56d2..55f43af5 100644
--- a/include/l1ctl_proto.h
+++ b/include/l1ctl_proto.h
@@ -59,6 +59,7 @@ enum {
L1CTL_GPRS_DL_BLOCK_IND = 0x23,
/* Extended (11-bit) RACH (see 3GPP TS 05.02, section 5.2.7) */
L1CTL_EXT_RACH_REQ = 0x24,
+ L1CTL_GPRS_RTS_IND = 0x25,
};
enum ccch_mode {
@@ -387,4 +388,10 @@ struct l1ctl_gprs_dl_block_ind {
uint8_t data[0];
} __attribute__((packed));
+/* payload of L1CTL_GPRS_RTS_IND */
+struct l1ctl_gprs_rts_ind {
+ uint32_t fn;
+ uint8_t tn;
+} __attribute__((packed));
+
#endif /* __L1CTL_PROTO_H__ */
diff --git a/src/shared/l1gprs.c b/src/shared/l1gprs.c
index 61b6eea8..35e43ea9 100644
--- a/src/shared/l1gprs.c
+++ b/src/shared/l1gprs.c
@@ -697,6 +697,7 @@ struct msgb *l1gprs_handle_dl_block_ind(struct l1gprs_state *gprs,
l1gprs_check_pending_tbfs(gprs, ind->hdr.fn);
+#if 0
if (pdch->ul_tbf_count + pdch->dl_tbf_count == 0) {
if (pdch->pending_ul_tbf_count + pdch->pending_dl_tbf_count > 0)
LOGP_PDCH(pdch, LOGL_DEBUG,
@@ -708,6 +709,7 @@ struct msgb *l1gprs_handle_dl_block_ind(struct l1gprs_state *gprs,
ind->hdr.fn);
return NULL;
}
+#endif
msg = l1gprs_l1ctl_msgb_alloc(L1CTL_GPRS_DL_BLOCK_IND);
if (OSMO_UNLIKELY(msg == NULL)) {
@@ -731,6 +733,8 @@ struct msgb *l1gprs_handle_dl_block_ind(struct l1gprs_state *gprs,
if (ind->data_len == 0)
return msg;
+ if (pdch->ul_tbf_count + pdch->dl_tbf_count == 0)
+ return msg; /* HACK: ensure constant stream of RTS.ind in the modem app */
if (BLOCK_IND_IS_PTCCH(ind)) {
memcpy(msgb_put(msg, ind->data_len), ind->data, ind->data_len);
return msg;