[PATCH] osmocom-bb[master]: host/trxcon/scheduler: use GSM_MACBLOCK_LEN definition

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6800 host/trxcon/scheduler: use GSM_MACBLOCK_LEN definition Change-Id: Ie3b27ecb62d6f0e84f2e3ec0c1558e32bb213d33 --- M src/host/trxcon/sched_lchan_common.c M src/host/trxcon/sched_lchan_xcch.c 2 files changed, 8 insertions(+), 5 deletions(-) git pull

[PATCH] osmocom-bb[master]: trxcon/scheduler: use linuxlist API for lchan management

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6817 trxcon/scheduler: use linuxlist API for lchan management As there is no any order relation between logical channels, it's better to use the linuxlist API instead of talloc array. Change-Id: I5a78582c77ed1ab33817d240e065dc4cd4708199 --- M

[PATCH] osmocom-bb[master]: trxcon/scheduler: deactivate lchans when resetting / deletin...

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6816 trxcon/scheduler: deactivate lchans when resetting / deleting TS Previously, when resetting or deleting a timeslot, we did not deactivate the logical channels, relaying on talloc hierarchical nature. This approach may cause some problems, e.g. on

[PATCH] osmocom-bb[master]: trxcon/scheduler: FIX: return NULL from TCH dequeue function

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6813 trxcon/scheduler: FIX: return NULL from TCH dequeue function Initially it was expected that a TCH transmit queue could contain TCH and FACCH primitives only. But there are also SACCH primitives, which are also being stored there. So, let's drop the

[PATCH] osmocom-bb[master]: trxcon/scheduler: BUGFIX: distinguish between SACCH and FACCH

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6806 trxcon/scheduler: BUGFIX: distinguish between SACCH and FACCH Both SACCH and FACCH messages have the same 23-byte length, both are being queued together within a single transimt queue. So, previously a SACCH frame could be picked by TCH burst handler,

[PATCH] osmocom-bb[master]: trxcon/scheduler: separate primitive management code

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6807 trxcon/scheduler: separate primitive management code 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.

[PATCH] osmocom-bb[master]: trxcon/scheduler: share chan / prim identification helpers

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6814 trxcon/scheduler: share chan / prim identification helpers Because they would be also used outside. Change-Id: Ic8af9d7c72fdb124caef82e35170f92b84e16eb9 --- M src/host/trxcon/sched_prim.c M src/host/trxcon/sched_trx.h 2 files changed, 9 insertions(+),

[PATCH] osmocom-bb[master]: trxcon/scheduler: preprocess UL bursts before sending

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6811 trxcon/scheduler: preprocess UL bursts before sending 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:

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: always print error messages

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6805 host/trxcon/scheduler: always print error messages Some error messages previously had incorrect logging level 'debug'. We aren't going to hide anything, right? Let's print them! Change-Id: I85fb37292046b667386bfe26b9bbb000600e1c6f --- M

[PATCH] osmocom-bb[master]: trxcon/scheduler: move prim management outside lchan handlers

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6808 trxcon/scheduler: move prim management outside lchan handlers 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

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: add initial TCH/F channel support

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6803 host/trxcon/scheduler: add initial TCH/F channel support 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:

[PATCH] osmocom-bb[master]: L1CTL/L1CTL_CRYPTO_REQ: add key length and channel info

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6810 L1CTL/L1CTL_CRYPTO_REQ: add key length and channel info Previously, the L1CTL_CRYPTO_REQ message contained only a ciphering algorithm and actual Kc key to be used. The key length was calculated manually using the MSGB API. Let's avoid manual

[PATCH] osmocom-bb[master]: trxcon/scheduler: implement A5/X ciphering support

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6812 trxcon/scheduler: implement A5/X ciphering support This change implements the A5/X ciphering support transparently for the logical channel handlers. In other words, a DL burst is deciphered before being passed to a handler, and an UL burst is ciphered

[PATCH] osmocom-bb[master]: trxcon/scheduler: prioritize FACCH correctly

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6809 trxcon/scheduler: prioritize FACCH correctly Previously we used to compare two consecutive first primitives, taken from a transmit queue. This approach may cause some delay, which is critical for FACCH e.g. in case of handover. Let's walk through a

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: handle L1CTL_TRAFFIC_REQ

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6802 host/trxcon/l1ctl.c: handle L1CTL_TRAFFIC_REQ Change-Id: Ibdf2d4f6aa464250a4c6951af86c06eb3fd3b98b --- M src/host/trxcon/l1ctl.c 1 file changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/trx_if.c: get rid of useless commands

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6792 host/trxcon/trx_if.c: get rid of useless commands The 'SETMAXDLY' command is used on the BTS side to limit maximal Time of Arrival for access bursts. As we don't receive RACH bursts on the MS side, the command is useless. The 'SETRXGAIN' command is

[PATCH] osmocom-bb[master]: common/l1ctl.c move TCH bit-ordering to the firmware

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6801 common/l1ctl.c move TCH bit-ordering to the firmware Previously, TCH frames coming from L1 were reordered to the RTP format. Moreover, the implementation had a few problems: - L1CTL is not the best place for such manipulations; - payloads with

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: drop meaningless memset call

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6799 host/trxcon/scheduler: drop meaningless memset call Change-Id: I18a938cef350632673cfc820beed5e42f40d89e7 --- M src/host/trxcon/sched_lchan_xcch.c 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: inform L2&3 about decoding errors

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6804 host/trxcon/scheduler: inform L2&3 about decoding errors 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

[PATCH] osmocom-bb[master]: fake_trx/clck_gen.py: send the first indication immediately

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6794 fake_trx/clck_gen.py: send the first indication immediately Change-Id: I0132dd939b02db357d248abf65c9116d6a1802d0 --- M src/target/fake_trx/clck_gen.py 1 file changed, 9 insertions(+), 6 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon/trx_ic.c: use osmo_ubit2sbit() from libosmocore

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6791 host/trxcon/trx_ic.c: use osmo_ubit2sbit() from libosmocore No need to reimplement the existing functions... Change-Id: Ic9b232c8561609d42dac10e6249a3e1c58c4edc1 --- M src/host/trxcon/trx_if.c 1 file changed, 2 insertions(+), 7 deletions(-) git

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: process frames in advance

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6790 host/trxcon/scheduler: process frames in advance In order to get the transceiver more time to process bursts, the L1 scheduler should process the frames and send the bursts in advance (a few frames before), like OsmoBTS does. By default, the advance

[PATCH] osmocom-bb[master]: fake_trx/clck_gen.py: reset the clck_src when calling stop()

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6795 fake_trx/clck_gen.py: reset the clck_src when calling stop() Change-Id: I1043f71a2cbe856a0cb605db8a7feab9defa6afd --- M src/target/fake_trx/clck_gen.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull

[PATCH] osmocom-bb[master]: fake_trx/burst_gen.py: remove unused import

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6787 fake_trx/burst_gen.py: remove unused import Change-Id: I407877e2025663f706d1a2f93e6228770bfc253c --- M src/target/fake_trx/burst_gen.py 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: clean up some includes

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6764 host/trxcon/scheduler: clean up some includes Change-Id: I47e3b953b80f4f822d563579d15498181009ca80 --- M src/host/trxcon/sched_lchan_rach.c M src/host/trxcon/sched_lchan_sch.c M src/host/trxcon/sched_lchan_xcch.c 3 files changed, 0 insertions(+), 10

[PATCH] osmocom-bb[master]: host/trxcon: forward Timing Advance value to transceiver

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6793 host/trxcon: forward Timing Advance value to transceiver The time at which the phone is allowed to transmit a burst of traffic within a timeslot must be adjusted accordingly to prevent collisions with adjacent users. Timing Advance (TA) is the variable

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: use new libosmocoding API for RACH

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6797 host/trxcon/scheduler: use new libosmocoding API for RACH Since the 32e5641d, the gsm0503_rach_encode() is deprecated, and the library provides new API with extended (11-bit) RACH support. Change-Id: I1955fe46eebd173d6eddd1d47ee9f7318b9b4e2d --- M

