Holger Hans Peter Freyther
6b88cddc21
bts: Simplify rcv_resource_request, remove logically dead code
...
tbf = find
if (tbf) {
tbf_free(tbf);
tbf = NULL;
}
if (!tbf) {
code...
}
Remove the if (!tbf) and indention as the tbf is always to be
NULL.
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
8021644e9d
bts: Kill dead stores of the tlli/tfi, fix the log message again
...
The code meant to print the tfi and not the tlli. Update it.
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
ec80f82824
tbf: Remove the trx_no field from the tbf, go through the trx object
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
fc498c9e7b
tbf: Go through the trx to get the ARFCN
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
875fc895a8
bts: Further logging improvements for TFI/TLLI output
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
e1a075ab59
bts: Pass the Packet_Control_Acknowledgement_t into the recv method
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
53a336f0e5
bts: Log the TLLI inside the report we get
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
8d0e489484
tbf: Log the TFI and TLLI so we can try to figure out more from logs
...
<0002> tbf.cpp:444 Poll timeout for DL TBF=0
<0002> tbf.cpp:513 - Timeout for polling PACKET DOWNLINK ACK.
<0002> tbf.cpp:688 - Assignment was on PACCH
<0002> tbf.cpp:694 - Downlink ACK was received
<0008> gprs_bssgp_pcu.cpp:154 LLC [SGSN -> PCU] = TLLI: 0xd6942c78 IMSI: 274080000004765 len: 506
<0002> bts.cpp:974 PACKET DOWNLINK ACK with unknown FN=2213128 TFI=0 (TRX 0 TS 6)
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
15bb1a2a51
misc: Change the logging for the tbf and what to log
...
TLLIs got printed as TBF. Fix that but also rename things to
TFI. The TFI is not required to be unique per BTS but it is
the indicator we use right now.
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
5da2014f13
bts: Use Packet_Downlink_Ack_Nack_t as parameter
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
7a344716a6
bts: Simplify the code and use Packet_Resource_Request_t*
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
cb5c49b581
bts: Work with the Packet_Measurement_Report_t
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
750ca67ce9
bts: Move the MT_PACKET_MEASUREMENT_REPORT handling to a new method
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
842808848c
bts: Move handling of MT_PACKET_RESOURCE_REQUEST to a method
...
Move the code to a new method
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
5a9658168a
bts: Move handling of MT_PACKET_DOWNLINK_ACK_NACK to separate function
...
Kill the tlli assignment as it is never used.
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
396f4161cb
pdch: Move handling of control_ack to a separate method
...
Kill the unused tfi parameter
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
c1ae22694c
bts: Count the rach frames we receive
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
90b87ea5e6
misc: Fix typo.. resource in english only has one 's'
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
180def907b
bts: Print the kind of message type not known.
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
1997787c52
llc: Count timedout and silently dropped frames
...
A DL tbf can be discarded and then the already queued LLCs will
be silently dropped. Count this event.
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
b98dd9e240
sba: Move freeing a sba into a central place
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
93e048fe27
sba: Count SBA allocation, frees and timeouts
...
Add a warning about the receive message poking in the internal
of the sba. This will be cleaned up in a follow up commit
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
158776411b
bts: Provide the first set of counters
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
f537298cca
bts: Start creating statistics inside the BTS code
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
3dc56a3b34
tbf: Move gprs_rlcmac_send_packet_uplink_assignment into the tbf
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
02beed5e98
bts: Move gprs_rlcmac_rcv_rach into the BTS class
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
24c1a5ba29
bts: Move gprs_rlcmac_trigger_downlink_assignment into BTS
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
d9262b3b55
tbf: Move gprs_rlcmac_poll_timeout into the tbf
...
Move the gprs_rlcmac_poll_timeout method into the tbf class and
gprs_rlcmac_downlink_assignment into the BTS.
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
40cfaa6837
bts: Move rcv_imm_ass_cnf into the bts code
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
70ddde6929
tbf/bts: Move the tfi_find_free into the bts
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
f63cabd931
tbf/pdch/bts: Move the tbf look-up by tfi into the BTS
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
a54bbbbf02
pdch/tbf: Add another todo item for badly placed code...
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
dea63b96e0
sba/pdch: Use thepdch to look up a sba for a frame number
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
05f8efc1a2
pdch: Remove the trx_no/ts_no parameter and use/caclulate it on demand
...
Simplify the depedencies and use the inline functions when we need
to figure out the numbers.
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
4f753c64d6
pdch: Remove the bts argument from rcv_control_block
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
65be4808af
pdch: Remove the the bts parameter from rcv_data_block_acknowledged
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
86300bbeea
tbf: Move the timer routine into the class
...
The timer is used for various timeouts and there is still external
client code that is calling it. In a perfect world the client code
would indicate that an event has happened and the internal timer
will be stopped. The best compromise is the "stop_t3191" method. It
allows to add semantic verification that the timer has been running.
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
fcbc702112
pdch: Move the giant switch/case of gprs_rlcmac_rcv_control_block
...
Move the dispatch into the PDCH. This needs to be split up
further into understandable blocks.
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
d11290b90b
pdch/tbf: Move gprs_rlcmac_rcv_data_block_acknowledged into the pdch
...
Move the method into the PDCH. Extract the finding of TLLI into a
new class called Decoding. Move the assemble and forward LLC frames
into the TBF as it is poking in the internals of the TBF.
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
6f9f434463
pdch: Move the dispatch of gprs_rlcmac_rcv_block into the pdch
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther
9ae367f639
pdch: Instead of passing bts, trx, ts use the pdch
...
All dispatching will go through the PDCH. This will clean a lot
of the look-ups inside the gprs_rlcmac_data.c and continue with
adding structure to the pcu code.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther
09ef27ae04
pdch: Simplify the reset code, rename variables to XYZ_no
...
Simplify the reset code now that the PDCH can know where it is
located. Rename the variables in the sba to trx_no and ts_no as
it stores the number and not the actual thing.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther
4ed1dae533
bts: Add backpointers to the PDCH and TRX structures
...
This will allow to kill various parameters from all the functions
as we can walk back.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther
34bd8bdf30
bts/tbf: Move the lists into the BTS and do the look-up from the BTS
...
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-30 21:24:10 +01:00
Holger Hans Peter Freyther
cedf890928
sba: Create a SBAController that will manage the sbas for a BTS
...
The PollController is a friend of the SBAController and is allowed
to access the internal list. The list is hidden from everyone else.
This is done because the calculation of timeout should belong into
the PollController and not into the SBAController.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther
63f29d6f73
encoding: Move the functions into the encoding class
...
Add some TODO to this class. E.g. they could all work on the
bitvec and the parameter handling could better.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther
9446485e3d
pdch: Only say we have paged when this has actually been done
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther
f0984897a5
bts/pdch: Move the adding of paging to the BTS/PDCH objects
...
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-30 21:24:10 +01:00
Holger Hans Peter Freyther
24e98d039d
pdch: Move paging dequeue into the PDCH object
...
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-30 21:24:10 +01:00
Holger Hans Peter Freyther
17b0d83a1f
pdch: Move enable/disable into the PDCH code
...
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-30 21:24:09 +01:00