Commit Graph

187 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther c8ddf73c8f bts_ipaccess_nanobts.c: Remove unused variable.
This must have been obsoleted by the move to libosmo-abis.

GCC warning:
bts_ipaccess_nanobts.c: In function ‘ipaccess_drop_oml’:
bts_ipaccess_nanobts.c:509:21: warning: variable ‘line’ set but not used [-Wunused-but-set-variable]
2012-02-03 20:31:05 +01:00
Holger Hans Peter Freyther 863dc9bc84 abis_rsl.c: Remove unused variable net.
The old BSC code had code to override the payload type, this has
been removed, remove the variable accessing it.

GCC warning:
abis_rsl.c: In function ‘ipa_rtp_pt_for_lchan’:
abis_rsl.c:1590:22: warning: unused variable ‘net’ [-Wunused-variable]
2012-02-03 20:29:00 +01:00
Holger Hans Peter Freyther 54fa2c7eab abis_rsl: The rach information was not used, introduce a signal
Introduce a SS_CCCH for the paging and the rach load. The paging
code could now start using the signal.

GCC warning:
abis_rsl.c: In function ‘rsl_rx_ccch_load’:
abis_rsl.c:1371:11: warning: variable ‘rach_access_count’ set but not used [-Wunused-but-set-variable]
abis_rsl.c:1370:11: warning: variable ‘rach_busy_count’ set but not used [-Wunused-but-set-variable]
abis_rsl.c:1369:11: warning: variable ‘rach_slot_count’ set but not used [-Wunused-but-set-variable]
2012-02-03 20:26:25 +01:00
Holger Hans Peter Freyther c6d0a17100 abis_rsl.c: Remove unused variable ts_number
GCC warning:
abis_rsl.c: In function ‘rsl_rx_chan_rqd’:
abis_rsl.c:1245:10: warning: variable ‘ts_number’ set but not used [-Wunused-but-set-variable]
2012-02-03 20:10:13 +01:00
Holger Hans Peter Freyther 06b04f851b abis_om2000.c: Remove unused variable to_trx_oml.
GCC warning:
abis_om2000.c: In function ‘abis_om2k_sendmsg’:
abis_om2000.c:804:6: warning: unused variable ‘to_trx_oml’ [-Wunused-variable]
2012-02-03 20:03:06 +01:00
Holger Hans Peter Freyther 37e6523c0f vty: Remove two unimplemented OML functions
attribute get|set <0-255> (.HEX) was never implemented and the
output about the unused attributes clutter the build output, remove
them.

GCC warning:
abis_nm_vty.c: In function ‘oml_attrib_get’:
abis_nm_vty.c:141:25: warning: unused variable ‘oms’ [-Wunused-variable]
abis_nm_vty.c: In function ‘oml_attrib_set’:
abis_nm_vty.c:152:25: warning: unused variable ‘oms’ [-Wunused-variable]
2012-02-03 20:03:02 +01:00
Holger Hans Peter Freyther dae5307a57 misc: abis_nm.c Use the result of ret.
Use LOGP(DNM, LOGL_ERROR, ...); for errors in the
abis_nm_rx_sw_act_req method.

GCC warning:
abis_nm.c: In function ‘abis_nm_rx_sw_act_req’:
abis_nm.c:412:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
2012-02-03 20:03:00 +01:00
Harald Welte 1fe73a19cd ARFCNs are in the range of 0..1023, not 0..1024
I'm sure I read somewhere that it actually was 0..1024, as I kept
wondering how stupid it was to use 10bit+1.  However, that source
was incorrect, as GSM TS 05.05 quite clearly states 0..1023
2012-01-29 13:24:12 +01:00
Harald Welte cf149eebb6 Move the bulk of RR processing from MSC into BSC
RR Messages like STATUS, GPRS SUSPEND, HANDOVER COMPLETE/FAIL, ...
should be processed on the BSC side of things, not on the MSC side.