[PATCH] osmocom-bb[master]: fake_trx: correct brief descriptions of files

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6789 fake_trx: correct brief descriptions of files Change-Id: Ie76fee4a567681a5380be90e5744621c2aa3e5f0 --- M src/target/fake_trx/burst_gen.py M src/target/fake_trx/burst_send.py M src/target/fake_trx/ctrl_cmd.py M src/target/fake_trx/data_if.py 4 files

[PATCH] osmocom-bb[master]: host/trxcon: separate logging of L1 Control and L1 Data

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6769 host/trxcon: separate logging of L1 Control and L1 Data L1 Data is quite verbose, while Control is typically limited. And if you would need to debug some Control message handling, the Data messages wont overflow your terminal anymore. This change

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: send stored tx_power to transceiver

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6771 host/trxcon/scheduler: send stored tx_power to transceiver Previously a fixed fake value (10) was used. Change-Id: I8ba70bbda6c8c9249f8eb4294aeb41ab8769a19a --- M src/host/trxcon/sched_lchan_rach.c M src/host/trxcon/sched_lchan_xcch.c 2 files changed,

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: fix chan_nr parsing

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6759 host/trxcon/scheduler: fix chan_nr parsing Previously, the chan_nr, received from L2, was parsed in a wrong way, so in some cases only one logical channel was activated or some messages (such as Measurement Requests) were sent on incorrect channel

[PATCH] osmocom-bb[master]: fake_trx: whitespace fix

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6767 fake_trx: whitespace fix Change-Id: Iad2be36777e4a2454e181c856c7902574a4ab20c --- M src/target/fake_trx/burst_gen.py M src/target/fake_trx/rand_burst_gen.py 2 files changed, 6 insertions(+), 6 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon/trx_if.c: fix wrong logging category

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6780 host/trxcon/trx_if.c: fix wrong logging category Change-Id: I0df0205e160fd9ea5811852077db7c49cddc7e8a --- M src/host/trxcon/trx_if.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: fix prim queue flushing function

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6779 host/trxcon/scheduler: fix prim queue flushing function For some reasons, the function, which is used to flush a queue of transmit primitives, was intended to flush a list of msgb instances instead of trx_ts_prim, so memory was being cleaned

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: share common code for lchan handlers

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6763 host/trxcon/scheduler: share common code for lchan handlers The training sequences array is currently used by xCCH handlers, but will be also used for handling both TCH/F and TCH/H bursts. Moreover the code that forwards decoded L2 payloads to L1CTL

[PATCH] osmocom-bb[master]: fake_trx: separate DataInterface from burst_gen.py

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6766 fake_trx: separate DataInterface from burst_gen.py Change-Id: I325cf2ae59ef8834c2ddfb67206eede44d1e0acf --- M src/target/fake_trx/burst_gen.py A src/target/fake_trx/data_if.py 2 files changed, 108 insertions(+), 81 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: ignore incomplete sets of bursts

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6758 host/trxcon/scheduler: ignore incomplete sets of bursts To be able to decode one xCCH message, it's required to have all set of bursts collected (4/4). Otherwise we should not even try to decode an incomplete set. Change-Id:

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: fix possible NULL deference

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6754 host/trxcon/scheduler: fix possible NULL deference We should make sure that required timeslot is not only allocated, but also configured, i.e. has a correct multiframe layout. Change-Id: I1d0b870c389802b51c709d089b80ac3fb3565fa8 --- M

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: clean up the trx_lchan_state

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6798 host/trxcon/scheduler: clean up the trx_lchan_state There were some BTS specific variables, which are meaningless. This change cleans them up, and also groups some measurement, encryption, and AMR specific variables into sub-structures. Change-Id:

