aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-01-06Allow Gb PAGING-PS without P-TMSIPau Espin Pedrol1-4/+8
P-TMSI is optional IE, but IE is mandatory and hence always available. Since the encoding is actually a Mobile Identity, the IMSI is used in case P-TMSI is not available. Change-Id: I4dbf8db04e81f98352a42ce34a5d91326be9bfd1
2020-01-06Pass paging group instead of imsi where later is not neededPau Espin Pedrol1-2/+2
Change-Id: Id0663a81f439f2d0b893b0d34f85a6db1927ef8e
2019-12-10Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I0515b5c8f6744fa501de88fa7808b7fc91981f0e
2019-10-16Fix assertion hit upon CCCH Paging RequestPau Espin Pedrol1-1/+1
Recent commit added an assertion to check for buffer boundaries and it actually gets hit. One of the 2 code paths calling pcu_l1if_tx_pch() was passing a buffer of 23 bytes while one of maximum 22 is expected (because plen is not set in the buffer but set inside pcu_l1if_tx_pch()). So it seems before the assert, that code path was actually writing 1 byte outside the boundaries of data buffer, since bitvec_pack() uses data_len field of bitvec. Related: OS#4228 Fixes: 8dc09e73d0b361b27232526ebcd5f25cd8c7edfd Change-Id: I84c5dfd4d5580e9d4c00ed21887cb51bd9abbd2e
2019-09-14Forward ETWS Primary Notification to MSOliver Smith1-0/+21
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-02-19Add define for dummy burst stringMax1-1/+1
Change-Id: I464920b3d6d47bb1c797a4ce06230f005a2e06a0
2018-02-19Update header includesMax1-1/+1
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-1/+0
Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301
2017-05-15remove pcu own bitvector implementationAlexander Couzens1-1/+1
The osmocore bitvec is exact the same, but use a pointer instead of a reference. Change-Id: Id8f797631d89aa12b6e48efb2dc153a3e2f059f7
2013-11-26debug_diagram: Remove the special debug_diagram compilation modeHolger Hans Peter Freyther1-84/+0
This approach is somehow flawed. We need/want to debug problems on systems with real traffic and re-compiling it with debug_diagram is not an option. All internal logging needs to be expressive enough so we can understand what is going on (e.g. create a script to post-process the output).
2013-11-06tbf: Move the tx part into the tbf as it accesses internal dataHolger Hans Peter Freyther1-25/+0
2013-10-30tbf: Make the tlli "private" and update the updating codeHolger Hans Peter Freyther1-1/+1
Now all updates to the tlli/tlli_valid are in one place. If we implement the policy to update the matching/linked TBF we can now to do it in a single place. Add a todo item for that as I am waiting for feedback from the mailinglist.
2013-10-30tbf: Create tbf_name and use it in log statementsHolger Hans Peter Freyther1-1/+1
This is like gsm_lchan_name and should be used in log statements. This way we can easily change the information that is printed and we know how to search things. The other part is that direct use of tfi/tlli is removed which will allow us to make them private and at the same time start to resolve the "tlli" updated in many places. Not old log statements are changed yet. This will done whenever a bad log statement is seen on the console...
2013-10-30tbf/bts: Move the tfi_find_free into the btsHolger Hans Peter Freyther1-55/+0
2013-10-30pdch: Move the dispatch of gprs_rlcmac_rcv_block into the pdchHolger Hans Peter Freyther1-33/+0
2013-10-30data: Move gprs_rlcmac_cs to the place it is used and make staticHolger Hans Peter Freyther1-9/+0
2013-10-30bts/tbf: Move the lists into the BTS and do the look-up from the BTSHolger Hans Peter Freyther1-5/+3
The list belongs to the BTS. This makes cleaning this up more easy and establishes a hierachy of resources that start from the BTS. The debug_diagram code is now broken.
2013-10-30sba: Move the sba code to a dedicated fileHolger Hans Peter Freyther1-62/+0
Move the code around and then turn it into an object...
2013-10-30ta: Move timing advance related code into the ta.cpp fileHolger Hans Peter Freyther1-102/+0
2013-10-30encoding: Move the functions into the encoding classHolger Hans Peter Freyther1-1/+2
Add some TODO to this class. E.g. they could all work on the bitvec and the parameter handling could better.
2013-10-30encoding: Move encoding routines into a separate fileHolger Hans Peter Freyther1-431/+0
2013-10-30bts/pdch: Move the adding of paging to the BTS/PDCH objectsHolger Hans Peter Freyther1-85/+0
Only the gprs_rlcmac_pdch will manipulate the paging list now. There can be various more refactorings of the code but they can be done later. E.g. on memory allocation failure we can continue instead of leaving the code, we should also set any_tbf only after things have been paged.
2013-10-30pdch: Move paging dequeue into the PDCH objectHolger Hans Peter Freyther1-94/+0
Rely on packet_paging_request returning NULL in case the queue is empty. We should move the write_packet_paging_request into a separate file/object as well.
2013-10-30pdch: Move enable/disable into the PDCH codeHolger Hans Peter Freyther1-2/+2
When a PDCH is disabled all resources should be freed. This is currently not possible as the PDCH does not know where it belongs to. On top of that the list (and other resources) should be properly initialized on construction so that disable() is idempotent and does not check if it was disabled. During the re-factoring I noticed that during a sysmobts re-start some resources are not freed. I left a warning in the code to resolve this issue later.
2013-10-30bts: Move struct gprs_rlcmac_bts and other structs into a bts.hHolger Hans Peter Freyther1-0/+1
Begin to make the BTS a real C++ object with real responsibilities. The biggest issue will be the pcu_vty.c that might not like C++ at all.
2013-10-30bts: Remove global state from gprs_rlcmac_add_pagingHolger Hans Peter Freyther1-2/+2
2013-10-30bts: Remove global state from write_immediate_assignmentHolger Hans Peter Freyther1-2/+3
2013-10-30bts: Remove global state from write_packet_uplink_assignmentHolger Hans Peter Freyther1-2/+3
2013-10-30bts: Remove global state frm gprs_rlcmac_rcv_control_blockHolger Hans Peter Freyther1-1/+1
2013-10-30bts: Remove global state from gprs_rlcmac_rcv_data_block_acknowledgedHolger Hans Peter Freyther1-2/+3
2013-10-30bts: Remove the global state from write_packet_uplink_ackHolger Hans Peter Freyther1-2/+2
Similiar to the previous patches
2013-10-30bts: Remove global state and the usage of the gprs_rlcmac_btsHolger Hans Peter Freyther1-2/+2
Global state makes mocking/writing tests more difficult. Continue by removing direct usage of the bts and adding it as pointer to the function calls (showing the true dependencies of the functions)
2013-10-30alloc: Call it trx_no and not trx as it is not trx objectHolger Hans Peter Freyther1-4/+4
2013-10-30alloc: Move the two timeslot alloc algorithms to a dedicated fileHolger Hans Peter Freyther1-561/+0
2013-10-30alloc: Move the "assignment" of the slot into a common functionHolger Hans Peter Freyther1-11/+16
Vladimir Rolbin pointed out that in case of the alloc_algorithm_a the usf has not been assigned. For now move all the assignment into a method and call it from the A and B algorithm.
2013-10-28tbf: Move the tbf_timer_cb into the tbf classHolger Hans Peter Freyther1-150/+0
Introduce the first instance method for printing out diagonistic about itself and create a jump function for it.
2013-10-28tbf: Remove dead code that called tbf_freeHolger Hans Peter Freyther1-48/+0
2013-10-28tbf: Move many routines related to the tbf from gprs_rlcmac to tbf.cHolger Hans Peter Freyther1-153/+0
2013-10-28tbf: Move the struct to the tbf.h header fileHolger Hans Peter Freyther1-0/+1
This is the begin of a long march of turning tbf into a C++ class and properly hiding the secrets inside this implementation instead of having it spread across various different files.
2013-10-17sba: Fix memory leak when all PDCHs are disabledHolger Hans Peter Freyther1-0/+1
2013-10-16misc: Print the payload that is not knownHolger Hans Peter Freyther1-1/+1
Print the payload type that is not handled as this allows one to look it up in the specification.
2013-10-16rlc: Add missing break after GPRS_RLCMAC_CONTROL_BLOCK_OPTHolger Hans Peter Freyther1-0/+1
Do not claim that the payload is not known. Add the missing break. Do not print: <0002> gprs_rlcmac.cpp:1174 GPRS_RLCMAC_CONTROL_BLOCK_OPT block payload is not supported. <0002> gprs_rlcmac.cpp:1176 Unknown RLCMAC block payload.
2013-10-16misc: Fix some typos sed -i s,ressources,resources,gHolger Hans Peter Freyther1-1/+1
2013-10-16misc: Fix format and typos in the codeHolger Hans Peter Freyther1-2/+2
2013-10-02tbf: Make multislot lookup tables static/constHolger Hans Peter Freyther1-3/+3
2013-10-02tfi: The tfi_alloc doesn't allocate anything, rename the functionHolger Hans Peter Freyther1-1/+2
Call things by what they do and this function doesn't allocate anything but it is searching for the first unallocated tbf index.
2013-09-04rlcmac: Reduce the depedency on the global gprs_rlcmac_bts variableHolger Hans Peter Freyther1-14/+13
For mocking/unit-testing/emulation (and a dual trx-systems) having global state is quite bad. Cut back on the usage of the global struct gprs_rlcmac_bts. It also makes the complexity of certain routines more clear.
2013-07-30misc: Move the struct bssgp_bvc_ctx into the struct osmo_pcuHolger Hans Peter Freyther1-0/+1
2013-05-13Added timing advance support for up and downlink TBFsAndreas Eversberg1-0/+104
The timing advance of any TBF is stored when it ends. Whenever a new TBF with the same TLLI is created (downlink TBF), the stored TA is recalled. This algorithm assumes that the mobile does not move too fast during transfer. Also the mobile must start a connection in order to get correct initial timing advance. This algorithm does not implement the timing advance procedure as defined in TS 04.60. To implement the standard timing advance procedure, the BTS must decode RACH on certain bursts, the mobile is expected to send them. This requires much more complexity to a transceiver like USRP/UmTRX or Calypso BTS. The algorithm was tested at TA >= 8 and works quite well.
2013-03-17Introduce new file for various measurementsAndreas Eversberg1-1/+7
The measurements include: - DL bandwidth usage - DL packet loss rate - DL measurements by mobile - UL measurements by BTS In order to receive DL measurements from mobile, it must be enabled via system information message at BSC.