Commit Graph

262 Commits

Author SHA1 Message Date
Pedro Alvarez 3eb525563a Fix issue reading MNC length in USIM. 2020-10-07 10:04:50 +01:00
Xavier Arteaga 6ae47b6510 SRSUE: Deafult PUCCH/SRS does not imply full PHY dedicated defaults 2020-10-07 09:58:23 +02:00
Pedro Alvarez 22a6dc305f Moved common variables and functions from the usim and pcsc_usim classes into usim_base class. 2020-10-05 12:14:46 +01:00
Francisco Paisana 4ebe92f6a3 refactor phy configuration in the rrc to keep track of activated scells, and cells configurations 2020-10-02 18:50:29 +01:00
Francisco Paisana d910c910a4 rrc::meas_cell now uses stack timers instead of system timers. 2020-10-02 17:53:02 +01:00
Francisco Paisana 023d32975a avoid use of pointers to meas_cells in ho_proc as they may become dangling 2020-10-02 17:53:02 +01:00
Francisco Paisana 072b7be582 renamed rrc::cell_t to rrc::meas_cell 2020-10-02 17:53:02 +01:00
Andre Puschmann 0ef8e1fdac rrc: include pci when logging serving cell measurement
this should facilitate easier log parsing and plotting
if the cell measurements _always_ include the PCI, even
in the case of the serving cell

