laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/29173 )
Change subject: layer23: explicitly set chan_nr / link_id in L1CTL_RACH_REQ
......................................................................
layer23: explicitly set chan_nr / link_id in L1CTL_RACH_REQ
The underlying L1 implementation uses both chan_nr and link_id to
determine a logical channel for sending an Access Burst. If not
set (both 0x00), RSL_CHAN_RACH is assumed. Indicate it implicitly.
Change-Id: Ia40f67920bd712e572b8ea5219eb83064106bd5d
---
M src/host/layer23/include/osmocom/bb/common/l1ctl.h
M src/host/layer23/src/common/l1ctl.c
M src/host/layer23/src/common/l1ctl_lapdm_glue.c
3 files changed, 12 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h
b/src/host/layer23/include/osmocom/bb/common/l1ctl.h
index 02ffa34..7e9bf83 100644
--- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h
+++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h
@@ -20,8 +20,9 @@
uint8_t algo, uint8_t *key, uint8_t len);
/* Transmit L1CTL_RACH_REQ */
-int l1ctl_tx_rach_req(struct osmocom_ms *ms, uint8_t ra, uint16_t offset,
- uint8_t combined);
+int l1ctl_tx_rach_req(struct osmocom_ms *ms,
+ uint8_t chan_nr, uint8_t link_id,
+ uint8_t ra, uint16_t offset, uint8_t combined);
/* Transmit L1CTL_DM_EST_REQ */
int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index 5e02dbe..e33074a 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -523,8 +523,9 @@
}
/* Transmit L1CTL_RACH_REQ */
-int l1ctl_tx_rach_req(struct osmocom_ms *ms, uint8_t ra, uint16_t offset,
- uint8_t combined)
+int l1ctl_tx_rach_req(struct osmocom_ms *ms,
+ uint8_t chan_nr, uint8_t link_id,
+ uint8_t ra, uint16_t offset, uint8_t combined)
{
struct msgb *msg;
struct l1ctl_info_ul *ul;
@@ -536,6 +537,8 @@
DEBUGP(DL1C, "RACH Req. offset=%d combined=%d\n", offset, combined);
ul = (struct l1ctl_info_ul *) msgb_put(msg, sizeof(*ul));
+ ul->chan_nr = chan_nr;
+ ul->link_id = link_id;
req = (struct l1ctl_rach_req *) msgb_put(msg, sizeof(*req));
req->ra = ra;
req->offset = htons(offset);
diff --git a/src/host/layer23/src/common/l1ctl_lapdm_glue.c
b/src/host/layer23/src/common/l1ctl_lapdm_glue.c
index df02370..a754476 100644
--- a/src/host/layer23/src/common/l1ctl_lapdm_glue.c
+++ b/src/host/layer23/src/common/l1ctl_lapdm_glue.c
@@ -20,6 +20,7 @@
#include <l1ctl_proto.h>
+#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/gsm/prim.h>
#include <osmocom/bb/common/l1ctl.h>
@@ -46,7 +47,9 @@
case PRIM_PH_RACH:
l1ctl_tx_param_req(ms, pp->u.rach_req.ta,
pp->u.rach_req.tx_power);
- rc = l1ctl_tx_rach_req(ms, pp->u.rach_req.ra,
+ rc = l1ctl_tx_rach_req(ms,
+ RSL_CHAN_RACH, 0x00,
+ pp->u.rach_req.ra,
pp->u.rach_req.offset,
pp->u.rach_req.is_combined_ccch);
break;
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/29173
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ia40f67920bd712e572b8ea5219eb83064106bd5d
Gerrit-Change-Number: 29173
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged