summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/sched_lchan_tchf.c
AgeCommit message (Collapse)AuthorFilesLines
2019-02-21trxcon/scheduler: count number of measurementsVadim Yanitskiy1-2/+1
Instead of counting both RSSI and ToA measurements separately, let's have a single counter in trx_lchan_state.meas struct. Change-Id: I45454a3ac92b8cc85dd74092e4ab6eb350f20c9a
2019-01-17trxcon: do not include trxcon.h everywhereVadim Yanitskiy1-1/+0
Change-Id: Ia78bd6dac7ab12970838e0b1a2929a106b898d9d
2018-09-15trxcon/scheduler: fix: don't send BFI in GSM48_CMODE_SIGN modeVadim Yanitskiy1-3/+8
GSM48_CMODE_SIGN means 'signaling only', so we shall not send bad frame indications in this state. Instead, it makes sense to send dummy L2 frames like we do for xCCH channels. Change-Id: Ie39d53522cafab265099076b3194fa96aff217ba
2018-08-15trxcon/scheduler: get rid of useless lchan->rsl_modeVadim Yanitskiy1-16/+2
This field of the logical channel state structure was not used at all as there is nothing related to A-bis / RSL in trxcon itself. Change-Id: Iec1abf777a74cf57deadafa95e2337cba5d02842
2018-08-15trxcon/scheduler: pass lchan to sched_bad_frame_ind()Vadim Yanitskiy1-1/+1
Instead of passing the information about a logical channel, it makes sense to pass the pointer to its state where everything is stored. This approach would allow to avoid adding more arguments every time, e.g. in case of AMR. Change-Id: I91fe86fef43aac68776a58c9acc37ef2a9ee8042
2018-07-24trxcon/scheduler: fix: check primitive len before encodingVadim Yanitskiy1-3/+11
We used to trust (and still doing this) the messages coming from L1CTL interface too much, and not to check the primitive length before passing the payload to the libosmocoding API. As was discovered and described in OS#3415, sending a L1CTL message (either DATA_REQ, or TRAFFIC_REQ) with an incorrect length (lower than expected) may cause heap overflow. Let's explicitly check a primitive before encoding, and drop it if its length doesn't match the expected value(s). Change-Id: I258ee9f6d0124b183b1db23a73f1e523fcea89a8 Fixes: OS#3415
2018-03-11trxcon/sched_lchan_tchf.c: always send traffic indicationsVadim Yanitskiy1-17/+29
We shall always send traffic frame indications, even if received frame is incomplete or decoding was failed. This is required for proper Measurement Reporting. Change-Id: I99e134699796c7075299459e96b2f2d462636619
2018-03-11trxcon/scheduler: enforce lchan handlers to set message typeVadim Yanitskiy1-6/+5
Since this change, each lchan handler shall manually indicate a type of both message indications and confirmations. Change-Id: I02e0b87d61c127d2f6f5b9532909af78332bf707
2018-03-02host/trxcon: use integer math for ToA (Timing of Arrival)Vadim Yanitskiy1-3/+3
There's no need to express ToA value as a float. Let's turn it into an int16_t with 1/256 symbol period accuracy throughout the code to avoid both float arithmetic as well as loosing any precision. Inspired by Idce4178e0b1f7e940ebc22b3e2f340fcd544d4ec. Change-Id: I99c0f38db08a530d5846c474aba352aa0b68fe86
2017-12-18trxcon/scheduler: preprocess UL bursts before sendingVadim Yanitskiy1-4/+2
Having a possibility to preprocess UL burst before sending to transceiver is required for the further ciphering support integration and probably some other tasks. Change-Id: Ia6eead5d4f51d7c0bf277b9d5ebb0a74676df567
2017-12-18trxcon/scheduler: move prim management outside lchan handlersVadim Yanitskiy1-29/+23
Previously, each lchan handler used to obtain and delete primitives from a timeslot's tranmit queue itself. This approach entails many potential problems and bugs: - The lchan handlers shall not do that by definition, they should encode and decode frames according to GSM 05.03. - In some cases (e.g. TCH), a single transmit queue may contain primitives of different types (e.g. TCH, FACCH and SACCH). At the same time, the lchan handlers don't care and don't even know about each other. So, this could cause an unexpected behaviour in some cases. This change separates all primitive management routines, providing a new API for obtaining and dropping them. "Write programs that do one thing and do it well." Change-Id: I29503ece51903784bc53541015285234471c8d15
2017-12-18trxcon/scheduler: separate primitive management codeVadim Yanitskiy1-1/+1
It's good to write, keep and make the source code as much modular as possible. So, Tte primitive management code was separated to the 'sched_prim.c' and going to be extended in the near future. Change-Id: Ifec8c9e4f2c95c72b00772688bcb5dc9c11d6de7
2017-12-16host/trxcon/scheduler: always print error messagesVadim Yanitskiy1-2/+2
Some error messages previously had incorrect logging level 'debug'. We aren't going to hide anything, right? Let's print them! Change-Id: I85fb37292046b667386bfe26b9bbb000600e1c6f
2017-12-16host/trxcon/scheduler: inform L2&3 about decoding errorsVadim Yanitskiy1-2/+5
Previously, we used to drop a frame if decoding wasn't successful. This way, the higher layers didn't even know about that, so the local counters and Measurement Reports were incomplete. This change makes scheduler to forward L2 frames in any case, setting the num_biterr for each of them. In case of decoding error, a dummy (payload filled by 0x00) L2 frame will be sent. Change-Id: I31011d8f3ca8b9a12474cd0bc653faed18391033
2017-12-16host/trxcon/scheduler: add initial TCH/F channel supportVadim Yanitskiy1-0/+292
This change implements basic TCH/F lchan handlers for both data reception and transmission. Only FACCH (signaling), FR and EFR payloads are supported at the moment. Change-Id: If6b0eaede2b484484d2a824e7219ff04483266a1