blob: 4d8588c9548846c8157e7624a88bb7ea049475cc [file] [log] [blame]
Daniel Willmannca102af2014-08-08 12:14:12 +02001/* Copied from tbf.cpp
2 *
3 * Copyright (C) 2012 Ivan Klyuchnikov
4 * Copyright (C) 2012 Andreas Eversberg <jolly@eversberg.eu>
5 * Copyright (C) 2013 by Holger Hans Peter Freyther
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 */
21
22#include <bts.h>
23#include <tbf.h>
Pau Espin Pedrol9d1cdb12019-09-25 17:47:02 +020024#include <tbf_ul.h>
Daniel Willmannca102af2014-08-08 12:14:12 +020025#include <rlc.h>
26#include <encoding.h>
27#include <gprs_rlcmac.h>
28#include <gprs_debug.h>
29#include <gprs_bssgp_pcu.h>
30#include <decoding.h>
Jacob Erlbeck20f6fd12015-06-08 11:05:45 +020031#include <pcu_l1_if.h>
Max1187a772018-01-26 13:31:42 +010032#include <gprs_ms.h>
33#include <llc.h>
sivasankari8adfcd02017-01-16 15:41:21 +053034#include "pcu_utils.h"
35
Daniel Willmannca102af2014-08-08 12:14:12 +020036extern "C" {
37#include <osmocom/core/msgb.h>
38#include <osmocom/core/talloc.h>
Max1187a772018-01-26 13:31:42 +010039 #include <osmocom/core/bitvec.h>
40 #include <osmocom/core/logging.h>
41 #include <osmocom/core/rate_ctr.h>
Pau Espin Pedrol442198c2020-10-23 22:30:04 +020042 #include <osmocom/core/stats.h>
Max1187a772018-01-26 13:31:42 +010043 #include <osmocom/core/utils.h>
44 #include <osmocom/gprs/gprs_bssgp_bss.h>
45 #include <osmocom/gprs/protocol/gsm_08_18.h>
46 #include <osmocom/gsm/tlv.h>
Max136ebcc2019-03-05 14:59:03 +010047 #include "coding_scheme.h"
Daniel Willmannca102af2014-08-08 12:14:12 +020048}
49
50#include <errno.h>
51#include <string.h>
52
53/* After receiving these frames, we send ack/nack. */
54#define SEND_ACK_AFTER_FRAMES 20
55
56extern void *tall_pcu_ctx;
57
Pau Espin Pedrol442198c2020-10-23 22:30:04 +020058static const struct rate_ctr_desc tbf_ul_gprs_ctr_description[] = {
59 { "gprs:uplink:cs1", "CS1 " },
60 { "gprs:uplink:cs2", "CS2 " },
61 { "gprs:uplink:cs3", "CS3 " },
62 { "gprs:uplink:cs4", "CS4 " },
63};
64
65static const struct rate_ctr_desc tbf_ul_egprs_ctr_description[] = {
66 { "egprs:uplink:mcs1", "MCS1 " },
67 { "egprs:uplink:mcs2", "MCS2 " },
68 { "egprs:uplink:mcs3", "MCS3 " },
69 { "egprs:uplink:mcs4", "MCS4 " },
70 { "egprs:uplink:mcs5", "MCS5 " },
71 { "egprs:uplink:mcs6", "MCS6 " },
72 { "egprs:uplink:mcs7", "MCS7 " },
73 { "egprs:uplink:mcs8", "MCS8 " },
74 { "egprs:uplink:mcs9", "MCS9 " },
75};
76
77static const struct rate_ctr_group_desc tbf_ul_gprs_ctrg_desc = {
78 "tbf:gprs",
79 "Data Blocks",
80 OSMO_STATS_CLASS_SUBSCRIBER,
81 ARRAY_SIZE(tbf_ul_gprs_ctr_description),
82 tbf_ul_gprs_ctr_description,
83};
84
85static const struct rate_ctr_group_desc tbf_ul_egprs_ctrg_desc = {
86 "tbf:egprs",
87 "Data Blocks",
88 OSMO_STATS_CLASS_SUBSCRIBER,
89 ARRAY_SIZE(tbf_ul_egprs_ctr_description),
90 tbf_ul_egprs_ctr_description,
91};
92
93static int ul_tbf_dtor(struct gprs_rlcmac_ul_tbf *tbf)
94{
95 tbf->~gprs_rlcmac_ul_tbf();
96 return 0;
97}
98
99struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot)
100{
101 struct gprs_rlcmac_ul_tbf *tbf;
102 int rc;
103
104 OSMO_ASSERT(ms != NULL);
105
106 if (ms->egprs_ms_class() == 0 && bts->egprs_enabled) {
107 LOGP(DTBF, LOGL_NOTICE, "Not accepting non-EGPRS phone in EGPRS-only mode\n");
108 bts->bts->do_rate_ctr_inc(CTR_TBF_FAILED_EGPRS_ONLY);
109 return NULL;
110 }
111
112 LOGP(DTBF, LOGL_DEBUG, "********** UL-TBF starts here **********\n");
113 LOGP(DTBF, LOGL_INFO, "Allocating UL TBF: MS_CLASS=%d/%d\n",
114 ms->ms_class(), ms->egprs_ms_class());
115
116 tbf = talloc(tall_pcu_ctx, struct gprs_rlcmac_ul_tbf);
117 if (!tbf)
118 return NULL;
119 talloc_set_destructor(tbf, ul_tbf_dtor);
120 new (tbf) gprs_rlcmac_ul_tbf(bts->bts, ms);
121
122 rc = tbf->setup(use_trx, single_slot);
123
124 /* if no resource */
125 if (rc < 0) {
126 talloc_free(tbf);
127 return NULL;
128 }
129
130 if (tbf->is_egprs_enabled())
131 tbf->set_window_size();
132
133 tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(tbf,
134 &tbf_ul_egprs_ctrg_desc, tbf->m_ctrs->idx);
135 tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(tbf,
136 &tbf_ul_gprs_ctrg_desc, tbf->m_ctrs->idx);
137 if (!tbf->m_ul_egprs_ctrs || !tbf->m_ul_gprs_ctrs) {
138 LOGPTBF(tbf, LOGL_ERROR, "Couldn't allocate TBF UL counters\n");
139 talloc_free(tbf);
140 return NULL;
141 }
142
143 llist_add(&tbf->list(), &bts->bts->ul_tbfs());
144 tbf->bts->do_rate_ctr_inc(CTR_TBF_UL_ALLOCATED);
145
146 return tbf;
147}
148
149
150gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx,
151 uint32_t tlli)
152{
153 struct gprs_rlcmac_ul_tbf *tbf;
154
155/* FIXME: Copy and paste with tbf_new_dl_assignment */
156 /* create new TBF, use same TRX as DL TBF */
157 /* use multislot class of downlink TBF */
158 tbf = tbf_alloc_ul_tbf(bts, ms, use_trx, false);
159 if (!tbf) {
160 LOGP(DTBF, LOGL_NOTICE, "No PDCH resource\n");
161 /* FIXME: send reject */
162 return NULL;
163 }
164 tbf->m_contention_resolution_done = 1;
165 TBF_SET_ASS_ON(tbf, GPRS_RLCMAC_FLAG_PACCH, false);
166 T_START(tbf, T3169, 3169, "allocation (UL-TBF)", true);
167 tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
168 OSMO_ASSERT(tbf->ms());
169
170 return tbf;
171}
172
173struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts,
174 GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts)
175{
176 struct gprs_rlcmac_ul_tbf *ul_tbf = NULL;
177 struct gprs_rlcmac_trx *trx = &bts->trx[trx_no];
178
179 if (!ms)
180 ms = bts->bts->ms_alloc(0, 0);
181 ms->set_tlli(tlli);
182
183 ul_tbf = talloc(tall_pcu_ctx, struct gprs_rlcmac_ul_tbf);
184 if (!ul_tbf)
185 return ul_tbf;
186
187 talloc_set_destructor(ul_tbf, ul_tbf_dtor);
188 new (ul_tbf) gprs_rlcmac_ul_tbf(bts->bts, ms);
189
190 llist_add(&ul_tbf->list(), &bts->bts->ul_tbfs());
191 ul_tbf->bts->do_rate_ctr_inc(CTR_TBF_UL_ALLOCATED);
192 TBF_SET_ASS_ON(ul_tbf, GPRS_RLCMAC_FLAG_PACCH, false);
193
194 ms->attach_tbf(ul_tbf);
195 ul_tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
196 TBF_SET_ASS_STATE_UL(ul_tbf, GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ);
197 ul_tbf->control_ts = ts;
198 ul_tbf->trx = trx;
199 ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, next_tbf_ctr_group_id++);
200 ul_tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(ul_tbf,
201 &tbf_ul_egprs_ctrg_desc,
202 ul_tbf->m_ctrs->idx);
203 ul_tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(ul_tbf,
204 &tbf_ul_gprs_ctrg_desc,
205 ul_tbf->m_ctrs->idx);
206 if (!ul_tbf->m_ctrs || !ul_tbf->m_ul_egprs_ctrs || !ul_tbf->m_ul_gprs_ctrs) {
207 LOGPTBF(ul_tbf, LOGL_ERROR, "Cound not allocate TBF UL rate counters\n");
208 talloc_free(ul_tbf);
209 return NULL;
210 }
211
212 return ul_tbf;
213}
214
Pau Espin Pedrole9f77d32020-10-23 18:41:40 +0200215gprs_rlcmac_ul_tbf::gprs_rlcmac_ul_tbf(BTS *bts_, GprsMs *ms) :
216 gprs_rlcmac_tbf(bts_, ms, GPRS_RLCMAC_UL_TBF),
Pau Espin Pedrolbddf1ad2019-09-26 14:41:18 +0200217 m_rx_counter(0),
218 m_contention_resolution_done(0),
219 m_final_ack_sent(0),
220 m_ul_gprs_ctrs(NULL),
221 m_ul_egprs_ctrs(NULL)
222{
223 memset(&m_usf, 0, sizeof(m_usf));
224}
225
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100226/*
227 * Store received block data in LLC message(s) and forward to SGSN
228 * if complete.
229 */
230int gprs_rlcmac_ul_tbf::assemble_forward_llc(const gprs_rlc_data *_data)
231{
232 const uint8_t *data = _data->block;
233 uint8_t len = _data->len;
Jacob Erlbeckf2ba4cb2016-01-07 18:59:28 +0100234 const struct gprs_rlc_data_block_info *rdbi = &_data->block_info;
Pau Espin Pedrol2ae83372020-05-18 11:35:35 +0200235 enum CodingScheme cs = _data->cs_last;
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100236
237 Decoding::RlcData frames[16], *frame;
238 int i, num_frames = 0;
239 uint32_t dummy_tlli;
240
Max0524e382018-01-19 18:22:25 +0100241 LOGPTBFUL(this, LOGL_DEBUG, "Assembling frames: (len=%d)\n", len);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100242
243 num_frames = Decoding::rlc_data_from_ul_data(
Alexander Couzensce936f32016-05-24 14:45:41 +0200244 rdbi, cs, data, &(frames[0]), ARRAY_SIZE(frames),
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100245 &dummy_tlli);
246
247 /* create LLC frames */
248 for (i = 0; i < num_frames; i++) {
249 frame = frames + i;
250
Aravind Sirsikar22a90192016-09-15 17:24:49 +0530251 if (frame->length) {
Pau Espin Pedrola107f8f2020-05-12 22:32:24 +0200252 bts->do_rate_ctr_add(CTR_RLC_UL_PAYLOAD_BYTES, frame->length);
Alexander Couzens7fdbf892016-05-21 19:45:23 +0200253
Max0524e382018-01-19 18:22:25 +0100254 LOGPTBFUL(this, LOGL_DEBUG, "Frame %d "
Aravind Sirsikar22a90192016-09-15 17:24:49 +0530255 "starts at offset %d, "
256 "length=%d, is_complete=%d\n",
257 i + 1, frame->offset, frame->length,
258 frame->is_complete);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100259
Aravind Sirsikar22a90192016-09-15 17:24:49 +0530260 m_llc.append_frame(data + frame->offset, frame->length);
261 m_llc.consume(frame->length);
262 }
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100263
264 if (frame->is_complete) {
265 /* send frame to SGSN */
Max0fdaa9d2018-01-30 16:03:10 +0100266 LOGPTBFUL(this, LOGL_DEBUG, "complete UL frame len=%d\n", m_llc.frame_length());
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100267 snd_ul_ud();
Pau Espin Pedrola107f8f2020-05-12 22:32:24 +0200268 bts->do_rate_ctr_add(CTR_LLC_UL_BYTES, m_llc.frame_length());
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100269 m_llc.reset();
270 }
271 }
272
273 return 0;
274}
275
Maxfd13f6c2017-07-07 14:29:36 +0200276bool gprs_rlcmac_ul_tbf::ctrl_ack_to_toggle()
277{
Max8dce1de2018-01-02 14:17:04 +0100278 if (check_n_clear(GPRS_RLCMAC_FLAG_TO_UL_ACK))
Maxfd13f6c2017-07-07 14:29:36 +0200279 return true; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was set, now cleared */
Maxfd13f6c2017-07-07 14:29:36 +0200280
281 state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_UL_ACK);
282 return false; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was unset, now set */
283}
284
285bool gprs_rlcmac_ul_tbf::handle_ctrl_ack()
286{
287 /* check if this control ack belongs to packet uplink ack */
Max088c7df2018-01-23 20:16:23 +0100288 if (ul_ack_state_is(GPRS_RLCMAC_UL_ACK_WAIT_ACK)) {
289 TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_NONE);
Maxfd13f6c2017-07-07 14:29:36 +0200290 return true;
291 }
292
293 return false;
294}
Daniel Willmannca102af2014-08-08 12:14:12 +0200295
Jacob Erlbeck5a3c84d2016-01-22 17:25:38 +0100296struct msgb *gprs_rlcmac_ul_tbf::create_ul_ack(uint32_t fn, uint8_t ts)
Daniel Willmannca102af2014-08-08 12:14:12 +0200297{
298 int final = (state_is(GPRS_RLCMAC_FINISHED));
299 struct msgb *msg;
Jacob Erlbeckf2694b72016-01-26 21:46:26 +0100300 int rc;
301 unsigned int rrbp = 0;
302 uint32_t new_poll_fn = 0;
Daniel Willmannca102af2014-08-08 12:14:12 +0200303
304 if (final) {
Maxcac6b662018-01-24 11:00:17 +0100305 if (poll_scheduled() && ul_ack_state_is(GPRS_RLCMAC_UL_ACK_WAIT_ACK)) {
Maxc21f0072017-12-15 17:36:45 +0100306 LOGPTBFUL(this, LOGL_DEBUG,
307 "Polling is already scheduled, so we must wait for the final uplink ack...\n");
Daniel Willmannca102af2014-08-08 12:14:12 +0200308 return NULL;
309 }
Jacob Erlbeckf2694b72016-01-26 21:46:26 +0100310
311 rc = check_polling(fn, ts, &new_poll_fn, &rrbp);
312 if (rc < 0)
Daniel Willmannca102af2014-08-08 12:14:12 +0200313 return NULL;
Daniel Willmannca102af2014-08-08 12:14:12 +0200314 }
315
316 msg = msgb_alloc(23, "rlcmac_ul_ack");
317 if (!msg)
318 return NULL;
Alexander Couzensccde5c92017-02-04 03:10:08 +0100319 bitvec *ack_vec = bitvec_alloc(23, tall_pcu_ctx);
Daniel Willmannca102af2014-08-08 12:14:12 +0200320 if (!ack_vec) {
321 msgb_free(msg);
322 return NULL;
323 }
Max7426c5f2019-02-18 20:42:42 +0100324 bitvec_unhex(ack_vec, DUMMY_VEC);
Alexander Couzens3a499f32019-06-16 15:25:30 +0200325 Encoding::write_packet_uplink_ack(ack_vec, this, final, rrbp);
Daniel Willmannca102af2014-08-08 12:14:12 +0200326 bitvec_pack(ack_vec, msgb_put(msg, 23));
327 bitvec_free(ack_vec);
Daniel Willmannca102af2014-08-08 12:14:12 +0200328
329 /* now we must set this flag, so we are allowed to assign downlink
330 * TBF on PACCH. it is only allowed when TLLI is acknowledged. */
331 m_contention_resolution_done = 1;
332
333 if (final) {
Maxf60cf622017-07-10 14:40:09 +0200334 set_polling(new_poll_fn, ts, GPRS_RLCMAC_POLL_UL_ACK);
Daniel Willmannca102af2014-08-08 12:14:12 +0200335 /* waiting for final acknowledge */
Daniel Willmannca102af2014-08-08 12:14:12 +0200336 m_final_ack_sent = 1;
337 } else
Max088c7df2018-01-23 20:16:23 +0100338 TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_NONE);
Daniel Willmannca102af2014-08-08 12:14:12 +0200339
340 return msg;
341}
342
Alexander Couzens2fcfc292016-05-24 14:40:03 +0200343/*! \brief receive data from PDCH/L1 */
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100344int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
Jacob Erlbeckf2ba4cb2016-01-07 18:59:28 +0100345 const struct gprs_rlc_data_info *rlc,
Jacob Erlbeckfc1b3e62016-01-11 09:58:11 +0100346 uint8_t *data, struct pcu_l1_meas *meas)
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100347{
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200348 const struct gprs_rlc_data_block_info *rdbi;
349 struct gprs_rlc_data *block;
350
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100351 int8_t rssi = meas->have_rssi ? meas->rssi : 0;
352
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100353 const uint16_t ws = m_window.ws();
354
355 this->state_flags |= (1 << GPRS_RLCMAC_FLAG_UL_DATA);
356
Max0524e382018-01-19 18:22:25 +0100357 LOGPTBFUL(this, LOGL_DEBUG, "UL DATA TFI=%d received (V(Q)=%d .. "
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100358 "V(R)=%d)\n", rlc->tfi, this->m_window.v_q(),
359 this->m_window.v_r());
360
361 /* process RSSI */
362 gprs_rlcmac_rssi(this, rssi);
363
364 /* store measurement values */
365 if (ms())
366 ms()->update_l1_meas(meas);
367
368 uint32_t new_tlli = 0;
369 unsigned int block_idx;
370
371 /* restart T3169 */
Pau Espin Pedrol28f160e2019-09-05 14:48:35 +0200372 T_START(this, T3169, 3169, "acked (data)", true);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100373
374 /* Increment RX-counter */
375 this->m_rx_counter++;
Mrinal Mishraf86307e2016-11-10 18:16:30 +0530376 update_coding_scheme_counter_ul(rlc->cs);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100377 /* Loop over num_blocks */
378 for (block_idx = 0; block_idx < rlc->num_data_blocks; block_idx++) {
379 int num_chunks;
380 uint8_t *rlc_data;
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200381 rdbi = &rlc->block_info[block_idx];
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100382 bool need_rlc_data = false;
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100383
Max0524e382018-01-19 18:22:25 +0100384 LOGPTBFUL(this, LOGL_DEBUG,
385 "Got %s RLC data block: CV=%d, BSN=%d, SPB=%d, PI=%d, E=%d, TI=%d, bitoffs=%d\n",
Max136ebcc2019-03-05 14:59:03 +0100386 mcs_name(rlc->cs),
Max0524e382018-01-19 18:22:25 +0100387 rdbi->cv, rdbi->bsn, rdbi->spb,
388 rdbi->pi, rdbi->e, rdbi->ti,
389 rlc->data_offs_bits[block_idx]);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100390
391 /* Check whether the block needs to be decoded */
392
393 if (!m_window.is_in_window(rdbi->bsn)) {
Max0524e382018-01-19 18:22:25 +0100394 LOGPTBFUL(this, LOGL_DEBUG, "BSN %d out of window %d..%d (it's normal)\n",
395 rdbi->bsn,
396 m_window.v_q(), m_window.mod_sns(m_window.v_q() + ws - 1));
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100397 } else if (m_window.is_received(rdbi->bsn)) {
Max0524e382018-01-19 18:22:25 +0100398 LOGPTBFUL(this, LOGL_DEBUG,
399 "BSN %d already received\n", rdbi->bsn);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100400 } else {
401 need_rlc_data = true;
402 }
403
404 if (!is_tlli_valid()) {
405 if (!rdbi->ti) {
Max0524e382018-01-19 18:22:25 +0100406 LOGPTBFUL(this, LOGL_NOTICE, "Missing TLLI within UL DATA.\n");
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100407 continue;
408 }
409 need_rlc_data = true;
410 }
411
412 if (!need_rlc_data)
413 continue;
414
415 /* Store block and meta info to BSN buffer */
416
Max0524e382018-01-19 18:22:25 +0100417 LOGPTBFUL(this, LOGL_DEBUG, "BSN %d storing in window (%d..%d)\n",
418 rdbi->bsn, m_window.v_q(),
419 m_window.mod_sns(m_window.v_q() + ws - 1));
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100420 block = m_rlc.block(rdbi->bsn);
Aravind Sirsikar550a5412016-06-14 18:59:18 +0530421 OSMO_ASSERT(rdbi->data_len <= sizeof(block->block));
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100422 rlc_data = &(block->block[0]);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100423
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530424 if (rdbi->spb) {
425 egprs_rlc_ul_reseg_bsn_state assemble_status;
426
427 assemble_status = handle_egprs_ul_spb(rlc,
428 block, data, block_idx);
429
430 if (assemble_status != EGPRS_RESEG_DEFAULT)
431 return 0;
432 } else {
433 block->block_info = *rdbi;
434 block->cs_last = rlc->cs;
435 block->len =
436 Decoding::rlc_copy_to_aligned_buffer(rlc,
437 block_idx, data, rlc_data);
438 }
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100439
Max0524e382018-01-19 18:22:25 +0100440 LOGPTBFUL(this, LOGL_DEBUG,
441 "data_length=%d, data=%s\n",
442 block->len, osmo_hexdump(rlc_data, block->len));
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100443 /* Get/Handle TLLI */
444 if (rdbi->ti) {
445 num_chunks = Decoding::rlc_data_from_ul_data(
446 rdbi, rlc->cs, rlc_data, NULL, 0, &new_tlli);
447
448 if (num_chunks < 0) {
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200449 bts->do_rate_ctr_inc(CTR_DECODE_ERRORS);
Max0524e382018-01-19 18:22:25 +0100450 LOGPTBFUL(this, LOGL_NOTICE,
451 "Failed to decode TLLI of %s UL DATA TFI=%d.\n",
Max136ebcc2019-03-05 14:59:03 +0100452 mcs_name(rlc->cs), rlc->tfi);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100453 m_window.invalidate_bsn(rdbi->bsn);
454 continue;
455 }
456 if (!this->is_tlli_valid()) {
457 if (!new_tlli) {
Max0524e382018-01-19 18:22:25 +0100458 LOGPTBFUL(this, LOGL_NOTICE,
459 "TLLI = 0 within UL DATA.\n");
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100460 m_window.invalidate_bsn(rdbi->bsn);
461 continue;
462 }
Max0524e382018-01-19 18:22:25 +0100463 LOGPTBFUL(this, LOGL_INFO,
464 "Decoded premier TLLI=0x%08x of UL DATA TFI=%d.\n",
Vadim Yanitskiy3f27fb52020-04-20 11:26:12 +0700465 new_tlli, rlc->tfi);
Pau Espin Pedrold21e9612020-06-26 14:20:37 +0200466 update_ms(new_tlli, GPRS_RLCMAC_UL_TBF);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100467 } else if (new_tlli && new_tlli != tlli()) {
Max0524e382018-01-19 18:22:25 +0100468 LOGPTBFUL(this, LOGL_NOTICE,
469 "TLLI mismatch on UL DATA TFI=%d. (Ignoring due to contention resolution)\n",
470 rlc->tfi);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100471 m_window.invalidate_bsn(rdbi->bsn);
472 continue;
473 }
474 }
475
476 m_window.receive_bsn(rdbi->bsn);
477 }
478
479 /* Raise V(Q) if possible, and retrieve LLC frames from blocks.
480 * This is looped until there is a gap (non received block) or
481 * the window is empty.*/
482 const uint16_t v_q_beg = m_window.v_q();
483 const uint16_t count = m_window.raise_v_q();
484
485 /* Retrieve LLC frames from blocks that are ready */
486 for (uint16_t i = 0; i < count; ++i) {
Jacob Erlbeck93c55d02015-12-23 16:29:07 +0100487 uint16_t index = m_window.mod_sns(v_q_beg + i);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100488 assemble_forward_llc(m_rlc.block(index));
489 }
490
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200491 /* Last frame in buffer: */
492 block = m_rlc.block(m_window.mod_sns(m_window.v_r() - 1));
493 rdbi = &block->block_info;
494
495 /* Check if we already received all data TBF had to send: */
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100496 if (this->state_is(GPRS_RLCMAC_FLOW) /* still in flow state */
497 && this->m_window.v_q() == this->m_window.v_r()) { /* if complete */
Max0524e382018-01-19 18:22:25 +0100498 LOGPTBFUL(this, LOGL_DEBUG,
499 "No gaps in received block, last block: BSN=%d CV=%d\n",
500 rdbi->bsn, rdbi->cv);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100501 if (rdbi->cv == 0) {
Max0524e382018-01-19 18:22:25 +0100502 LOGPTBFUL(this, LOGL_DEBUG, "Finished with UL TBF\n");
Max2399b1d2018-01-12 15:48:12 +0100503 TBF_SET_STATE(this, GPRS_RLCMAC_FINISHED);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100504 /* Reset N3103 counter. */
Max847ed9f2018-02-20 18:16:11 +0100505 this->n_reset(N3103);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100506 }
507 }
508
509 /* If TLLI is included or if we received half of the window, we send
510 * an ack/nack */
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200511 maybe_schedule_uplink_acknack(rlc, rdbi->cv == 0);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100512
513 return 0;
514}
515
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100516void gprs_rlcmac_ul_tbf::maybe_schedule_uplink_acknack(
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200517 const gprs_rlc_data_info *rlc, bool countdown_finished)
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100518{
Pau Espin Pedrol09afd6f2020-05-15 16:40:18 +0200519 bool require_ack = false;
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100520 bool have_ti = rlc->block_info[0].ti ||
521 (rlc->num_data_blocks > 1 && rlc->block_info[1].ti);
522
Pau Espin Pedrol09afd6f2020-05-15 16:40:18 +0200523 if (rlc->si) {
524 require_ack = true;
525 LOGPTBFUL(this, LOGL_NOTICE,
526 "Scheduling Ack/Nack, because MS is stalled.\n");
527 }
528 if (have_ti) {
529 require_ack = true;
530 LOGPTBFUL(this, LOGL_DEBUG,
531 "Scheduling Ack/Nack, because TLLI is included.\n");
532 }
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200533 if (countdown_finished) {
Pau Espin Pedrol09afd6f2020-05-15 16:40:18 +0200534 require_ack = true;
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200535 if (state_is(GPRS_RLCMAC_FLOW))
536 LOGPTBFUL(this, LOGL_DEBUG,
537 "Scheduling Ack/Nack, because some data is missing and last block has CV==0.\n");
538 else if (state_is(GPRS_RLCMAC_FINISHED))
539 LOGPTBFUL(this, LOGL_DEBUG,
540 "Scheduling final Ack/Nack, because all data was received and last block has CV==0.\n");
Pau Espin Pedrol09afd6f2020-05-15 16:40:18 +0200541 }
542 if ((m_rx_counter % SEND_ACK_AFTER_FRAMES) == 0) {
543 require_ack = true;
544 LOGPTBFUL(this, LOGL_DEBUG,
545 "Scheduling Ack/Nack, because %d frames received.\n",
546 SEND_ACK_AFTER_FRAMES);
547 }
548
549 if (!require_ack)
550 return;
551
552 if (ul_ack_state_is(GPRS_RLCMAC_UL_ACK_NONE)) {
553 /* trigger sending at next RTS */
554 TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_SEND_ACK);
555 } else {
556 /* already triggered */
557 LOGPTBFUL(this, LOGL_DEBUG,
558 "Sending Ack/Nack already scheduled, no need to re-schedule\n");
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100559 }
560}
561
Daniel Willmannca102af2014-08-08 12:14:12 +0200562/* Send Uplink unit-data to SGSN. */
563int gprs_rlcmac_ul_tbf::snd_ul_ud()
564{
565 uint8_t qos_profile[3];
566 struct msgb *llc_pdu;
567 unsigned msg_len = NS_HDR_LEN + BSSGP_HDR_LEN + m_llc.frame_length();
568 struct bssgp_bvc_ctx *bctx = gprs_bssgp_pcu_current_bctx();
569
570 LOGP(DBSSGP, LOGL_INFO, "LLC [PCU -> SGSN] %s len=%d\n", tbf_name(this), m_llc.frame_length());
571 if (!bctx) {
572 LOGP(DBSSGP, LOGL_ERROR, "No bctx\n");
573 m_llc.reset_frame_space();
574 return -EIO;
575 }
Pau Espin Pedrol488aa292019-09-25 17:48:35 +0200576
Daniel Willmannca102af2014-08-08 12:14:12 +0200577 llc_pdu = msgb_alloc_headroom(msg_len, msg_len,"llc_pdu");
578 uint8_t *buf = msgb_push(llc_pdu, TL16V_GROSS_LEN(sizeof(uint8_t)*m_llc.frame_length()));
579 tl16v_put(buf, BSSGP_IE_LLC_PDU, sizeof(uint8_t)*m_llc.frame_length(), m_llc.frame);
580 qos_profile[0] = QOS_PROFILE >> 16;
581 qos_profile[1] = QOS_PROFILE >> 8;
582 qos_profile[2] = QOS_PROFILE;
583 bssgp_tx_ul_ud(bctx, tlli(), qos_profile, llc_pdu);
584
585 m_llc.reset_frame_space();
586 return 0;
587}
588
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530589egprs_rlc_ul_reseg_bsn_state gprs_rlcmac_ul_tbf::handle_egprs_ul_second_seg(
590 const struct gprs_rlc_data_info *rlc, struct gprs_rlc_data *block,
591 uint8_t *data, const uint8_t block_idx)
592{
593 const gprs_rlc_data_block_info *rdbi = &rlc->block_info[block_idx];
594 union split_block_status *spb_status = &block->spb_status;
595 uint8_t *rlc_data = &block->block[0];
596
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200597 bts->do_rate_ctr_inc(CTR_SPB_UL_SECOND_SEGMENT);
sivasankarida7250a2016-12-16 12:57:18 +0530598
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530599 if (spb_status->block_status_ul &
600 EGPRS_RESEG_FIRST_SEG_RXD) {
Max0524e382018-01-19 18:22:25 +0100601 LOGPTBFUL(this, LOGL_DEBUG,
602 "Second seg is received first seg is already present set the status to complete\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530603 spb_status->block_status_ul = EGPRS_RESEG_DEFAULT;
604
605 block->len += Decoding::rlc_copy_to_aligned_buffer(rlc,
606 block_idx, data, rlc_data + block->len);
607 block->block_info.data_len += rdbi->data_len;
608 } else if (spb_status->block_status_ul == EGPRS_RESEG_DEFAULT) {
Max0524e382018-01-19 18:22:25 +0100609 LOGPTBFUL(this, LOGL_DEBUG,
610 "Second seg is received first seg is not received set the status to second seg received\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530611
612 block->len = Decoding::rlc_copy_to_aligned_buffer(rlc,
613 block_idx, data,
614 rlc_data + rlc->block_info[block_idx].data_len);
615
616 spb_status->block_status_ul = EGPRS_RESEG_SECOND_SEG_RXD;
617 block->block_info = *rdbi;
618 }
619 return spb_status->block_status_ul;
620}
621
622egprs_rlc_ul_reseg_bsn_state gprs_rlcmac_ul_tbf::handle_egprs_ul_first_seg(
623 const struct gprs_rlc_data_info *rlc, struct gprs_rlc_data *block,
624 uint8_t *data, const uint8_t block_idx)
625{
626 const gprs_rlc_data_block_info *rdbi = &rlc->block_info[block_idx];
627 uint8_t *rlc_data = &block->block[0];
628 union split_block_status *spb_status = &block->spb_status;
629
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200630 bts->do_rate_ctr_inc(CTR_SPB_UL_FIRST_SEGMENT);
sivasankarida7250a2016-12-16 12:57:18 +0530631
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530632 if (spb_status->block_status_ul & EGPRS_RESEG_SECOND_SEG_RXD) {
Max0524e382018-01-19 18:22:25 +0100633 LOGPTBFUL(this, LOGL_DEBUG,
634 "First seg is received second seg is already present set the status to complete\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530635
636 block->len += Decoding::rlc_copy_to_aligned_buffer(rlc,
637 block_idx, data, rlc_data);
638
639 block->block_info.data_len = block->len;
640 spb_status->block_status_ul = EGPRS_RESEG_DEFAULT;
641 } else if (spb_status->block_status_ul == EGPRS_RESEG_DEFAULT) {
Max0524e382018-01-19 18:22:25 +0100642 LOGPTBFUL(this, LOGL_DEBUG,
643 "First seg is received second seg is not received set the status to first seg received\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530644
645 spb_status->block_status_ul = EGPRS_RESEG_FIRST_SEG_RXD;
646 block->len = Decoding::rlc_copy_to_aligned_buffer(rlc,
647 block_idx, data, rlc_data);
648 block->block_info = *rdbi;
649 }
650 return spb_status->block_status_ul;
651}
652
653egprs_rlc_ul_reseg_bsn_state gprs_rlcmac_ul_tbf::handle_egprs_ul_spb(
654 const struct gprs_rlc_data_info *rlc, struct gprs_rlc_data *block,
655 uint8_t *data, const uint8_t block_idx)
656{
657 const gprs_rlc_data_block_info *rdbi = &rlc->block_info[block_idx];
658
Max0524e382018-01-19 18:22:25 +0100659 LOGPTBFUL(this, LOGL_DEBUG,
660 "Got SPB(%d) cs(%s) data block with BSN (%d), TFI(%d).\n",
Max136ebcc2019-03-05 14:59:03 +0100661 rdbi->spb, mcs_name(rlc->cs), rdbi->bsn, rlc->tfi);
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530662
663 egprs_rlc_ul_reseg_bsn_state assemble_status = EGPRS_RESEG_INVALID;
664
665 /* Section 10.4.8b of 44.060*/
666 if (rdbi->spb == 2)
667 assemble_status = handle_egprs_ul_first_seg(rlc,
668 block, data, block_idx);
669 else if (rdbi->spb == 3)
670 assemble_status = handle_egprs_ul_second_seg(rlc,
671 block, data, block_idx);
672 else {
Max0524e382018-01-19 18:22:25 +0100673 LOGPTBFUL(this, LOGL_ERROR,
674 "spb(%d) Not supported SPB for this EGPRS configuration\n",
675 rdbi->spb);
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530676 }
677
678 /*
679 * When the block is successfully constructed out of segmented blocks
680 * upgrade the MCS to the type 2
681 */
682 if (assemble_status == EGPRS_RESEG_DEFAULT) {
Pau Espin Pedrol2ae83372020-05-18 11:35:35 +0200683 switch (rlc->cs) {
Maxbea2edb2019-03-06 17:04:59 +0100684 case MCS3 :
685 block->cs_last = MCS6;
Max0524e382018-01-19 18:22:25 +0100686 LOGPTBFUL(this, LOGL_DEBUG, "Upgrading to MCS6\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530687 break;
Maxbea2edb2019-03-06 17:04:59 +0100688 case MCS2 :
689 block->cs_last = MCS5;
Max0524e382018-01-19 18:22:25 +0100690 LOGPTBFUL(this, LOGL_DEBUG, "Upgrading to MCS5\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530691 break;
Maxbea2edb2019-03-06 17:04:59 +0100692 case MCS1 :
Max0524e382018-01-19 18:22:25 +0100693 LOGPTBFUL(this, LOGL_DEBUG, "Upgrading to MCS4\n");
Maxbea2edb2019-03-06 17:04:59 +0100694 block->cs_last = MCS4;
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530695 break;
696 default:
Max0524e382018-01-19 18:22:25 +0100697 LOGPTBFUL(this, LOGL_ERROR,
698 "cs(%s) Error in Upgrading to higher MCS\n",
Max136ebcc2019-03-05 14:59:03 +0100699 mcs_name(rlc->cs));
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530700 break;
701 }
702 }
703 return assemble_status;
704}
Mrinal Mishraf86307e2016-11-10 18:16:30 +0530705
Maxfb59a932019-03-13 18:40:19 +0100706void gprs_rlcmac_ul_tbf::update_coding_scheme_counter_ul(enum CodingScheme cs)
Mrinal Mishraf86307e2016-11-10 18:16:30 +0530707{
Maxfb59a932019-03-13 18:40:19 +0100708 switch (cs) {
709 case CS1:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200710 bts->do_rate_ctr_inc(CTR_GPRS_UL_CS1);
Maxfb59a932019-03-13 18:40:19 +0100711 rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS1]);
712 break;
713 case CS2:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200714 bts->do_rate_ctr_inc(CTR_GPRS_UL_CS2);
Maxfb59a932019-03-13 18:40:19 +0100715 rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS2]);
716 break;
717 case CS3:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200718 bts->do_rate_ctr_inc(CTR_GPRS_UL_CS3);
Maxfb59a932019-03-13 18:40:19 +0100719 rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS3]);
720 break;
721 case CS4:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200722 bts->do_rate_ctr_inc(CTR_GPRS_UL_CS4);
Maxfb59a932019-03-13 18:40:19 +0100723 rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS4]);
724 break;
725 case MCS1:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200726 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS1);
Maxfb59a932019-03-13 18:40:19 +0100727 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS1]);
728 break;
729 case MCS2:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200730 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS2);
Maxfb59a932019-03-13 18:40:19 +0100731 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS2]);
732 break;
733 case MCS3:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200734 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS3);
Maxfb59a932019-03-13 18:40:19 +0100735 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS3]);
736 break;
737 case MCS4:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200738 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS4);
Maxfb59a932019-03-13 18:40:19 +0100739 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS4]);
740 break;
741 case MCS5:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200742 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS5);
Maxfb59a932019-03-13 18:40:19 +0100743 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS5]);
744 break;
745 case MCS6:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200746 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS6);
Maxfb59a932019-03-13 18:40:19 +0100747 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS6]);
748 break;
749 case MCS7:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200750 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS7);
Maxfb59a932019-03-13 18:40:19 +0100751 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS7]);
752 break;
753 case MCS8:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200754 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS8);
Maxfb59a932019-03-13 18:40:19 +0100755 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS8]);
756 break;
757 case MCS9:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200758 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS9);
Maxfb59a932019-03-13 18:40:19 +0100759 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS9]);
760 break;
761 default:
762 LOGPTBFUL(this, LOGL_ERROR, "attempting to update rate counters for unsupported (M)CS %s\n",
763 mcs_name(cs));
Mrinal Mishraf86307e2016-11-10 18:16:30 +0530764 }
765}
sivasankari8adfcd02017-01-16 15:41:21 +0530766
Max9d7357e2017-12-14 15:02:33 +0100767void gprs_rlcmac_ul_tbf::set_window_size()
sivasankari8adfcd02017-01-16 15:41:21 +0530768{
Max34513fe2018-12-11 16:47:30 +0100769 const struct gprs_rlcmac_bts *b = bts->bts_data();
770 uint16_t ws = egprs_window_size(b, ul_slots());
Max0524e382018-01-19 18:22:25 +0100771 LOGPTBFUL(this, LOGL_INFO, "setting EGPRS UL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n",
Max34513fe2018-12-11 16:47:30 +0100772 ws, b->ws_base, pcu_bitcount(ul_slots()), b->ws_pdch);
sivasankari8adfcd02017-01-16 15:41:21 +0530773 m_window.set_ws(ws);
774}
Pau Espin Pedrol9767e442020-10-23 21:11:41 +0200775
Pau Espin Pedrolb3f23972020-10-23 21:00:23 +0200776gprs_rlc_window *gprs_rlcmac_ul_tbf::window()
Pau Espin Pedrol9767e442020-10-23 21:11:41 +0200777{
778 return &m_window;
779}