aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-02-19HO: cosmetic: handover_decision.c: make process_meas_rep() return voidNeels Hofmeyr1-11/+12
The function's return value is ignored. An upcoming patch will use this as callback function and requires a void return. Change-Id: Id455a8becbb43884e8205d87b0371b216d0119fc
2018-02-19HO: clearly mark conn penalty timer member for hodec2Neels Hofmeyr2-3/+4
The conn's penalty timers will be used only for handover decision 2, make it clear by a sub-struct. hodec2 will also initialize the penalty timer list on demand only, so no need to always initialize. Change-Id: Ie6c2bc2b10dc424dfd94a9e11a9a62f51c48aa10
2018-02-19HO: lchan: store last seen measurement report nr, tweak logNeels Hofmeyr3-2/+5
Handover decision 2 will also store the last seen mr nr for neighbor cell measurements and hence can tell whether a neighbor's measurement is outdated. Change-Id: Ic1148364597f91b5a55666c80c758b61fa56f582
2018-02-19HO: cfg: separate hodec1 from hodec2 parametersNeels Hofmeyr3-124/+303
Do not share config items between the current handover decision and the upcoming handover_decision_2. Rename current handover config items to hodec2_* and duplicate the ones relevant to handover decision algorithm 1 with name prefix of hodec1_*. I considered moving hodec2 parameters to an entirely separate .c file and struct, but that causes considerable code bloat. Rather use the nice handover_cfg net/bts level mechanism as-is, and simply prefix the names. In the VTY, the hodec1 parameters are configurable by 'handover foo 23' commands, while the hodec2 parameters are by 'handover2 foo 23'. The generic VTY commands to enable/disable handover and to choose the algorithm are still 'handover (0|1)' and 'handover algorithm (1|2)'. (Note, a subsequent commit will rename the 'handover foo' for hodec1 to 'handover1 foo' and add backwards-compat aliases.) For example, the 'window rxlev averaging 5' command now exists both for handover decision 1 and handover decision 2, and its values are independent. This is valid config: network # set up handover decision algorithm 1 # (pending rename of these items to 'handover1 ...') handover window rxlev averaging 5 handover window rxlev neighbor averaging 5 # set up handover decision algorithm 2 handover2 window rxlev averaging 7 handover2 window rxlev neighbor averaging 7 handover2 penalty-time max-distance 10 # enable handover handover 1 bts 0 handover algorithm 1 bts 1 handover algorithm 2 In this example, bts 0 uses algo 1 with rxlev averaging of 5, while bts 1 uses algorithm 2 where rxlev averaging of 7 is in effect. Change-Id: I6475b2543b18d21710a6d774b214cb484f36ec8e
2018-02-19chan_compat_with_mode: signalling works over all channel typesHarald Welte1-0/+7
chan_compat_with_mode() currently only considered the requirements of voice/csd services. It failed to realize that GSM48_CMODE_SIGN can also be performed over a SDCCH, resulting in unneeded channel allocation/assignment to TCH type channels, e.g. for SMS. This makes TC_assignment_sign pass. Change-Id: I85ffcbd32ccd2617c897edb3b904f56bacd0684f Closes: OS#2762
2018-02-19bssmap_handle_assignm_req(): Don't print log statemens in malloc failure caseHarald Welte1-4/+1
Change-Id: I85528689b5298a13c60ae80fabd8d66459f730a9
2018-02-19bssmap_handle_assignm_req(): Use more conscise error/log message textsHarald Welte1-3/+3
Change-Id: Iffbdfd7591aaeedf24ff0de5f34093be78e2833a
2018-02-19bssmap_handle_assignm_req(): Use proper cause valuesHarald Welte1-11/+15
The BSSMAP Cause value should give a clear indication of why a given operation failed. Previously we were unconditionally sending GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE even in cases where mandatory IEs were missing or other errors occurred unrelated to resource availability. Closes: OS#2759 Change-Id: I86adcae2950cbea6dcac4551cfde1054cb0abad1
2018-02-19Permit set of multiple different A5 ciphersHarald Welte4-21/+52
So far, the administrator had to pick one particular cipher which would then be used throughout all subscribers/phones. This is a bit impractical, as e.g. not all phones support A5/3. Extend the VTY command syntax in a backwards-compatible way to permit for multiple ciphers. The bit-mask of permitted ciphers from the MSC (sent in ASSIGNMENT COMMAND) is intersected with the vty-configured mask a the BSC. Finally, the best (highest) possible cipher is chosen. Change-Id: I1d1c8131855bcab2392b4f27f6216bdb2fae10e0 Closes: OS#2461
2018-02-19logging: Remove obsolete log categoriesHarald Welte3-90/+1
About half of our log categories/subsystems were inherited from OsmoNITB, and are no longer used but may confuse the user. Change-Id: I8b39429f71c0faefdf8158a82093cfb19f44809e
2018-02-19SIGTRAN: correct wrong log categoryPhilipp Maier1-2/+2
osmo_bsc_sigtran.c uses DRANAP instead of DMSC in two places, this is not correct. - change wrong DRANAP to DMSC Change-Id: I1594d1906cf7d053d00fff52e9dc0ddfd097ed6e
2018-02-19vty: Permit codec-list containing both full-rate and half-rate codecsHarald Welte1-14/+2
Once upon a time, in the old osmo-bsc-sccplite, there was a restriction of not being able to handle configurations with both TCH/F and TCH/H type codecs. This time is long gone, so let's remove this constraint. Change-Id: Iba0822f57c41cedeeb7f069be540f3a851752a23 Closes: OS#2763
2018-02-19Structural reform: Get rid of osmo_bsc_sccp_conHarald Welte14-266/+222
There was always a 1:1 correspondence between gsm_subscriber_connection and osmo_bsc_sccp_con, so there's really no point in having two separate dynamically allocated data structures with pointers back and forth and another linked list around. Let's merge osmo_bsc_sccp_con into gsm_subscriber_connection for simplicity. The resulting code might not be elegant in places, but I've tried to do only the most simple changes in this patch, while further simplifications can be done in later subsequent patches. As a side-effect, this patch also fixes lchan clearing if the MSC (or the local SCCP provider) hard-disconnects the SCCP connection. Change-Id: Idd2b733477ee90d24dec369755a00f1c39c93f39
2018-02-16vty: 'show bts': print neighbor cellsNeels Hofmeyr1-0/+38
Print out the current neighbor cell list, works both for manual and automatically populated modes. Examples of output for various configs: Neighbor Cells: Automatic, ARFCNs: (none) Neighbor Cells: Automatic, ARFCNs: 868 (1) Neighbor Cells: Manual, ARFCNs: 123 125 (2) Neighbor Cells: Manual/separate SI5, ARFCNs: 123 125 (2) SI5: 321 (1) Change-Id: I57dae0e01b81a6f028b39f3edcaf430251ca8fe2
2018-02-16vty: 'show bts': list the TRXs' ARFCNsNeels Hofmeyr1-0/+33
Change-Id: I56ee2edc7473dc5e9f3c3463194369024cd64995
2018-02-16HO: cfg: tweak vty writeNeels Hofmeyr3-4/+17
Have expicitly named vty write functions for bts and net levels, so that it is trivial to add commands that exist only on one of each (like the upcoming congestion check timer config for hodec2). Change-Id: Ibea4c20abc50c3d655f6bbb1a643477dfc722c8e
2018-02-16HO: store speech codec list from BSSMAP Assignment in connNeels Hofmeyr2-3/+15
On BSSMAP Assignment Request received from the MSC, store the Speech Codec List in the subscr conn, so that we may evaluate available codecs during handover decision. (Will be used, e.g., by handover_decision_2.) Change-Id: I8222d73085eb777696e365c94214c05d56e6d129
2018-02-16HO: move penalty timers to own file as proper APINeels Hofmeyr6-18/+171
Separate penalty timers API from specific struct members and move to own .h/.c file, so that future code may re-use the API arbitrarily. Change-Id: Ife975a1c7c17a500b1693be620475a8bea72f86f
2018-02-16HO: logging: more logs, and more concise loggingNeels Hofmeyr2-15/+41
Explicitly log "Handover" or "Assignment", add more info to existing log statements and add more log statements. Log ho failure both on RR and HO log categories: RR receives the HO failure message, while the HO failure is an important event to note when watching the HO category. Change-Id: Ia3999755cdd4e0c2861582b20e2dbb7e1538e074
2018-02-16HO: bsc_handover_start_lchan_change(): set MS to max power on handoverNeels Hofmeyr1-2/+9
For re-assignment within the same cell, keep the same MS power. But for handover to another cell, start off with that cell's configured maximum MS power. Change-Id: Ia91766d8bb8f543f514726ce9508b7747bb2bcb5
2018-02-16HO: always do async handoverNeels Hofmeyr1-4/+2
We're really only interested in async handover so far. Set ho->async to true always. Change-Id: I48715864d4b953987c86d93fe1b3a5456f0c4e0f
2018-02-16HO: cosmetic: bsc_handover_start_lchan_change(): tweak local varsNeels Hofmeyr1-3/+11
To keep this cosmetic change apart from subsequent functional changes: have a local do_assigment flag and a local network pointer. Change-Id: I09684dcf2a00e3d930e058cc1c925ad6e59b1468
2018-02-16HO: add new_lchan_type arg to bsc_handover_start()Neels Hofmeyr4-13/+16
Upcoming handover_decision_2 will want to be able to handover to a differing TCH type, hence add a parameter to bsc_handover_start(); adjust current callers to pass the old lchan type. Tweak the 'bts' argument to 'new_bts'. Change-Id: I4478ebcaada00897cc38c5a299e07661139ed3c5
2018-02-16HO: cosmetic: bsc_handover_start(): "fix" memcpy for AMR configNeels Hofmeyr1-2/+2
memcpy obviously needs the byte size, not the ARRAY_SIZE. For the uint8_t arrays, these are incidentally the same number, but semantically it should be sizeof. Change-Id: I97b6ac05192ad477b246a23ce00c5c91abfd938a
2018-02-16HO: process_meas_rep: guard against modulo zeroNeels Hofmeyr1-0/+3
Fixes: CID#182318 Change-Id: I3ad9d01cbffa287adce55b3569667b58a2d3556b
2018-02-16handover_logic.c: on HO command, send new lchan's MS powerNeels Hofmeyr1-1/+1
Change-Id: I90eda8405f2d2eddfb041ca38b34fe30c397e09d
2018-02-16handover_logic.c: always do inter-cell channel activationNeels Hofmeyr1-3/+1
In commit [1], the channel activation kind was modified out-of-context to use Immediate Assignment in case of intra-cell re-assignment. This so far hasn't worked out in tests, so instead stay with the strategy to use RSL_ACT_INTER_ASYNC also for re-assignment within the same cell. We may move to RSL_ACT_INTRA_IMM_ASS in a separate patch after proper testing. [1]: 5eaa4fb821751b70ad2b864d8765ff96bd301996, I2d91765c1f9719c64fd99426a872cecc724215db "HO: add indicators for inter-cell and async ho, use for chan act type", Note that so far, no re-assignment within cells is triggered by the current handover decision algorithm, so the effect will be really noticeable with handover decision 2 that is coming up. See feature OS#2949 which asks for implementing actual RR Assignment to handover within a cell. Related: OS#2949 Change-Id: Ia3d979094fa16620f1acc5933418797829710ba8
2018-02-15bts chan_load: ignore unusable BTSNeels Hofmeyr1-0/+5
For unconnected BTS, the channel load would report a "bogus channel load sample" every second (on RLL debug). Instead, skip unusable BTS. This follows up on commit 6cee893a0f2c4e53155a2631aff12a5f615b973d / I57e38f6d6ba3b23cc6e1f9520b90261dbb1f1cec 'Make "waiting indicator" of IMMEDIATE ASSIGN REJECT dynamic.' Change-Id: I627fe10e1f5c1f2f23745c906320871024b5c8c3
2018-02-15vty: 'show bts': fix indentingNeels Hofmeyr1-19/+19
Add two-space indent to many items. Change-Id: I34e3c8928871fc41b9551ab0502a42140ccbdda8
2018-02-15vty: 'show bts': write '(none)' if none are found.Neels Hofmeyr1-0/+4
Change-Id: I77039824b85a14b9d7bdfe6d2f717679b6886915
2018-02-14gsm_network: drop unused subscr_epxire_timerNeels Hofmeyr1-3/+0
Change-Id: I2e34ffb35e244472f8bfc993facc8d6e130f10d9
2018-02-14drop unused common.hNeels Hofmeyr3-8/+0
Change-Id: I7cf4076d7e36ae71d88e70a86d5c2d0640c1146f
2018-02-14drop libcommon-cs completelyNeels Hofmeyr26-114/+2
Change-Id: I07d4a48af3154ee4d904686f230a51b8b8a94ff9
2018-02-14common_cs.h: mv gsm_encr to gsm_data.hNeels Hofmeyr2-8/+8
This leaves common_cs.h practically empty. Leave its removal to the next patch, which removes libcommon-cs entirely (I07d4a48af3154ee4d904686f230a51b8b8a94ff9). Change-Id: Ic3233f03580aa8c0ab178dfd33e68ecab5b9f042
2018-02-14libcommon-cs: move vty bits to libbsc/bsc_vty.cNeels Hofmeyr3-209/+197
The gsm_network VTY was partly shared between libmsc and libbsc in the old openbsc.git; now osmo-bsc.git has its own copy, so merge all of it into bsc_vty.c. This leaves common_cs_vty.c practically empty; leave removal of the file to later, when we drop the entire libcommon-cs in I07d4a48af3154ee4d904686f230a51b8b8a94ff9. Note that gsmnet_from_vty() is also already declared in bsc/vty.h. Change-Id: I6f3a596f31762b48afed39a85a343c400826300f
2018-02-14libcommon_cs: move gsm48 bits to libbscNeels Hofmeyr6-63/+65
These functions were originally shared between libmsc and libbsc in the old openbsc.git; now osmo-bsc.git has its own copies, so move them into libbsc. Change-Id: Ie411c2ce8008accee54782a442d6361e50777a54
2018-02-14gsm_network: drop unused trans_listNeels Hofmeyr2-7/+0
Change-Id: I7910ce8098d5431e41409bf09429ae4221efb360
2018-02-14libcommon-cs: move gsm_network_init() into bsc_network_init()Neels Hofmeyr3-38/+15
Some part of the network init was common between libbsc and libmsc in the old openbsc.git repository. Now osmo-bsc.git is independent with its own copy of the gsm_network initialization. So move it over to libbsc. Change-Id: I8968787a5f0b078619264f0cb42349a9bc7943af
2018-02-14libcommon-cs: move a_reset.c into libbscNeels Hofmeyr3-1/+1
a_reset.c was originally used by both libmsc and libbsc in the old openbsc.git repository. Now osmo-msc.git has its own copy, and the idea of sharing libcommon-cs is no longer applicable. Move it to libbsc where it belongs. Change-Id: I30e4b5dab9c6d761d20a3a0e5b9ec2d65e64ebc5
2018-02-14drop libcommon completely, move remaining files to libbscNeels Hofmeyr19-43/+3
Move gsm_data.c and handover_cfg.c to libbsc, where they belong. This leaves libcommon utterly empty, drop it. Change-Id: I6178061fa30c7e1a4c22c29d3c8f508b1033569f
2018-02-14libcommon: join gsm_data_shared.* into gsm_data.*Neels Hofmeyr10-1794/+1736
The separation of gsm_data_shared.* from gsm_data.* historically allowed compiling parts of it into osmo-bts, which we have dropped since (osmo-bts has its own copy now). Even though gsm_data.* now becomes rather large by it, remove the legacy separation to get rid of the "shared" naming, which is no longer meaningful. A future patch might separate into meaningful smaller bits, if we get the time. Change-Id: Ie247bc492efb331871d970c56700595ad3f7e201
2018-02-14ipaccess-proxy: don't redefine tall_bsc_ctxNeels Hofmeyr1-2/+1
Curiously, ipaccess-proxy.c is able to define its own tall_bsc_ctx even though the same should already be linked from gsm_data.c. Declare it extern instead and hence use the one from gsm_data.c. A linking error actually occured as soon as I joined gsm_data_shared.c into gsm_data.c, which is how my attention was drawn to this. I assume that linking didn't necessarily pull in gsm_data.c before and a separate tall_bsc_ctx was permitted. As soon as the next commit merges those files (Ie247bc492efb331871d970c56700595ad3f7e201), it becomes impossible to define a second tall_bsc_ctx in ipaccess-proxy.c. Change-Id: I9c9c8540419876696e65a690717144d497d60fb2
2018-02-14libcommon: eliminate talloc_ctx.cNeels Hofmeyr9-56/+24
Interestingly enough, talloc_ctx_init() actually had not a single caller. While dropping it, see to it that the few contexts that are actually used in osmo-bsc.git are indeed initialized in all the main scopes. Also initialize two void* ctxts as NULL explicitly, to allocate under the NULL context in case some main scope forgets to branch it off another root context. (That's bsc, fle and paging, all others actually come in from other libraries.) Change-Id: I344a3d07e146999e154824837ed95db2b9879356
2018-02-14libcommon: eliminate socket.cNeels Hofmeyr7-158/+37
Replace calls to make_sock() with osmo_sock_init_ofd(). Shame on me for not testing every single one in practice, I hope for peer review to confirm that this should be correct... Read closely please! The IPPROTO_GRE define seems to be unused (at least in osmo-bsc.git), drop it completely. Change-Id: Ia6e4e0e1eed3328fa25b3b90be376d532ad0e56b
2018-02-14libcommon: eliminate debug.cNeels Hofmeyr17-243/+373
Provide concise log categories for each main scope. Move the complete log categories 1:1 to osmo_bsc_main.c. In bsc_nat.c, omit obviously unused log categories. In tests, omit almost all log categories, except for those explicitly tested as the expected output. Note: should any logging occur for a log category that is omitted by accident, such will end up being logged as DLGLOBAL, so it will show up and we can fix it, and it will not get lost silently. Change-Id: Ib524e49ec211662e0dfde8161495a72aa8ad76cf
2018-02-14libcommon: eliminate common_vty.cNeels Hofmeyr5-157/+129
Move bsc_vty_go_parent() to osmo_bsc_main.c and bsc_nat.c, and drop those nodes that aren't used in the respective main scope. Change-Id: I22ebb76742e9c5ab9dd608ac089a5c558aceeb36
2018-02-14libcommon: eliminate bsc_version.cNeels Hofmeyr3-33/+7
Move the copyright string into osmo_bsc_main.c. No other users of it exist. Change-Id: I7f48924f484e4e4b98be4ca8bee253e6ea9c0576
2018-02-14osmo-bsc: Add talloc context introspection via VTYHarald Welte2-0/+2
This requires libosmocore with Change-Id I43fc42880b22294d83c565ae600ac65e4f38b30d or later. Change-Id: I1245b6818eb54f5c0c8adddcd3a01ecc7363fb42
2018-02-13Make RSL connection attempts time out.Stefan Sperling4-8/+44
If a BTS/TRX does not respond to the "IPA RSL Connect" command, pretend that the BTS has sent a NACK for the connection. To ensure that osmo_timer_del(&trx->rsl_connection_timeout) is not called before this timer is initialized with osmo_timer_setup(), the E1 layer now drops incoming RSL messages from a BTS/TRX in LOCKED administrative state. We cancel the timeout if we receive an RSL Connect ACK or NACK from the BTS, and if the underlying E1 link does down. While here, add a missing message buffer free() in bts_isdn_sign_link(). The callers do not free it. Change-Id: Ia72b65a0f15f47dcb8a6f944f6c3695a4a64b923 Related: OS#2716
2018-02-06abis_rsl: do not allow SACCH in MF mode on SAPI=0Philipp Maier1-0/+15
osmo-msc does currently not check if an MS attemts to establish an SACCH link on SAPI=0. This combination is not permitted and should be dropped. - Make sure that establish indication for SAPI=0 and channel-type=SACCH is not permitted See also TTCN3 Testcase: BSC_Tests.TC_rll_est_ind_inval_sacch Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Closes: OS#2750