15:49:11.357447 [RRC ] [I] MEAS:  New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=+0.1 Hz
15:49:11.391610 [RRC ] [I] MEAS:  New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=-0.4 Hz
15:49:11.427325 [RRC ] [I] MEAS:  New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=-0.6 Hz
15:49:11.463101 [RRC ] [I] MEAS:  New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=-0.7 Hz
15:49:11.499817 [RRC ] [I] MEAS:  New measurement serving cell: earfcn=0, pci=1, rsrp=-11.51 dBm, cfo=+0.1 Hz
15:49:11.499828 [RRC ] [I] MEAS:  New measurement neighbour cell: earfcn=2850, pci=0, rsrp=-12.16 dBm, cfo=-0.8 Hz
15:49:11.535027 [RRC ] [I] MEAS:  New measurement serving cell: earfcn=0, pci=1, rsrp=-11.46 dBm, cfo=-0.8 Hz
15:49:11.571707 [RRC ] [I] MEAS:  New measurement serving cell: earfcn=0, pci=1, rsrp=-11.46 dBm, cfo=-0.9 Hz
15:49:11.607932 [RRC ] [I] MEAS:  New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=-0.8 Hz
2020-10-01 20:15:41 +02:00
Pedro Alvarez 2f0125ef4e Fix issue recovering key state, when the first HO fails (specifically, is_first_ncc was not recovered). Minor improvements in key logging. 2020-10-01 18:48:07 +01:00
Francisco Paisana 1f2cca8909 in the rrc reconf procedure, handle the scenario where the rrc reconfiguration message does not config the phy 2020-10-01 11:25:21 +01:00
Francisco Paisana c6f4776a6f send the nassdus sooner in the rrc reconf procedure 2020-10-01 11:25:21 +01:00
Francisco Paisana fc49b5a030 implemented rrc reconfiguration procedure that includes a continuation when phy configuration is complete 2020-10-01 11:25:21 +01:00
Francisco Paisana b3eb9651d6 disable cqi in scells during handover procedure 2020-09-29 12:10:42 +01:00
Francisco Paisana 8a9a95a937 ensure sibs are acquired if cell selection calls cell search 2020-09-29 11:06:32 +01:00
Francisco Paisana 045f647914 fix edge case where serving cell is good enough for reestablishment but the sibs are not yet acquired 2020-09-28 23:45:13 +01:00
Francisco Paisana 5ecbe8fb17 cleanup of the reestablishment procedure state machine. It does not need to wait for the serving cell configuration because such procedure is already included in the cell selection procedure 2020-09-28 18:39:28 +01:00
Pedro Alvarez b3bfe336a9 Make sure that remote address test has a ip mask 2020-09-28 16:08:28 +02:00
Sylvain Munaut 5783c01cbb tf_packet_filter: Improve support for the different filter types 2020-09-28 16:08:28 +02:00
Francisco Paisana 0997daa7a0 now the handover procedure in the srsUE does not wait for the phy cell selection result. It only waits for the RA result 2020-09-25 13:03:50 +01:00
Pedro Alvarez 86f4d469c6 Added some functions to save and restore AS keys for the case of failed handover in the USIM 2020-09-24 13:30:08 +01:00
Francisco Paisana cf89d6645b add comments explaining each function of the reest procedure 2020-09-23 14:59:38 +01:00
Francisco Paisana d068d594af implemented rrc reestablishment procedure part after sending reest request 2020-09-23 14:59:38 +01:00
Francisco Paisana 73e21daeb2 refactor reestablishment procedure to more closely follow TS. 2020-09-23 14:59:38 +01:00
Andre Puschmann 1afc137032
[REBASE] Make PHY non-blocking and fefactor HO procedure (#1753)
* Make PHY non-blocking and fefactor HO procedure

* makes entire PHY non-blocking through command interface
* adds dedicated queue for cell_search/cell_select commands
* refactor HO procedure to run faster, in one stack cycle. Looks closer to the specs
* force ue to always apply SIB2 configuration during reestablishment
* Run update_measurements in all workers

Co-authored-by: Ismael Gomez <ismagom@gmail.com>
2020-09-22 21:47:16 +02:00
Francisco Paisana 7f8af023b8 added a callback that always gets triggered when the phy cell selection completes. This callback checks if cell selection failed, and if so, sets the rsrp of the selected cell to -infinity 2020-09-22 17:09:18 +01:00
Andre Puschmann b616944a13 ue,rrc: fix security config during HO/reestablishment
we fix a number of very related issues for HO/reestablishment
in the success/error case:

* this patch removes the hard-coded check that intra-cell HO aren't
allowed. There are cases where eNBs use this method to update
the security context.

* the patch also fixes an issue after failed HO where the security context
of the source eNB should be used for the reestablishment.

* update security keys according to specs when mobilitycontrol
indicated change of key
2020-09-21 09:27:07 +02:00
Andre Puschmann 6827c2df21 rrc_meas: disable layer3 filtering until quantity config is received
the filter alpha was initialized to zero by default which causes an
issue because the first measurement for a cell can't be updated,
because the filtering function will always return the current value.

According to 36.331 Sec 5.5.3.2 Note 2, a k-value of 0 should turn
off filtering, which should be used as the default value until
an update is received from the network.
2020-09-21 09:27:07 +02:00
Ismael Gomez f49fbd6d02
Fix the order of HO/reest measurement actions (#1696) 2020-09-04 12:18:12 +02:00
Andre Puschmann aec18a93d1 mux,bsr: refactor UL buffer status reporting
this patch fixes the UL BSR as per TS 36.321, it includes following
main changes:

* report UL buffer state to reflect the UEs transmit buffer after
  the MAC UL PDU containing the BSR has been built.
  In other words, if the UE, for example, can transmit all outstanding
  data in an UL grant, it will not report any pending data to transmit.

* refactor MUX routines and subheader space calculation
2020-09-03 15:00:36 +02:00
Ismael Gomez 06a5bdaab2 Process all calls to RLF in the main RRC task 2020-09-01 11:03:02 +02:00
Francisco Paisana 92221eb780 update of rrc_interface_mac to remove signal from mac to rrc that RA failed in case of handover failure 2020-08-29 20:06:08 +01:00
Francisco Paisana fca1273b3e avoid spurious warnings of trying to start the PRACH when it is already running during handover 2020-08-28 10:14:23 +01:00
Francisco Paisana fddcc3d8ea In the case of Handover, postpone the activation of the CQI and SR config present in the HO command for after the RA proc completion to the target eNB 2020-08-28 10:14:23 +01:00
Francisco Paisana 5242f9422b fix deadlock in handover 2020-08-27 13:43:18 +01:00
Francisco Paisana 834c0b3929 integrated new observer pattern into phy controller fsm 2020-08-24 22:10:32 +01:00
Francisco Paisana 48dd436d86 integrated observer pattern into rrc phy ctrl fsm 2020-08-24 22:10:32 +01:00
Francisco Paisana b1670c005b remove shadowed variables for reestablishment during handover 2020-08-24 17:48:50 +01:00
Francisco Paisana 8d10aa906e move defer_task to switch case in the rrc 2020-08-17 22:49:40 +01:00
Xavier Arteaga 4e1e8cea1a SRSUE: MAC HARQ entities vector is fixed 2020-07-28 09:31:34 +02:00
Francisco Paisana 4fb8011a6d updated phy controller to use task scheduler 2020-07-14 13:33:50 +01:00
Francisco Paisana 9c5471b094 more ergonomic event callback 2020-07-14 13:33:50 +01:00
Francisco Paisana 58a9610efa use of stack event loop to propagate cell search and selection results 2020-07-14 13:33:50 +01:00
Francisco Paisana d48a45976e moved cell selection/search complete event signalling out of phy_controller 2020-07-14 13:33:50 +01:00
Francisco Paisana 48138b5281 removal of phy cell selection procedure as it now it is replaced by phy controller 2020-07-14 13:33:50 +01:00
Francisco Paisana 489969722e implemented phy controller FSM to perform cell selection & search. The controller also tracks the phy sync state 2020-07-14 13:33:50 +01:00
Andre Puschmann a7911f0dab pdcp,rlc: refactor SDU queueing policy
this patch refactors the SDU queuing and dropping policy of the RLC and PDCP layer.
the previous design had issues when packets have been generated at a higher
rate above the PDCP than they could be consumed below the RLC.

When the RLC SDU queues were full, we allowed two policies, one to block on the write
and the other to drop the SDU. Both options are not ideal because they either
lead to a blocking stack thread or to lost PDCP PDUs.

To avoid this, this patch makes the following changes:

* PDCP monitors RLC's SDU queue and drops packets on its north-bound SAP if queues are full
  * a new method sdu_queue_is_full() has been added to the RLC interface for PDCP
* remove blocking write from pdcp and rlc write_sdu() interface
  * all writes into queues need to be non-blocking
  * if Tx queues are overflowing, SDUs are dropped above PDCP, not RLC
* log warning if RLC still needs to drop SDUs
  * this case should be avoided with the monitoring mechanism
2020-07-13 17:05:28 +02:00
Francisco Paisana 5e06430455 removal of stack handler interface 2020-07-13 11:19:25 +01:00
Francisco Paisana 7c364070ee creation of task scheduler interface for classes/functions running outside the main control thread 2020-07-13 11:19:25 +01:00
Francisco Paisana 039977aeb5 renamed interfaces 2020-07-13 11:19:25 +01:00
Francisco Paisana 1a9c04bf2f use of task scheduler handle in pdcp 2020-07-13 11:19:25 +01:00