[PATCH] osmocom-bb[master]: fake_trx: don't sent clock indications until POWERON

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6796 fake_trx: don't sent clock indications until POWERON Change-Id: I86ccc9d26fc54e6511f74f858afdaebb2b284c19 --- M src/target/fake_trx/ctrl_if_bts.py M src/target/fake_trx/fake_trx.py 2 files changed, 10 insertions(+), 1 deletion(-) git pull

[PATCH] osmocom-bb[master]: fake_trx: add options to specify fn, tn and pwr

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6765 fake_trx: add options to specify fn, tn and pwr Change-Id: Ifd4f4864707596a69fece11218a4800b98551c31 --- M src/target/fake_trx/burst_gen.py 1 file changed, 31 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon: fix: use valid names for FSM instances

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6784 host/trxcon: fix: use valid names for FSM instances Since 8c4f5457 in libosmocore there are some limitations on FSM and FSM instance names. This change adjusts the names of both l1ctl_fsm and trx_fsm instances. Change-Id:

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: separate logging of data messages

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6783 host/trxcon/scheduler: separate logging of data messages Change-Id: I3a33687a688db2a183b546425f71c7a0a7030594 --- M src/host/trxcon/logging.c M src/host/trxcon/logging.h M src/host/trxcon/sched_lchan_rach.c M src/host/trxcon/sched_lchan_sch.c M

[PATCH] osmocom-bb[master]: host/trxcon/trx_if.c: separate logging of data messages

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6782 host/trxcon/trx_if.c: separate logging of data messages Change-Id: I74ebe0441aeb41c324eafb6b586b2edd9ef4fd1a --- M src/host/trxcon/logging.c M src/host/trxcon/logging.h M src/host/trxcon/trx_if.c 3 files changed, 16 insertions(+), 9 deletions(-)

[PATCH] osmocom-bb[master]: fake_trx/README: correct the branch name

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6786 fake_trx/README: correct the branch name Change-Id: I9d65580570d9bced65a7bcc95ca073ecc3e130e5 --- M src/target/fake_trx/README 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/86/6786/1

[PATCH] osmocom-bb[master]: host/trxcon: use LOGP instead of fprintf

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6781 host/trxcon: use LOGP instead of fprintf There is no (performance) reason to use fprintf instead of LOGP. Second one provides more useful information, such as a file name and a line number. Change-Id: I86dda5b3d746c7802442e4226578a06c04941721 --- M

[PATCH] osmocom-bb[master]: fake_trx: implement a new tool for burst sending

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6788 fake_trx: implement a new tool for burst sending This change introduces a new tool for sending existing bursts from file or standard input either to L1 (OsmoBTS or OsmocomBB) or to TRX (OsmoTRX and GR-GSM TRX). Change-Id:

