aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-05-14 22:05:17 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-05-27 22:40:58 +0700
commitd9de1a5b287fcb63d2aafb47436a52ff69005e34 (patch)
tree94a10f145124da69ea90cdafc3d126a79f0e4147
parenta0770250bc70024fcba4ec787587006ff508a6dd (diff)
osmo-bts-trx: use direct pointer to chan_state->{ul,dl}_bursts
There is no more need to access the UL/DL buffers via pointer to pointer thanks to the previous patch [1] moving the memory management routines out of the logical channel specific Rx/Tx handlers. Change-Id: Ib1e8e86ac60a7ac9b0415ef66b609eaa33443c19 Related: [1] c45e03726af8a2b46b7166b3c47bc666ba933a69
-rw-r--r--src/osmo-bts-trx/sched_lchan_pdtch.c24
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchf.c30
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c38
-rw-r--r--src/osmo-bts-trx/sched_lchan_xcch.c20
4 files changed, 56 insertions, 56 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c
index ddb4478a..5ff72291 100644
--- a/src/osmo-bts-trx/sched_lchan_pdtch.c
+++ b/src/osmo-bts-trx/sched_lchan_pdtch.c
@@ -42,7 +42,7 @@
int rx_pdtch_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{
struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan];
- sbit_t *burst, **bursts_p = &chan_state->ul_bursts;
+ sbit_t *burst, *bursts_p = chan_state->ul_bursts;
uint32_t first_fn;
uint8_t *mask = &chan_state->ul_mask;
struct l1sched_meas_set meas_avg;
@@ -62,7 +62,7 @@ int rx_pdtch_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* clear burst */
if (bi->bid == 0) {
- memset(*bursts_p, 0, GSM0503_EGPRS_BURSTS_NBITS);
+ memset(bursts_p, 0, GSM0503_EGPRS_BURSTS_NBITS);
*mask = 0x0;
}
@@ -75,20 +75,20 @@ int rx_pdtch_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* copy burst to buffer of 4 bursts */
switch (bi->burst_len) {
case EGPRS_BURST_LEN:
- burst = *bursts_p + bi->bid * 348;
+ burst = bursts_p + bi->bid * 348;
memcpy(burst, bi->burst + 9, 174);
memcpy(burst + 174, bi->burst + 261, 174);
n_bursts_bits = GSM0503_EGPRS_BURSTS_NBITS;
break;
case GSM_BURST_LEN:
- burst = *bursts_p + bi->bid * 116;
+ burst = bursts_p + bi->bid * 116;
memcpy(burst, bi->burst + 3, 58);
memcpy(burst + 58, bi->burst + 87, 58);
n_bursts_bits = GSM0503_GPRS_BURSTS_NBITS;
break;
case 0:
/* NOPE.ind, assume GPRS? */
- burst = *bursts_p + bi->bid * 116;
+ burst = bursts_p + bi->bid * 116;
memset(burst, 0, 116);
n_bursts_bits = GSM0503_GPRS_BURSTS_NBITS;
}
@@ -113,11 +113,11 @@ int rx_pdtch_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
* then we incur decoding overhead of 31 bits on the Type 3 EGPRS
* header, which is tolerable.
*/
- rc = gsm0503_pdtch_egprs_decode(l2, *bursts_p, n_bursts_bits,
+ rc = gsm0503_pdtch_egprs_decode(l2, bursts_p, n_bursts_bits,
NULL, &n_errors, &n_bits_total);
if ((bi->burst_len == GSM_BURST_LEN) && (rc < 0)) {
- rc = gsm0503_pdtch_decode(l2, *bursts_p, NULL,
+ rc = gsm0503_pdtch_decode(l2, bursts_p, NULL,
&n_errors, &n_bits_total);
}
@@ -144,7 +144,7 @@ int rx_pdtch_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
int tx_pdtch_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
{
struct msgb *msg = NULL; /* make GCC happy */
- ubit_t *burst, **bursts_p = &l1ts->chan_state[br->chan].dl_bursts;
+ ubit_t *burst, *bursts_p = l1ts->chan_state[br->chan].dl_bursts;
enum trx_mod_type *mod = &l1ts->chan_state[br->chan].dl_mod_type;
int rc = 0;
@@ -166,9 +166,9 @@ int tx_pdtch_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
/* BURST BYPASS */
/* encode bursts */
- rc = gsm0503_pdtch_egprs_encode(*bursts_p, msg->l2h, msg->tail - msg->l2h);
+ rc = gsm0503_pdtch_egprs_encode(bursts_p, msg->l2h, msg->tail - msg->l2h);
if (rc < 0)
- rc = gsm0503_pdtch_encode(*bursts_p, msg->l2h, msg->tail - msg->l2h);
+ rc = gsm0503_pdtch_encode(bursts_p, msg->l2h, msg->tail - msg->l2h);
/* check validity of message */
if (rc < 0) {
@@ -189,7 +189,7 @@ int tx_pdtch_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
send_burst:
/* compose burst */
if (*mod == TRX_MOD_T_8PSK) {
- burst = *bursts_p + br->bid * 348;
+ burst = bursts_p + br->bid * 348;
memset(br->burst, 1, 9);
memcpy(br->burst + 9, burst, 174);
memcpy(br->burst + 183, TRX_8PSK_NB_TSC(br), 78);
@@ -198,7 +198,7 @@ send_burst:
br->burst_len = EGPRS_BURST_LEN;
} else {
- burst = *bursts_p + br->bid * 116;
+ burst = bursts_p + br->bid * 116;
memcpy(br->burst + 3, burst, 58);
memcpy(br->burst + 61, TRX_GMSK_NB_TSC(br), 26);
memcpy(br->burst + 87, burst + 58, 58);
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 3e6bdc26..7c2a05f7 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -75,7 +75,7 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{
struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan];
struct gsm_lchan *lchan = chan_state->lchan;
- sbit_t *burst, **bursts_p = &chan_state->ul_bursts;
+ sbit_t *burst, *bursts_p = chan_state->ul_bursts;
uint8_t *mask = &chan_state->ul_mask;
uint8_t rsl_cmode = chan_state->rsl_cmode;
uint8_t tch_mode = chan_state->tch_mode;
@@ -101,8 +101,8 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* shift the buffer by 4 bursts leftwards */
if (bi->bid == 0) {
- memcpy(*bursts_p, *bursts_p + 464, 464);
- memset(*bursts_p + 464, 0, 464);
+ memcpy(bursts_p, bursts_p + 464, 464);
+ memset(bursts_p + 464, 0, 464);
*mask = *mask << 4;
}
@@ -113,7 +113,7 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
trx_sched_meas_push(chan_state, bi);
/* copy burst to end of buffer of 8 bursts */
- burst = *bursts_p + bi->bid * 116 + 464;
+ burst = bursts_p + bi->bid * 116 + 464;
if (bi->burst_len > 0) {
memcpy(burst, bi->burst + 3, 58);
memcpy(burst + 58, bi->burst + 87, 58);
@@ -137,12 +137,12 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
switch (tch_mode) {
case GSM48_CMODE_SIGN:
case GSM48_CMODE_SPEECH_V1: /* FR */
- rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 0, &n_errors, &n_bits_total);
+ rc = gsm0503_tch_fr_decode(tch_data, bursts_p, 1, 0, &n_errors, &n_bits_total);
if (rc == GSM_FR_BYTES) /* only for valid *speech* frames */
lchan_set_marker(osmo_fr_is_any_sid(tch_data), lchan); /* DTXu */
break;
case GSM48_CMODE_SPEECH_EFR: /* EFR */
- rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 1, &n_errors, &n_bits_total);
+ rc = gsm0503_tch_fr_decode(tch_data, bursts_p, 1, 1, &n_errors, &n_bits_total);
if (rc == GSM_EFR_BYTES) /* only for valid *speech* frames */
lchan_set_marker(osmo_efr_is_any_sid(tch_data), lchan); /* DTXu */
break;
@@ -168,7 +168,7 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
* we receive an FACCH frame instead of a voice frame (we
* do not know this before we actually decode the frame) */
amr = sizeof(struct amr_hdr);
- rc = gsm0503_tch_afs_decode_dtx(tch_data + amr, *bursts_p,
+ rc = gsm0503_tch_afs_decode_dtx(tch_data + amr, bursts_p,
amr_is_cmr, chan_state->codec, chan_state->codecs, &chan_state->ul_ft,
&chan_state->ul_cmr, &n_errors, &n_bits_total, &chan_state->amr_last_dtx);
@@ -449,7 +449,7 @@ int tx_tchf_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
{
struct l1sched_chan_state *chan_state = &l1ts->chan_state[br->chan];
uint8_t tch_mode = chan_state->tch_mode;
- ubit_t *burst, **bursts_p = &chan_state->dl_bursts;
+ ubit_t *burst, *bursts_p = chan_state->dl_bursts;
struct msgb *msg;
/* send burst, if we already got a frame */
@@ -459,8 +459,8 @@ int tx_tchf_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
/* BURST BYPASS */
/* shift buffer by 4 bursts for interleaving */
- memcpy(*bursts_p, *bursts_p + 464, 464);
- memset(*bursts_p + 464, 0, 464);
+ memcpy(bursts_p, bursts_p + 464, 464);
+ memset(bursts_p + 464, 0, 464);
/* dequeue a message to be transmitted */
msg = tch_dl_dequeue(l1ts, br);
@@ -474,27 +474,27 @@ int tx_tchf_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
};
LOGL1SB(DL1P, LOGL_DEBUG, l1ts, br, "No TCH or FACCH prim for transmit.\n");
- gsm0503_tch_fr_encode(*bursts_p, dummy, sizeof(dummy), 1);
+ gsm0503_tch_fr_encode(bursts_p, dummy, sizeof(dummy), 1);
chan_state->dl_facch_bursts = 8;
goto send_burst;
}
/* populate the buffer with bursts */
if (msgb_l2len(msg) == GSM_MACBLOCK_LEN) {
- gsm0503_tch_fr_encode(*bursts_p, msg->l2h, msgb_l2len(msg), 1);
+ gsm0503_tch_fr_encode(bursts_p, msg->l2h, msgb_l2len(msg), 1);
chan_state->dl_facch_bursts = 8;
} else if (tch_mode == GSM48_CMODE_SPEECH_AMR) {
/* the first FN 4,13,21 defines that CMI is included in frame,
* the first FN 0,8,17 defines that CMR is included in frame.
*/
- gsm0503_tch_afs_encode(*bursts_p, msg->l2h + sizeof(struct amr_hdr),
+ gsm0503_tch_afs_encode(bursts_p, msg->l2h + sizeof(struct amr_hdr),
msgb_l2len(msg) - sizeof(struct amr_hdr),
!sched_tchf_dl_amr_cmi_map[br->fn % 26],
chan_state->codec, chan_state->codecs,
chan_state->dl_ft,
chan_state->dl_cmr);
} else {
- gsm0503_tch_fr_encode(*bursts_p, msg->l2h, msgb_l2len(msg), 1);
+ gsm0503_tch_fr_encode(bursts_p, msg->l2h, msgb_l2len(msg), 1);
}
/* free message */
@@ -502,7 +502,7 @@ int tx_tchf_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
send_burst:
/* compose burst */
- burst = *bursts_p + br->bid * 116;
+ burst = bursts_p + br->bid * 116;
memcpy(br->burst + 3, burst, 58);
memcpy(br->burst + 61, TRX_GMSK_NB_TSC(br), 26);
memcpy(br->burst + 87, burst + 58, 58);
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index f464b565..5772e9f4 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -97,7 +97,7 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{
struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan];
struct gsm_lchan *lchan = chan_state->lchan;
- sbit_t *burst, **bursts_p = &chan_state->ul_bursts;
+ sbit_t *burst, *bursts_p = chan_state->ul_bursts;
uint8_t *mask = &chan_state->ul_mask;
uint8_t rsl_cmode = chan_state->rsl_cmode;
uint8_t tch_mode = chan_state->tch_mode;
@@ -124,9 +124,9 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* shift the buffer by 2 bursts leftwards */
if (bi->bid == 0) {
- memcpy(*bursts_p, *bursts_p + 232, 232);
- memcpy(*bursts_p + 232, *bursts_p + 464, 232);
- memset(*bursts_p + 464, 0, 232);
+ memcpy(bursts_p, bursts_p + 232, 232);
+ memcpy(bursts_p + 232, bursts_p + 464, 232);
+ memset(bursts_p + 464, 0, 232);
*mask = *mask << 2;
}
@@ -137,7 +137,7 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
trx_sched_meas_push(chan_state, bi);
/* copy burst to end of buffer of 6 bursts */
- burst = *bursts_p + bi->bid * 116 + 464;
+ burst = bursts_p + bi->bid * 116 + 464;
if (bi->burst_len > 0) {
memcpy(burst, bi->burst + 3, 58);
memcpy(burst + 58, bi->burst + 87, 58);
@@ -174,9 +174,9 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
meas_avg_mode = SCHED_MEAS_AVG_M_S6N6;
/* fall-through */
case GSM48_CMODE_SPEECH_V1: /* HR or signalling */
- rc = gsm0503_tch_hr_decode2(tch_data, *bursts_p,
- !sched_tchh_ul_facch_map[bi->fn % 26],
- &n_errors, &n_bits_total);
+ rc = gsm0503_tch_hr_decode2(tch_data, bursts_p,
+ !sched_tchh_ul_facch_map[bi->fn % 26],
+ &n_errors, &n_bits_total);
if (rc == GSM_HR_BYTES) { /* only for valid *speech* frames */
bool is_sid = osmo_hr_check_sid(tch_data, GSM_HR_BYTES);
lchan_set_marker(is_sid, lchan); /* DTXu */
@@ -201,7 +201,7 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* See comment in function rx_tchf_fn() */
amr = sizeof(struct amr_hdr);
- rc = gsm0503_tch_ahs_decode_dtx(tch_data + amr, *bursts_p,
+ rc = gsm0503_tch_ahs_decode_dtx(tch_data + amr, bursts_p,
!sched_tchh_ul_facch_map[bi->fn % 26],
!fn_is_cmi, chan_state->codec,
chan_state->codecs, &chan_state->ul_ft,
@@ -350,7 +350,7 @@ int tx_tchh_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
{
struct l1sched_chan_state *chan_state = &l1ts->chan_state[br->chan];
uint8_t tch_mode = chan_state->tch_mode;
- ubit_t *burst, **bursts_p = &chan_state->dl_bursts;
+ ubit_t *burst, *bursts_p = chan_state->dl_bursts;
struct msgb *msg;
/* send burst, if we already got a frame */
@@ -360,12 +360,12 @@ int tx_tchh_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
/* BURST BYPASS */
/* shift buffer by 2 bursts for interleaving */
- memcpy(*bursts_p, *bursts_p + 232, 232);
+ memcpy(bursts_p, bursts_p + 232, 232);
if (chan_state->dl_ongoing_facch) {
- memcpy(*bursts_p + 232, *bursts_p + 464, 232);
- memset(*bursts_p + 464, 0, 232);
+ memcpy(bursts_p + 232, bursts_p + 464, 232);
+ memset(bursts_p + 464, 0, 232);
} else {
- memset(*bursts_p + 232, 0, 232);
+ memset(bursts_p + 232, 0, 232);
}
/* dequeue a message to be transmitted */
@@ -396,7 +396,7 @@ int tx_tchh_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
goto send_burst;
}
- gsm0503_tch_hr_encode(*bursts_p, dummy, sizeof(dummy));
+ gsm0503_tch_hr_encode(bursts_p, dummy, sizeof(dummy));
chan_state->dl_ongoing_facch = 1;
chan_state->dl_facch_bursts = 6;
goto send_burst;
@@ -404,21 +404,21 @@ int tx_tchh_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
/* populate the buffer with bursts */
if (msgb_l2len(msg) == GSM_MACBLOCK_LEN) {
- gsm0503_tch_hr_encode(*bursts_p, msg->l2h, msgb_l2len(msg));
+ gsm0503_tch_hr_encode(bursts_p, msg->l2h, msgb_l2len(msg));
chan_state->dl_ongoing_facch = 1; /* first of two TCH frames */
chan_state->dl_facch_bursts = 6;
} else if (tch_mode == GSM48_CMODE_SPEECH_AMR) {
/* the first FN 4,13,21 or 5,14,22 defines that CMI is included
* in frame, the first FN 0,8,17 or 1,9,18 defines that CMR is
* included in frame. */
- gsm0503_tch_ahs_encode(*bursts_p, msg->l2h + sizeof(struct amr_hdr),
+ gsm0503_tch_ahs_encode(bursts_p, msg->l2h + sizeof(struct amr_hdr),
msgb_l2len(msg) - sizeof(struct amr_hdr),
!sched_tchh_dl_amr_cmi_map[br->fn % 26],
chan_state->codec, chan_state->codecs,
chan_state->dl_ft,
chan_state->dl_cmr);
} else {
- gsm0503_tch_hr_encode(*bursts_p, msg->l2h, msgb_l2len(msg));
+ gsm0503_tch_hr_encode(bursts_p, msg->l2h, msgb_l2len(msg));
}
/* free message */
@@ -426,7 +426,7 @@ int tx_tchh_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
send_burst:
/* compose burst */
- burst = *bursts_p + br->bid * 116;
+ burst = bursts_p + br->bid * 116;
memcpy(br->burst + 3, burst, 58);
memcpy(br->burst + 61, TRX_GMSK_NB_TSC(br), 26);
memcpy(br->burst + 87, burst + 58, 58);
diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c
index 786b509b..1945d325 100644
--- a/src/osmo-bts-trx/sched_lchan_xcch.c
+++ b/src/osmo-bts-trx/sched_lchan_xcch.c
@@ -50,7 +50,7 @@ static void add_sbits(sbit_t * current, const sbit_t * previous)
int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{
struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan];
- sbit_t *burst, **bursts_p = &chan_state->ul_bursts;
+ sbit_t *burst, *bursts_p = chan_state->ul_bursts;
uint32_t *first_fn = &chan_state->ul_first_fn;
uint8_t *mask = &chan_state->ul_mask;
uint8_t l2[GSM_MACBLOCK_LEN], l2_len;
@@ -71,7 +71,7 @@ int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* clear burst & store frame number of first burst */
if (bi->bid == 0) {
- memset(*bursts_p, 0, 464);
+ memset(bursts_p, 0, 464);
*mask = 0x0;
*first_fn = bi->fn;
}
@@ -84,7 +84,7 @@ int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* Copy burst to buffer of 4 bursts. If the burst indication contains
* no data, ensure that the buffer does not stay uninitialized */
- burst = *bursts_p + bi->bid * 116;
+ burst = bursts_p + bi->bid * 116;
if (bi->burst_len > 0) {
memcpy(burst, bi->burst + 3, 58);
memcpy(burst + 58, bi->burst + 87, 58);
@@ -112,7 +112,7 @@ int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
*mask = 0x0;
/* decode */
- rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total);
+ rc = gsm0503_xcch_decode(l2, bursts_p, &n_errors, &n_bits_total);
if (rc) {
LOGL1SB(DL1P, LOGL_NOTICE, l1ts, bi, "Received bad data (%u/%u)\n",
bi->fn % l1ts->mf_period, l1ts->mf_period);
@@ -123,8 +123,8 @@ int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
* information from the previous SACCH block. See also:
* 3GPP TS 44.006, section 11.2 */
if (rep_sacch) {
- add_sbits(*bursts_p, chan_state->ul_bursts_prev);
- rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total);
+ add_sbits(bursts_p, chan_state->ul_bursts_prev);
+ rc = gsm0503_xcch_decode(l2, bursts_p, &n_errors, &n_bits_total);
if (rc) {
LOGL1SB(DL1P, LOGL_NOTICE, l1ts, bi,
"Combining current SACCH block with previous SACCH block also yields bad data (%u/%u)\n",
@@ -143,7 +143,7 @@ int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* Keep a copy to ease decoding in the next repetition pass */
if (rep_sacch)
- memcpy(chan_state->ul_bursts_prev, *bursts_p, 464);
+ memcpy(chan_state->ul_bursts_prev, bursts_p, 464);
return _sched_compose_ph_data_ind(l1ts, *first_fn,
bi->chan, l2, l2_len,
@@ -156,7 +156,7 @@ int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
int tx_data_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
{
struct msgb *msg = NULL; /* make GCC happy */
- ubit_t *burst, **bursts_p = &l1ts->chan_state[br->chan].dl_bursts;
+ ubit_t *burst, *bursts_p = l1ts->chan_state[br->chan].dl_bursts;
/* send burst, if we already got a frame */
if (br->bid > 0)
@@ -181,14 +181,14 @@ int tx_data_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
/* BURST BYPASS */
/* encode bursts */
- gsm0503_xcch_encode(*bursts_p, msg->l2h);
+ gsm0503_xcch_encode(bursts_p, msg->l2h);
/* free message */
msgb_free(msg);
send_burst:
/* compose burst */
- burst = *bursts_p + br->bid * 116;
+ burst = bursts_p + br->bid * 116;
memcpy(br->burst + 3, burst, 58);
memcpy(br->burst + 61, TRX_GMSK_NB_TSC(br), 26);
memcpy(br->burst + 87, burst + 58, 58);