This is among other things required in preparation of intra-BSC
hand-over support in osmo-bsc.
2012-01-23 16:40:24 +01:00
Harald Welte 95e862cab4 Move processing of CLASSMARK CHANGE behind bsc_api
This prevents osmo-bsc from sending RR messages to the MSC and rather
process them inside the BSC and turn them into BSSAP CM UPDATE.
2012-01-23 10:28:35 +01:00
Holger Hans Peter Freyther f95f2733e6 lchan: Close a possible still open RTP Socket
In case of a reset (loss of the BTS) close down all remaining
RTP Proxy sockets. In case of a lchan_free shout if the rtp
proxy is still open. I would prefer if the proxy code sits inside
the gsm subscriber connection.
2012-01-17 15:30:24 +01:00
Holger Hans Peter Freyther 1d7f7c8ca8 ho: Remove rtp_proxy.h include, no proxy code in here 2012-01-17 15:27:13 +01:00
Holger Hans Peter Freyther 794e8f2649 abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflags
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the
LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same
time as we only build .a archives.
2012-01-15 17:52:02 +01:00
Holger Hans Peter Freyther c0a6674614 channel: Review lchan_free calls and the state the channel is in
In case of a memory allocation failure in rsl_rx_chan_rqd we would
have left the channel in the LCHAN_S_ACT_REQ state. Move the state
change below the allocation.
2012-01-15 00:28:15 +01:00
Holger Hans Peter Freyther dfcfe65f24 lchan: Rename release_reason to release_mode
Use the name of GSM 08.58 for the release mode.
2012-01-15 00:03:19 +01:00
Holger Hans Peter Freyther bbf2139fdc channel: The error timer and the lchan_deact_tmr are both running
In case a BTS does not send the RF Channel Release ACK and we are
closing the channel because of an error two timers are running to
set the state back to none.

Make lchan_deact_tmr_cb and rsl_rx_rf_chan_rel_ack behave the same
in regard to changing the state of the lchan. For the other direction
we are save, the error path will set the state to NONE and the timeout
will call lchan_free to set the channel type back to NONE, only then
the lchan may be allocated again.

The channel release procedure requires some more tweaking, some part
was started in the zecke/28c3 branch and needs to be tested/integrated
with the goal of having one common release path.
2012-01-15 00:02:54 +01:00
Holger Hans Peter Freyther c55f0a5415 Revert "libbsc: Log if a channel is freed with lchan->state != LCHAN_S_NONE"
In case of a failed channel we still want the channel to not be
re-allocated right away but keep it closed/unused for (T3109 + T311).

rsl_rx_rf_chan_rel_ack has a check to not set the channel to S_NONE in
case the channel is in the error state. Add the camp Harald added a timer
to set the channel back to the none state in case the RF Channel Release
is not acked.

This reverts commit fc462dd59e.
2012-01-15 00:02:54 +01:00
Holger Hans Peter Freyther 7173f63eed bsc: Fix "show lchan" for partially provided information
show lchan should be capable of showing all allocated lchans,
all of a given bts, a given trx, a given ts. This feature was
broken when I added the ability to show a more simple summary.

Restore the initial behavior by splitting out the for loops
for the bts/trx/ts and check if we have parsed all parameters
and then call and return the subroutine.
2012-01-15 00:02:54 +01:00
Holger Hans Peter Freyther 40aac3f7f6 bsc: Assume assignment_complete/assignment_fail is set
The osmo-nitb application sometimes crashes because the BSC API
is doing an assignment underneath which is not handled by the code,
add dumy handlers to not crash, the right thing to do is to change
MNCC to have an assignment that can succeed/fail.

The keyword to look for is MNCC_LCHAN_MODIFY and mncc_sock should
wait for an ack/nack but right now the call just continues.
2011-12-27 12:55:44 +01:00
Andreas Eversberg 3365cd1cfe RSL: Nokia BTS reports TA in quarter-bits, not full bits.
We need to compensate accordingly...
2011-12-24 11:49:05 +01:00
Andreas Eversberg 2957de9228 RSL: BS-11 reports TA in quarter-bits, not full bits.
We need to compensate accordingly...
2011-12-16 17:45:37 +01:00
Gus Bourg 1c5dd2c9bb Add NITZ (timezone) support as part of MM INFO
The UTC offset from the operating system will be used by default to
calculate the NITZ in MM INFO.  However,  a "timezone" vty command is
added at the BTS level, allowing BTS-specific overrides, e.g. in case
BTSs are distributed accross multiple timezones.
2011-12-02 10:18:17 +01:00
Sylvain Munaut 63ef215e15 bsc_vty: Fix usage of deprecated osmo_osmo_hexdump_nospc
The typo was fixed upstream

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 23:05:48 +01:00
Andreas.Eversberg bb5c594e15 nokia: Use a longer T200 because RSL link can be pretty slow after a reset
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-02 23:11:19 +01:00
Sylvain Munaut 2192ed8d61 libbsc/nokia_site: Increase reset timer to 15 seconds
Also make sure to specify seconds in the 'seconds' field. Doing
otherwise is an abuse that non longer works with the new timer infra.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-18 21:51:03 +02:00
Sylvain Munaut c951946691 libbsc/nokia_site: Fix reset procedure and add option to skip it.
do_reset was not initialized anywhere anymore, so the reset was never
triggered. It's now fixed and we add an option to skip it in the
config so that when in production, you can restart without config
changes quickly.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-18 21:51:02 +02:00
Sylvain Munaut 67c0c7f8aa libbsc/nanobts: Fix NSVC OML init sequence for some rugby models
The NVC never goes to OFF LINE but only to DEPENDENCY (because of
missing attributes).

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-17 13:57:58 +02:00
Sylvain Munaut 851f1206a8 libbsc: Don't include ext_info in SI13 if not in EGPRS mode
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-17 13:56:02 +02:00
Holger Hans Peter Freyther df82b72375 bsc: Drop the BTS instead of exiting the application
When the BTS reboots it might not want to accept our BTS Attr,
do not leave the bsc_msc_ip/bsc_nitb but simply drop the BTS
connection.

Manually cherry-picked from: 54e6c8b3400b376ed36fe84f28f7930d2d9ff24b
2011-10-12 08:30:22 +02:00
Holger Hans Peter Freyther 08542564fe vty: Document more VTY parameters of a command
The below is used to identify commands that need proper documentation

diff --git a/src/vty/command.c b/src/vty/command.c
index ab1eaca..bcf72d0 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -426,6 +426,20 @@ void install_element(enum node_type ntype, struct cmd_element *cmd)

        cmd->strvec = cmd_make_descvec(cmd->string, cmd->doc);
        cmd->cmdsize = cmd_cmdsize(cmd->strvec);
+
+       printf("NODE: %d\n", ntype);
+
+       int j;
+       for (j = 0; j < vector_count(cmd->strvec); ++j) {
+               vector descvec = vector_slot(cmd->strvec, j);
+               int i;
+               for (i = 0; i < vector_active(descvec); i++) {
+                       struct desc *desc = vector_slot(descvec, i);
+                       if (desc == NULL)
+                               continue;
+                       printf(" %s %s\n", desc->cmd, desc->str);
+               }
+       }
 }
2011-10-12 08:30:14 +02:00
Andreas Eversberg d271a350b4 Undo my changes to bts_siemens_bs11.c it works as it was. 2011-09-29 01:33:10 +02:00
Andreas Eversberg c57e6eda9b All 3 E1-BTS should now work with dahdi and misdn_lapd driver. 2011-09-29 01:33:10 +02:00
Harald Welte 15eae8dcaf Fix Ericsson RBS2000 support after libosmo-abis merge
The libosmo-abis merge broke Ericsson RBS support, as it didn't get the
part right where the per-TRX OML sign_link is determined while
transmitting OM2000 messages.

As a result of this fix, we can remove the 'to_trx_oml' parameter to
_abis_nm_sendmsg(), which is a nice cleanup.
2011-09-26 23:44:49 +02:00
Harald Welte b70bd52c2a bsc_api: Add some more comments to the code 2011-09-13 00:02:09 +01:00
Alexander Huemer e1d2e1c74c fix some "implicit declaration" warnings in libbsc 2011-09-06 09:32:14 +02:00
Dieter Spaar 6b353778c4 bsc_api: Make sure to use correct MS Power on ASSIGNMENT CMD
When gsm48_send_rr_ass_cmd() is being called to send the ASSIGNMENT
COMMAND, we need to use the propwer lchan->ms_power setting, not
some fixed magic "0x3" number.

Without this patch, every MS would transmit at a very high output power
fullowing an assignment command - more than what was set in the config
file with "ms max power"
2011-09-03 14:11:24 +02:00
Holger Hans Peter Freyther cab0d7bedc bsc: Fix a crash in case we get a NACK from the BTS for a new channel
In case of a nack the secondary_lchan will be NULLed but then the T10
timeout will attempt to release the channel and we will try to release
a NULL pointer.

Daniel witnessed this crash at the camp and added the NULL check at:
28d9ccbca0, it is also the proper fix
given the _NAK handling.
2011-08-30 19:13:22 +02:00
Harald Welte b4d913d336 BTS support: nokia/ericcson - use e1inp_ts->lapd
the lapd member has moved from the .driver.dahdi.lapd to the more
generic lapd location inside 'struct e1inp_ts'
2011-08-26 19:14:55 +02:00
Harald Welte f7a2b19771 Revert "we don't have openbsc/ipaccess.h anymore"
This reverts commit 8697e43bb2.
2011-08-23 16:00:22 +02:00
Holger Hans Peter Freyther 594b322a4e audio: Move the setting of MultiRateConfig to one place
Move it to one place so it is more easy to make changes to
that.
2011-08-22 18:24:07 +02:00
Holger Hans Peter Freyther ed999b29bc audio: From RTP point of view we can use one payload for HR/FR AMR
Remove the separation of half-rate and full-rate AMR. The used rate
can be found inside the AMR payload. The signalling of what kind of
traffic channel is used can be done with the GSM 08.08 Chosen
Channel IE in the Assignment Complete message.

This way I can use a fixed payload type in the MGCP GateWay but
have a mixed TCH/F and TCH/H config. E.g. use TCH/F FR3 for some
subscribers when connected to MSC A but use AMR5.9 on a TCH/F for
MSC B when all TCH/Hs are gone.
2011-08-22 18:23:50 +02:00
Holger Hans Peter Freyther 128892f55f audio: Remove the hardcoding of the RTP Payload
The MGCP config must be correct and use 99 for RTP AMR.
2011-08-22 18:22:44 +02:00
Harald Welte 8697e43bb2 we don't have openbsc/ipaccess.h anymore 2011-08-20 18:10:18 +02:00
Pablo Neira Ayuso ed5cacb240 src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.

The main changes are:

- The directory libabis/ has been removed as it now lives in
  libosmo-abis.

- new configuration file format for nanoBTS and HSL femto, we
  need to define the virtual e1_line and attach it to the OML
  link.

- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
  BS11 and rbs2000) now use the new libosmo-abis framework.

- use r232 input driver available in libosmo-abis for bs11_config.

- use ipa_msg_recv instead of old ipaccess_read_msg function.

- delete definition of gsm_e1_subslot and input_signal_data.
  These structures now lives in libosmo-abis.

Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.

This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:

- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node

This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-19 22:38:35 +02:00
Pablo Neira Ayuso 7abecfcfc9 src: use new msg->dst pointer instead of deprecated msg->trx
This patch modifies openBSC code to use msg->dst which stores the
pointer to the signalling link structure instead of the pointer to
the transceiver structure.

This patch prepares the introduction of libosmo-abis.
2011-08-19 22:38:33 +02:00
Holger Hans Peter Freyther 013ae46ef6 bsc: Crash fix for the osmo-nitb/MNCC code
It is possible that MNCC sends a MNCC_LCHAN_MODIFY and
wants a channel mode that is not possible on the current
lchan, in that case a new channel is assigned. We now crash
as the osmo-nitb is not having an assignment complete handler,
add a NULL check.
2011-08-13 22:53:53 +02:00
Daniel Willmann fc462dd59e libbsc: Log if a channel is freed with lchan->state != LCHAN_S_NONE
I'm not sure if that is an abnormal condition or not, but it seems
that lchan state and type have to be none for the lchan to be
considered idle.
2011-08-11 17:21:24 +02:00
Daniel Willmann 6fc6a12c07 libbsc: Cosmetic fix for the channel activate NACK log message 2011-08-11 17:21:24 +02:00
Daniel Willmann 7ddc318687 libbsc: Release the RF channel if BTS thinks it's still in use
The Nokia metrosite BTS seem to keep the channels open indefinitely.
If osmo-nitb is restarted while one of the channel was still active
and tries to activate that channel again the bts would return a
CHANNEL ACTIVATE NACK with "Radio channel already activated". This
accumulated over the restarts so soon enough no more channels were
available.

This patch sends a release request to the bts so the channel
becomes available again.
2011-08-11 17:21:24 +02:00
Daniel Willmann 513da17732 libbsc: Call lchan_free in the timeout callbacks
This makes sure that the lchans can be used again. (state and type
are set to NONE)
2011-08-11 17:21:24 +02:00
Jan Luebbe 563d99d3c3 libbsc: Only skip lchans with state AND type set to NONE in show lchan
The function lchan_alloc only considers lchans to be available if both
the type and state are NONE. So change show lchan to list all lchans
 that are not considered available.
2011-08-11 17:21:24 +02:00
Harald Welte e8bd9e885d RSL: add timer for lchan activation/deactivation without BTS response
The timer callback will simply reset the lchan state to NONE in order
to prevent channels getting stuck in 'activation requested' or
'deactivation requested' states.
2011-08-11 17:21:23 +02:00
Harald Welte 986926ebde E1 Input: Move 'show e1_*' command to e1_input_vty.c 2011-08-11 12:59:54 +02:00
Daniel Willmann 28d9ccbca0 libbsc: Don't free secondary lchan if it is NULL. 2011-08-10 13:40:39 +02:00
Pablo Neira Ayuso 2962c20f73 NOKIA: Resend SABM on unknown TEI from LAPD 2011-08-10 10:51:02 +02:00
Harald Welte 44d26113bc NOKIA: use 'struct value_string' whenever possible 2011-08-10 10:51:02 +02:00
Harald Welte 3c3003f703 NOKIA: use 'value_string' for severity and bts_type 2011-08-10 10:51:02 +02:00
Harald Welte c8755af8a5 NOKIA: Move more static variables into 'struct gsm_bts' 2011-08-10 10:51:01 +02:00
Harald Welte 9d2f377927 NOKIA: move 'conf' and 'bts_type' into 'struct gsm_bts'
This is one step in the direction of supporting multiple Nokia BTS
2011-08-10 10:51:01 +02:00
Harald Welte cde579473b NOKIA: Some more whitespace changes 2011-08-10 10:51:01 +02:00
Harald Welte bda367c697 Nokia: Coding style
Running the entire bts_nokia_site.c through the 'Lindent' script
to match indent/coding style with remainder of project.

There are still lots of other cleanups pending, but this one is
a purely cosmetic one.
2011-08-10 10:51:01 +02:00
Dieter Spaar 1664602476 Initial version of Support for Nokia *Site BTS
This includes the MetroSite, but also other Nokia BTS models.
2011-08-10 10:51:01 +02:00
Dieter Spaar 402ccedcf4 BSC VTY: Accept MNC of 0-999, as 0 is a valid MNC 2011-07-27 23:43:56 +02:00
Dieter Spaar eabb6e3e4f RSL: Fix erroneous GSM48_IE_CHANDESC_2 in rsl_chan_activate_lchan()
This fixes a bug introduced more than one year ago in commit
e38bd6caa34005816a9336f021fd17d328d5c901:

The RSL_IE_CHAN_IDENT is a TLV, but the GSM48_IE_CHANDESC_2 contained in
it, is a mere TV type IE with fixed length.

The problem specifically has caused problems on Nokia MetroSite BTS,
which apparently read the TSC out of this Layer3 IE.
2011-07-27 23:40:33 +02:00
Harald Welte b226864db5 fix some header file related issues preventing lcr from compiling 2011-07-23 10:53:30 +02:00
Holger Hans Peter Freyther 31f5f71647 paging: Add method to find the paging data for a given subscriber 2011-07-19 20:01:54 +02:00
Holger Hans Peter Freyther 5e3bbba962 bsc: Call the RF Control interface ctrl all the way
We had the rf_ctrl_name and the rf_ctl pointer, make both use
the word ctrl.
2011-07-19 19:53:52 +02:00
Holger Hans Peter Freyther fe1ca353bb bts-init: Initialize the BTS like it will look after a reset
Reset the BTS MO State on BTS bootstrap. This way we will always
test the BTS disconnect/reconnect case of the BTS.

Do not reset the administrative state of objects. The BSC might
have set these and wants to maintain them across disconnect/
reconnect. Right now this is true for the TRX state.
2011-07-18 11:35:56 +02:00
Harald Welte 46324ccfcd bsc_vty: Fix some Smatch warnings
/home/laforge/projects/git/openbsc/openbsc/src/libbsc/bsc_vty.c +1062
show_e1ts(25) warn: variable dereferenced before check 'line'
/home/laforge/projects/git/openbsc/openbsc/src/libbsc/bsc_vty.c +1075
show_e1ts(38) warn: buffer overflow 'line->ts' 32 <= 32
2011-07-16 13:16:39 +02:00
Harald Welte 142c4b8ca8 abis_nm: fix signedness error (uint8_t len cannot be negative)
Detected by Smatch
2011-07-16 13:03:29 +02:00
Harald Welte b7849987e5 properly reset the MO state of all MO on Abis disconnect
When we loose the A-bis link, we should properly re-set the
administrative, operational and availability state of all MOs
2011-06-29 16:49:03 +02:00
Harald Welte e86b3ebf2e Revert "HACK: disable NM_ATTR for CELL GLOBAL ID for sysmo-bts"
This reverts commit 8b65ab9d91, which
should never have been committed to master.  In fact, it is not even
needed anymore with recent osmo-bts code.
2011-06-27 21:15:59 +02:00
Harald Welte c90499bb28 move gsm0502_calc_paging_group() to libosmocore 2011-06-26 14:54:55 +02:00
Harald Welte 1cf43ece12 generalize function for calculation of the paging group 2011-06-26 14:43:46 +02:00
Harald Welte bc82f92a8d move gsm 05.02 related calculations into libosmocore 2011-06-26 14:41:58 +02:00
Harald Welte 457a081379 use new gsm48_number_of_paging_subchannels from libosmocore 2011-06-26 14:21:43 +02:00
Harald Welte f6093a4d0e move {ts,lchan}2chan_nr() functions to gsm_data_shared.c
... this way osmo-bts can use them
2011-06-25 10:02:33 +02:00
Harald Welte 8b65ab9d91 HACK: disable NM_ATTR for CELL GLOBAL ID for sysmo-bts
Do not commit this to master.  It disables a non-standard IE in the BTS
attributes.
2011-06-09 11:03:49 +02:00
Harald Welte 978714d752 move objclass2{nmstate,mo,}obj() to gsm_data_shared.c (and prefix) 2011-06-06 18:31:20 +02:00
Harald Welte 3300c01e82 split gsm_data.c in gsm_data_shared.c and gsm_data.c
This facilitates the use of gsm_data.c from osmo-bts
2011-06-05 13:31:33 +02:00
Harald Welte 135a648ad7 Introduce per-ts TSC
This allows us to configure a TSC for each timeslot, not just one globally for
the entire BTS.
2011-06-03 14:03:27 +02:00
Harald Welte d64c0bca17 gsm_data_shared: introduce 'struct gsm_abis_mo'
... as a common wrapper around nm_attr and nm_state
2011-06-03 14:03:27 +02:00
Holger Hans Peter Freyther f2c1f25612 abis: Get the structs and values from libosmocore
Remove the forward declarations for functions and structs
that have been moved to libosmocore.
2011-05-31 00:37:47 +02:00
Harald Welte 4e4fa4ce9b move some more abis_nm related code into libosmocore
This syncs openbsc.git with libosmocore.git commit rev
11c7193ad8ceb4f3898799dc44b700b8b93a59b8
2011-05-24 17:24:44 +02:00
Harald Welte 80cffaf323 Move system information related defines and code to libosmocore
This brings openbsc in sync with the following libosmocore commit:
b5503136fa234690d5493b19a8aee3a4ef74190d
2011-05-24 15:02:20 +02:00
Harald Welte cdc59ff5cc abis_nm: Some more fall-out from the abis_nm move to libosmocore
we want get_string_value(), not the equivalent of get_value_string()
2011-05-23 20:42:26 +02:00
Harald Welte 867d9f3985 abis_nm: fix some fallout regarding abis_nm migration to libosmocore
Thanks to Holger for noticing this.
2011-05-23 20:30:39 +02:00
Harald Welte 15c6172a8d abis_nm: Move lots of generic definitions + code to libosmocore 2011-05-22 22:45:37 +02:00
Pablo Neira Ayuso 0d2881ad58 bsc: on-demand setup of nanoBTS and HSL femto sockets
The daemons set up nanoBTS and HSL femto sockets by default, ie. the
three sockets to support these two drivers are open even if we have
no BTS of that kind.

This patch enables on-demand socket creation, ie. we only enable them
if we have one BTS at least that requires it.

I added two new attributes to the gsm_bts object, they are:

* the start() function includes the code that we need to run to start
the BTS. This new function contains the socket creation in the
particular case of nanoBTS and HSL femto.

* the started boolean, which is used to know if we have already
started the BTS, ie. we have already invoked start().

Note that, I have splitted the bts_model_*_init() function into two
functions, the _init() functions that register the BTS driver
and the _start() functions that start BTS driver on-demand.

While I was at it, I added several changes/cleanups to this patch:

* Group all bts_model_*_init() calls into one function bts_init(),
which is called in the initialization path of osmo-nitb and
osmo-bsc.

* Add openbsc/bss.h that contains the declaration of
bsc_bootstrap_network, bsc_shutdown_net and bts_init.

* Add missing e1inp_init() in osmo-bsc.

* Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-22 21:03:35 +02:00
Pablo Neira Ayuso 6e52b88a17 bsc: fix bail out in case of problems bootstrapping BTS or E1 input
The error message was missing in case of problems bootstrapping the BTS.
The E1 input driver initialization was displayed in the standard output,
now this error is reported via logs.
2011-05-22 21:02:04 +02:00
Pablo Neira Ayuso c0d17f2266 src: use namespace prefix osmo_* for misc utils
Summary of changes:

