aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac_data.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-12-18Fix: Align TLLI to 32 bit margin, before converting itAndreas Eversberg1-1/+3
2012-12-18Rework on multislot allocation algorithmAndreas Eversberg1-1/+3
The slots are choosen in a way that later selection of slots for concurrent TBFs will have the same downlink/uplink control channel (PACCH). This is required for polling acknowledge of new TBF assignment on PACCH. The MS will always have the same PACCH uplink slot while beeing in packet transfer mode.
2012-12-18Fix: Don't use TIMING_ADVANCE_INDEX in assignment messages, if not usedAndreas Eversberg1-5/+5
Some MS will leave packet transfer mode, if TAI is given, but no timing advance control messages are sent on PTCCH. This could results in permanent loss of larger packets.
2012-12-18Fix: Drop ongoing UL TBF, if another UL TBF is established for same TLLIAndreas Eversberg1-2/+12
This happens, if the mobile looses coverage and establishes a subsequent uplink TBF.
2012-12-18Fix: Handling of final acknowledge on downlink TBFsAndreas Eversberg1-10/+11
It is essential to initialize the first_fin_ack variable. Also it is essential not to free TBF, in case the final ack is not received, but all frames have been acked. In this special case, we resend the final block again and again (and poll), until we receive the final ack.
2012-12-18Fix: Be sure to check if the PACKET DOWNLINK ACK belongs to the polled MSAndreas Eversberg1-2/+8
2012-12-18Adding flow chart diagram of ongoing TBFs and their eventsAndreas Eversberg1-4/+45
It is quite essential. It shows how TBFs are related and helps to estimate states and timers (timeouts) of the MS. In order to use it, it must be defined by a switch at gprs_rlcmac.h.
2012-10-05Merge branch 'jolly'Ivan Kluchnikov1-210/+631
Conflicts: src/gprs_bssgp_pcu.cpp src/gprs_rlcmac.cpp src/gprs_rlcmac_data.cpp src/gprs_rlcmac_sched.cpp
2012-10-03Allow setting of seperate coding schemes for uplink and downlinkAndreas Eversberg1-1/+1
2012-10-03Replace switch/case construct by a structure, to define coding schemesAndreas Eversberg1-16/+6
A new attribute at TBF instance indicates the current scheme used.
2012-10-03Fix: Poll correctly for downlink acknowlege, to prevent window stallingAndreas Eversberg1-8/+7
2012-09-27Use PCH confirm from BTS to start downlink packet flowAndreas Eversberg1-7/+60
Since we don't know when the IMM.ASS message is sent on it's paging group on PCH, we will wait for confirm from BTS and start packet flow then.
2012-09-27Free existing UL/DL TBF, if RACH has been received from MSAndreas Eversberg1-0/+17
In this case the mobile has lost existing flows, so it make sense to free them. The TFI(s) can be re-used immidiately, because they are not associated by MS anymore.
2012-09-27Set Alpha and Gamma at assingment messages for power controlAndreas Eversberg1-5/+16
The initial power control value Alpha must be set in SI13.
2012-09-24Fix: T3193 is now started with the correct valueAndreas Eversberg1-1/+1
2012-08-07Assign TFI to complete TRX, not just one TSAndreas Eversberg1-3/+3
This is required, since we may change slot allocation. In case of a change, we do not want to be unable to change, if the same TFI on one of the other slots is already in use by a different TBF (having same TFI, but on different slot).
2012-08-07Adding single block allocationAndreas Eversberg1-57/+156
It is mandatory to support it because MS may request a single block. In this case the network must assign a single block. It is possible to force single block allocation for all uplink requests on RACH. (VTY option)
2012-08-07Fix: Add timer for downlink TBF in assignment stateAndreas Eversberg1-7/+25
This is required, since the UL TBF which is used to assign downlink TBF may be freed due to timeouts.
2012-08-06Adding flags for debugging assignment and polling timeoutAndreas Eversberg1-8/+77
2012-08-06Adding polling for packet control ack at packet downlink/uplink assignmentAndreas Eversberg1-32/+59
2012-07-26Use final_ack_sent and contention_resolution_done to define ongoing UL TBFAndreas Eversberg1-3/+4
Both flags can be used to determine wether assignment must be sent on PCH or on AGCH. Before contention resolution is done, mobile will ignore downlink assinment. When final uplink acknowledge was sent, the mobile will go back to PCH after reception of akcnowledge.
2012-07-25Replaced malloc() by talloc_zero() to be able to track memeory leaksAndreas Eversberg1-7/+10
2012-07-24misc: Fix typos in the commentsHolger Hans Peter Freyther1-5/+5
ressource -> resorce
2012-07-24Added debugging of downlink bandwidthAndreas Eversberg1-0/+24
2012-07-23Fix: gprs_rlcmac_trigger_downlink_assignment() selects correct channelAndreas Eversberg1-15/+8
In order to select correct channel (PCH or PACCH), a tbf pointer is set in case of PACCH. The tbf pointer points to TBF whose PACCH is used.
2012-07-23Fix: Kill pending downlink TBF, if mobile requests uplink TBF on RACHAndreas Eversberg1-0/+9
If the mobile misses assignment, it changes back to idle mode. In this case we must kill the pending downlink TBF, because it is not used by mobile and we can assign a new downlink TBF for new downlink data. (We may not have two downlink TBF with same TLLI!)
2012-07-23Fix: Send downlink assignment on PCH twice to make reception more safeAndreas Eversberg1-2/+4
If the mobile is not fast enough switching back to CCCH, the second assignment, which is sent later is usefull in this case.
2012-07-23Fix: We don't use timer to define when assignment is complete on PACCHAndreas Eversberg1-3/+25
Instead we use the event of sending assignment message. Then we set the TBF state to 'FLOW'.
2012-07-21Add check of lifetime of LLC frameAndreas Eversberg1-2/+45
If lifetime expires of queued LLC frames, they are discarded. The number of discarded frames and the sum of their octets are reported to SGSN via LLC-DISCARDED message. The lifetime can be overridden via VTY. The value can be centi-seconds or "infinite".
2012-07-16Changed log levels, to indicate abnormal eventsAndreas Eversberg1-15/+16
2012-07-16Check for downlink sequence is out of rangeAndreas Eversberg1-3/+15
This may happen, if Packer Downlink Assignment was not received by MS, so old TBF with old sequence number is still alive. In this case we free TBF.
2012-07-16Change polling interval for Packet Downlink Ack/NackAndreas Eversberg1-13/+17
This lowers the risk for stalling of transmit window.
2012-07-15If we already sent final Packet Uplink Ack/Nack, request DL TBF on PCHAndreas Eversberg1-1/+2
If network does not respond fast enough, the MS might already received final Packet Uplink Ack/Nack, so we need to assign new DL TBF on PCH.
2012-07-15No content resolution is required when UL TBF is requested during DL TBFAndreas Eversberg1-0/+1
2012-07-15Ignore Packet Resource RequestAndreas Eversberg1-6/+2
2012-07-15Fixed contention resolution issueAndreas Eversberg1-3/+17
In order to do downlink assignment during uplink TBF, the content resolution must be completed. It is completed when the first Packet Uplink Ack/Nack message is transmitted to the mobile.
2012-07-15Downlink transfer is finished if all packets are acknowlegedAndreas Eversberg1-4/+8
It turned out that the final ack flag may not be set, but all packets have been acknowledged. This patch will finish transfer in case all blocks are acknowledged.
2012-07-15Polling for downlink ack/nack is performed only on suitable slotAndreas Eversberg1-8/+20
The slot must be the control channel TS, which is selected by the allocation algorithm. The MS must be able to respond at this TS. The counter to trigger polling is incremented until polling has to be performed. Then the counter stops. When the transmission of data block is requested on control channel TS, the counter is reset. The counter-value is also used to poll immediately when the transmission has finished.
2012-07-15multislot: Rework of handling control channel / pollingAndreas Eversberg1-12/+12
In order to send control blocks to MS and receive control blocks from MS (polling), it is required to select one timeslot that the MS must be able to send and receive. The allocation algorithm must take care of selecting that slot.
2012-07-13multislot: Extracted "slot allocation algorithm" from tbf allocatorAndreas Eversberg1-5/+5
The current available algorithm only supports selecting a single slot for downlink/uplink. (In the future, a multislot algorithm will follow.)
2012-07-13Changed data structures for TBF and PDCH instances, to allow multislotAndreas Eversberg1-53/+50
The new data structure is required to define slot/TFI assigment for MS with multislot capability. Now there are two lists for TBFs: uplink and downlink. It is possible to have different TBFs with same TFI in the same direction, as long as they are assigned on different timeslots. See tbf.txt for description. Note: This does not implement any multislot support. It defines the new data structure. Currently only the first slot is assigned.
2012-07-12Merge branch 'jolly_new'Ivan Kluchnikov1-0/+1409
Merge is based on jolly_new branch with two modifications. 1. Modified PCU L1 interface. pcu_l1_if.cpp - common functions for tx and rx messages on L1 interface. sysmo_sock.cpp - SYSMO-PCU socket functions. openbts_sock.cpp - OpenBTS-PCU socket functions. pcuif_proto.h - L1 interface's primitives. 2. Modified encoding of RLC/MAC Control messages, now we use structures and encode_gsm_rlcmac_downlink() function for encode control blocks (without hand-coding).
2012-07-09Send downlink IMMEDIATE ASSIGNMENT on PCH and not on AGCHAndreas Eversberg1-8/+17
The IMSI is used to define paging group on which it is sent. This is tested with MS that requires correct paging group.
2012-07-06Restructured debugging levels to get better overview of TBFs/processesAndreas Eversberg1-53/+63
Only when using LOGL_DEBUG, every detailled information is displayed. When using LOGL_INFO, a summary of the process is displayed. When using LOGL_NOTICE, only errors and warnings like timeouts or invalid received informations are displayed. When using LOGL_ERROR, only local error like software errorss are displayed.
2012-07-06Fixed pseudo length of IMMEDIATE ASSIGNMENT message.Andreas Eversberg1-9/+9
The pseudo length may not include the rest-octets, so it stays compatible to non-GPRS phones. At pcu_l1_if.c (OpenBTS) no pseudo length is given, so the frame is only 22 bytes long. I could not test if it works.
2012-07-06RLC/MAC process makes use from attributes, received from PCU socketAndreas Eversberg1-12/+35
For OpenBTS interface and BSSGP, fixed values are still used.
2012-07-06Receive cell informations via PCU socket interfaceAndreas Eversberg1-7/+3
These informations provide RAI, timers, counters and other attributes to the BSSGP and RLC/MAC processes. The attributes are stored in gprs_rlcmac_bts global structure.
2012-07-03TBF acknowledged mode finished for both link directionsAndreas Eversberg1-106/+1000
2012-06-27Rewrite of RLC/MAC uplink acknowledged TBF.Andreas Eversberg1-0/+473
It uses history buffer and sends ack/nack control messages about received blocks. It defragments the blocks and forwards them to upper layer. It does content resolution and ignores other MS. It sends final ACK after all blocks have been sucessfully received. Timers are used to detect loss of uplink, and repeat lost final ACK.