[layer23] Fixed DM est./release for current supported channel types.
Now layer23 supports selecting TS 0-4 with SDCCH/8 channels. But some tests showed me that it doesn't work. Please help debugging. Added DM release function to l1ctl.c and gsm48_rr.c.
This commit is contained in:
parent
0d0c9e8f5b
commit
4e03d6f822
|
@ -161,6 +161,7 @@ int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc,
|
|||
int gsm48_rr_enc_cm2(struct osmocom_ms *ms, struct gsm48_classmark2 *cm);
|
||||
int gsm48_rr_tx_rand_acc(struct osmocom_ms *ms, struct msgb *msg);
|
||||
int gsm48_rr_los(struct osmocom_ms *ms);
|
||||
int gsm48_rr_rach_conf(struct osmocom_ms *ms, uint32_t fn);
|
||||
extern const char *gsm48_rr_state_names[];
|
||||
|
||||
#endif /* _GSM48_RR_H */
|
||||
|
|
|
@ -17,8 +17,12 @@ 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,
|
||||
uint8_t tsc);
|
||||
int tx_ph_dm_est_req(struct osmocom_ms *ms, uint16_t band_arfcn,
|
||||
uint8_t chan_nr, uint8_t tsc);
|
||||
|
||||
/* Transmit L1CTL_DM_REL_REQ */
|
||||
int tx_ph_dm_rel_req(struct osmocom_ms *ms);
|
||||
|
||||
/* 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,
|
||||
|
|
|
@ -2309,8 +2309,8 @@ static int gsm322_cs_powerscan(struct osmocom_ms *ms)
|
|||
|
||||
/* start scan on radio interface */
|
||||
cs->powerscan = 1;
|
||||
#warning TESTING!!!!
|
||||
usleep(300000);
|
||||
//#warning TESTING!!!!
|
||||
//usleep(300000);
|
||||
return l1ctl_tx_pm_req_range(ms, s, e);
|
||||
}
|
||||
|
||||
|
@ -2833,8 +2833,8 @@ static int gsm322_c_conn_mode_1(struct osmocom_ms *ms, struct msgb *msg)
|
|||
hack = 5;
|
||||
gsm322_sync_to_cell(ms, cs);
|
||||
cs->si = cs->list[cs->arfcn].sysinfo;
|
||||
#warning TESTING: laforge must fix the sync error when sending fbsb request too close to each other. also we must get a response with arfcn or a confirm, so we know where the response belongs to.
|
||||
usleep(300000);
|
||||
//#warning TESTING!!!!
|
||||
//usleep(300000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#include <osmocom/l1l2_interface.h>
|
||||
#include <osmocom/logging.h>
|
||||
#include <osmocom/networks.h>
|
||||
#include <osmocom/l1ctl.h>
|
||||
|
||||
static int gsm48_rcv_rsl(struct osmocom_ms *ms, struct msgb *msg);
|
||||
static int gsm48_rr_dl_est(struct osmocom_ms *ms);
|
||||
|
@ -213,6 +214,8 @@ static void new_rr_state(struct gsm48_rrlayer *rr, int state)
|
|||
if (state == GSM48_RR_ST_IDLE) {
|
||||
struct msgb *msg, *nmsg;
|
||||
|
||||
/* release dedicated mode, if any */
|
||||
tx_ph_dm_rel_req(rr->ms);
|
||||
/* free establish message, if any */
|
||||
rr->rr_est_req = 0;
|
||||
if (rr->rr_est_msg) {
|
||||
|
@ -3003,9 +3006,15 @@ static int gsm48_rr_dl_est(struct osmocom_ms *ms)
|
|||
#ifdef TODO
|
||||
RSL_MT_ to activate channel with all the cd_now informations
|
||||
#else
|
||||
if (rr->cd_now.h) {
|
||||
printf("FIXME: Channel hopping not supported, exitting.\n");
|
||||
exit(-ENOTSUP);
|
||||
}
|
||||
rsl_dec_chan_nr(rr->cd_now.chan_nr, &ch_type, &ch_subch, &ch_ts);
|
||||
if (ch_type != RSL_CHAN_SDCCH4_ACCH || ch_ts != 0) {
|
||||
printf("Channel type not supported, exitting.\n");
|
||||
if ((ch_type != RSL_CHAN_SDCCH8_ACCH
|
||||
&& ch_type != RSL_CHAN_SDCCH4_ACCH) || ch_ts > 4) {
|
||||
printf("Channel type %d, subch %d, ts %d not supported, "
|
||||
"exitting.\n", ch_type, ch_subch, ch_ts);
|
||||
exit(-ENOTSUP);
|
||||
}
|
||||
tx_ph_dm_est_req(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr,
|
||||
|
|
|
@ -343,6 +343,23 @@ int tx_ph_dm_est_req(struct osmocom_ms *ms, uint16_t band_arfcn, uint8_t chan_nr
|
|||
return osmo_send_l1(ms, msg);
|
||||
}
|
||||
|
||||
/* Transmit L1CTL_DM_REL_REQ */
|
||||
int tx_ph_dm_rel_req(struct osmocom_ms *ms)
|
||||
{
|
||||
struct msgb *msg;
|
||||
struct l1ctl_info_ul *ul;
|
||||
|
||||
msg = osmo_l1_alloc(L1CTL_DM_REL_REQ);
|
||||
if (!msg)
|
||||
return -1;
|
||||
|
||||
DEBUGP(DL1C, "Tx Dedic.Mode Rel Req\n");
|
||||
|
||||
ul = (struct l1ctl_info_ul *) msgb_put(msg, sizeof(*ul));
|
||||
|
||||
return osmo_send_l1(ms, msg);
|
||||
}
|
||||
|
||||
int l1ctl_tx_echo_req(struct osmocom_ms *ms, unsigned int len)
|
||||
{
|
||||
struct msgb *msg;
|
||||
|
|
|
@ -171,9 +171,9 @@ static void l1ctl_rx_dm_est_req(struct msgb *msg)
|
|||
puts("We don't support ARFCN switches yet\n");
|
||||
return;
|
||||
}
|
||||
if (ul->chan_nr & 0x7) {
|
||||
if ((ul->chan_nr & 0x7) > 4) {
|
||||
/* FIXME: Timeslot */
|
||||
puts("We don't support non-0 TS yet\n");
|
||||
puts("We don't support TS > 4 yet\n");
|
||||
return;
|
||||
}
|
||||
if (est_req->h) {
|
||||
|
|
Loading…
Reference in New Issue