Review at  https://gerrit.osmocom.org/7638

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
---
M src/common/rsl.c
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/38/7638/1

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 @@
 /* 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 @@
        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,

-- 
To view, visit https://gerrit.osmocom.org/7638
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe7988e9ef374e8c7d9429777fb32322d90c2024
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to