[PATCH] osmocom-bb[master]: fake_trx/ctrl_cmd.py: add help and basic command line options

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6785 fake_trx/ctrl_cmd.py: add help and basic command line options Sometimes it's important to use different CTRL port, for example when OsmoTRX is running at the same time. This change adds the corresponding command line options and help message.

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: include DL frame info in L1CTL_DATA_CONF

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6776 host/trxcon/l1ctl.c: include DL frame info in L1CTL_DATA_CONF The l1ctl_info_dl header is expected to be a part of a L1CTL_DATA_CONF message, but was missing previously. Change-Id: Ia8dfaed924fd84395ba9ae539164eaa94f52d30b --- M

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: handle L1CTL_TCH_MODE_REQ

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6777 host/trxcon/l1ctl.c: handle L1CTL_TCH_MODE_REQ Change-Id: Ib2332e1610fa873755cdfa745153c7b7d4a72a62 --- M src/host/trxcon/l1ctl.c 1 file changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: share common declarations of lchan ha...

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6778 host/trxcon/scheduler: share common declarations of lchan handlers The training sequences, data / traffic indication and confirmation helpers are used by several lchan handlers, like xCCC and TCH. It would be better to have them all declared within a

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: fix wrong log level

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6770 host/trxcon/l1ctl.c: fix wrong log level Change-Id: I0ac65d94b0ae3dd370675318a26a65d11c49cbbe --- M src/host/trxcon/l1ctl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/70/6770/1

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: use primitive management API for RACH

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6775 host/trxcon/l1ctl.c: use primitive management API for RACH Change-Id: I956ddfc4d1b47575715375c08f46c55953ec5fb6 --- M src/host/trxcon/l1ctl.c 1 file changed, 25 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: don't fill l1ctl_info_ul into a primitive

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6773 host/trxcon/l1ctl.c: don't fill l1ctl_info_ul into a primitive The UL frame header isn't used by lchan handlers. Change-Id: Ia1c63b6f17c3802b29f54299da1151a39edf3a03 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/sched_lchan_xcch.c 2 files changed, 3

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: retune TRX only if current ARFCN differs

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6772 host/trxcon/l1ctl.c: retune TRX only if current ARFCN differs Change-Id: I797dc284bd92d07ad4859f851a44d048407db86d --- M src/host/trxcon/l1ctl.c 1 file changed, 9 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: share primitive management code

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6774 host/trxcon/l1ctl.c: share primitive management code This change introduces shared primitive management functions, exposed from the l1ctl_rx_data_req() implementation: - sched_trx_init_prim() - allocates memory for a new primitive and its

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: do nothing if CCCH mode matches

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6768 host/trxcon/l1ctl.c: do nothing if CCCH mode matches When the L1CTL_CCCH_MODE_REQ is received, we don't need to reconfigure anything if the current mode matches requested. Change-Id: Ib8a511e4edd7210b1806f47e83f316be00a8cbb1 --- M

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: drop a meaningless FIXME label

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6757 host/trxcon/scheduler: drop a meaningless FIXME label Change-Id: If5497f4fdce22e986f46725cc1575a1e809ccdab --- M src/host/trxcon/sched_trx.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: implement sched_clck_reset()

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6748 host/trxcon/scheduler: implement sched_clck_reset() It's better to have the clock management API inside a single file. Change-Id: I92772f3db404e70fdffd530779613196afec61c9 --- M src/host/trxcon/sched_clck.c M src/host/trxcon/sched_trx.c M

[PATCH] osmocom-bb[master]: host/trxcon: get rid of useless TRX_EVENT_RESET_IND

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6747 host/trxcon: get rid of useless TRX_EVENT_RESET_IND Change-Id: I2aa4c000b37f64c351a806711b2d19bf27ef82bd --- M src/host/trxcon/trx_if.c M src/host/trxcon/trxcon.c M src/host/trxcon/trxcon.h 3 files changed, 2 insertions(+), 7 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon: don't flush trx control messages on reset

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6746 host/trxcon: don't flush trx control messages on reset Change-Id: I0851f168adeb012a933c796c4180ef507b1c57ec --- M src/host/trxcon/l1ctl.c M src/host/trxcon/trxcon.c 2 files changed, 1 insertion(+), 2 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon: adjust default verbosity level

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6750 host/trxcon: adjust default verbosity level Change-Id: I91258091b59e5cdd30b767364fb48c3d67980eb7 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/sched_clck.c M src/host/trxcon/sched_trx.c 3 files changed, 22 insertions(+), 13 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: pass trx_lchan_state to lchan handlers

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6760 host/trxcon/scheduler: pass trx_lchan_state to lchan handlers It's better to pass a trx_lchan_state instance directly from caller to lchan handler instead of passing trx_lchan_type. This way a handler wouldn't need to find lchan itself. Change-Id:

[PATCH] osmocom-bb[master]: fake_trx: add copyright message to clck_gen.py and ctrl_cmd.py

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6751 fake_trx: add copyright message to clck_gen.py and ctrl_cmd.py Change-Id: Ia79279dd9e85d131d66d790f1f3fd64fb1914f58 --- M src/target/fake_trx/clck_gen.py M src/target/fake_trx/ctrl_cmd.py 2 files changed, 20 insertions(+), 0 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: git rid of sched_trx_find_ts()

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6755 host/trxcon/scheduler: git rid of sched_trx_find_ts() After simplification of timeslot management API this function does not make sense. Change-Id: I2fc0c68d784c8f01e1452bc46f8e1eaac2917656 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/sched_trx.c M

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: make l1ctl_tx_data_ind flexible

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6762 host/trxcon/l1ctl.c: make l1ctl_tx_data_ind flexible Now this function can send both DATA and TRAFFIC indications. Change-Id: I945c10c317155917b6e6ce9d663d9cb46f2e085c --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl.h M

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: reset FBSB expire timer on shutdown

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6744 host/trxcon/l1ctl.c: reset FBSB expire timer on shutdown Change-Id: If3c8a34f0c1105c6acbfe4f9233482a31f6558de --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl.h M src/host/trxcon/l1ctl_link.c M src/host/trxcon/l1ctl_link.h 4 files changed, 22

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: use 'tn' instead of 'ts_num'

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6756 host/trxcon/scheduler: use 'tn' instead of 'ts_num' The new timeslot index designation is more generic for Osmocom projects, so let's use one. Change-Id: I8c0118aad439816148490e57938d7e32b6e20877 --- M src/host/trxcon/sched_mframe.c M

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: get rid of useless nbits argument

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6761 host/trxcon/scheduler: get rid of useless nbits argument Change-Id: I8508676e2cb347396c6ca6b394f13113f3e63084 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_lchan_rach.c M src/host/trxcon/sched_lchan_sch.c M

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: simplify timeslot management

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6753 host/trxcon/scheduler: simplify timeslot management As we know the count of timeslots per GSM TDMA frame, it would be better to have an array of pointers to trx_ts instances instead of linux list, which is more usable for lists with unknown length.

[PATCH] osmocom-bb[master]: fake_trx: fix compatibility with Python 3

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6735 fake_trx: fix compatibility with Python 3 Change-Id: Idce0c631aa3fcd20092a3773558570e442b2fec8 --- M src/target/fake_trx/clck_gen.py M src/target/fake_trx/ctrl_cmd.py M src/target/fake_trx/fake_trx.py M src/target/fake_trx/udp_link.py 4 files changed,

[PATCH] osmocom-bb[master]: host/trxcon: get rid of useless trxcon fsm events

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6745 host/trxcon: get rid of useless trxcon fsm events Both SCH_EVENT_CLCK_IND and SCH_EVENT_CLCK_LOSS were not handled, moreover there is no purpose to keep them. Change-Id: I8efac459a40f4287e3325890809991d5ef46e9b1 --- M src/host/trxcon/sched_clck.c M

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: implement TSC selection

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6736 host/trxcon/scheduler: implement TSC selection Change-Id: I004cc71aafe0a26e5141a4b2ffa90063e961be31 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/sched_lchan_handlers.c M src/host/trxcon/trx_if.h 3 files changed, 44 insertions(+), 5 deletions(-)

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: confirm xCCH data sending

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6737 host/trxcon/scheduler: confirm xCCH data sending Change-Id: I40994e7046c25306a0a323910a65e195d2d8fbd0 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl.h M src/host/trxcon/sched_lchan_handlers.c 3 files changed, 37 insertions(+), 11 deletions(-)

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: handle L1CTL_PARAM_REQ

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6743 host/trxcon/l1ctl.c: handle L1CTL_PARAM_REQ Change-Id: I5c23520dc0f19147b41ad2e13681bf0a62e9facd --- M src/host/trxcon/l1ctl.c M src/host/trxcon/trx_if.h 2 files changed, 22 insertions(+), 0 deletions(-) git pull

[PATCH] osmocom-bb[master]: fake_trx: add a new tool for burst generation

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6752 fake_trx: add a new tool for burst generation This change introduces a new tool named 'burst_gen.py'. One can be used for sending GSM bursts either to L1 (OsmoBTS or OsmocomBB) or to TRX (OsmoTRX and GR-GSM TRX). Currently it is only possible to send

[PATCH] osmocom-bb[master]: host/trxcon: share trxcon fsm and talloc ctx via trxcon.h

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6739 host/trxcon: share trxcon fsm and talloc ctx via trxcon.h Change-Id: I9ef558f84a6dc1c9b8fc394c48e108676fa169f8 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl_link.c M src/host/trxcon/sched_clck.c M src/host/trxcon/sched_lchan_handlers.c M

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: optionally reset clock counter

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6749 host/trxcon/scheduler: optionally reset clock counter Change-Id: I4565620fc0c5f64133c2674d2c972fc34245cf32 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/sched_trx.c M src/host/trxcon/sched_trx.h M src/host/trxcon/trxcon.c 4 files changed, 13

[PATCH] osmocom-bb[master]: host/trxcon: split sched_lchan_handlers.c

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6740 host/trxcon: split sched_lchan_handlers.c It would be better to have xCCH, SCH and RACH burst handlers in separate files, because as much code we add to a single file, as harder it becomes to read and understand one. Change-Id:

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: handle L1CTL_DATA_REQ

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6734 host/trxcon/l1ctl.c: handle L1CTL_DATA_REQ Change-Id: Ia72fd3d55c86697ff16bbae94f76839eb5a1 --- M src/host/trxcon/l1ctl.c 1 file changed, 68 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/34/6734/1

[PATCH] osmocom-bb[master]: fake_trx: don't send clock indications to mobile stations

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6742 fake_trx: don't send clock indications to mobile stations Clock indications are only required for BTS, while MS can obtain current frame number from messages on DATA interface. Change-Id: Id2993847a3581cac0d355850ad09ceabc6116d3f --- M

[PATCH] osmocom-bb[master]: host/trxcon/trx_if.c: get rid of CLCK interface

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6741 host/trxcon/trx_if.c: get rid of CLCK interface Local clock counter can be corrected using frame number values, obtained from burst header on DATA interface. Change-Id: I5a813e3dc1b960831343b8ecb80718291f20e80d --- M src/host/trxcon/trx_if.c M

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: add a reference to GSM 05.02

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6738 host/trxcon/scheduler: add a reference to GSM 05.02 Change-Id: I067af9c114bcbc5bd74515d5008e21a07fd0167e --- M src/host/trxcon/sched_lchan_handlers.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: implement xCCH TX capability

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6733 host/trxcon/scheduler: implement xCCH TX capability Change-Id: I4da4816dcecc55eb9b4d2d6c631967026a5e4f68 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_lchan_handlers.c M src/host/trxcon/sched_trx.h 3 files changed, 95 insertions(+),

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: handle L1CTL_DM_{EST, REL}_REQ

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6732 host/trxcon/l1ctl.c: handle L1CTL_DM_{EST,REL}_REQ Change-Id: Ifdf229a6dd3c73ede313d2bfe384032e3887cc3a --- M src/host/trxcon/l1ctl.c M src/host/trxcon/sched_trx.c M src/host/trxcon/sched_trx.h M src/host/trxcon/trx_if.h 4 files changed, 144

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: fix incomplete msg in l1ctl_tx_fbsb_conf()

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6728 host/trxcon/l1ctl.c: fix incomplete msg in l1ctl_tx_fbsb_conf() Previously, all L1CTL_FBSB_CONF messages were sent without required l1ctl_info_dl header, what caused unpredictable behavior on higher layers (L2 & L3). Let's fix it. Change-Id:

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: notify transceiver about TS state

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6726 host/trxcon/scheduler: notify transceiver about TS state Change-Id: I5783066e7c1b01e4ebb28d10b03f3290ff8a0f37 --- M src/host/trxcon/sched_trx.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: fake_trx/ctrl_cmd.py: print response to stdout

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6721 fake_trx/ctrl_cmd.py: print response to stdout Change-Id: Icdbb1802b81eddf42786fafcf96200a60db3cc24 --- M src/target/fake_trx/ctrl_cmd.py 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: implement FBSB expire timer

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6730 host/trxcon/l1ctl.c: implement FBSB expire timer Change-Id: I27f96cbe951de164fcecaf19f8305db5e5b20229 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl_link.h 2 files changed, 48 insertions(+), 0 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: fix TS index in sched_trx_configure_ts()

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6731 host/trxcon/scheduler: fix TS index in sched_trx_configure_ts() TS index was not assigned after allocation of a new one. Change-Id: I1b62218f863acf27fb1d1f46b273b345b97d33d8 --- M src/host/trxcon/sched_trx.c 1 file changed, 3 insertions(+), 0

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: handle L1CTL_PM_REQ correctly

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6724 host/trxcon/l1ctl.c: handle L1CTL_PM_REQ correctly Change-Id: Ib5a2198f21e747b6169ef141817ef22b241ef9fa --- M src/host/trxcon/l1ctl.c 1 file changed, 3 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: fix L1CTL_RACH_{REQ, CONF} handling

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6729 host/trxcon/l1ctl.c: fix L1CTL_RACH_{REQ,CONF} handling Previously, L1CTL_RACH_REQ / L1CTL_RACH_CONF messages were handled without l1ctl_info_ul / l1ctl_info_dl header, what caused incorrect data parsing. Change-Id:

