aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-08-25WIPlynxis/ns2-wipAlexander Couzens4-30/+12
Change-Id: Ia051e6003527a3bdfb4a67b5ada637de9347ac51
2020-08-23fixup rebase artifact remote_protoAlexander Couzens1-1/+0
Change-Id: I2c8fff0940fed7f7ca67af882ca0db3b1675ff4a
2020-08-23fixup pcu ind with spareAlexander Couzens1-0/+1
Change-Id: Ifcd047e00e7775ed56f013fa921d41c6d6c1ec85
2020-08-22rework bssgpAlexander Couzens4-54/+100
Change-Id: I2ccc076cccdf256db3a6d7b8f34cf8de39bf8110
2020-08-22pcuif copy over from bts (fixeria + mine)Alexander Couzens1-5/+20
Change-Id: I60f10710f58fd7ea0f83f8330761328a8aa00712
2020-08-21fixup bssgp callback renamingAlexander Couzens4-4/+4
Change-Id: I3333b7a777dae990d00c0baaa949188c878b5972
2020-08-21WIPAlexander Couzens1-23/+12
2020-08-21WIPAlexander Couzens7-79/+116
2020-08-20Support setting rt-prio and cpu-affinity mask through VTYPau Espin Pedrol6-5/+59
Change-Id: I92bfabd57fab28b23bd4494a577373106be1daec Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c Related: SYS#4986
2020-08-20doc: Update VTY reference xml filePau Espin Pedrol1-4/+107
Change-Id: I5800f1607878ab764323dc12c537a8e28d387cc9
2020-08-20configure.ac: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I54b360c537e04ab3a9cb30ac3e3f9730bcad1c91
2020-08-18Introduce log macro helper LOGPMSPau Espin Pedrol4-21/+29
Change-Id: Ib304ced06531a5154b7ec8bf87f9717dfd7d1397
2020-08-18pdch: Drop unneeded notice log message in rcv pkt meas reportPau Espin Pedrol1-9/+2
It's totally fine to receive Packet Measurement Report messages with no SBA present, since the MS also sends measurements on PACCH while transmitting data. Related: OS#4719 Change-Id: I8f642d9cdeb342df7d5f2fa30516ea69554a6270
2020-08-17Fix typo in log messagePau Espin Pedrol1-2/+2
Change-Id: Ifd65542eca9180a2fcaaca290861396569e453ec
2020-08-13debian/control: change maintainer to the Osmocom team / mailing listVadim Yanitskiy1-1/+1
Change-Id: Ic114f2552ceadfeaaa00f8e719a5c7bd5d6b4917
2020-08-12direct-phy: fix handle_ph_ra_ind(): handle PH-RA.ind on PRACH SAPIVadim Yanitskiy3-0/+3
In [1] I restricted L1 SAPI of PH-RA.ind to PDTCH and PTCCH, and this seems to have caused a regression reported in [2]: DL1IF ERROR sysmo_l1_if.c:251 Rx PH-RA.ind for unknown L1 SAPI PRACH I assumed that PH-RA.ind belonging to a Control Acknowledgement message (in format of 4 Access Bursts) would have PDTCH SAPI, while apparently it's actually arriving on PRACH. [1] I482d60a46b9d253dfe0b16140eac9fea6420b30c [2] https://osmocom.org/issues/1526#note-39 Change-Id: Ib0a6da37de7a1db4cad2b96293b31b9f32e7d9eb Related: OS#1526
2020-07-18encoding: assert() presence of Downlink TBFVadim Yanitskiy1-4/+1
This is not something that should normally happen. If it happens, then it's definitely a bug, and we should not tolerate it. Change-Id: I6e46ba42650f0db2399649b536a1d2b3f0fcbf04
2020-07-18encoding: drop log_alert_exit(), use OSMO_ASSERT() insteadVadim Yanitskiy1-13/+2
Change-Id: Id5ef1c3c08dc7f264ad801e519d727d86f5ae5b8
2020-07-18bts: cosmetic: use DUMMY_VEC for padding where possibleVadim Yanitskiy1-2/+2
Change-Id: I725a7bd1b0c4d2b0d73f1b6d1f16543bf3d9d9fe
2020-07-09pdch.cpp: Store TLLI promptly on newly created TLLI in rcv_resource_requestPau Espin Pedrol2-90/+91
The TLLI is tried to be updated later anyway during tbf_alloc_ul(), but this way it's clear that information is stored where it belongs as soon as possible. The change already shows clearer log lines in TbfTest.err. Change-Id: I20ce4eb94ecf85ce2835275d0056d9ecd1b558c3
2020-07-09pdch.cpp: Fix wrong annoying log line about non-scheduled ResourceReq receivedPau Espin Pedrol2-21/+22
It's perfectly fine receiving a Resource Request message under some circumstances (as stated in the comment added in the commit). To print issues only under non-expected circumstances, the function rcv_resource_request need to be refactored: * Destroying older UL_TBF is delayed because it is needed further down. * When the old UL_TBF is FINISHED, it's an acceptable time to receive a Resource request, so we check if that's the case and don't print a warning in that case. Change-Id: I4b4367126d6a16055cd2f45afc4a6b9c15a7c980
2020-07-09pdch.cpp: Avoid resetting (egprs_)ms_class to unknown if not found in MS ↵Pau Espin Pedrol2-19/+6
RadioAccCap If the information is not found in the message, 0 (unknown MS class) will be returned. If the MS already had some previous information on the MS class, let's not lose it by setting it back to 0. Take the opportunity to drop related log lines which are no needed, since set_(egprs_)ms_class() functions already log the value changes. Change-Id: Icd52209fd4395d78dc770e7869d1b1fe45a18ca0
2020-07-09pdch.cpp: Avoid dropping existing DL TBF during rcv_resource_requestPau Espin Pedrol2-36/+0
There's no real good explanation on why the DL TBF is dropped there, since PKT RESOUCE REQUEST is used basically during UL TBF establishment. Also, as decribed by TS 44.060 11.2.16 "Packet Resource Request": """ This message is sent on the PACCH by the mobile station to the network to request a change in the uplink resources assigned. """ Change-Id: Iab4afb66f0d671f7ad54909d2685a1613e12ab4d
2020-07-09encoding.cpp: Fix missing spacing in function paramPau Espin Pedrol1-2/+2
Change-Id: I4f30a0cea615d57cd7783a92ae782790c8075a6c
2020-07-09encoding: Encode TA as unsigned and check validty against GSM48_TA_INVALIDPau Espin Pedrol1-3/+3
According to 3GPP TS 44.018 sec 10.5.2.40, Timing Advance value is 8 bit and range is 0-63 (0-219 on GSM400). Unsigned value (uint8_t) is used everywhere else, so avoid using a signed one here, and simply check for GSM48_TA_INVALID here, which we use everywhere else to initialize when the value is not known. Ideally we should check for value based on band, but it makes more sense to check that when receiving the data and storing in in set_ta(). Change-Id: I82b13561d0fe5ebafb5c3a8b9a501045c29809bc
2020-07-07tbf_dl: uint8_t is enough to store a TA valuePau Espin Pedrol1-1/+1
According to 3GPP TS 44.018 sec 10.5.2.40, Timing Advance value is 8 bit and range is 0-63 (0-219 on GSM400). So there's no need for 16 bits to store it. uint8_t is used in all other places in the code. Change-Id: I38aa063ae30ca5680fef6252d2cef22cea98c123
2020-06-30decoding.cpp: Improve logging in malformed UL data parsingPau Espin Pedrol1-2/+2
Change-Id: Ic4ad14b88fddde8d9e62e0a2587b501d36821f01
2020-06-30Set correct GSMTAP channel type for PDTCH messages returning errorPau Espin Pedrol1-1/+5
For instance, that may happen because the len of the message is not filling the expect size (because padding is missing for example). Still, in this case we know the channel type, so we set it so that wireshark tries to decode the message as a data one. Change-Id: Ifea94095d669b528874e64ca823a776cd6e22b4b
2020-06-30pdch.cpp: Fix logging line format in rcv_block wrong lengthPau Espin Pedrol1-2/+2
Change-Id: I2f818021cef41ab6f4569cd87026072811853352
2020-06-26tbf: Drop unneeded method set_tlli_from_ulPau Espin Pedrol5-52/+2
Since commit 322456ed474a733094c9f3e240295b469023ad14 (and previous one), it is expected that a tbf object ALWAYS has a MS object referend to it, even if it's a temporary copy which will later be merged when TLLI/IMSI is retrieved and it is found that several MS objects relate to the same MS. The purpose of set_tlli_from_ul was mainly to update TBF's ms() to old_ms before going through usual tbf->update_ms() path. That's not really needed since ms() is already always set and TBFs for old_ms are already freed in update_ms() and children function. Change-Id: Ie8795e7a02032336e53febb65c11f9150c36d2a0
2020-06-26gprs_ms: Transfer known EGPRS MS class when mergling old MSPau Espin Pedrol1-0/+3
Since not all the the information about the MS is known during TBF creation in all scenrios, it may happen that when TBF is created it creates a MS which later will end up being found a duplicate of an already previously existing MS. At that point, the old object is dropped and information retrieved from both is merged into the new one. The GPRS MS class was being transferred, but the EGPRS MS class was missing. Change-Id: Ieb9929b60254b12f79392d6acb8b456d71cccb9e
2020-06-26gprs_ms: Small clean ups in IMSI storage related codePau Espin Pedrol2-4/+5
Change-Id: I987af0d33b79302c037d062c9d1c828a0e027147
2020-06-11bts: fix send_gsmtap_rach(): properly pack 11 bit RAVadim Yanitskiy1-2/+14
According to 3GPP TS 44.004, section 7.4a, two alternative RACH block formats are specified: 8 bit (1 octet) and 11 bit. The bit order is LSB (right to left), byte order is MSB. In PCUIF RACH.ind structure (see gsm_pcu_if_rach_ind) we use a field of type uint16_t to store RA values regardles of the block format. Thus when packing it to bytes, we cannot just cast uint16_t* to uint8_t*, we need to do some bit shifting. Change-Id: I08a0a908f855b0d8a002df732e02781126d27dfb
2020-06-11bts: add send_gsmtap_rach(), also send PTCCH/U over GSMTAPVadim Yanitskiy3-3/+18
Change-Id: I5cc4c3d2522215a31924121f83fcc2ac9ac6fe9c
2020-06-03BTS::parse_rach_ind(): properly handle EGPRS Packet Channel RequestVadim Yanitskiy1-3/+56
Let's finally use the API we introduced in [1]. [1] I96df3352856933c9140177b2801a2c71f4134183 Change-Id: Ia15761c33c8048d35c7f7bc93dbea781dd0894b7 Related: OS#1548
2020-06-03bts: refactor handling and parsing of RACH.indVadim Yanitskiy5-325/+274
This patch is a set of tightly related changes: - group all RACH.ind parameters into struct 'rach_ind_params'; - group Channel Request parameters into struct 'chan_req_params'; - get rid of egprs_mslot_class_from_ra(), priority_from_ra(), and is_single_block(), introduce unified parse_rach_ind(); - improve logging, get rid of redundant information. This is needed for proper EGPRS Packet Channel Request handling. Change-Id: I5fe7e0f51bf5c9eac073935cc4f4edd667c67c6e Related: OS#1548
2020-05-31doc/manuals: fix typo in overview.adoc: s/Omsocom/Osmocom/gVadim Yanitskiy1-1/+1
Change-Id: I7730e65728a3917dc4923728738253155e1e0428
2020-05-25encoding: fix write_ia_rest_egprs_uplink_sba(): add missing CHECK(rc)Vadim Yanitskiy1-0/+1
Change-Id: I8e41c2912aaff689b0e311c8e2d3e961d2f1ac2c
2020-05-23RLC/MAC: implement decoding of EGPRS Packet Channel RequestVadim Yanitskiy5-0/+222
According to 3GPP TS 44.004, section 7.4a, two alternative RACH block formats are specified: 8 bit (1 octet) and 11 bit. This change adds CSN.1 definitions for 11 bit EGPRS Packet Channel Request as per 3GPP TS 44.060, table 11.2.5a.2. Change-Id: I96df3352856933c9140177b2801a2c71f4134183 Related: OS#1548
2020-05-23encoding: cosmetic: use RLC_MODE_ACKNOWLEDGED where possibleVadim Yanitskiy1-2/+3
Change-Id: Ic69d120f622f512f05016596bfdd4a89b96e3e3b
2020-05-23csn1: fix: never use enumerated types in codec structuresVadim Yanitskiy3-10/+12
I faced a problem while working on EGPRS Packet Channel Request coding support: the unit test I wrote for it was passing when compiled with AddressSanitizer, but failing when compiled without it o_O. Somehow this was observed only with GCC 10. Here is a part the standard output diff for that unit test: *** testEGPRSPktChReq *** decode_egprs_pkt_ch_req(0x2b5) returns 0 - ==> One Phase Access + ==> unknown 0xdd5f4e00 decode_egprs_pkt_ch_req(0x14a) returns 0 - ==> One Phase Access + ==> unknown 0xdd5f4e00 decode_egprs_pkt_ch_req(0x428) returns 0 - ==> Short Access + ==> unknown 0xdd5f4e01 At the same time, debug output of the CSN.1 decoder looked fine. So WYSINWYG (What You See Is *NOT* What You Get)! As it turned out, this was happening because I used an enumerated type to represent the sub-type of EGPRS Packet Channel Request. typedef struct { EGPRS_PacketChannelRequestType_t Type; // <-- enum EGPRS_PacketChannelRequestContent_t Content; } EGPRS_PacketChannelRequest_t; The problem is that length of an enumerated field, more precisely the amount of bytes it takes in the memory, is compiler/machine dependent. While the CSN.1 decoder assumes that the field holding sequential number of the chosen element is one octet long, so its address is getting casted to (guint8 *) and the value is written to the first MSB. // csnStreamDecoder(), case CSN_CHOICE: pui8 = pui8DATA(data, pDescr->offset); *pui8 = i; // [ --> xx .. .. .. ] Let's make sure that none of the existing RLC/MAC definitions is using enumerated types, and add a warning comment to CSN_CHOICE. Affected CSN.1 definitions (unit test output adjusted): - Additional_access_technologies_struct_t, - Channel_Request_Description_t. Change-Id: I917a40647480c6f6f3b0e68674ce9894379a9e7f
2020-05-23csn1: fix csnStreamEncoder(): always check the choice indexVadim Yanitskiy1-4/+6
It's so easy to pick an out of bounds value otherwise... Change-Id: I12f5ab739b97f1f3b5d4bed1b5a4a661c879e89f
2020-05-23csn1: fix csnStreamEncoder(): also check length of the choice listVadim Yanitskiy1-1/+7
Similar checks are done in csnStreamDecoder(), so better check than sorry. Change-Id: I441c716975905a37264efc8a76df92194f39c1fb
2020-05-23csn1: fix M_CHOICE: restirct maximum length of the choice listVadim Yanitskiy2-1/+4
The current implementation is not capable of handling more than 256 (UCHAR_MAX) selectors in the choice list. Let's document this and add a guard check to the M_CHOICE handler. Change-Id: I40c3c5b9be892804c6cd71cbb907af469ce5d769
2020-05-22l1if: fix: s/pcu_rx_rach_ind_pdtch/pcu_rx_rach_ind_ptcch/gVadim Yanitskiy5-5/+5
This is not a functional change, just fixing misleading function name. Access Bursts on PTCCH/U have nothing to do with PDTCH. Change-Id: I4ab710ba026315301cc6970263967616401a9fc8
2020-05-22Makefile.am: EXTRA_DIST: debian, contrib/*.spec.inOliver Smith1-1/+6
Change-Id: If17e82c5fe1fc49877a5a3d9ba250e86091e253c
2020-05-20gsmtap: Set signal level and SNR fieldsPau Espin Pedrol4-8/+25
lqual (containing C/I value) is passed instead of SNR, but let's have that better than nothing. Change-Id: Ibe9502d42c8bd1b984069e7fd805dde87ecbab0c
2020-05-20Get rid of class GprsCodingSchemePau Espin Pedrol26-686/+541
We have same kind of object splitted into two layers, in coding_scheme and gprs_coding_scheme. Let's merge them together and get rid of the class, which is not really useful because it's only a set of functions operating on one enum value. This change also fixes gcc 10.1.0 error about memseting a complex type in rlc.h init(). Change-Id: Ie9ce2144ba9e8dbba9704d4e0000a2929e3e41df
2020-05-19contrib: integrate RPM specOliver Smith3-6/+9
Remove OpenSUSE bug report link, set version to @VERSION@, make it build with CentOS 8 etc. Related: OS#4550 Change-Id: Idfe04c2e2609763387d1309f059c390b8e7ae938
2020-05-19contrib: import RPM specOliver Smith1-0/+82
Copy the RPM spec file from: https://build.opensuse.org/project/show/home:mnhauke:osmocom:nightly Related: OS#4550 Change-Id: I4da70814357a326842de52b33934819d3ea133d8