aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms.h
AgeCommit message (Collapse)AuthorFilesLines
2023-06-29ms_need_dl_tbf(): Fix state checks and document functionPau Espin Pedrol1-3/+22
A new state TBF_ST_WAIT_REUSE_TFI was added lately in dl_tbf_fsm, which allows differentiating the time where the MS is listening on PACCH after having sent last DL ACK/NACK, and time where it should already be in idle mode. In the former, the ms_need_dl_tbf() should return false since the MS is still ongoing in packet-active mode (and new data incoming from SGSN will trigger new DL TBF assignment over PACCH as needed), while in the later we want to start a new PCH assignment. Fixes: 40a297f3b0c8e1670d46a4974750dd3335bc7885 Change-Id: I96f311480d036859511c6ba825ccd36bdc71190b
2023-04-21ms: Log MS active/idle state in 'show ms' VTY commandsPau Espin Pedrol1-0/+2
Change-Id: Ibcd34055c9ae390510c5c3ba26621fd96d2368fd
2023-04-21ms: Rename field timer -> release_timerPau Espin Pedrol1-1/+1
Rename it so that it becomes clear what the timer is used for. Change-Id: Id4738ea196b232858e1ec9cdc439f9b81839058f
2023-04-21ms: Get rid of ms->delay fieldPau Espin Pedrol1-6/+0
Simply apply the content of the configured timer when the MS goes idle. Having that field is convenient to do tricky stuff in unit tests, but makes the main osmo-pcu app more complex for no good enough reason. Change-Id: I8d44318b37b6605afd84db8ccec0d75e6db293b9
2023-04-21ms: Hold a reference during ms_allocPau Espin Pedrol1-1/+1
Make the caller hold a reference to the MS object just allocated, so that it hs to explicitly unref it and, in turn, if no new references were added during its use, trigger release of the MS object. This is useful to avoid leaking MS object if it was allocated and then no TBF is attached to it because allocation of TBF failed. Related: OS#6002 Change-Id: I2088a7ddd76fe9157b6626ef96ae4315e88779ea
2023-04-20ms: Rewrite MS release lifecyclePau Espin Pedrol1-12/+2
This commit changes lots of stuff in the MS release lifecycle, but there's no really good way to split this into patches which make sense, since all the chaos is intensively entangled. Get rid of the ms_callback complex mess, it is not needed at all. Previous MS release was strange due to the existance of previous ms_callback.idle concept and MS storage: the MS signalled when it went idle (no TBFs attached) and waited for somebody outside to free it, while then arming itself the release timer to release itself if it was not released by whoever. The new lifecycle follows an easier (expected) approach: Whenever all TBFs become detached from the MS and it becomes idle (use_count becomes 0), then it frees its reserved resources (TFI, etc.) and either: * frees itself immediatelly under certain conditions (release timeout configured = 0 or MS garbage with TLLI=GSM_RESERVED_TMSI) * Arms release_timer and frees itself when it triggers. If during release_timer the MS is required again (for instance because a new TBF with TLLI/IMSI of the MS is observed), then a TBF is attached to the MS and it is considered to become active again, hence the release_timer is stopped. OS#6002 Change-Id: Ibe5115bc15bb4d76026918adc1be79469c2f4839
2023-04-20ms: Use osmo_use_count to track referencesPau Espin Pedrol1-4/+11
Change-Id: Ib65629224e6bd5683bb9192ba4354e965e8d39ec
2023-04-17ms: Drop setting tlli during ms_alloc()Pau Espin Pedrol1-1/+1
Inside osmo-pcu code, the code path is to always call ms_alloc with tlli=GSM_RESERVED_TMSI; a different value is only passed during unit tests. It makes no sense to have unit tests using differnet code paths than ther app itself, since in the app it always desired to go through the ms_set_tlli() and ms_confirm_tlli() which does more stuff. Hence, drop the tlli param in ms_alloc and change the unit tests to use the available APIs used by the application. Change-Id: I730ec911a43b0f4e78faee4eeffb3ca8601564f8
2023-03-20pcu_l1_if: get rid of strange paging group calculationPhilipp Maier1-1/+0
The PCU uses a 16 bit integer value as paging group which does in fact not really resamble the paging group. Instead it encodes the last three digits of the IMSI from which the paging group can be calculated. The value is then eventually converted back to Ascii-digits and then sent over the PCU-IF interface. Lets get rid of this weird conversion and use the IMSI directly. Change-Id: I40d7fc14c9591b3de091e425faaf325421c70a0e
2022-12-16Convert ms_first_common_ts to struct gprs_rlcmac_pdchPau Espin Pedrol1-4/+4
This way it contains full information about the TS, not only the TN. Change-Id: I19373939ec104d371e3e91422f018a8175cb0f89
2022-12-16Refactor code rejecting UL-TBF upon rx of PktResourceReqPau Espin Pedrol1-0/+1
* Make it similar to the already existing TBF allocation procedures * Pass pdch pointer instead of trx and ts numbers Change-Id: I04b3b65942732cc652adeaa507529b849292ff61
2022-12-16Move first_common_ts from gprs_rlcmac_tbf to GprsMsPau Espin Pedrol1-1/+4
The field contains a common value between the 2 active TBFs of the MS, so it makes no sense to have them duplicated on each TBF. It can be sanely stored in the MS object. Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba
2022-12-13sched: Pass pdch to *_create_rlcmac_msg() functionsPau Espin Pedrol1-1/+2
The pdch pointer contains more info than just timeslot number. For instance, it contains information about the TRX owning the TS. Change-Id: Ic31a7360a29e61f70bb1338ddab6f5f31aa8b26e
2022-10-31Rework tbf::update_ms()Pau Espin Pedrol1-0/+1
That function was pretty confusing since it used a "enum gprs_rlcmac_tbf_direction dir" param (whose type is expected to describe the data direction of a TBF) to describe the direction of the the packet which triggered its call. The parameter was actually always called with "GPRS_RLCMAC_UL_TBF" which in this case meant "uplink direction" which meant "TLLI was updated from the MS, not the SGSN". The DL direction was only used in unit tests, which can hence be simply replaced by ms_confirm_tlli(), which this commit does. So this update_ms() function was actually used in practice in osmo-pcu to trigger update of TLLI and find duplicates only when an RLCMAC block (control or data) was received from the MS. Therefore, this function is renamed in this patch and moved to the gprs_ms class, since it really does nothing with the TBF. Related: OS#5700 Change-Id: I1b7c0fde15b9bb8a973068994dbe972285ad0aff
2022-10-31Move UL allocation&assign functions to gprs_ms.cPau Espin Pedrol1-0/+2
Similar structure as what we have with DL-TBF. Change-Id: I256aeede2a2678c9738539fb6ec4db9766fa85e4
2022-10-28Replace tbf->establish_dl_tbf_on_pacch() refactoring GprsMs functionsPau Espin Pedrol1-1/+2
ms_new_dl_tbf_assignment() is split into 2 functions, one to allocate+assign on PACCH and another one for PCH. This makes a lot clearer the aim of each caller of the function. Once this is done, it becomes obvious tbf->establish_dl_tbf_on_pacch() is basically doing the same as ms_new_dl_tbf_assigned_on_pacch() so drop it. Change-Id: I610210e3120c962d91ce8ff94c66161e086761ba
2022-10-28Delay ImmAss(PCH, PktDlAss) if waiting for PKT_CTRL_ACK answering ↵Pau Espin Pedrol1-0/+1
UL_ACK_NACK (FinACK=1) In that state (ul_tbf=TBF_ST_FINISHED), we are unable to reach the MS to assign a new DL TBF. * MS Is not available in CCCH because it's attached the PDCH. * MS won't be able to PKT_CTRL_ACK a PktDlAss on PACCH, because next thing it will do is to PKT_CTRL_ACK the UL_ACK_NACK(FINACK=1) we already polled it for, and immediatelly after that it will release the UL TBF on its side and go back to packet idle mode. Hence, we must wait for MS to send the PKT_CTRL_ACK to us in order to be able to assign the DL TBF in PCH (CCCH). Related: OS#5700 Change-Id: I7a30db9cc7dae70e04054f1a4dba004bd1780d4a
2022-10-27Move LLC enqueuing and retransmit timer to MS objectPau Espin Pedrol1-0/+3
The LLC queue is already in the MS object. The LLC timer and most of the logic to enqueue its data is independent from the TBF. Change-Id: I56b89fcac838d8eb732b629734d5e458e9c806d1
2022-10-21gprs_ms: Move creating string name of object to a functionPau Espin Pedrol1-5/+3
This way it can be used outside of LOGPMS(). Change-Id: I8ab713154c8f308878f3e85b6f7e8afc5c4be249
2022-04-05llc_queue: Refactor to handle codel_state per prio queue internallyPau Espin Pedrol1-7/+0
A CoDel state per prio queue is needed, otherwise the sojourn time state is not properly reset when a high prio packet is dequeued. If we have a global codel state shared for all prio queues of an MS, then basically high prio (GMM) packets will "never" be dropped because they are handled/dequeued way quicker, so it's sojourn time will be below the threshold most probably, stopping the "dropping" state for the rest of lower prio packets. The handling of different codel states is moved from MS object to the llc_queue, also offloading already loaded dl_tbf.cpp in the process. This will also allow in the future setting different CoDel parameters for different priority queues if needed. Tests need to be adapted since now the CoDel and PDU lifetime are incorporated into the llc_queue_dequeue(). Also because dequeue now also accesses related MS fields. Related: OS#5508 Change-Id: I2bce2e82ab6389d8a70130a5c26a966a316b0fa4
2021-12-14treewide: remove FSF address2021q4Oliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I4a49dbeeec89b22624c968152118aecf8886dac6
2021-11-12Fix MS ending up with assigned imsi 000Pau Espin Pedrol1-0/+6
The whole paging path and data structre is cleaned up. New MS helpers ms_imsi_is_valid() and ms_paging_group() are introduced to help in the process and keep implementation details inside GprsMs class. Related: OS#5303 Change-Id: I4c0838b26ede58e4b711410eee2a8e4f71e9414b
2021-05-19tbf: Move existing tbf_state implementation to osmo_fsmPau Espin Pedrol1-1/+1
This is only an initial implementation, where all state changes are still done outside the FSM itself. The idea is to do the move in several commits so that they can be digested better in logical steps and avoid major break up. Related: OS#2709 Change-Id: I6bb4baea2dee191ba5bbcbec2ea9dcf681aa1237
2021-02-03nacc: Implement Pkt Cell Change Continue retransmissionPau Espin Pedrol1-1/+1
Use the fact that the MS must answer the RRBP of the Pkt Cell Change Continue with a CTRL ACK to find out whether the message was received successfuly or a retransmission is potentially required. 3GPP TS 44.060: """ When the mobile station receives the PACKET CELL CHANGE ORDER or the PACKET CELL CHANGE CONTINUE message the mobile station shall transmit a PACKET CONTROL ACKNOWLEDGMENT message in the specified uplink radio block if a valid RRBP field is received as part of the message; the mobile station may then switch to a new cell. """ Related: SYS#4909 Change-Id: I7cc28922e71699598da0ef6eb90136a47d3c002f
2021-01-29Introduce NACC supportPau Espin Pedrol1-0/+6
A new nacc_fsm is introduced per MS object, with its partner priv structure struct nacc_fsm_ctx, which exists and is available in the MS object only during the duration of the NACC procedure. The NACC context is created on an MS whenever a Pkt Cell Change Notification is received on Uplink RLCMAC, which asks for neighbor information of a given ARFCN+BSIC. First, the target ARFCN+BSIC needs to be translated into a CGI-PS (RAC+CI) address. That's done by asking the BSC through the Neighbour Resolution Service available in osmo-bsc using the CTRL interface. Once the CGI-PS of the target cell is known, PCU starts a RIM RAN-INFO request against the SGSN (which will route the request as needed), and wait for a response containing the SI bits from the target cell. After the SI are received, the scheduler is instructed to eventually poll a TBF for the MS originating the CCN, so that we can send the SI encapsulated into multiple Packet Neighbor Cell Data messages on the downlink. One all the SI bits are sent, the scheduler is instructed to send a Packet Cell Change Continue message. Once the message above has been sent, the FSM autodestroys itself. Caches are also introduced in this patch which allows for re-using recently known translations ARFCN+BSIC -> CGI-PS and CGI-PS -> SI_INFO respectively. Change-Id: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
2021-01-25Fix Dl EGPRS data blocks being generated occasionally on GPRS TBFsPau Espin Pedrol1-1/+1
Under some circumstances, it could happen that a DL TBF is created as a GPRS TBF due to not yet having enough information of the MS, and only after the TBF is created the PCU gains that information and upgrades the MS mode to "EGPRS". Hence, there's the possibility to run into a situation where a GPRS TBF is attached to a EGPRS MS. It may also happen sometimes that despite the TBF and the MS be EGPRS, there's need to further limit the DL MCS to use, eg. MCS1-4 (GMSK). As a result, when asking for the current DL (M)CS to use, we must tell the MS which kind of limitations we want to apply. The later reasoning was already implemented when GPRS+EGPRS multiplexing was added, but the former was not being checked. Hence, by further spreading through the call stack the "req_kind_mode" we match both cases. Related: OS#4973 Change-Id: Ic0276ce045660713129f0c72f1158a3321c5977f
2021-01-19Unify BTS into a C usable structurePau Espin Pedrol1-3/+3
Previous work on BTS class started to get stuff out of the C++ struct into a C struct (BTS -> struct gprs_glcmac_bts) so that some parts of it were accessible from C code. Doing so, however, ended up being messy too, since all code needs to be switching from one object to another, which actually refer to the same logical component. Let's instead rejoin the structures and make sure the struct is accessible and usable from both C and C++ code by rewriting all methods to be C compatible and converting 3 allocated suboject as pointers. This way BTS can internally still use those C++ objects while providing a clean APi to both C and C++ code. Change-Id: I7d12c896c5ded659ca9d3bff4cf3a3fc857db9dd
2021-01-12ms: Replace struct var with rate_ctrPau Espin Pedrol1-11/+6
Let's use usual osmocom rate_ctr instead of having one variable + setter/getter functions, so we can easily add new counters and also because it makes code more clear (no need to look at what the "update" function is doing). Using rate counter also provides info about how recently the MS has been interacting with the network. Related: OS#4907 Change-Id: I744507fde4291955c1dbbb9739b18a12a80145b1
2021-01-05Convert GprsMS and helpers classes to CPau Espin Pedrol1-188/+128
As we integrate osmo-pcu more and more with libosmocore features, it becomes really hard to use them since libosmocore relies heavily on C specific compilation features, which are not available in old C++ compilers (such as designated initializers for complex types in FSMs). GprsMs is right now a quite simple object since initial design of osmo-pcu made it optional and most of the logic was placed and stored duplicated in TBF objects. However, that's changing as we introduce more features, with the GprsMS class getting more weight. Hence, let's move it now to be a C struct in order to be able to easily use libosmocore features there, such as FSMs. Some helper classes which GprsMs uses are also mostly move to C since they are mostly structs with methods, so there's no point in having duplicated APIs for C++ and C for such simple cases. For some more complex classes, like (ul_,dl_)tbf, C API bindings are added where needed so that GprsMs can use functionalitites from that class. Most of those APIs can be kept afterwards and drop the C++ ones since they provide no benefit in general. Change-Id: I0b50e3367aaad9dcada76da97b438e452c8b230c
2020-11-10TLLI 0x00000000 is a valid TLLI, use 0xffffffff insteadVadim Yanitskiy1-4/+8
The assumption that TLLI 0x00000000 is invalid and can be used as the initializer is wrong. Similar to TMSI, 0x00000000 is a perfectly valid value, while 0xffffffff is reserved - use it. According to 3GPP TS 23.003, section 2.4, a TMSI/P-TMSI with all 32 bits equal to 1 is special and shall not be allocated by the network. The reason is that it must be stored on the SIM, where 'ff'O represents the erased state. According to section 2.6 of the same document, a local/foreign TLLI is derived from P-TMSI, so the same rule applies to TLLI. I manually checked and corrected all occurances of 'tlli' in the code. The test expectations have been adjusted with this command: $ find tests/ -name "*.err" | xargs sed -i "s/0x00000000/0xffffffff/g" so there should be no behavior change. The only exception is the 'TypesTest', where TLLI 0xffffffff is being encoded and expected in the hexdump, so I regenerated the test output. Change-Id: Ie89fab75ecc1d8b5e238d3ff214ea7ac830b68b5 Related: OS#4844
2020-10-29tbf: Clean up gprs_rlcmac_dl_tbf::handle()Pau Espin Pedrol1-1/+2
Avoid passing tons of params to internal helper function tbf_nel_dl_assignment() in order to either fetch again the ms object or create a new one. Let's instead create the ms function earlier if needed and fill it with all the discovered information prior to calling the helper function. This provides cleaner code and also better log output. This way we also avoid trying to fill the MS twice and unneeded getter+setter for TA. tbf::imsi(): There' always an ms, so simply forward call to ms()->imsi(). We can also get rid of assign_imsi, since the modified code is the only place where it's used and there's already some code in place there to update the MS. We instead merge it with set_imsi and keep the duplication code to catch possible bugs from callers. Move merge_and_clear_ms from tbf class to GprsMS, where it really belongs. Change-Id: Id18098bac3cff26fc4a8d2f419e21641a1f4c83b
2020-10-24Move ul_tbf allocation code to correct filePau Espin Pedrol1-0/+1
Change-Id: Ifd98abbcce49e4605c764267965903fbf9f35867
2020-08-18Introduce log macro helper LOGPMSPau Espin Pedrol1-0/+8
Change-Id: Ib304ced06531a5154b7ec8bf87f9717dfd7d1397
2020-06-26gprs_ms: Small clean ups in IMSI storage related codePau Espin Pedrol1-1/+3
Change-Id: I987af0d33b79302c037d062c9d1c828a0e027147
2020-05-20Get rid of class GprsCodingSchemePau Espin Pedrol1-10/+10
We have same kind of object splitted into two layers, in coding_scheme and gprs_coding_scheme. Let's merge them together and get rid of the class, which is not really useful because it's only a set of functions operating on one enum value. This change also fixes gcc 10.1.0 error about memseting a complex type in rlc.h init(). Change-Id: Ie9ce2144ba9e8dbba9704d4e0000a2929e3e41df
2019-09-25Move out tbf subclasses from tbf.h to their own headersPau Espin Pedrol1-0/+1
It's a good start towards clearing current mess between parent and the 2 children classes. Change-Id: Ibc22ea2e02609af7ee058b8bc15df2115d4c6f60
2019-09-14Forward ETWS Primary Notification to MSOliver Smith1-0/+2
Receive an Application Information Request from the BTS via PCU interface. Construct a Packet Application Information message from it (3GPP TS 44.060 11.2.47) and send it to all MS with active TBF. The TTCN-3 test infrastructure to test this feature is not quite ready yet, so I've added C unit tests instead. Related: OS#4048 Change-Id: Ie35959f833f46bde5f2126314b6f96763f863b36
2019-03-24MCS: move Mode enum outside of class definitionMax1-4/+4
Move Mode (EDGE/GPRS) definition and related functions outside of GprsCodingScheme class. This allows us to use standard libosmocore value_string functions. Change-Id: I3baaac7f1ca3f5b88917a23c1679d63847455f47
2019-03-12MCS: move Coding Scheme enum outside of class definitionMax1-1/+1
Move generic MCS enum to C header file to simplify further modifications to GprsCodingScheme class in follow-up patches. This also allows us to use standard libosmocore value_sting functions in upcoming patches for IA Rest Octet encoding/decoding. Related: OS#3014 Change-Id: I993b49d9a82b8c7ad677d52d11003794aeabe117
2018-02-19Update header includesMax1-0/+3
Many files include unnecessary headers and don't include headers which are actually used. Because of that combined with the fact that OsmoPCU is a mixture of C and C++, it makes it hard to modularize code. Fix this (using iwyu [1] tool): * add missing headers * remove unused headers [1] https://include-what-you-use.org/ Related: OS#1539 Change-Id: I8c9f488a43b099c72b2d30d3245e7ba50872fc00
2017-12-18Remove unused includes and forward declarationsMax1-3/+0
Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301
2016-12-22Add counter at BTS level And statistics at TBF/MS level.sivasankari1-0/+14
Adds spb counters at BTS level(show bts statistics). Adds RLC/MAC downlink control msg at ms level(show ms imsi <imsi_val>). Adds the number of coding schemes counter for UL at TBF level. Change-Id: Icbe4ba95e34bea89ee36f532d099db68204b7c38
2016-07-13Add Accessor functions for ARQ-II in EGPRS DLAravind Sirsikar1-0/+1
Add accessor function in existing classes to support ARQ-II for retransmission in EGPRS DL Change-Id: Iefff956bf2dcfe8fb0b2f5a7a7a2122d5d555f9e
2016-02-08ms: Add current_pacch_slots methodJacob Erlbeck1-0/+1
The PACCH is specific to an MS and may change when a TBF is established or removed (see TS 44.060, 8.1.1.2.2). For multislot class type 2 phones, more than one timeslot may be used to transmit RLC/MAC control messages. Add a method that returns a set of TS which can be used for the PACCH. Sponsored-by: On-Waves ehf
2016-02-01edge: Replace integer cs by GprsCodingSchemeJacob Erlbeck1-5/+16
Currently the TBF and MS object use a plain integer value (current_cs) to manage the coding scheme. This makes it difficult to support the MCS schemes. GprsCodingScheme supports a partial ordering of these values (CS and MCS) and provides safe increment and decrement methods. Use the GprsCodingScheme type instead of integer for cs fields and variables. Add a 'mode' to GprsMs which can be set to either GPRS, EGPRS, or EGPRS_GMSK which also set the initial values of current_cs_ul/dl. Select the mode based on max_mcs_ul and max_mcs_dl. Sponsored-by: On-Waves ehf
2015-11-30edge: Get EGPRS multislot classJacob Erlbeck1-0/+8
The EGPRS MS class ist contained in the MS_RA_capability information. Its presence indicates, that the MS is able (and willing) to use EGPRS. This commit implements basic support for retrieving, storing, and showing it in the VTY. The information is stored in the MS object. Sponsored-by: On-Waves ehf
2015-09-01bts: Start a DL TBF if needed after establishment of an UL TBFJacob Erlbeck1-0/+9
Currently an existing DL TBF can get lost in the process of establishing an UL TBF via RACH. This can lead to stalled connections until the network sends more LLC frames. This commit adds a check for a non-empty LLC queue after the UL TBF has been established to rcv_control_ack (GPRS_RLCMAC_UL_ASS_WAIT_ACK path) to eventually establish a new DL TBF on the UL TBF's PACCH. Sponsored-by: On-Waves ehf
2015-08-24ms: Store references to replaced TBFs in the MS objectJacob Erlbeck1-1/+9
Currently when calling GprsMs::attach_tbf and a TBF of the same direction already exists, the old TBF gets detached from the MS object. Therefore that TBF object loses access to that MS object including for instance TLLI and IMSI. This leads to failing DL TBF reuses, since the downlink assigment cannot be sent on the PACCH later on because that must be sent on the old DL TBF which ms() is NULL and the new DL TBF cannot be retrieved. This commit fixes this bug by changing the GprsMs implementation to keep a list of replaced (old) TBFs. TBFs are only removed when they are being detached explicitely (see tbf_free and set_ms). Addresses: tbf.cpp:741 We have a schedule for downlink assignment at uplink TBF(TFI=1 TLLI=0xf35a680e DIR=UL STATE=RELEASING), but there is no downlink TBF Sponsored-by: On-Waves ehf
2015-08-18ms: Move MS information merging to GprsMSJacob Erlbeck1-0/+2
Currently the merging of the meta information (MS class, IMSI) takes place in gprs_rlcmac_tbf::merge_and_clear_ms(). This makes it difficult to merge the internal state and does not directly relate to TBFs anyway. This commit moves this into a new method GprsMs::merge_old_ms. Sponsored-by: On-Waves ehf
2015-08-14tbf: Handle TLLI change on DLJacob Erlbeck1-0/+2
When doing an RA Update the network can request to change the TLLI. In this case, there can be 2 MS objects with different TLLI for a single real MS. The first is associated with the old TLLI and the IMSI, while the second is associated with the new TLLI and no IMSI if it had been created for the uplink TBF. When the first message with the new TLLI and the IMSI arrives from the network, the PCU is able to detect this. Currently this is not handled properly. The TBFs of the old MS object are not cleaned up properly, keeping the old MS from being deleted. This patch modifies gprs_rlcmac_dl_tbf::handle to check for this and if neccessary to move an existing DL TBF and to clean up the old MS object to ensure its deletion. Sponsored-by: On-Waves ehf