fixeria has submitted this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/34733?usp=email )
Change subject: layer23: send UL/DL GPRS blocks over GSMTAP
......................................................................
layer23: send UL/DL GPRS blocks over GSMTAP
Note that despite the VTY interface offers various channel type
filtering facilities, the actual filtering is not implemented.
This patch simply brings PS domain in consistency with CS domain:
the UL and DL GPRS blocks are now being sent over GSMTAP without
any filtering, just like GSM MAC blocks.
Change-Id: I338205bee44fe182233efc5619a3d528cd07d932
Related: OS#5500, OS#6209
---
M src/host/layer23/src/common/l1ctl.c
1 file changed, 37 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index 589af09..c4589f0 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -961,6 +961,8 @@
static int rx_l1_gprs_dl_block_ind(struct osmocom_ms *ms, struct msgb *msg)
{
const struct l1ctl_gprs_dl_block_ind *ind = (void *)msg->l1h;
+ uint8_t gsmtap_chan;
+ uint32_t fn;
if (msgb_l1len(msg) < sizeof(*ind)) {
LOGP(DL1C, LOGL_ERROR,
@@ -977,8 +979,20 @@
msg->l2h = (void *)&ind->data[0];
+ fn = ntohl(ind->hdr.fn);
+ if ((fn % 104) == 12)
+ gsmtap_chan = GSMTAP_CHANNEL_PTCCH;
+ else
+ gsmtap_chan = GSMTAP_CHANNEL_PDTCH;
+
+ gsmtap_send(l23_cfg.gsmtap.inst,
+ ms->rrlayer.cd_now.arfcn,
+ ind->hdr.tn, gsmtap_chan, 0, fn,
+ rxlev2dbm(ind->meas.rx_lev), 0,
+ msgb_l2(msg), msgb_l2len(msg));
+
DEBUGP(DL1C, "Rx GPRS DL block (fn=%u, tn=%u, len=%u): %s\n",
- ntohl(ind->hdr.fn), ind->hdr.tn, msgb_l2len(msg), msgb_hexdump_l2(msg));
+ fn, ind->hdr.tn, msgb_l2len(msg), msgb_hexdump_l2(msg));
/* distribute or drop */
if (ms->l1_entity.l1_gprs_dl_block_ind)
@@ -1037,6 +1051,11 @@
DEBUGP(DL1C, "Tx GPRS UL block (fn=%u, tn=%u, len=%zu): %s\n",
fn, tn, data_len, osmo_hexdump(data, data_len));
+ gsmtap_send(l23_cfg.gsmtap.inst,
+ ms->rrlayer.cd_now.arfcn | GSMTAP_ARFCN_F_UPLINK,
+ tn, GSMTAP_CHANNEL_PDTCH, 0, fn, 127, 0,
+ data, data_len);
+
return osmo_send_l1(ms, msg);
}
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34733?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I338205bee44fe182233efc5619a3d528cd07d932
Gerrit-Change-Number: 34733
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged