aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-04-05 09:28:04 +0200
committerHarald Welte <laforge@gnumonks.org>2018-04-05 13:50:33 +0000
commit254326de3dd238d6a26989f141ff3c7eaf1da56a (patch)
tree52f4295df6659f0152b0481392c73ea345e6fef2
parentd4c346a9316173f62c8cec0e568c5e91218a541e (diff)
rsl_tx_dyn_pdch_ack: Add missing FRAME_NR information element
It seems that the IPA PDCH ACT ACK contains not only the channel number, but also the frame number. Let's make sure we're as close as possible to other implementations to ensure maximum interoperability. Change-Id: Ibe7988e9ef374e8c7d9429777fb32322d90c2024
-rw-r--r--src/common/rsl.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 6120e0e..9adb89a 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1932,8 +1932,10 @@ static int rsl_rx_ipac_dlcx(struct msgb *msg)
/* PDCH ACT/DEACT ACKNOWLEDGE */
static int rsl_tx_dyn_pdch_ack(struct gsm_lchan *lchan, bool pdch_act)
{
- struct msgb *msg;
+ struct gsm_time *gtime = get_time(lchan->ts->trx->bts);
uint8_t chan_nr = gsm_lchan2chan_nr(lchan);
+ struct msgb *msg;
+ uint8_t ie[2];
LOGP(DRSL, LOGL_NOTICE, "%s Tx PDCH %s ACK\n",
gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT");
@@ -1942,9 +1944,10 @@ static int rsl_tx_dyn_pdch_ack(struct gsm_lchan *lchan, bool pdch_act)
if (!msg)
return -ENOMEM;
- msg->len = 0;
- msg->data = msg->tail = msg->l3h;
-
+ if (pdch_act) {
+ gsm48_gen_starting_time(ie, gtime);
+ msgb_tv_fixed_put(msg, RSL_IE_FRAME_NUMBER, 2, ie);
+ }
rsl_dch_push_hdr(msg,
pdch_act? RSL_MT_IPAC_PDCH_ACT_ACK
: RSL_MT_IPAC_PDCH_DEACT_ACK,