int tx_ph_rach_req(struct osmocom_ms *ms);
/* Transmit L1CTL_DM_EST_REQ */
-int tx_ph_dm_est_req(struct osmocom_ms *ms, uint16_t band_arfcn, uint8_t chan_nr);
+int tx_ph_dm_est_req(struct osmocom_ms *ms, uint16_t band_arfcn, uint8_t chan_nr,
+ uint8_t tsc);
/* Transmit FBSB_REQ */
int l1ctl_tx_fbsb_req(struct osmocom_ms *ms, uint16_t arfcn,
uint8_t flags, uint16_t timeout, uint8_t sync_info_idx,
printf("Channel type not supported, exitting.\n");
exit(-ENOTSUP);
}
- tx_ph_dm_est_req(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr);
+ tx_ph_dm_est_req(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr,
+ rr->cd_now.tsc);
#endif
/* start establishmnet */
struct msgb *nmsg;
/* change radio to new channel */
- tx_ph_dm_est_req(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr);
+ tx_ph_dm_est_req(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr,
+ rr->cd_now.tsc);
/* send DL-ESTABLISH REQUEST */
nmsg = gsm48_l3_msgb_alloc();
/* change radio to old channel */
tx_ph_dm_est_req(ms, rr->cd_now.arfcn,
- rr->cd_now.chan_nr);
+ rr->cd_now.chan_nr, rr->cd_now.tsc);
/* re-establish old link */
nmsg = gsm48_l3_msgb_alloc();
memcpy(&rr->chan_desc, &rr->chan_last, sizeof(*cd));
/* change radio to old channel */
- tx_ph_dm_est_req(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr);
+ tx_ph_dm_est_req(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr,
+ rr->cd_now.tsc);
/* re-establish old link */
nmsg = gsm48_l3_msgb_alloc();
}
/* Transmit L1CTL_DM_EST_REQ */
-int tx_ph_dm_est_req(struct osmocom_ms *ms, uint16_t band_arfcn, uint8_t chan_nr)
+int tx_ph_dm_est_req(struct osmocom_ms *ms, uint16_t band_arfcn, uint8_t chan_nr,
+ uint8_t tsc)
{
struct msgb *msg;
struct l1ctl_info_ul *ul;
ul->tx_power = 0; /* FIXME: initial TX power */
req = (struct l1ctl_dm_est_req *) msgb_put(msg, sizeof(*req));
- req->tsc = 7; /* FIXME */
+ req->tsc = tsc;
req->h = 0;
req->h0.band_arfcn = htons(band_arfcn);
}
/* request L1 to go to dedicated mode on assigned channel */
- tx_ph_dm_est_req(ms, arfcn, ia->chan_desc.chan_nr);
+ tx_ph_dm_est_req(ms, arfcn, ia->chan_desc.chan_nr,
+ ia->chan_desc.h0.tsc);
/* request L2 to establish the SAPI0 connection */
gsm48_tx_loc_upd_req(ms, ia->chan_desc.chan_nr);
struct l1ctl_info_ul *ul = (struct l1ctl_info_ul *) l1h->data;
struct l1ctl_dm_est_req *est_req = (struct l1ctl_dm_est_req *) ul->payload;
- printd("L1CTL_DM_EST_REQ (arfcn=%u, chan_nr=0x%02x)\n",
- ntohs(est_req->h0.band_arfcn), ul->chan_nr);
+ printd("L1CTL_DM_EST_REQ (arfcn=%u, chan_nr=0x%02x, tsc=%u)\n",
+ ntohs(est_req->h0.band_arfcn), ul->chan_nr, est_req->tsc);
if (ntohs(est_req->h0.band_arfcn) != l1s.serving_cell.arfcn) {
/* FIXME: ARFCN */