summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/common/l1ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/layer23/src/common/l1ctl.c')
-rw-r--r--src/host/layer23/src/common/l1ctl.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index dd1b6eee..bdb4853b 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -473,7 +473,7 @@ int l1ctl_tx_rach_req(struct osmocom_ms *ms, uint8_t ra, uint16_t offset,
/* Transmit L1CTL_DM_EST_REQ */
int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
uint8_t chan_nr, uint8_t tsc, uint8_t tch_mode,
- uint8_t audio_mode)
+ uint8_t audio_mode, int tx, int sync, int index)
{
struct msgb *msg;
struct l1ctl_info_ul *ul;
@@ -496,6 +496,14 @@ int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
req->h0.band_arfcn = htons(band_arfcn);
req->tch_mode = tch_mode;
req->audio_mode = audio_mode;
+ req->flags = (tx) ? 0 : L1CTL_EST_F_RXONLY;
+ if (sync) {
+ if (index >= 0) {
+ req->flags |= L1CTL_EST_F_NBSYNC;
+ req->neighbor = index;
+ } else
+ req->flags |= L1CTL_EST_F_LASTSYNC;
+ }
return osmo_send_l1(ms, msg);
}
@@ -503,7 +511,7 @@ int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
int l1ctl_tx_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
uint16_t *ma, uint8_t ma_len,
uint8_t chan_nr, uint8_t tsc, uint8_t tch_mode,
- uint8_t audio_mode)
+ uint8_t audio_mode, int tx, int sync, int index)
{
struct msgb *msg;
struct l1ctl_info_ul *ul;
@@ -531,6 +539,14 @@ int l1ctl_tx_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
req->h1.ma[i] = htons(ma[i]);
req->tch_mode = tch_mode;
req->audio_mode = audio_mode;
+ req->flags = (tx) ? 0 : L1CTL_EST_F_RXONLY;
+ if (sync) {
+ if (index >= 0) {
+ req->flags |= L1CTL_EST_F_NBSYNC;
+ req->neighbor = index;
+ } else
+ req->flags |= L1CTL_EST_F_LASTSYNC;
+ }
return osmo_send_l1(ms, msg);
}