s/bcd2char/osmo_bcd2char/g
s/char2bcd/osmo_char2bcd/g
s/hexparse/osmo_hexparse/g
s/hexdump/osmo_hexdump/g
s/hexdump_nospc/osmo_hexdump_nospc/g
s/ubit_dump/osmo_ubit_dump/g
s/static_assert/osmo_static_assert/g
2011-05-07 12:58:59 +02:00
Pablo Neira Ayuso dfb342c19a src: use namespace prefix osmo_counter*
Summary of changes:

s/struct counter/struct osmo_counter/g
s/counter_inc/osmo_counter_inc/g
s/counter_get/osmo_counter_get/g
s/counter_reset/osmo_counter_reset/g
s/counter_alloc/osmo_counter_alloc/g
s/counter_free/osmo_counter_free
2011-05-06 12:14:16 +02:00
Pablo Neira Ayuso e1273b1f3c src: use namespace prefix osmo_wqueue*
Summary of changes:

s/struct write_queue/struct osmo_wqueue/g
s/write_queue_init/osmo_wqueue_init/g
s/write_queue_clear/osmo_wqueue_clear/g
s/write_queue_enqueue/osmo_wqueue_enqueue/g
s/write_queue_bfd_cb/osmo_wqueue_bfd_cb/g
2011-05-06 12:12:49 +02:00
Pablo Neira Ayuso bbc5b99a6b src: use namespace prefix osmo_signal*
Summary of changes:

s/signal_cbfn/osmo_signal_cbfn/g
s/register_signal_handler/osmo_signal_register_handler/g
s/unregister_signal_handler/osmo_signal_unregister_handler/g
s/dispatch_signal/osmo_signal_dispatch/g
2011-05-06 12:12:31 +02:00
Pablo Neira Ayuso 4db9299286 src: use namespace prefix osmo_fd* and osmo_select*
Summary of changes:

s/struct bsc_fd/struct osmo_fd/g
s/bsc_register_fd/osmo_fd_register/g
s/bsc_unregister_fd/osmo_fd_unregister/g
s/bsc_select_main/osmo_select_main/g
2011-05-06 12:11:23 +02:00
Pablo Neira Ayuso bf540cb7c3 src: use namespace prefix osmo_timer* for timer functions
Summary of changes:

s/struct timer_list/struct osmo_timer_list/g
s/bsc_add_timer/osmo_timer_add/g
s/bsc_schedule_timer/osmo_timer_schedule/g
s/bsc_del_timer/osmo_timer_del/g
s/bsc_timer_pending/osmo_timer_pending/g
s/bsc_nearest_timer/osmo_timers_nearest/g
s/bsc_prepare_timers/osmo_timers_prepare/g
s/bsc_update_timers/osmo_timers_update/g
s/bsc_timer_check/osmo_timers_check/g
2011-05-06 12:11:06 +02:00
Holger Hans Peter Freyther 66e14cdda6 paging: Provide the number of pending requests
Address the FIXME and take code from the on-waves/bsc-master
branch. This will count the number of requests.
2011-05-02 19:19:15 +02:00
Holger Hans Peter Freyther 5a081bbb1d paging: Initialize structs internally to avoid a crash
The code to create the struct gsm_bts is in libcommon right now
and we can not call paging_init from there. Right now it appears
to be the easiest of doing the init internally.
2011-05-02 19:19:15 +02:00
Holger Hans Peter Freyther e188010512 bsc: Allow to have a list of MSCs/MUXs to connect to
Be able to configure a list of destinations (duplicates allowed)
that will be tried in a round robin fashion. The change is in
the bsc_msc_connection to operate on a list. We achieve the
round robin nature with the same trick used in the paging code
to delete and append the current entry. The nat code was updated
to compile but one can only configure one destination.
2011-04-26 09:36:19 +02:00
Holger Hans Peter Freyther 5deb6c3c5f abis: Use LOGL_ERROR for the Failure Event Report
It is not an error of the BSC but we will treat a
BTS error like an error of the BSC for now.
2011-04-26 09:33:47 +02:00