aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
AgeCommit message (Collapse)AuthorFilesLines
2011-08-19src: port openBSC over libosmo-abisopenbsc/0.9.15Pablo Neira Ayuso12-131/+525
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-19src: use new msg->dst pointer instead of deprecated msg->trxPablo Neira Ayuso8-84/+114
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-13bsc: Crash fix for the osmo-nitb/MNCC codeHolger Hans Peter Freyther1-1/+2
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-11libbsc: Log if a channel is freed with lchan->state != LCHAN_S_NONEDaniel Willmann1-0/+4
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-11libbsc: Cosmetic fix for the channel activate NACK log messageDaniel Willmann1-1/+1
2011-08-11libbsc: Release the RF channel if BTS thinks it's still in useDaniel Willmann1-0/+3
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-11libbsc: Call lchan_free in the timeout callbacksDaniel Willmann1-2/+4
This makes sure that the lchans can be used again. (state and type are set to NONE)
2011-08-11libbsc: Only skip lchans with state AND type set to NONE in show lchanJan Luebbe1-1/+1
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-11RSL: add timer for lchan activation/deactivation without BTS responseHarald Welte1-1/+37
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-11E1 Input: Move 'show e1_*' command to e1_input_vty.cHarald Welte1-117/+0
2011-08-10libbsc: Don't free secondary lchan if it is NULL.Daniel Willmann1-1/+5
2011-08-10NOKIA: Resend SABM on unknown TEI from LAPDPablo Neira Ayuso1-1/+8
2011-08-10NOKIA: use 'struct value_string' whenever possibleHarald Welte1-472/+243
2011-08-10NOKIA: use 'value_string' for severity and bts_typeHarald Welte1-48/+31
2011-08-10NOKIA: Move more static variables into 'struct gsm_bts'Harald Welte1-14/+9
2011-08-10NOKIA: move 'conf' and 'bts_type' into 'struct gsm_bts'Harald Welte1-12/+10
This is one step in the direction of supporting multiple Nokia BTS
2011-08-10NOKIA: Some more whitespace changesHarald Welte1-20/+11
2011-08-10Nokia: Coding styleHarald Welte1-1633/+1666
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-10Initial version of Support for Nokia *Site BTSDieter Spaar6-1/+2034
This includes the MetroSite, but also other Nokia BTS models.
2011-07-27BSC VTY: Accept MNC of 0-999, as 0 is a valid MNCDieter Spaar1-1/+1
2011-07-27RSL: Fix erroneous GSM48_IE_CHANDESC_2 in rsl_chan_activate_lchan()Dieter Spaar1-1/+1
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-23fix some header file related issues preventing lcr from compilingHarald Welte1-1/+1
2011-07-19paging: Add method to find the paging data for a given subscriberHolger Hans Peter Freyther1-0/+14
2011-07-19bsc: Call the RF Control interface ctrl all the wayHolger Hans Peter Freyther1-2/+2
We had the rf_ctrl_name and the rf_ctl pointer, make both use the word ctrl.
2011-07-18bts-init: Initialize the BTS like it will look after a resetHolger Hans Peter Freyther1-0/+3
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-16bsc_vty: Fix some Smatch warningsHarald Welte1-4/+7
/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-16abis_nm: fix signedness error (uint8_t len cannot be negative)Harald Welte1-1/+1
Detected by Smatch
2011-06-29properly reset the MO state of all MO on Abis disconnectopenbsc/0.9.14Harald Welte1-7/+1
When we loose the A-bis link, we should properly re-set the administrative, operational and availability state of all MOs
2011-06-27Revert "HACK: disable NM_ATTR for CELL GLOBAL ID for sysmo-bts"Harald Welte1-2/+2
This reverts commit 8b65ab9d9133efe53a058733d492ac0595040fb4, which should never have been committed to master. In fact, it is not even needed anymore with recent osmo-bts code.
2011-06-26move gsm0502_calc_paging_group() to libosmocoreHarald Welte1-17/+0
2011-06-26generalize function for calculation of the paging groupHarald Welte1-7/+10
2011-06-26move gsm 05.02 related calculations into libosmocoreHarald Welte2-25/+3
2011-06-26use new gsm48_number_of_paging_subchannels from libosmocoreHarald Welte2-16/+4
2011-06-25move {ts,lchan}2chan_nr() functions to gsm_data_shared.cHarald Welte2-55/+16
... this way osmo-bts can use them
2011-06-09HACK: disable NM_ATTR for CELL GLOBAL ID for sysmo-btsHarald Welte1-2/+2
Do not commit this to master. It disables a non-standard IE in the BTS attributes.
2011-06-06move objclass2{nmstate,mo,}obj() to gsm_data_shared.c (and prefix)Harald Welte1-158/+4
2011-06-05split gsm_data.c in gsm_data_shared.c and gsm_data.cHarald Welte1-2/+2
This facilitates the use of gsm_data.c from osmo-bts
2011-06-03Introduce per-ts TSCHarald Welte2-3/+21
This allows us to configure a TSC for each timeslot, not just one globally for the entire BTS.
2011-06-03gsm_data_shared: introduce 'struct gsm_abis_mo'Harald Welte6-46/+60
... as a common wrapper around nm_attr and nm_state
2011-05-31abis: Get the structs and values from libosmocoreHolger Hans Peter Freyther1-0/+2
Remove the forward declarations for functions and structs that have been moved to libosmocore.
2011-05-24move some more abis_nm related code into libosmocoreHarald Welte1-19/+0
This syncs openbsc.git with libosmocore.git commit rev 11c7193ad8ceb4f3898799dc44b700b8b93a59b8
2011-05-24Move system information related defines and code to libosmocoreHarald Welte2-110/+11
This brings openbsc in sync with the following libosmocore commit: b5503136fa234690d5493b19a8aee3a4ef74190d
2011-05-23abis_nm: Some more fall-out from the abis_nm move to libosmocoreHarald Welte3-3/+5
we want get_string_value(), not the equivalent of get_value_string()
2011-05-23abis_nm: fix some fallout regarding abis_nm migration to libosmocoreHarald Welte3-5/+5
Thanks to Holger for noticing this.
2011-05-22abis_nm: Move lots of generic definitions + code to libosmocoreHarald Welte1-388/+26
2011-05-22bsc: on-demand setup of nanoBTS and HSL femto socketsPablo Neira Ayuso7-10/+77
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-22bsc: fix bail out in case of problems bootstrapping BTS or E1 inputPablo Neira Ayuso1-4/+6
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-07src: use namespace prefix osmo_* for misc utilsPablo Neira Ayuso6-16/+16
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-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso6-24/+24
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-06src: use namespace prefix osmo_wqueue*Pablo Neira Ayuso1-7/+7
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