[layer23] use the TSC that is passed from L1 when going in dedicated mode
This commit is contained in:
parent
39a6b56f88
commit
bc860c43c2
|
@ -17,7 +17,8 @@ int tx_ph_data_req(struct osmocom_ms *ms, struct msgb *msg,
|
|||
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,
|
||||
|
|
|
@ -3008,7 +3008,8 @@ static int gsm48_rr_dl_est(struct osmocom_ms *ms)
|
|||
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 */
|
||||
|
@ -3658,7 +3659,8 @@ static int gsm48_rr_susp_cnf_dedicated(struct osmocom_ms *ms, struct msgb *msg)
|
|||
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();
|
||||
|
@ -4096,7 +4098,7 @@ static int gsm48_rr_mdl_error_ind(struct osmocom_ms *ms, struct msgb *msg)
|
|||
|
||||
/* 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();
|
||||
|
@ -4133,7 +4135,8 @@ static void timeout_rr_t3124(void *arg)
|
|||
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();
|
||||
|
|
|
@ -318,7 +318,8 @@ 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)
|
||||
{
|
||||
struct msgb *msg;
|
||||
struct l1ctl_info_ul *ul;
|
||||
|
@ -337,7 +338,7 @@ int tx_ph_dm_est_req(struct osmocom_ms *ms, uint16_t band_arfcn, uint8_t chan_nr
|
|||
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);
|
||||
|
||||
|
|
|
@ -187,7 +187,8 @@ static int gsm48_rx_imm_ass(struct msgb *msg, struct osmocom_ms *ms)
|
|||
}
|
||||
|
||||
/* 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);
|
||||
|
|
|
@ -167,8 +167,8 @@ static void l1ctl_rx_dm_est_req(struct msgb *msg)
|
|||
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 */
|
||||
|
|
Loading…
Reference in New Issue