Commit Graph

3542 Commits

Author SHA1 Message Date
Zhe Huang 8b526e1c20 Fix SQN incrementation arithmetic (#212)
* Fix SQN incrementation arithmetic

Current implementation of increment_sqn function increments the 48 bits
SQN directly by 1 which is incorrect according to 3GPP TS 33.102 version
11.5.1 Annex C. This bug causes commercial UEs to report AUTHENTICATION
FAILURE EMM cause #21 "synch failure" when SQN is out of sync.

According to 3GPP TS 33.102 version 11.5.1 Annex C, 48 bits SQN consists
of 43 bits SEQ and 5 bits IND parts where SEQ are incremented during
generation of authentication vector or resync procedure. A
new IND value is also assigned when an authentication vector is
generated. However, resync procedure will use the same IND value.

This patch implements the increment_sqn function according to 3GPP TS
33.102 version 11.5.1 Annex C. A new function increment_seq_after_resync
is added to handle the special case of SQN arithmetic during SQN
resynchronization.

This patch is tested with two comercial UEs (Oneplus One and Oneplus 3T).

* Fix the maximum value of SEQ value to be 2^43-1

The SEQ value is 43 bits long and previous maximum value has a typo (one
extra F) which allows SEQ value to be 2^47-1. This patch corrects the typo.
2018-09-24 11:28:07 +02:00
Ismael Gomez 13cba873d5 Make SIB2 mbsfn settings optional 2018-09-24 11:27:22 +02:00
Ismael Gomez 2e53478a3b Allow time_adv_nsamples parameter to be negative 2018-09-24 11:26:30 +02:00
Ismael Gomez 4068ad0064 Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-09-21 17:03:35 +02:00
Ismael Gomez d0c392e3dd Increase radio preamble buffer 2018-09-21 17:03:25 +02:00
Andre Puschmann 3d4e90029c fix RLC UM issue when dropping PDU that is neither start nor end aligned 2018-09-21 10:29:41 +02:00
Andre Puschmann 9a4ce125fb fix RLC stress test with respect to timer handling 2018-09-21 10:29:41 +02:00
Andre Puschmann 4b0171ccea fix MAC timer handling in rlc_stress_test 2018-09-21 10:29:41 +02:00
Andre Puschmann 5469a958be Merge branch 'next_test_after_merge' into next 2018-09-21 10:28:38 +02:00
Andre Puschmann b73f48f91e Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-09-21 10:23:04 +02:00
Ismael Gomez 90875973c5 Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-09-20 19:26:09 +02:00
Ismael Gomez a0c87dcd15 Increased maximum burst samples 2018-09-20 19:25:57 +02:00
Andre Puschmann a9d46cbad3 Merge branch 'master' into next_test_after_merge 2018-09-20 13:01:43 +02:00
Zhe Huang cd1fb0d81e Set AMF to all zeros during resync (#213)
During the resync procedure, the security_milenage_f1_star generates a
MAC_S value that does not match the MAC_S value reported in AUTS. This
posts a security risk.

According to 3GPP TS 33.102 version 11.5.1 section 6.3.3, the AMF used
to calculate MAC-S assumes a dummy value of all zeros so that it does
not need to be transmitted in the clear in the re-synch message.

This patch corrects this problem. MAC_S reported by AUTS matches the
MAC_S calculated using f1_star function after the fix.
2018-09-20 12:57:47 +02:00
Andre Puschmann d981f129e0 Merge branch 'master' into next 2018-09-20 12:54:05 +02:00
Andre Puschmann 1fab8e6702 fix reset of NAS counters after receiving security mode command
- reported by cpetersgit
- reset only needed after receiving initial security mode command
2018-09-20 12:16:44 +02:00
Andre Puschmann f458d58527 fixed handling of UE indentity request 2018-09-20 11:55:42 +02:00
Joseph Giovatto 2dddfa2aac added ability to track tput per bearer (#233)
added mac_metrics for ul/dl harq retex counts
2018-09-20 11:22:22 +02:00
Ismael Gomez 4a8d83721a Fix unnecessary memory usage in radio 2018-09-20 09:45:46 +02:00
Ismael Gomez 2cf381823c Fixed bug in commit 197d855d3f 2018-09-19 18:00:47 +02:00
Zhe Huang 3433b0ffde assign correct values from BladeRf manual calibration to correction
* Assign correct values from BladeRf manual calibration to correction

The rf_calibration function for blade RF was assgiing dc_gain to
BLADERF_CORR_FPGA_PHASE and dc_phase to BLADERF_CORR_FPGA_GAIN. This hot
fix corrects the value assignments in both rf_blade_set_tx_cal and
rf_blade_set_rx_cal functions.
2018-09-19 17:43:18 +02:00
Ismael Gomez e43eb3ffc1 Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-09-19 17:37:28 +02:00
Ismael Gomez dabfbfb75a Fixes #250 2018-09-19 17:37:23 +02:00
Xavier Arteaga f865296421 Added BladeRF Micro Support (required bladerf driver > 2.0.2) 2018-09-19 17:36:38 +02:00
IgnasJ 67c8bf1368 Fixes for srsLTE on ARM (#229)
* Fix ARM NEON code compilation

Fix LV_HAVE_NEON defintion incorrecly used instead of HAVE_NEON in some places
Replace vqabsq_s32 with vabsq_f32 as vqabsq_s32 requires int type (fails to compile)
Fix missing NEON code path in mat.h in srslte_mat_2x2_mmse_csi_simd()

* Fix timestamp overflow issue on 32-bit systems with Soapy driver

'time_t secs' can be 32-bit on some systems. This causes calculation:
'secs * 1000000000;' to overflow.
2018-09-19 17:34:59 +02:00
Ismael Gomez 0294923e2b Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-09-19 16:42:11 +02:00
Ismael Gomez 197d855d3f Fix issue #240 2018-09-19 16:41:59 +02:00
Xavier Arteaga a9fcd64b1f Fixes #259: Turbodecoder AVX2 instructions under LV_HAVE_AVX (instead of LV_HAVE_AVX2) 2018-09-19 12:35:37 +02:00
Andre Puschmann 184539b87d add LCID change API to UE interface, add method to reestablish single RLC bearer 2018-09-18 15:09:24 +02:00
Andre Puschmann 352ea36246 Merge branch 'lcid_change' into next 2018-09-18 14:41:11 +02:00
Andre Puschmann 10bc01a7ae add API to change LCID of RLC bearers 2018-09-17 13:11:03 +02:00
Andre Puschmann 27459bf706 add API to change LCID of PDCP bearers 2018-09-17 13:10:44 +02:00
Xavier Arteaga 7f72a90051 Implemented 16 bit LLR CSI in SSE 2018-09-17 12:33:14 +02:00
Andre Puschmann 068fd2d81e log PDCP PDU dropping in MAC isnt valid 2018-09-17 10:39:45 +02:00
Igor Kim 8d48613c38 fix typo in metrics rssi CMA calculation (#230) 2018-09-17 09:43:14 +02:00
Andre Puschmann adbec3ee70 fix warning in common.h reported by clang-tidy 2018-09-13 17:12:32 +02:00
Andre Puschmann b1a443a9b8 add clang-tidy detection 2018-09-13 17:11:55 +02:00
Andre Puschmann e12dc1a751 fix SIMD detection for Clang 2018-09-12 21:20:01 +02:00
Ismael Gomez 243a7708d4 Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-09-07 14:06:27 +02:00
Ismael Gomez 826fbccf11 Fixed memory leaks in new decoder 2018-09-07 14:05:45 +02:00
Andre Puschmann d03f5017df fix RLC mode printf and timer access 2018-09-07 14:04:57 +02:00
Andre Puschmann 02e38c7c9f fix stopping of RLC_AM timer and protect access 2018-09-07 13:10:22 +02:00
Andre Puschmann f3eceab242 small re-factor of RLC_AM class (reorder methods) 2018-09-07 13:08:45 +02:00
Andre Puschmann c0899ddda9 refactor RLC AM, add tx/rx subclasses 2018-09-07 10:49:52 +02:00
Andre Puschmann 6c896c4962 fix RLC AM test in release 2018-09-07 10:49:52 +02:00
Andre Puschmann 24cde06e32 fix UM config printout during init 2018-09-07 10:49:52 +02:00
Andre Puschmann f14ee09ed3 adapt AM test to new MAC timer 2018-09-07 10:49:52 +02:00
Andre Puschmann 823d9e75f1 Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-09-07 10:38:59 +02:00
Andre Puschmann 883eb49043
Merge pull request #254 from softwareradiosystems/tx_mutex_fix
Change TX mutex to semaphores (mutex implementation was violating loc…
2018-09-06 18:00:57 +02:00
Ismael Gomez 6a791f1416 Change TX mutex to semaphores (mutex implementation was violating lock ownership requirement) 2018-09-06 15:22:37 +02:00