summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gprs_ns_test.c: Remove unused byte arraysPau Espin Pedrol2017-06-181-49/+0
| | | | | | | | | | Commit 0d4e949e229a649ffd0503d8e930dba8be7dd34d changed the code to use functions with local variables holding the bytes, but forgot to remove the old global variables. This test fixes compilation warnings. Change-Id: I140de30038222b0419423d8c4f9da1946651a4e7
* sms_test.c: Remove test of deprecated wrapper functionPau Espin Pedrol2017-06-182-27/+0
| | | | | | | The deprecated function is just a wrapper, and it triggers a compilation warning. Change-Id: Iaac701bdf0c0e66c343f68cc31d82550a024ef57
* card_fs_uicc.c: Fix unused compilation warningPau Espin Pedrol2017-06-181-1/+1
| | | | | | | | This array of bytes is not yet used but is referring to some specs. They may be used in the future, so leave it there but mark it explicitly as unused. Change-Id: I0a61d17f9989ecddafbc68d4b9446853e4c15159
* Fix compilation warning on deprecated macroPau Espin Pedrol2017-06-183-2/+11
| | | | | | | | | A warning was printed even if the deprecation didn't apply to libosmocore because it is still allowed to use it internally. This patch fixes this case while still printing a warning if external projects build using libosmocore headers. Change-Id: I32212f20756f828af1017482a71e29e4b3adbad4
* ctrl_test.c: fix build with GCC 7.1.1Vadim Yanitskiy2017-06-131-1/+1
| | | | | | | | | | | | | | | | According to GCC's online docs: When an inline function is not static, then the compiler must assume that there may be calls from other source files; since a global symbol can be defined only once in any program, the function must not be defined in the other source files, so the calls therein cannot be integrated. Therefore, a non-static inline function is always compiled on its own in the usual fashion. There is no any (performance or size) benefit from 'inline' keyword in this particular file, so let's replace one by 'static'. Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f
* gsm/gsm48.c: drop useless assignmentVadim Yanitskiy2017-06-131-1/+0
| | | | Change-Id: I96c1ba70e332199a4ca95e827a7562f953975af4
* vty/command.c: drop useless assignmentVadim Yanitskiy2017-06-131-1/+1
| | | | Change-Id: Ia30b6481ee570c6cf3e3b38e7a78028c66c036b7
* core/conv/conv.c: drop useless assignmentVadim Yanitskiy2017-06-131-1/+1
| | | | Change-Id: I8c3aa5ec100abacf93da1493aa134e42bf612206
* gb/gprs_bssgp.c: avoid valueless goto usageVadim Yanitskiy2017-06-131-10/+3
| | | | Change-Id: I0c2aaf1ab462c923d62232f1a63fae1e4eb18b4d
* sim/core.c: drop useless double assignmentVadim Yanitskiy2017-06-131-1/+1
| | | | Change-Id: I3bfcabd80b57aeb7f110b306350802e6e82c847a
* core/conv/viterbi.c: fix possible NULL-pointer referenceVadim Yanitskiy2017-06-131-3/+16
| | | | Change-Id: I36012d4443d97470050cdf9638a9d4cf67ea3b40
* update/extend doxygen documentationHarald Welte2017-06-1263-157/+827
| | | | | | | | | It's a pity that even with this patch we still are fare away from having the whole API documented. However, at least we have a more solid foundation. Updates not only extend the documentation, but also make sure it is rendered properly in the doxygen HTML. Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
* Update doxygen main page for libosmo{core,gsm,vty}Harald Welte2017-06-123-0/+36
| | | | | | | We should link to project homepage as well as put the library into the wider Osmocom context. Change-Id: I07ca57ecef0f36c87c9ebacc1e1507c217bdb25b
* gsm0503_coding: Mark gsm0503_mcs_{ul,dl}_codes as constHarald Welte2017-06-121-6/+6
| | | | | | | The table describing the various MCS convolutional codes are constant data and should be marked as such. Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
* gsm0503_interleaving: Mark input arguments as 'const *'Harald Welte2017-06-122-10/+10
| | | | | | | The interleaving/deinterleaving functions were missing 'const' qualifiers on their input data buffers Change-Id: I2118c34a6353167787b23f877f1d81d60151aaf9
* Add doxygen documentation to libosmocodingHarald Welte2017-06-1211-31/+465
| | | | | | | This adds the minimum amount of API documentation that we should have on all our code, particularly new code merged into a library. Change-Id: I526804f64313867913574e50e5b9e9205ad3aa74
* gsm0503_{coding,mapping}: Mark input arguments as 'const'Harald Welte2017-06-124-76/+75
| | | | | | | | It is generally our coding style to mark pointers to constant input data as 'const *'. For some reason the gsm0503 coding and mapping was not adhering to this, so let's bring it into compliance. Change-Id: Id8731d7ae6171dff94741b6ddbb95ab5f03bfd4e
* Add header file with definitions for GSM TS 04.14 / 3GPP TS 44.014Harald Welte2017-06-125-1/+125
| | | | Change-Id: I1f4fc2761b55a4f83544c1c3793ab67fec9fc120
* Include codec.h file from codec C filesHarald Welte2017-06-093-0/+3
| | | | | | | failure to do so would prevent the compiler from catching inconsistencies between declaration and definition. Change-Id: I88617c97adcff328292e501fd5d254eeae96a660
* Update L3 protocol discriminator definitionsHarald Welte2017-06-091-3/+5
| | | | Change-Id: Ia699d3494b93b7f88c36338e4960b35c42a29b9c
* osmo_{fr,hr}_check_sid(): Use const input argumentHarald Welte2017-06-093-6/+6
| | | | Change-Id: If779cce63f06a18d4f3b0cb3d6dd7a99aa52a646
* Fix wrongful GSM FR codec SID frame detection in DTX.Jean-Francois Dionne2017-06-093-11/+27
| | | | | | | | Based on ETSI TS 101 318 section 5.1.2 the 95 bits SID code word is not detected correctly due to a wrongful offset in the bits location indexes. Change-Id: I45d98c6edf267f313883503a65385190ffbc65ca
* introduce proper test case for GSM FR detectionHarald Welte2017-06-092-0/+98
| | | | | | | our code is actually wrong, so let's skip the test until the fix is applied in a follow-up patch. Change-Id: I710c7871f959671deb3d18ab9062588f3056fd7c
* core/conv: do not mix up AVX and SSE codeVadim Yanitskiy2017-05-296-570/+740
| | | | | | | | | | | | | | | | | | | | | | | According to GCC's wiki: If you specify command-line switches such as -msse, the compiler could use the extended instruction sets even if the built-ins are not used explicitly in the program. For this reason, applications that perform run-time CPU detection must compile separate files for each supported architecture, using the appropriate flags. In particular, the file containing the CPU detection code should be compiled without these options. So, this change introduces a separate Viterbi implementation, which is almost the same as previous one, but is being compiled with -mavx2. This implementation will be only used by CPUs with both SSE and AVX support: SSE3 and AVX2: viterbi_sse_avx.c SSE3 only: viterbi_sse.c Generic: viterbi_generic.c Change-Id: I042cc76258df7e4c6c90a73af3d0a6e75999b2b0
* core/conv: rename viterbi_gen.c to viterbi_generic.cVadim Yanitskiy2017-05-292-1/+1
| | | | | | | Let's avoid confusion with generated files which have ending with _gen.* as well. Change-Id: I3ecd8f9e73c05236f2cdc186f58b3d0ba552283f
* socket: Add osmo_sock_init2_ofd() functionPau Espin Pedrol2017-05-262-0/+27
| | | | | | Will be used by osmo-bts-trx Change-Id: I3c655a4af64fb80497a5aaa811cce8005dba9cd9
* Introduce build script for arm-none-eabi cross-compilationsblobb2017-05-261-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a necessary step to use libosmocore-arm dep in OsmocomBB. After this patch is submitted the "./contrib/jenkins.sh" line in libosmocore jenkins jobs [1][2] needs to be replaced with: if [[ "$JOB_NAME" == *"arch=arm-none-eabi,label=linux_amd64_debian8"* ]] then ./contrib/jenkins-arm.sh else # (FreeBSD && debian8)_amd64 builds ./contrib/jenkins.sh fi Furthermore, the "arch" matrix-build axis has to be created, holding "arm-none-eabi" and "amd64". Following combination filter is necessary to skip cross-compilations on FreeBSD buildslave: !(arch=="arm-none-eabi" && label=="FreeBSD_amd64") [1] https://jenkins.osmocom.org/jenkins/job/libosmocore/ [2] https://jenkins.osmocom.org/jenkins/job/libosmocore-gerrit/ Change-Id: I0db83ad2c94ada65c00fd1bcf867830dec80085d
* Revert "Introduce build script for arm-none-eabi cross-compilations"blobb2017-05-261-33/+0
| | | | | | | | | | | | "--enable-sanitize" does not work on jenkins build slave (debian8), although it worked out locally for me. Following patch will introduce corrected arm build script without "--enable-sanitize" option: https://gerrit.osmocom.org/#/c/2742/ This reverts commit ba58167e1bf6ff8815c4e9e0d7b0b63ba1c529f8. Change-Id: I644114679db1394e75ff12b0203ae8e568aff82c
* Introduce build script for arm-none-eabi cross-compilationsblobb2017-05-251-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a necessary step to use libosmocore-arm dep in OsmocomBB. After this patch is submitted the "./contrib/jenkins.sh" line in libosmocore jenkins jobs [1][2] needs to be replaced with: if [[ "$JOB_NAME" == *"arch=arm-none-eabi,label=linux_amd64_debian8"* ]] then ./contrib/jenkins-arm.sh else # (FreeBSD && debian8)_amd64 builds ./contrib/jenkins.sh fi Furthermore, the "arch" matrix-build axis has to be created, holding "arm-none-eabi". Following combination filter is necessary to skip cross-compilations on FreeBSD buildslave: !(arch=="arm-none-eabi" && label=="FreeBSD_amd64") [1] https://jenkins.osmocom.org/jenkins/job/libosmocore/ [2] https://jenkins.osmocom.org/jenkins/job/libosmocore-gerrit/ Change-Id: I9e07fb9e60830dbd585f22d9c658c46252ce399f
* Add human-readable names for signal_nsMax2017-05-243-0/+13
| | | | | Change-Id: Id664355eb8305fb287e4dae0800fb20dc2f9b8cd Related: SYS#3610
* Distinguish between unsupported and invalid MCSMax2017-05-242-59/+63
| | | | | | | | | | | | | | | | | | Previously MCS0 was incorrectly set for some of type1 header values while according to 3GPP TS 44.060 it can only be set for type3. Fix this: * use EGPRS_MCS* constants instead of magic values * do not set MCS0 for reserved bits values in EGPRS header type1 * return different error codes for invalid and unsupported MCS as well as for other decoding errors Note: there's no need to adjust tests because MCS0 decoding is not supported but it's better to explicitly distinguish between unsupported and invalid values nevertheless. Change-Id: Id665d5c0cf50efa18b1bcbf4f17359418a380f9e Related: OS#1524
* core/conv: add x86 SSE support for Viterbi decoderTom Tsou2017-05-244-10/+748
| | | | | | | | | | | | | | Fast convolutional decoding is provided through x86 intrinsic based SSE operations. SSE3, found on virtually all modern x86 processors, is the minimal requirement. SSE4.1 and AVX2 are used if available. Also, the original code was extended with runtime SIMD detection, so only supported extensions will be used by target CPU. It makes the library more partable, what is very important for binary packages distribution. Runtime SIMD detection is currently implemented through the __builtin_cpu_supports call. Change-Id: I1da6d71ed0564f1d684f3a836e998d09de5f0351
* tests/Makefile.am: do not test disabled featuresVadim Yanitskiy2017-05-181-4/+19
| | | | | | Compiling tests for disabled features breaks build. Change-Id: Iebcc24b493092a5a8e3561d7642a0b4608a8beae
* src/select.c: Don't #include <sys/select.h> if it doesn't existHarald Welte2017-05-171-1/+1
| | | | | | | | | We have to #include <sys/select.h> inside the block protected by HAVE_SYS_SELECT_H, otherwise it will fail on (embedded) builds where that file doesn't exist, such as the arm-none-eabi target on Debian stable and Ubuntu 16.04. Change-Id: I82a2dcbc55b6ee0e914881c5e09b80506c5de4f2
* add libpseudotalloc as super-simplistic talloc replacementHarald Welte2017-05-179-1/+145
| | | | | | | | | | | In tightly embedded builds (--enable-embedded), we want the ability to replace talloc with a very simple heap allocator to avoid the complexity of talloc without modifying all our code that assumes talloc. This will break the hierarchical notion of the allocator, but libosmo{core,gsm,coding,codec} don't rely on that anyway. Change-Id: Ie341034076f242a813f081919dd09d845775ad35
* gitignore: Update with new *_gen.c files and generic 'tags'Harald Welte2017-05-171-0/+2
| | | | Change-Id: I6e9df474b4d93e6e20c6d19ac9ffab5b7b959143
* sercomm: More API documentationHarald Welte2017-05-172-5/+62
| | | | Change-Id: I5d5002ceedd10e10d772693478f4f9cab6b1290a
* sercomm: Better integration of driver interfaceHarald Welte2017-05-172-34/+24
| | | | | | | | | We cannot assume a certain UART API like uart_baudrate() which only exists in OsmocomBB. Rather, use generic function prototypes (sercomm_drv_*) which are to be provided by the application / environment to the sercomm core. Change-Id: I01ea3067baf1791000c1a7d537ccce496a1ab1ee
* add sercomm unit testHarald Welte2017-05-174-2/+169
| | | | Change-Id: I9e2e7fcda28e7c6844d5faa09e02acf537cea44d
* sercomm: Include in libosmocore MakefileHarald Welte2017-05-174-5/+6
| | | | Change-Id: If9d50d634381f43b2c67b97fea36a462a66e4559
* src/panic.c: Remove unneeded #include of gsm_utils.hHarald Welte2017-05-171-1/+0
| | | | Change-Id: I25cea5d3a4a900550e8f18c2bea392e642bfb191
* sercomm: Rename sercomm_lock() to sercomm_drv_lock()Harald Welte2017-05-171-18/+15
| | | | | | | | The user of the code is supposed to provide a "driver" implementing those calls according to the specific target architecture/hardware. This only applies to non-host (i.e. embedded) builds Change-Id: I9a6848f23b70fc32f4de10149d857374f76f000d
* sercomm: remove unrequired helper functionsHarald Welte2017-05-172-15/+0
| | | | | | | | osmo_sercomm_{bind,get}_uart() are not really needed anymore, as sercomm_inst is public and thus the user can access the uart_id member directly. Change-Id: I6d57709c3764036046202f16a26c9eb87426c8d1
* sercomm: Move HDLC related defines into C fileHarald Welte2017-05-172-7/+7
| | | | | | | Those values are not relevant to the sercomm user, only to the implementation and thus can remain inside sercomm.c Change-Id: I5700a45985b7c119c6338932171aae62ee4e2d22
* sercomm: Add doxygen-style documentation to public APIHarald Welte2017-05-172-13/+32
| | | | Change-Id: I2d8b11905692920d328262836420f01305be489e
* sercomm: include header file from osmocom/coreHarald Welte2017-05-171-2/+1
| | | | Change-Id: Iff5ff3a51d7781bcfb3aff0839b733bc7a71b7e5
* sercomm: make rx msg size configurable per instanceHarald Welte2017-05-172-4/+7
| | | | Change-Id: I835506e26e83232e1e7290c0da04d389c8d7fb40
* sercomm: introduce osmo_ naming prefix in struct and function namesHarald Welte2017-05-172-28/+28
| | | | Change-Id: If4e22f182a47b72b1fe43146716a4fbccceb62e6
* sercomm: Enable multiple instances of 'sercomm'Harald Welte2017-05-172-104/+106
| | | | | | | | Rather than having one global instance, let's permit multiple instances of sercomm to co-exist, with all API functions extended by the instance as first argument. Change-Id: I0f3b53f464b119d65747bcb0be0af2d631e1cc05
* Import sercomm.c from osmocom-bbHarald Welte2017-05-172-0/+404
| | | | | | | | | This imports the file src/target/firmware/comm/sercomm.c from osmocom-bb.git without introducing any modifications. It will not even be built yet, as Makefile integration is intentionally left until it has been adapted to work inside libosmocore. Change-Id: I9ee199381c7b5986a9540d124836cdddd0f66c86