diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2010-09-26 22:55:02 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2010-09-28 08:04:18 +0200 |
commit | 9257fe53bfe4387cdd7a78f1fbd1c93134f5ab0b (patch) | |
tree | 778290c60868448b05b0933820fe08ba6af995d4 | |
parent | d227b37f1220a01e2e2b8b218a3754af225e7ef1 (diff) |
l1ctl: Add initial tch_mode value in DM_EST_REQ
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r-- | include/l1ctl_proto.h | 2 | ||||
-rw-r--r-- | src/host/layer23/include/osmocom/bb/common/l1ctl.h | 5 | ||||
-rw-r--r-- | src/host/layer23/src/common/l1ctl.c | 6 | ||||
-rw-r--r-- | src/host/layer23/src/misc/layer3.c | 6 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/gsm48_rr.c | 7 |
5 files changed, 16 insertions, 10 deletions
diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h index f2880eb5..24cb64ba 100644 --- a/include/l1ctl_proto.h +++ b/include/l1ctl_proto.h @@ -207,6 +207,8 @@ struct l1ctl_dm_est_req { struct l1ctl_h0 h0; struct l1ctl_h1 h1; }; + uint8_t tch_mode; + uint8_t _padding[1]; } __attribute__((packed)); struct l1ctl_dm_freq_req { diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h b/src/host/layer23/include/osmocom/bb/common/l1ctl.h index 20e9481c..88aedcf5 100644 --- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h +++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h @@ -25,9 +25,10 @@ int l1ctl_tx_rach_req(struct osmocom_ms *ms, uint8_t ra, uint8_t fn51, /* 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 chan_nr, uint8_t tsc, uint8_t tch_mode); 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); + uint16_t *ma, uint8_t ma_len, uint8_t chan_nr, uint8_t tsc, + uint8_t tch_mode); /* Transmit L1CTL_DM_FREQ_REQ */ int l1ctl_tx_dm_freq_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 21ee9963..e59e5251 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -386,7 +386,7 @@ int l1ctl_tx_rach_req(struct osmocom_ms *ms, uint8_t ra, uint8_t fn51, /* 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 chan_nr, uint8_t tsc, uint8_t tch_mode) { struct msgb *msg; struct l1ctl_info_ul *ul; @@ -409,13 +409,14 @@ int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn, req->tsc = tsc; req->h = 0; req->h0.band_arfcn = htons(band_arfcn); + req->tch_mode = tch_mode; return osmo_send_l1(ms, msg); } 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 chan_nr, uint8_t tsc, uint8_t tch_mode) { struct msgb *msg; struct l1ctl_info_ul *ul; @@ -443,6 +444,7 @@ int l1ctl_tx_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn, req->h1.n = ma_len; for (i = 0; i < ma_len; i++) req->h1.ma[i] = htons(ma[i]); + req->tch_mode = tch_mode; return osmo_send_l1(ms, msg); } diff --git a/src/host/layer23/src/misc/layer3.c b/src/host/layer23/src/misc/layer3.c index 37dd2e72..6a6cbeca 100644 --- a/src/host/layer23/src/misc/layer3.c +++ b/src/host/layer23/src/misc/layer3.c @@ -209,7 +209,8 @@ static int gsm48_rx_imm_ass(struct msgb *msg, struct osmocom_ms *ms) /* request L1 to go to dedicated mode on assigned channel */ rv = l1ctl_tx_dm_est_req_h0(ms, - arfcn, ia->chan_desc.chan_nr, ia->chan_desc.h0.tsc); + arfcn, ia->chan_desc.chan_nr, ia->chan_desc.h0.tsc, + GSM48_CMODE_SIGN); } else { /* Hopping */ uint8_t maio, hsn, ma_len; @@ -240,7 +241,8 @@ static int gsm48_rx_imm_ass(struct msgb *msg, struct osmocom_ms *ms) /* request L1 to go to dedicated mode on assigned channel */ rv = l1ctl_tx_dm_est_req_h1(ms, maio, hsn, ma, ma_len, - ia->chan_desc.chan_nr, ia->chan_desc.h1.tsc); + ia->chan_desc.chan_nr, ia->chan_desc.h1.tsc, + GSM48_CMODE_SIGN); } DEBUGPC(DRR, "\n"); diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 332ed830..e92b1cba 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -3171,16 +3171,15 @@ static int gsm48_rr_activate_channel(struct osmocom_ms *ms, ch_type, ch_subch, ch_ts, cd->mode); if (cd->h) l1ctl_tx_dm_est_req_h1(ms, cd->maio, cd->hsn, - ma, ma_len, cd->chan_nr, cd->tsc); + ma, ma_len, cd->chan_nr, cd->tsc, cd->mode); else - l1ctl_tx_dm_est_req_h0(ms, cd->arfcn, cd->chan_nr, cd->tsc); + l1ctl_tx_dm_est_req_h0(ms, cd->arfcn, cd->chan_nr, cd->tsc, + cd->mode); rr->dm_est = 1; if (rr->cipher_on) l1ctl_tx_crypto_req(ms, rr->cipher_type + 1, subscr->key, 8); - gsm48_rr_set_mode(ms, cd->chan_nr, cd->mode); - return 0; } |