[PATCH] osmocom-bb[master]: host/trxcon/trx_if.c: add power measurement command

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6719 host/trxcon/trx_if.c: add power measurement command Change-Id: Ib947b60248cafad4edeb7e49c2bd3a1f81696239 --- M src/host/trxcon/trx_if.c M src/host/trxcon/trx_if.h 2 files changed, 68 insertions(+), 0 deletions(-) git pull

[PATCH] osmocom-bb[master]: fake_trx: implement simple freq. filter

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6727 fake_trx: implement simple freq. filter Change-Id: Ifbeaebeaf68a88c07a05b672502f503ab7b890f2 --- M src/target/fake_trx/burst_fwd.py M src/target/fake_trx/ctrl_if_bb.py M src/target/fake_trx/ctrl_if_bts.py M src/target/fake_trx/fake_trx.py 4 files

[PATCH] osmocom-bb[master]: fake_trx: handle SETSLOT command from BB

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6725 fake_trx: handle SETSLOT command from BB Change-Id: I152486377ecd6777dbae7024e5d12cfdbcb17628 --- M src/target/fake_trx/burst_fwd.py M src/target/fake_trx/ctrl_if_bb.py M src/target/fake_trx/fake_trx.py 3 files changed, 28 insertions(+), 2 deletions(-)

[PATCH] osmocom-bb[master]: fake_trx: implement power measurement emulation

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6723 fake_trx: implement power measurement emulation This change introduces a new class named FakePM, which is intended to generate pseudo-random power levels for base stations and noise levels inactive frequencies. Also, there is a new command in BB CTRL,

[PATCH] osmocom-bb[master]: fake_trx/ctrl_if.py: allow adding custom params to response

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6722 fake_trx/ctrl_if.py: allow adding custom params to response Change-Id: I551bb425c25a5c978801d9e1e033b4ba352e259f --- M src/target/fake_trx/ctrl_if.py 1 file changed, 11 insertions(+), 2 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon/scheduler: confirm successful RACH requests

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6717 host/trxcon/scheduler: confirm successful RACH requests Change-Id: I079ecebbeeb3843288118fbb55fa520af22859bb --- M src/host/trxcon/sched_lchan_handlers.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull

[PATCH] osmocom-bb[master]: host/trxcon/trx_if.c: simplify response matching

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6718 host/trxcon/trx_if.c: simplify response matching Previously, we had both length and string matching of request and response. To be able to implement commands with additional params in the future, this change drops the length matching part. Change-Id:

[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: handle L1CTL_RACH_REQ

2018-02-22 Thread Harald Welte
Review at https://gerrit.osmocom.org/6716 host/trxcon/l1ctl.c: handle L1CTL_RACH_REQ Change-Id: I4c06bcf987120c6271b6e2ad94454fa69689a03e --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl.h 2 files changed, 65 insertions(+), 0 deletions(-) git pull

<    1   2   3   4   >