blob: 80a8eaa49d490ad33825be77f1bb4c918687a77a [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
Pau Espin Pedrol442198c2020-10-23 22:30:04 +0200106 LOGP(DTBF, LOGL_DEBUG, "********** UL-TBF starts here **********\n");
107 LOGP(DTBF, LOGL_INFO, "Allocating UL TBF: MS_CLASS=%d/%d\n",
108 ms->ms_class(), ms->egprs_ms_class());
109
110 tbf = talloc(tall_pcu_ctx, struct gprs_rlcmac_ul_tbf);
111 if (!tbf)
112 return NULL;
113 talloc_set_destructor(tbf, ul_tbf_dtor);
114 new (tbf) gprs_rlcmac_ul_tbf(bts->bts, ms);
115
116 rc = tbf->setup(use_trx, single_slot);
117
118 /* if no resource */
119 if (rc < 0) {
120 talloc_free(tbf);
121 return NULL;
122 }
123
124 if (tbf->is_egprs_enabled())
125 tbf->set_window_size();
126
127 tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(tbf,
128 &tbf_ul_egprs_ctrg_desc, tbf->m_ctrs->idx);
129 tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(tbf,
130 &tbf_ul_gprs_ctrg_desc, tbf->m_ctrs->idx);
131 if (!tbf->m_ul_egprs_ctrs || !tbf->m_ul_gprs_ctrs) {
132 LOGPTBF(tbf, LOGL_ERROR, "Couldn't allocate TBF UL counters\n");
133 talloc_free(tbf);
134 return NULL;
135 }
136
137 llist_add(&tbf->list(), &bts->bts->ul_tbfs());
138 tbf->bts->do_rate_ctr_inc(CTR_TBF_UL_ALLOCATED);
139
140 return tbf;
141}
142
143
144gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx,
145 uint32_t tlli)
146{
147 struct gprs_rlcmac_ul_tbf *tbf;
148
149/* FIXME: Copy and paste with tbf_new_dl_assignment */
150 /* create new TBF, use same TRX as DL TBF */
151 /* use multislot class of downlink TBF */
152 tbf = tbf_alloc_ul_tbf(bts, ms, use_trx, false);
153 if (!tbf) {
154 LOGP(DTBF, LOGL_NOTICE, "No PDCH resource\n");
155 /* FIXME: send reject */
156 return NULL;
157 }
158 tbf->m_contention_resolution_done = 1;
159 TBF_SET_ASS_ON(tbf, GPRS_RLCMAC_FLAG_PACCH, false);
160 T_START(tbf, T3169, 3169, "allocation (UL-TBF)", true);
161 tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
162 OSMO_ASSERT(tbf->ms());
163
164 return tbf;
165}
166
167struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts,
168 GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts)
169{
170 struct gprs_rlcmac_ul_tbf *ul_tbf = NULL;
171 struct gprs_rlcmac_trx *trx = &bts->trx[trx_no];
172
173 if (!ms)
174 ms = bts->bts->ms_alloc(0, 0);
175 ms->set_tlli(tlli);
176
177 ul_tbf = talloc(tall_pcu_ctx, struct gprs_rlcmac_ul_tbf);
178 if (!ul_tbf)
179 return ul_tbf;
180
181 talloc_set_destructor(ul_tbf, ul_tbf_dtor);
182 new (ul_tbf) gprs_rlcmac_ul_tbf(bts->bts, ms);
183
184 llist_add(&ul_tbf->list(), &bts->bts->ul_tbfs());
185 ul_tbf->bts->do_rate_ctr_inc(CTR_TBF_UL_ALLOCATED);
186 TBF_SET_ASS_ON(ul_tbf, GPRS_RLCMAC_FLAG_PACCH, false);
187
188 ms->attach_tbf(ul_tbf);
189 ul_tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
190 TBF_SET_ASS_STATE_UL(ul_tbf, GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ);
191 ul_tbf->control_ts = ts;
192 ul_tbf->trx = trx;
193 ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, next_tbf_ctr_group_id++);
194 ul_tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(ul_tbf,
195 &tbf_ul_egprs_ctrg_desc,
196 ul_tbf->m_ctrs->idx);
197 ul_tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(ul_tbf,
198 &tbf_ul_gprs_ctrg_desc,
199 ul_tbf->m_ctrs->idx);
200 if (!ul_tbf->m_ctrs || !ul_tbf->m_ul_egprs_ctrs || !ul_tbf->m_ul_gprs_ctrs) {
201 LOGPTBF(ul_tbf, LOGL_ERROR, "Cound not allocate TBF UL rate counters\n");
202 talloc_free(ul_tbf);
203 return NULL;
204 }
205
206 return ul_tbf;
207}
208
Pau Espin Pedrole9f77d32020-10-23 18:41:40 +0200209gprs_rlcmac_ul_tbf::gprs_rlcmac_ul_tbf(BTS *bts_, GprsMs *ms) :
210 gprs_rlcmac_tbf(bts_, ms, GPRS_RLCMAC_UL_TBF),
Pau Espin Pedrolbddf1ad2019-09-26 14:41:18 +0200211 m_rx_counter(0),
212 m_contention_resolution_done(0),
213 m_final_ack_sent(0),
214 m_ul_gprs_ctrs(NULL),
215 m_ul_egprs_ctrs(NULL)
216{
217 memset(&m_usf, 0, sizeof(m_usf));
218}
219
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100220/*
221 * Store received block data in LLC message(s) and forward to SGSN
222 * if complete.
223 */
224int gprs_rlcmac_ul_tbf::assemble_forward_llc(const gprs_rlc_data *_data)
225{
226 const uint8_t *data = _data->block;
227 uint8_t len = _data->len;
Jacob Erlbeckf2ba4cb2016-01-07 18:59:28 +0100228 const struct gprs_rlc_data_block_info *rdbi = &_data->block_info;
Pau Espin Pedrol2ae83372020-05-18 11:35:35 +0200229 enum CodingScheme cs = _data->cs_last;
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100230
231 Decoding::RlcData frames[16], *frame;
232 int i, num_frames = 0;
233 uint32_t dummy_tlli;
234
Max0524e382018-01-19 18:22:25 +0100235 LOGPTBFUL(this, LOGL_DEBUG, "Assembling frames: (len=%d)\n", len);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100236
237 num_frames = Decoding::rlc_data_from_ul_data(
Alexander Couzensce936f32016-05-24 14:45:41 +0200238 rdbi, cs, data, &(frames[0]), ARRAY_SIZE(frames),
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100239 &dummy_tlli);
240
241 /* create LLC frames */
242 for (i = 0; i < num_frames; i++) {
243 frame = frames + i;
244
Aravind Sirsikar22a90192016-09-15 17:24:49 +0530245 if (frame->length) {
Pau Espin Pedrola107f8f2020-05-12 22:32:24 +0200246 bts->do_rate_ctr_add(CTR_RLC_UL_PAYLOAD_BYTES, frame->length);
Alexander Couzens7fdbf892016-05-21 19:45:23 +0200247
Max0524e382018-01-19 18:22:25 +0100248 LOGPTBFUL(this, LOGL_DEBUG, "Frame %d "
Aravind Sirsikar22a90192016-09-15 17:24:49 +0530249 "starts at offset %d, "
250 "length=%d, is_complete=%d\n",
251 i + 1, frame->offset, frame->length,
252 frame->is_complete);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100253
Aravind Sirsikar22a90192016-09-15 17:24:49 +0530254 m_llc.append_frame(data + frame->offset, frame->length);
255 m_llc.consume(frame->length);
256 }
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100257
258 if (frame->is_complete) {
259 /* send frame to SGSN */
Max0fdaa9d2018-01-30 16:03:10 +0100260 LOGPTBFUL(this, LOGL_DEBUG, "complete UL frame len=%d\n", m_llc.frame_length());
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100261 snd_ul_ud();
Pau Espin Pedrola107f8f2020-05-12 22:32:24 +0200262 bts->do_rate_ctr_add(CTR_LLC_UL_BYTES, m_llc.frame_length());
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100263 m_llc.reset();
264 }
265 }
266
267 return 0;
268}
269
Maxfd13f6c2017-07-07 14:29:36 +0200270bool gprs_rlcmac_ul_tbf::ctrl_ack_to_toggle()
271{
Max8dce1de2018-01-02 14:17:04 +0100272 if (check_n_clear(GPRS_RLCMAC_FLAG_TO_UL_ACK))
Maxfd13f6c2017-07-07 14:29:36 +0200273 return true; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was set, now cleared */
Maxfd13f6c2017-07-07 14:29:36 +0200274
275 state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_UL_ACK);
276 return false; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was unset, now set */
277}
278
279bool gprs_rlcmac_ul_tbf::handle_ctrl_ack()
280{
281 /* check if this control ack belongs to packet uplink ack */
Max088c7df2018-01-23 20:16:23 +0100282 if (ul_ack_state_is(GPRS_RLCMAC_UL_ACK_WAIT_ACK)) {
283 TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_NONE);
Maxfd13f6c2017-07-07 14:29:36 +0200284 return true;
285 }
286
287 return false;
288}
Daniel Willmannca102af2014-08-08 12:14:12 +0200289
Jacob Erlbeck5a3c84d2016-01-22 17:25:38 +0100290struct msgb *gprs_rlcmac_ul_tbf::create_ul_ack(uint32_t fn, uint8_t ts)
Daniel Willmannca102af2014-08-08 12:14:12 +0200291{
292 int final = (state_is(GPRS_RLCMAC_FINISHED));
293 struct msgb *msg;
Jacob Erlbeckf2694b72016-01-26 21:46:26 +0100294 int rc;
295 unsigned int rrbp = 0;
296 uint32_t new_poll_fn = 0;
Daniel Willmannca102af2014-08-08 12:14:12 +0200297
298 if (final) {
Maxcac6b662018-01-24 11:00:17 +0100299 if (poll_scheduled() && ul_ack_state_is(GPRS_RLCMAC_UL_ACK_WAIT_ACK)) {
Maxc21f0072017-12-15 17:36:45 +0100300 LOGPTBFUL(this, LOGL_DEBUG,
301 "Polling is already scheduled, so we must wait for the final uplink ack...\n");
Daniel Willmannca102af2014-08-08 12:14:12 +0200302 return NULL;
303 }
Jacob Erlbeckf2694b72016-01-26 21:46:26 +0100304
305 rc = check_polling(fn, ts, &new_poll_fn, &rrbp);
306 if (rc < 0)
Daniel Willmannca102af2014-08-08 12:14:12 +0200307 return NULL;
Daniel Willmannca102af2014-08-08 12:14:12 +0200308 }
309
310 msg = msgb_alloc(23, "rlcmac_ul_ack");
311 if (!msg)
312 return NULL;
Alexander Couzensccde5c92017-02-04 03:10:08 +0100313 bitvec *ack_vec = bitvec_alloc(23, tall_pcu_ctx);
Daniel Willmannca102af2014-08-08 12:14:12 +0200314 if (!ack_vec) {
315 msgb_free(msg);
316 return NULL;
317 }
Max7426c5f2019-02-18 20:42:42 +0100318 bitvec_unhex(ack_vec, DUMMY_VEC);
Alexander Couzens3a499f32019-06-16 15:25:30 +0200319 Encoding::write_packet_uplink_ack(ack_vec, this, final, rrbp);
Daniel Willmannca102af2014-08-08 12:14:12 +0200320 bitvec_pack(ack_vec, msgb_put(msg, 23));
321 bitvec_free(ack_vec);
Daniel Willmannca102af2014-08-08 12:14:12 +0200322
323 /* now we must set this flag, so we are allowed to assign downlink
324 * TBF on PACCH. it is only allowed when TLLI is acknowledged. */
325 m_contention_resolution_done = 1;
326
327 if (final) {
Maxf60cf622017-07-10 14:40:09 +0200328 set_polling(new_poll_fn, ts, GPRS_RLCMAC_POLL_UL_ACK);
Daniel Willmannca102af2014-08-08 12:14:12 +0200329 /* waiting for final acknowledge */
Daniel Willmannca102af2014-08-08 12:14:12 +0200330 m_final_ack_sent = 1;
331 } else
Max088c7df2018-01-23 20:16:23 +0100332 TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_NONE);
Daniel Willmannca102af2014-08-08 12:14:12 +0200333
334 return msg;
335}
336
Alexander Couzens2fcfc292016-05-24 14:40:03 +0200337/*! \brief receive data from PDCH/L1 */
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100338int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
Jacob Erlbeckf2ba4cb2016-01-07 18:59:28 +0100339 const struct gprs_rlc_data_info *rlc,
Jacob Erlbeckfc1b3e62016-01-11 09:58:11 +0100340 uint8_t *data, struct pcu_l1_meas *meas)
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100341{
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200342 const struct gprs_rlc_data_block_info *rdbi;
343 struct gprs_rlc_data *block;
344
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100345 int8_t rssi = meas->have_rssi ? meas->rssi : 0;
346
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100347 const uint16_t ws = m_window.ws();
348
349 this->state_flags |= (1 << GPRS_RLCMAC_FLAG_UL_DATA);
350
Max0524e382018-01-19 18:22:25 +0100351 LOGPTBFUL(this, LOGL_DEBUG, "UL DATA TFI=%d received (V(Q)=%d .. "
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100352 "V(R)=%d)\n", rlc->tfi, this->m_window.v_q(),
353 this->m_window.v_r());
354
355 /* process RSSI */
356 gprs_rlcmac_rssi(this, rssi);
357
358 /* store measurement values */
359 if (ms())
360 ms()->update_l1_meas(meas);
361
Vadim Yanitskiycb988942020-11-08 13:27:35 +0700362 uint32_t new_tlli = GSM_RESERVED_TMSI;
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100363 unsigned int block_idx;
364
365 /* restart T3169 */
Pau Espin Pedrol28f160e2019-09-05 14:48:35 +0200366 T_START(this, T3169, 3169, "acked (data)", true);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100367
368 /* Increment RX-counter */
369 this->m_rx_counter++;
Mrinal Mishraf86307e2016-11-10 18:16:30 +0530370 update_coding_scheme_counter_ul(rlc->cs);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100371 /* Loop over num_blocks */
372 for (block_idx = 0; block_idx < rlc->num_data_blocks; block_idx++) {
373 int num_chunks;
374 uint8_t *rlc_data;
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200375 rdbi = &rlc->block_info[block_idx];
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100376 bool need_rlc_data = false;
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100377
Max0524e382018-01-19 18:22:25 +0100378 LOGPTBFUL(this, LOGL_DEBUG,
379 "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 +0100380 mcs_name(rlc->cs),
Max0524e382018-01-19 18:22:25 +0100381 rdbi->cv, rdbi->bsn, rdbi->spb,
382 rdbi->pi, rdbi->e, rdbi->ti,
383 rlc->data_offs_bits[block_idx]);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100384
385 /* Check whether the block needs to be decoded */
386
387 if (!m_window.is_in_window(rdbi->bsn)) {
Max0524e382018-01-19 18:22:25 +0100388 LOGPTBFUL(this, LOGL_DEBUG, "BSN %d out of window %d..%d (it's normal)\n",
389 rdbi->bsn,
390 m_window.v_q(), m_window.mod_sns(m_window.v_q() + ws - 1));
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100391 } else if (m_window.is_received(rdbi->bsn)) {
Max0524e382018-01-19 18:22:25 +0100392 LOGPTBFUL(this, LOGL_DEBUG,
393 "BSN %d already received\n", rdbi->bsn);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100394 } else {
395 need_rlc_data = true;
396 }
397
398 if (!is_tlli_valid()) {
399 if (!rdbi->ti) {
Max0524e382018-01-19 18:22:25 +0100400 LOGPTBFUL(this, LOGL_NOTICE, "Missing TLLI within UL DATA.\n");
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100401 continue;
402 }
403 need_rlc_data = true;
404 }
405
406 if (!need_rlc_data)
407 continue;
408
409 /* Store block and meta info to BSN buffer */
410
Max0524e382018-01-19 18:22:25 +0100411 LOGPTBFUL(this, LOGL_DEBUG, "BSN %d storing in window (%d..%d)\n",
412 rdbi->bsn, m_window.v_q(),
413 m_window.mod_sns(m_window.v_q() + ws - 1));
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100414 block = m_rlc.block(rdbi->bsn);
Aravind Sirsikar550a5412016-06-14 18:59:18 +0530415 OSMO_ASSERT(rdbi->data_len <= sizeof(block->block));
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100416 rlc_data = &(block->block[0]);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100417
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530418 if (rdbi->spb) {
419 egprs_rlc_ul_reseg_bsn_state assemble_status;
420
421 assemble_status = handle_egprs_ul_spb(rlc,
422 block, data, block_idx);
423
424 if (assemble_status != EGPRS_RESEG_DEFAULT)
425 return 0;
426 } else {
427 block->block_info = *rdbi;
428 block->cs_last = rlc->cs;
429 block->len =
430 Decoding::rlc_copy_to_aligned_buffer(rlc,
431 block_idx, data, rlc_data);
432 }
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100433
Max0524e382018-01-19 18:22:25 +0100434 LOGPTBFUL(this, LOGL_DEBUG,
435 "data_length=%d, data=%s\n",
436 block->len, osmo_hexdump(rlc_data, block->len));
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100437 /* Get/Handle TLLI */
438 if (rdbi->ti) {
439 num_chunks = Decoding::rlc_data_from_ul_data(
440 rdbi, rlc->cs, rlc_data, NULL, 0, &new_tlli);
441
442 if (num_chunks < 0) {
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200443 bts->do_rate_ctr_inc(CTR_DECODE_ERRORS);
Max0524e382018-01-19 18:22:25 +0100444 LOGPTBFUL(this, LOGL_NOTICE,
445 "Failed to decode TLLI of %s UL DATA TFI=%d.\n",
Max136ebcc2019-03-05 14:59:03 +0100446 mcs_name(rlc->cs), rlc->tfi);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100447 m_window.invalidate_bsn(rdbi->bsn);
448 continue;
449 }
450 if (!this->is_tlli_valid()) {
Vadim Yanitskiycb988942020-11-08 13:27:35 +0700451 if (new_tlli == GSM_RESERVED_TMSI) {
Max0524e382018-01-19 18:22:25 +0100452 LOGPTBFUL(this, LOGL_NOTICE,
Vadim Yanitskiycb988942020-11-08 13:27:35 +0700453 "TLLI is 0x%08x within UL DATA?!?\n",
454 new_tlli);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100455 m_window.invalidate_bsn(rdbi->bsn);
456 continue;
457 }
Max0524e382018-01-19 18:22:25 +0100458 LOGPTBFUL(this, LOGL_INFO,
459 "Decoded premier TLLI=0x%08x of UL DATA TFI=%d.\n",
Vadim Yanitskiy3f27fb52020-04-20 11:26:12 +0700460 new_tlli, rlc->tfi);
Pau Espin Pedrold21e9612020-06-26 14:20:37 +0200461 update_ms(new_tlli, GPRS_RLCMAC_UL_TBF);
Vadim Yanitskiycb988942020-11-08 13:27:35 +0700462 } else if (new_tlli != GSM_RESERVED_TMSI && new_tlli != tlli()) {
Max0524e382018-01-19 18:22:25 +0100463 LOGPTBFUL(this, LOGL_NOTICE,
Pau Espin Pedrol305763d2020-11-06 20:03:24 +0100464 "Decoded TLLI=%08x mismatch on UL DATA TFI=%d. (Ignoring due to contention resolution)\n",
465 new_tlli, rlc->tfi);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100466 m_window.invalidate_bsn(rdbi->bsn);
467 continue;
468 }
469 }
470
471 m_window.receive_bsn(rdbi->bsn);
472 }
473
474 /* Raise V(Q) if possible, and retrieve LLC frames from blocks.
475 * This is looped until there is a gap (non received block) or
476 * the window is empty.*/
477 const uint16_t v_q_beg = m_window.v_q();
478 const uint16_t count = m_window.raise_v_q();
479
480 /* Retrieve LLC frames from blocks that are ready */
481 for (uint16_t i = 0; i < count; ++i) {
Jacob Erlbeck93c55d02015-12-23 16:29:07 +0100482 uint16_t index = m_window.mod_sns(v_q_beg + i);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100483 assemble_forward_llc(m_rlc.block(index));
484 }
485
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200486 /* Last frame in buffer: */
487 block = m_rlc.block(m_window.mod_sns(m_window.v_r() - 1));
488 rdbi = &block->block_info;
489
490 /* Check if we already received all data TBF had to send: */
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100491 if (this->state_is(GPRS_RLCMAC_FLOW) /* still in flow state */
492 && this->m_window.v_q() == this->m_window.v_r()) { /* if complete */
Max0524e382018-01-19 18:22:25 +0100493 LOGPTBFUL(this, LOGL_DEBUG,
494 "No gaps in received block, last block: BSN=%d CV=%d\n",
495 rdbi->bsn, rdbi->cv);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100496 if (rdbi->cv == 0) {
Max0524e382018-01-19 18:22:25 +0100497 LOGPTBFUL(this, LOGL_DEBUG, "Finished with UL TBF\n");
Max2399b1d2018-01-12 15:48:12 +0100498 TBF_SET_STATE(this, GPRS_RLCMAC_FINISHED);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100499 /* Reset N3103 counter. */
Max847ed9f2018-02-20 18:16:11 +0100500 this->n_reset(N3103);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100501 }
502 }
503
504 /* If TLLI is included or if we received half of the window, we send
505 * an ack/nack */
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200506 maybe_schedule_uplink_acknack(rlc, rdbi->cv == 0);
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100507
508 return 0;
509}
510
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100511void gprs_rlcmac_ul_tbf::maybe_schedule_uplink_acknack(
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200512 const gprs_rlc_data_info *rlc, bool countdown_finished)
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100513{
Pau Espin Pedrol09afd6f2020-05-15 16:40:18 +0200514 bool require_ack = false;
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100515 bool have_ti = rlc->block_info[0].ti ||
516 (rlc->num_data_blocks > 1 && rlc->block_info[1].ti);
517
Pau Espin Pedrol09afd6f2020-05-15 16:40:18 +0200518 if (rlc->si) {
519 require_ack = true;
520 LOGPTBFUL(this, LOGL_NOTICE,
521 "Scheduling Ack/Nack, because MS is stalled.\n");
522 }
523 if (have_ti) {
524 require_ack = true;
525 LOGPTBFUL(this, LOGL_DEBUG,
526 "Scheduling Ack/Nack, because TLLI is included.\n");
527 }
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200528 if (countdown_finished) {
Pau Espin Pedrol09afd6f2020-05-15 16:40:18 +0200529 require_ack = true;
Pau Espin Pedrolc33a0242020-05-15 16:57:48 +0200530 if (state_is(GPRS_RLCMAC_FLOW))
531 LOGPTBFUL(this, LOGL_DEBUG,
532 "Scheduling Ack/Nack, because some data is missing and last block has CV==0.\n");
533 else if (state_is(GPRS_RLCMAC_FINISHED))
534 LOGPTBFUL(this, LOGL_DEBUG,
535 "Scheduling final Ack/Nack, because all data was received and last block has CV==0.\n");
Pau Espin Pedrol09afd6f2020-05-15 16:40:18 +0200536 }
537 if ((m_rx_counter % SEND_ACK_AFTER_FRAMES) == 0) {
538 require_ack = true;
539 LOGPTBFUL(this, LOGL_DEBUG,
540 "Scheduling Ack/Nack, because %d frames received.\n",
541 SEND_ACK_AFTER_FRAMES);
542 }
543
544 if (!require_ack)
545 return;
546
547 if (ul_ack_state_is(GPRS_RLCMAC_UL_ACK_NONE)) {
548 /* trigger sending at next RTS */
549 TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_SEND_ACK);
550 } else {
551 /* already triggered */
552 LOGPTBFUL(this, LOGL_DEBUG,
553 "Sending Ack/Nack already scheduled, no need to re-schedule\n");
Jacob Erlbeckb3100e12015-12-14 13:36:13 +0100554 }
555}
556
Daniel Willmannca102af2014-08-08 12:14:12 +0200557/* Send Uplink unit-data to SGSN. */
558int gprs_rlcmac_ul_tbf::snd_ul_ud()
559{
560 uint8_t qos_profile[3];
561 struct msgb *llc_pdu;
562 unsigned msg_len = NS_HDR_LEN + BSSGP_HDR_LEN + m_llc.frame_length();
563 struct bssgp_bvc_ctx *bctx = gprs_bssgp_pcu_current_bctx();
564
565 LOGP(DBSSGP, LOGL_INFO, "LLC [PCU -> SGSN] %s len=%d\n", tbf_name(this), m_llc.frame_length());
566 if (!bctx) {
567 LOGP(DBSSGP, LOGL_ERROR, "No bctx\n");
568 m_llc.reset_frame_space();
569 return -EIO;
570 }
Pau Espin Pedrol488aa292019-09-25 17:48:35 +0200571
Daniel Willmannca102af2014-08-08 12:14:12 +0200572 llc_pdu = msgb_alloc_headroom(msg_len, msg_len,"llc_pdu");
573 uint8_t *buf = msgb_push(llc_pdu, TL16V_GROSS_LEN(sizeof(uint8_t)*m_llc.frame_length()));
574 tl16v_put(buf, BSSGP_IE_LLC_PDU, sizeof(uint8_t)*m_llc.frame_length(), m_llc.frame);
575 qos_profile[0] = QOS_PROFILE >> 16;
576 qos_profile[1] = QOS_PROFILE >> 8;
577 qos_profile[2] = QOS_PROFILE;
578 bssgp_tx_ul_ud(bctx, tlli(), qos_profile, llc_pdu);
579
580 m_llc.reset_frame_space();
581 return 0;
582}
583
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530584egprs_rlc_ul_reseg_bsn_state gprs_rlcmac_ul_tbf::handle_egprs_ul_second_seg(
585 const struct gprs_rlc_data_info *rlc, struct gprs_rlc_data *block,
586 uint8_t *data, const uint8_t block_idx)
587{
588 const gprs_rlc_data_block_info *rdbi = &rlc->block_info[block_idx];
589 union split_block_status *spb_status = &block->spb_status;
590 uint8_t *rlc_data = &block->block[0];
591
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200592 bts->do_rate_ctr_inc(CTR_SPB_UL_SECOND_SEGMENT);
sivasankarida7250a2016-12-16 12:57:18 +0530593
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530594 if (spb_status->block_status_ul &
595 EGPRS_RESEG_FIRST_SEG_RXD) {
Max0524e382018-01-19 18:22:25 +0100596 LOGPTBFUL(this, LOGL_DEBUG,
597 "Second seg is received first seg is already present set the status to complete\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530598 spb_status->block_status_ul = EGPRS_RESEG_DEFAULT;
599
600 block->len += Decoding::rlc_copy_to_aligned_buffer(rlc,
601 block_idx, data, rlc_data + block->len);
602 block->block_info.data_len += rdbi->data_len;
603 } else if (spb_status->block_status_ul == EGPRS_RESEG_DEFAULT) {
Max0524e382018-01-19 18:22:25 +0100604 LOGPTBFUL(this, LOGL_DEBUG,
605 "Second seg is received first seg is not received set the status to second seg received\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530606
607 block->len = Decoding::rlc_copy_to_aligned_buffer(rlc,
608 block_idx, data,
609 rlc_data + rlc->block_info[block_idx].data_len);
610
611 spb_status->block_status_ul = EGPRS_RESEG_SECOND_SEG_RXD;
612 block->block_info = *rdbi;
613 }
614 return spb_status->block_status_ul;
615}
616
617egprs_rlc_ul_reseg_bsn_state gprs_rlcmac_ul_tbf::handle_egprs_ul_first_seg(
618 const struct gprs_rlc_data_info *rlc, struct gprs_rlc_data *block,
619 uint8_t *data, const uint8_t block_idx)
620{
621 const gprs_rlc_data_block_info *rdbi = &rlc->block_info[block_idx];
622 uint8_t *rlc_data = &block->block[0];
623 union split_block_status *spb_status = &block->spb_status;
624
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200625 bts->do_rate_ctr_inc(CTR_SPB_UL_FIRST_SEGMENT);
sivasankarida7250a2016-12-16 12:57:18 +0530626
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530627 if (spb_status->block_status_ul & EGPRS_RESEG_SECOND_SEG_RXD) {
Max0524e382018-01-19 18:22:25 +0100628 LOGPTBFUL(this, LOGL_DEBUG,
629 "First seg is received second seg is already present set the status to complete\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530630
631 block->len += Decoding::rlc_copy_to_aligned_buffer(rlc,
632 block_idx, data, rlc_data);
633
634 block->block_info.data_len = block->len;
635 spb_status->block_status_ul = EGPRS_RESEG_DEFAULT;
636 } else if (spb_status->block_status_ul == EGPRS_RESEG_DEFAULT) {
Max0524e382018-01-19 18:22:25 +0100637 LOGPTBFUL(this, LOGL_DEBUG,
638 "First seg is received second seg is not received set the status to first seg received\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530639
640 spb_status->block_status_ul = EGPRS_RESEG_FIRST_SEG_RXD;
641 block->len = Decoding::rlc_copy_to_aligned_buffer(rlc,
642 block_idx, data, rlc_data);
643 block->block_info = *rdbi;
644 }
645 return spb_status->block_status_ul;
646}
647
648egprs_rlc_ul_reseg_bsn_state gprs_rlcmac_ul_tbf::handle_egprs_ul_spb(
649 const struct gprs_rlc_data_info *rlc, struct gprs_rlc_data *block,
650 uint8_t *data, const uint8_t block_idx)
651{
652 const gprs_rlc_data_block_info *rdbi = &rlc->block_info[block_idx];
653
Max0524e382018-01-19 18:22:25 +0100654 LOGPTBFUL(this, LOGL_DEBUG,
655 "Got SPB(%d) cs(%s) data block with BSN (%d), TFI(%d).\n",
Max136ebcc2019-03-05 14:59:03 +0100656 rdbi->spb, mcs_name(rlc->cs), rdbi->bsn, rlc->tfi);
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530657
658 egprs_rlc_ul_reseg_bsn_state assemble_status = EGPRS_RESEG_INVALID;
659
660 /* Section 10.4.8b of 44.060*/
661 if (rdbi->spb == 2)
662 assemble_status = handle_egprs_ul_first_seg(rlc,
663 block, data, block_idx);
664 else if (rdbi->spb == 3)
665 assemble_status = handle_egprs_ul_second_seg(rlc,
666 block, data, block_idx);
667 else {
Max0524e382018-01-19 18:22:25 +0100668 LOGPTBFUL(this, LOGL_ERROR,
669 "spb(%d) Not supported SPB for this EGPRS configuration\n",
670 rdbi->spb);
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530671 }
672
673 /*
674 * When the block is successfully constructed out of segmented blocks
675 * upgrade the MCS to the type 2
676 */
677 if (assemble_status == EGPRS_RESEG_DEFAULT) {
Pau Espin Pedrol2ae83372020-05-18 11:35:35 +0200678 switch (rlc->cs) {
Maxbea2edb2019-03-06 17:04:59 +0100679 case MCS3 :
680 block->cs_last = MCS6;
Max0524e382018-01-19 18:22:25 +0100681 LOGPTBFUL(this, LOGL_DEBUG, "Upgrading to MCS6\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530682 break;
Maxbea2edb2019-03-06 17:04:59 +0100683 case MCS2 :
684 block->cs_last = MCS5;
Max0524e382018-01-19 18:22:25 +0100685 LOGPTBFUL(this, LOGL_DEBUG, "Upgrading to MCS5\n");
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530686 break;
Maxbea2edb2019-03-06 17:04:59 +0100687 case MCS1 :
Max0524e382018-01-19 18:22:25 +0100688 LOGPTBFUL(this, LOGL_DEBUG, "Upgrading to MCS4\n");
Maxbea2edb2019-03-06 17:04:59 +0100689 block->cs_last = MCS4;
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530690 break;
691 default:
Max0524e382018-01-19 18:22:25 +0100692 LOGPTBFUL(this, LOGL_ERROR,
693 "cs(%s) Error in Upgrading to higher MCS\n",
Max136ebcc2019-03-05 14:59:03 +0100694 mcs_name(rlc->cs));
Aravind Sirsikar505a86d2016-07-26 18:26:21 +0530695 break;
696 }
697 }
698 return assemble_status;
699}
Mrinal Mishraf86307e2016-11-10 18:16:30 +0530700
Maxfb59a932019-03-13 18:40:19 +0100701void gprs_rlcmac_ul_tbf::update_coding_scheme_counter_ul(enum CodingScheme cs)
Mrinal Mishraf86307e2016-11-10 18:16:30 +0530702{
Maxfb59a932019-03-13 18:40:19 +0100703 switch (cs) {
704 case CS1:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200705 bts->do_rate_ctr_inc(CTR_GPRS_UL_CS1);
Maxfb59a932019-03-13 18:40:19 +0100706 rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS1]);
707 break;
708 case CS2:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200709 bts->do_rate_ctr_inc(CTR_GPRS_UL_CS2);
Maxfb59a932019-03-13 18:40:19 +0100710 rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS2]);
711 break;
712 case CS3:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200713 bts->do_rate_ctr_inc(CTR_GPRS_UL_CS3);
Maxfb59a932019-03-13 18:40:19 +0100714 rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS3]);
715 break;
716 case CS4:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200717 bts->do_rate_ctr_inc(CTR_GPRS_UL_CS4);
Maxfb59a932019-03-13 18:40:19 +0100718 rate_ctr_inc(&m_ul_gprs_ctrs->ctr[TBF_CTR_GPRS_UL_CS4]);
719 break;
720 case MCS1:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200721 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS1);
Maxfb59a932019-03-13 18:40:19 +0100722 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS1]);
723 break;
724 case MCS2:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200725 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS2);
Maxfb59a932019-03-13 18:40:19 +0100726 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS2]);
727 break;
728 case MCS3:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200729 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS3);
Maxfb59a932019-03-13 18:40:19 +0100730 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS3]);
731 break;
732 case MCS4:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200733 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS4);
Maxfb59a932019-03-13 18:40:19 +0100734 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS4]);
735 break;
736 case MCS5:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200737 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS5);
Maxfb59a932019-03-13 18:40:19 +0100738 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS5]);
739 break;
740 case MCS6:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200741 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS6);
Maxfb59a932019-03-13 18:40:19 +0100742 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS6]);
743 break;
744 case MCS7:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200745 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS7);
Maxfb59a932019-03-13 18:40:19 +0100746 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS7]);
747 break;
748 case MCS8:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200749 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS8);
Maxfb59a932019-03-13 18:40:19 +0100750 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS8]);
751 break;
752 case MCS9:
Pau Espin Pedrol2338e532020-05-12 20:54:35 +0200753 bts->do_rate_ctr_inc(CTR_EGPRS_UL_MCS9);
Maxfb59a932019-03-13 18:40:19 +0100754 rate_ctr_inc(&m_ul_egprs_ctrs->ctr[TBF_CTR_EGPRS_UL_MCS9]);
755 break;
756 default:
757 LOGPTBFUL(this, LOGL_ERROR, "attempting to update rate counters for unsupported (M)CS %s\n",
758 mcs_name(cs));
Mrinal Mishraf86307e2016-11-10 18:16:30 +0530759 }
760}
sivasankari8adfcd02017-01-16 15:41:21 +0530761
Max9d7357e2017-12-14 15:02:33 +0100762void gprs_rlcmac_ul_tbf::set_window_size()
sivasankari8adfcd02017-01-16 15:41:21 +0530763{
Max34513fe2018-12-11 16:47:30 +0100764 const struct gprs_rlcmac_bts *b = bts->bts_data();
765 uint16_t ws = egprs_window_size(b, ul_slots());
Max0524e382018-01-19 18:22:25 +0100766 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 +0100767 ws, b->ws_base, pcu_bitcount(ul_slots()), b->ws_pdch);
sivasankari8adfcd02017-01-16 15:41:21 +0530768 m_window.set_ws(ws);
769}
Pau Espin Pedrol9767e442020-10-23 21:11:41 +0200770
Pau Espin Pedrolb3f23972020-10-23 21:00:23 +0200771gprs_rlc_window *gprs_rlcmac_ul_tbf::window()
Pau Espin Pedrol9767e442020-10-23 21:11:41 +0200772{
773 return &m_window;
774}