osmocom-bb.git
8 years agogsmmap: Dump SYSTEM INFORMATION messages while processing master
Andreas Eversberg [Sun, 31 Jul 2011 08:48:46 +0000 (10:48 +0200)]
gsmmap: Dump SYSTEM INFORMATION messages while processing

8 years agoFixed broken gsmmap.
Andreas Eversberg [Sun, 31 Jul 2011 08:46:36 +0000 (10:46 +0200)]
Fixed broken gsmmap.

8 years agoMerge commit '1a99df84e12315c63f2e96a2972864e4c311712d'
Sylvain Munaut [Sat, 30 Jul 2011 19:35:37 +0000 (21:35 +0200)]
Merge commit '1a99df84e12315c63f2e96a2972864e4c311712d'

8 years agogsm/gsm48_ie: Fix frequency list decoding
Andreas.Eversberg [Sat, 30 Jul 2011 18:27:40 +0000 (20:27 +0200)]
gsm/gsm48_ie: Fix frequency list decoding

Fix-by: Andreas.Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofix off-by-one error in OSMO_NUM_DLIB
Harald Welte [Fri, 29 Jul 2011 13:12:41 +0000 (15:12 +0200)]
fix off-by-one error in OSMO_NUM_DLIB

This bug was introduced in 95f7eb288c4b8b69d61fa8d68957fb21f09e11e5 and
it caused a segfault on 'write terminal'

8 years agouse the 'L' prefix in debug names (DLINP instead of DINP)
Harald Welte [Fri, 29 Jul 2011 09:43:39 +0000 (11:43 +0200)]
use the 'L' prefix in debug names (DLINP instead of DINP)

8 years agolayer23: Add mobile support for sending / receiving voice frame through MNCC
Andreas.Eversberg [Thu, 28 Jul 2011 18:54:42 +0000 (20:54 +0200)]
layer23: Add mobile support for sending / receiving voice frame through MNCC

Support GSM FR codec only so far.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/prim_tch: Add support for sending frame from l23 (TRAFFIC_REQ/CONF)
Sylvain Munaut [Sun, 24 Apr 2011 11:03:37 +0000 (13:03 +0200)]
fw/prim_tch: Add support for sending frame from l23 (TRAFFIC_REQ/CONF)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/prim_tch: Add support for sending traffic frames to l23 (TRAFFIC_IND)
Sylvain Munaut [Sun, 24 Apr 2011 10:13:45 +0000 (12:13 +0200)]
fw/prim_tch: Add support for sending traffic frames to l23 (TRAFFIC_IND)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/layer1/l23_api: Add processing of the new audio_mode
Sylvain Munaut [Sat, 25 Jun 2011 23:06:17 +0000 (01:06 +0200)]
fw/layer1/l23_api: Add processing of the new audio_mode

This currently just stores it into the l1 sync state struct

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agol23/l1ctl: Add default values for audio_mode
Sylvain Munaut [Sun, 17 Jul 2011 11:27:38 +0000 (13:27 +0200)]
l23/l1ctl: Add default values for audio_mode

Theses value should simulate the old behavior

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agol1ctl: Add definitions for the audio_mode configuration
Sylvain Munaut [Sun, 24 Apr 2011 14:18:09 +0000 (16:18 +0200)]
l1ctl: Add definitions for the audio_mode configuration

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/l1: Add a queue for traffic frame to send to network (TRAFFIC_REQ)
Sylvain Munaut [Sun, 24 Apr 2011 09:20:48 +0000 (11:20 +0200)]
fw/l1: Add a queue for traffic frame to send to network (TRAFFIC_REQ)

Also hard limit to maximum 4 pending frames (should not happen !), the
upstream is supposed to do its own flow control.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agol1ctl: Add definition for TRAFFIC_{REQ,CONF,IND}
Sylvain Munaut [Sun, 24 Apr 2011 08:56:25 +0000 (10:56 +0200)]
l1ctl: Add definition for TRAFFIC_{REQ,CONF,IND}

Also adapt packet creation length in L1

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agolayer23: Adapt to new logging API: fix calls to log_init
Andreas.Eversberg [Thu, 28 Jul 2011 19:28:41 +0000 (21:28 +0200)]
layer23: Adapt to new logging API: fix calls to log_init

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agoMerge commit '430be849945688ae107b079db1e216329b1a1f06'
Andreas.Eversberg [Thu, 28 Jul 2011 19:02:38 +0000 (21:02 +0200)]
Merge commit '430be849945688ae107b079db1e216329b1a1f06'

8 years agoadd definition of OSMO_MIN macro, similar to OSMO_MAX
Harald Welte [Wed, 27 Jul 2011 20:23:11 +0000 (22:23 +0200)]
add definition of OSMO_MIN macro, similar to OSMO_MAX

8 years agosms: Fix style issues with the code, add spaces after keywords
Holger Hans Peter Freyther [Sun, 24 Jul 2011 18:17:00 +0000 (20:17 +0200)]
sms: Fix style issues with the code, add spaces after keywords

8 years agosms: SMS where cropped (from VTY), concatenation of SMS where not possible
Dennis Wehrle [Sun, 24 Jul 2011 18:14:13 +0000 (20:14 +0200)]
sms: SMS where cropped (from VTY), concatenation of SMS where not possible

Additionally it wasn't possible to send concatenated sms from the vty.
To send multiple sms, it is necessary to use padding bits and add a user_data_header.
Therefore the gsm_7bit_encode function was splitted to gsm_7bit_encode and gsm_septets2octets.
gsm_septets2octets: this is the old gsm_7bit_encode function + additional padding parameter

Additionally the gsm_7bit_decode function was modified to take account for the user_data_header.
With the new gsm_get_octet_len function you can get the octet length for a given septet length.

I also added several sms tests.

8 years agovty: Increase the number of arguments one can have in VTY commands
Holger Hans Peter Freyther [Sun, 24 Jul 2011 17:58:06 +0000 (19:58 +0200)]
vty: Increase the number of arguments one can have in VTY commands

For some interactive commands (e.g. sending a SMS in OpenBSC) we
are using the "NAME." arg definition. For the usecase of sending SMS
it is not enough to only allow about 13 spaces. Increase the limit.

Original patch is coming from Dennis Wehrle.

8 years agodon't call a function argoment 'class' for the benefit of c++ users
Harald Welte [Sat, 23 Jul 2011 08:49:51 +0000 (10:49 +0200)]
don't call a function argoment 'class' for the benefit of c++ users

This had broken lcr compilation...

8 years agoipaccess: Reserve an extensions for an external SMSC connection
Holger Hans Peter Freyther [Sat, 23 Jul 2011 07:59:24 +0000 (09:59 +0200)]
ipaccess: Reserve an extensions for an external SMSC connection

This could be used to submit SMS to OpenBSC and to get informed
about new SMS coming from OpenBSC.

8 years agoremove DLRSL and DLNM, we don't need them
Harald Welte [Thu, 21 Jul 2011 14:57:57 +0000 (16:57 +0200)]
remove DLRSL and DLNM, we don't need them

They are not used anywhere in our libraries, so they should be defined
by the respective applications

8 years agomake sure we don't have namespace clashes between libraries and apps
Harald Welte [Tue, 19 Jul 2011 12:31:44 +0000 (14:31 +0200)]
make sure we don't have namespace clashes between libraries and apps

* All loging prefixes in libraries should be DL like DLINP
* All signals / subsystems should be called S_L_* SS_L_*
* All command nodes should be called L_*_NODE

This makes sure existinc code still compiles as expected

8 years agomkae the new 'void *dst' member part of a union with the trx pointer
Harald Welte [Mon, 18 Jul 2011 14:59:27 +0000 (16:59 +0200)]
mkae the new 'void *dst' member part of a union with the trx pointer

this ensures struct msgb is the same size as before, which will ensure
binary compatibility

8 years agovty: reserve nodes for libosmo-abis
Pablo Neira Ayuso [Thu, 7 Jul 2011 17:46:50 +0000 (19:46 +0200)]
vty: reserve nodes for libosmo-abis

This patch reserves E1INP_NODE and IPA_NODE for libosmo-abis
VTY interfaces.

8 years agomsgb: add ->dst attribute to store routing information
Pablo Neira Ayuso [Thu, 7 Jul 2011 17:46:44 +0000 (19:46 +0200)]
msgb: add ->dst attribute to store routing information

This patch adds a new attribute to msgb objects. This new
attribute will store a pointer to the routing information,
in the case of the A-bis link, this will be used to store
e1inp_sign_link instead of struct gsm_bts_trx.

This deprecates msg->trx, that can be removed once all
application are ported to use msg->dst.

8 years agologging: add libosmo-abis logging subsystems
Pablo Neira Ayuso [Thu, 7 Jul 2011 17:46:38 +0000 (19:46 +0200)]
logging: add libosmo-abis logging subsystems

This adds the libosmo-abis logging subsystems to libosmocore,
it uses the new change that harald proposed based on negative
numbers for library logging subsystems.

8 years agosignal: reserve signal subsystems >= INT_MAX/2 for libraries
Pablo Neira Ayuso [Thu, 7 Jul 2011 17:46:34 +0000 (19:46 +0200)]
signal: reserve signal subsystems >= INT_MAX/2 for libraries

The first range (from 0 to INT_MAX/2) of signal subsystems can be
used by client applications while the second range (from INT_MAX)
is reserved for libraries.

This is useful to support signals defined in libraries that
may be used by different client applications.

8 years ago[mobile] Added missing curly braces, as proposed by Harald
Andreas Eversberg [Sun, 17 Jul 2011 10:23:59 +0000 (12:23 +0200)]
[mobile] Added missing curly braces, as proposed by Harald

8 years ago[layer23] Added special return value for invalid MCC/MNC input
Andreas Eversberg [Sun, 26 Jun 2011 08:53:28 +0000 (10:53 +0200)]
[layer23] Added special return value for invalid MCC/MNC input

This way an MNC of 000 can be entered.

8 years agomisc: Put git-version-gen into the tarball
Holger Hans Peter Freyther [Sun, 17 Jul 2011 10:13:31 +0000 (12:13 +0200)]
misc: Put git-version-gen into the tarball

autoreconf does not work on released tarballs due the
missing git-version-gen. Add it.

8 years ago[layer23] Correctly report to restart mobile instance after band change
Andreas Eversberg [Sun, 12 Jun 2011 19:39:24 +0000 (21:39 +0200)]
[layer23] Correctly report to restart mobile instance after band change

Mobile instance must be restarted (shutdown / no shutdown) in order to
apply changes to the available ARFCNs.

8 years ago[layer23] Fixes and improvements of system information decoding
Andreas Eversberg [Mon, 13 Jun 2011 06:15:26 +0000 (08:15 +0200)]
[layer23] Fixes and improvements of system information decoding

8 years agofw/apps: Remove manual gain control with keyboard
Sylvain Munaut [Sun, 17 Jul 2011 10:05:07 +0000 (12:05 +0200)]
fw/apps: Remove manual gain control with keyboard

 - It's broken by the use of compute_gain
 - Since there is now an AGC loop, manually setting the register
   as no effect.

If someone needs manual gain control for testing, he'll have to
re-implement a proper AGC override.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years ago[layer23/mobile] Improvement and fixes of idle mode process
Andreas Eversberg [Sun, 17 Jul 2011 09:12:15 +0000 (11:12 +0200)]
[layer23/mobile] Improvement and fixes of idle mode process

This patch introduces cell re-relection. When camping on a cell, it
scanns neighbour cells. If a 'better' cell is found, the cell is selected.
If the cell is in a different location area, a location upating is
performed under certain conditions.

The 'better' cell depends on various informations that are broadcasted on
the BCCH of a neihbour cell and of course the RX level. Most operators
don't set these informations, so the 'better' cell depend on a better
RX level for the same location area, or a much better RX level (6 dBm)
at a different location area.

There were many issues at the idle mode process that has been fixed.
Expecially when moving, the state machines got stuck, so no more cell search
was possible, or no further calls / location updating was possible.

In order to see the process of cell selection, enter the VTY interface and
enable the network monitor:

enable
monitor network 1  (where '1' is the instance of the MS)

In order to see the current state of the processes, enter:

show ms

8 years ago[mobile] Corrected output value of PCS power class
Andreas Eversberg [Sun, 17 Jul 2011 08:58:21 +0000 (10:58 +0200)]
[mobile] Corrected output value of PCS power class

8 years ago[mobile] Adding option to hide most default values in config
Andreas Eversberg [Sun, 17 Jul 2011 08:52:05 +0000 (10:52 +0200)]
[mobile] Adding option to hide most default values in config

In order to shrink config output, a new config option "[no] hide-default"
is added. The config is now easier to read, but does not show all available
options, if they are set to default. Newcommers may want to see all
available options in config. Therefore all options are show by default.

To hide default options, enter:

configure terminal
hide-default
end

8 years ago[mobile] Adding PCS band to list of maximum ARFCNs to scan in one band
Andreas Eversberg [Sun, 17 Jul 2011 08:23:35 +0000 (10:23 +0200)]
[mobile] Adding PCS band to list of maximum ARFCNs to scan in one band

8 years ago[mobile] Adding security warning, if default IMEI is not changed
Andreas Eversberg [Sun, 17 Jul 2011 08:18:46 +0000 (10:18 +0200)]
[mobile] Adding security warning, if default IMEI is not changed

8 years ago[layer23] Adding "neighbour cell" logging category: DNB
Andreas Eversberg [Sun, 12 Jun 2011 20:39:47 +0000 (22:39 +0200)]
[layer23] Adding "neighbour cell" logging category: DNB

8 years ago[layer23] Detach SIM, if reading fails
Andreas Eversberg [Sun, 26 Jun 2011 08:40:56 +0000 (10:40 +0200)]
[layer23] Detach SIM, if reading fails

This way the mobility management and cell selection process continues as
if no SIM has been inserted.

8 years ago[layer1] Adding neighbour cell measurement code to layer1.
Andreas Eversberg [Sun, 17 Jul 2011 07:41:19 +0000 (09:41 +0200)]
[layer1] Adding neighbour cell measurement code to layer1.

When listening to BCCH, layer1 may measure the power level of neighbour
cells. A list of neighbour cell frequencies need to be sent to layer1.
After the measurement is done, the results are indicated to layer23.

8 years ago[layer23] Adding neighbour cell measurement to L1CTL interface.
Andreas Eversberg [Sun, 17 Jul 2011 07:36:49 +0000 (09:36 +0200)]
[layer23] Adding neighbour cell measurement to L1CTL interface.

8 years ago[rf] Adding rffe_set_gain() and rffe_get_gain() to get/set computed gain
Andreas Eversberg [Sun, 17 Jul 2011 07:27:35 +0000 (09:27 +0200)]
[rf] Adding rffe_set_gain() and rffe_get_gain() to get/set computed gain

rffe_compute_gain() is the new name for rffe_set_gain(). I needed to change
this, to solve the name collision with the rffe_set_gain() function, which
actually sets the absolute gain.

rffe_get_gain() will now read the absolute gain which has been computed by
rffe_compute_gain() or set by rffe_set_gain().

8 years ago[layer23] Fixed handling of channel 0 in certain loops
Andreas Eversberg [Sun, 17 Jul 2011 07:09:32 +0000 (09:09 +0200)]
[layer23] Fixed handling of channel 0 in certain loops

The ARFC counts from 1 to 1023, and then to 0. The index of these loops
count from 1 to 1024. The index 1024 stands for ARFCN 0.

This also reverses commit eb77945e162ae1968242009372e448b7af51ea50.

8 years agotpu_window: Fix int16_t overflow in tpu_window calculation
Harald Welte [Sat, 16 Jul 2011 16:01:48 +0000 (18:01 +0200)]
tpu_window: Fix int16_t overflow in tpu_window calculation

First we add 55500 to an int16_t, then later we subtract it again.
The bug only didn't become apparent as we wrap twice, once adding
then subtracting.

Discovered by Smatch:
firmware/layer1/tpu_window.c +127 l1s_rx_win_ctrl(24) warn: value 55000 can't fit into 32767 'stop'

8 years agocalypso/uart.c: Fix array bounds checking
Harald Welte [Sat, 16 Jul 2011 15:48:20 +0000 (17:48 +0200)]
calypso/uart.c: Fix array bounds checking

Found by Smatch:
calypso/uart.c +433 uart_baudrate(7) error: buffer overflow 'divider' 7 <= 7

8 years agocalypso/irq: Fix array bounds checking
Harald Welte [Sat, 16 Jul 2011 15:46:54 +0000 (17:46 +0200)]
calypso/irq: Fix array bounds checking

Found by Smatch:
calypso/irq.c +200 irq_register_handler(5) error: buffer overflow 'irq_handlers' 32 <= 32

8 years agosettings.h: IMSI is 15 bytes +1 \0 maximum
Harald Welte [Sat, 16 Jul 2011 15:41:02 +0000 (17:41 +0200)]
settings.h: IMSI is 15 bytes +1 \0 maximum

If we use a larger field to store the IMSI, we can create overflows when
copying the imsi to other structures that are only 16 bytes in size.

Detected by Smatch:
src/host/layer23/src/mobile/subscriber.c +195 gsm_subscr_testcard(39) error: strcpy() 'set->test_imsi' too large for 'subscr->imsi' (20 vs 16)

8 years agosysinfo.h: ARFCN can be 0..1024, so we need an array of 1025 entries
Harald Welte [Sat, 16 Jul 2011 15:38:19 +0000 (17:38 +0200)]
sysinfo.h: ARFCN can be 0..1024, so we need an array of 1025 entries

Detected by Smatch:
src/host/layer23/src/mobile/gsm48_rr.c +1658 gsm48_new_sysinfo(23) warn: buffer overflow 's->freq' 1024 <= 1024

8 years agogsm48_rr: Don't overflow array boundary
Harald Welte [Sat, 16 Jul 2011 15:37:34 +0000 (17:37 +0200)]
gsm48_rr: Don't overflow array boundary

Detected by Smatch:
src/host/layer23/src/mobile/gsm48_rr.c +3021 gsm48_rr_render_ma(89) warn: buffer overflow 'cd->freq_seq_lv' 10 <= 10
src/host/layer23/src/mobile/gsm48_rr.c +3023 gsm48_rr_render_ma(91) error: buffer overflow 'cd->freq_seq_lv' 10 <= 10

8 years agoosmocon: if we ignore a return value, we don't need to assign it to a variable
Harald Welte [Sat, 16 Jul 2011 15:34:07 +0000 (17:34 +0200)]
osmocon: if we ignore a return value, we don't need to assign it to a variable

8 years agogsm 04.80: fix typo (256, not 265!)
Harald Welte [Sat, 16 Jul 2011 13:42:46 +0000 (15:42 +0200)]
gsm 04.80: fix typo (256, not 265!)

This was introduced by me in commit
79599ba0eb7a9aeaeb9dfbbf4881f0633724a471

Thanks to Alexander Huemer for detecting it

8 years agoosmocon: get rid of some Smash warnings
Harald Welte [Sat, 16 Jul 2011 12:52:18 +0000 (14:52 +0200)]
osmocon: get rid of some Smash warnings

8 years agogsm 04.80: ussd_request.text can contain 0xff, needs to be unsigned
Harald Welte [Sat, 16 Jul 2011 11:28:59 +0000 (13:28 +0200)]
gsm 04.80: ussd_request.text can contain 0xff, needs to be unsigned

Found by Smatch

8 years agolapdm: fix memory leak due to unreachable code
Harald Welte [Sat, 16 Jul 2011 10:21:55 +0000 (12:21 +0200)]
lapdm: fix memory leak due to unreachable code

detected by Smatch

8 years agogsm 08.08: use ANSI function definition with (void)
Harald Welte [Sat, 16 Jul 2011 10:13:00 +0000 (12:13 +0200)]
gsm 08.08: use ANSI function definition with (void)

8 years agotlv: Make tlv parser arrays 256 entries wide to prevent overflow on 0xff
Harald Welte [Sat, 16 Jul 2011 10:05:49 +0000 (12:05 +0200)]
tlv: Make tlv parser arrays 256 entries wide to prevent overflow on 0xff

If we encounter a tag with 0xFF, we overflow our existing tlv_parse
array definitions.

Warning: this breaks ABI

8 years agogprs_cipher_core: Fix potential buffer overflows
Harald Welte [Sat, 16 Jul 2011 10:03:13 +0000 (12:03 +0200)]
gprs_cipher_core: Fix potential buffer overflows

detected by Smatch

8 years agotelnet_interface: if we don't check for the return value, don't use ret
Harald Welte [Sat, 16 Jul 2011 10:01:52 +0000 (12:01 +0200)]
telnet_interface: if we don't check for the return value, don't use ret

8 years agotelnet_interface: get rid of 'const' warning
Harald Welte [Sat, 16 Jul 2011 09:59:44 +0000 (11:59 +0200)]
telnet_interface: get rid of 'const' warning

8 years agoget rid of non-ANSI function declarations missing (void)
Harald Welte [Sat, 16 Jul 2011 09:58:09 +0000 (11:58 +0200)]
get rid of non-ANSI function declarations missing (void)

Detected by Smatch

8 years agodon't use signed bit-fields
Harald Welte [Sat, 16 Jul 2011 09:57:53 +0000 (11:57 +0200)]
don't use signed bit-fields

detected by Smatch

8 years agotimer: use (void) for functions that take no arguments
Harald Welte [Sat, 16 Jul 2011 08:15:16 +0000 (10:15 +0200)]
timer: use (void) for functions that take no arguments

This has been detected by http://smatch.sourceforge.net/

8 years agoRevert various debian related changes
Holger Hans Peter Freyther [Sat, 16 Jul 2011 09:08:59 +0000 (11:08 +0200)]
Revert various debian related changes

The debian related changes were not meant to be comitted and
were local experiments. The changes should go through Jan and
not this way.

Revert "more changes"
This reverts commit 96ba20cb44e602abb292b53c9e4f92aa59998df1.

Revert "debian: Updates to fix lintian errors"
This reverts commit b670c86edd704d45b572b87111f3224abecc4767.

Revert "debian: Switch to the 3.0(quilt) format to play with launchpad"
This reverts commit 7a91d6071d1ef15e5a05f5feb7f79a06c279c673.

Revert "debian: Add new changelog entry for the shlib:Depends change"
This reverts commit 54b8c4e0edb2f0f0cde7d28c1715810dd5c6a4b1.

Revert "debian: dpkg-buildpackage complains about this here"
This reverts commit 4284307ead92f35e844e452c0ff9c73a61038096.

Revert "debian: Add a new changelog entry"
This reverts commit ae9b220d166dac277a9b9078add20650415d1cb2.

8 years agomisc: Fix crash in cell_log due missing l1_prim_cb
Holger Hans Peter Freyther [Sat, 16 Jul 2011 07:33:35 +0000 (09:33 +0200)]
misc: Fix crash in cell_log due missing l1_prim_cb

Commit 3538c38835b9120d7cf062fa533f7657768bf0d3 introduced the
l1_prim_cb but the init of the misc apps were not updated, make
it us the generic callback that should restore the previous behavior

8 years agoosmo_hexdump: Fix segfault when input is too long.
Holger Hans Peter Freyther [Fri, 15 Jul 2011 14:07:23 +0000 (16:07 +0200)]
osmo_hexdump: Fix segfault when input is too long.

In snprinftf the size is a size_t (unsigned) in case we want
to write more than we have available, len_remain will be < 0.

This was spotted while removing hexdump from simtrace and comparing
it to our implementation.

int snprintf(char *str, size_t size, const char *format, ...);

8 years agomore changes
Holger Hans Peter Freyther [Wed, 13 Jul 2011 18:49:02 +0000 (20:49 +0200)]
more changes

8 years agodebian: Updates to fix lintian errors
Holger Hans Peter Freyther [Wed, 13 Jul 2011 15:22:57 +0000 (17:22 +0200)]
debian: Updates to fix lintian errors

8 years agodebian: Switch to the 3.0(quilt) format to play with launchpad
Holger Hans Peter Freyther [Wed, 13 Jul 2011 15:16:29 +0000 (17:16 +0200)]
debian: Switch to the 3.0(quilt) format to play with launchpad

8 years agodebian: Add new changelog entry for the shlib:Depends change
Holger Hans Peter Freyther [Wed, 13 Jul 2011 13:08:45 +0000 (15:08 +0200)]
debian: Add new changelog entry for the shlib:Depends change

8 years agodebian: dpkg-buildpackage complains about this here
Holger Hans Peter Freyther [Wed, 13 Jul 2011 12:08:18 +0000 (14:08 +0200)]
debian: dpkg-buildpackage complains about this here

8 years agodebian: Add a new changelog entry
Holger Hans Peter Freyther [Wed, 13 Jul 2011 11:53:23 +0000 (13:53 +0200)]
debian: Add a new changelog entry

8 years agoGSM 08.08: Fix generation of CIPHER MODE REJECT
Harald Welte [Mon, 11 Jul 2011 22:02:09 +0000 (00:02 +0200)]
GSM 08.08: Fix generation of CIPHER MODE REJECT

The message has a total length of 4 octets, so don't allocate only 3 in the
msgb.

8 years agogsm 08.08: add value_strings and gsm0808_msg_name() function
Harald Welte [Mon, 11 Jul 2011 15:43:19 +0000 (17:43 +0200)]
gsm 08.08: add value_strings and gsm0808_msg_name() function

8 years agofix against corrupted output in parallel logging
Harald Welte [Sat, 2 Jul 2011 19:51:32 +0000 (21:51 +0200)]
fix against corrupted output in parallel logging

In 825607672215b7a12ea6e201a89cd5209f6d657f it was attempted to fix
a bug previously introduced by logging related changes.  The problem
is that a va_list can be corrupted after it has been used once, so
we need to va_copy before each successive use.

And if we copy it, we also need to use the copy, and not the original ;)

8 years agolapdm: make sure we flush all queues whenever entering IDLE state
Harald Welte [Wed, 29 Jun 2011 17:22:47 +0000 (19:22 +0200)]
lapdm: make sure we flush all queues whenever entering IDLE state

this fixes a memory leak where the final UA would always remain
in memory after a LAPDm entity has been disconnected.

8 years agoadd msgb_set_talloc_ctx() to set the talloc context for msgb allocations
Harald Welte [Wed, 29 Jun 2011 16:46:10 +0000 (18:46 +0200)]
add msgb_set_talloc_ctx() to set the talloc context for msgb allocations

8 years agomake sure abis_nm <-> osmocom pchan type conversion always works
Harald Welte [Wed, 29 Jun 2011 16:44:06 +0000 (18:44 +0200)]
make sure abis_nm <-> osmocom pchan type conversion always works

8 years agoLAPDm: Uplink SACCH frames use format B, not format B4
Harald Welte [Wed, 29 Jun 2011 10:13:51 +0000 (12:13 +0200)]
LAPDm: Uplink SACCH frames use format B, not format B4

8 years agoLAPDm: When Rx DATA from L1, L1 does not know the SAPI
Harald Welte [Mon, 27 Jun 2011 21:32:14 +0000 (23:32 +0200)]
LAPDm: When Rx DATA from L1, L1 does not know the SAPI

We have to determine the SAPI ourselves inside the LAPDm header.

8 years agoFix the generation of the log_categories string + LAPDM
Harald Welte [Mon, 27 Jun 2011 12:19:16 +0000 (14:19 +0200)]
Fix the generation of the log_categories string + LAPDM

... I should do more testing :(

Conflicts:

src/logging.c

8 years agologging: make sure to add the internal categories, as intended
Harald Welte [Mon, 27 Jun 2011 12:00:03 +0000 (14:00 +0200)]
logging: make sure to add the internal categories, as intended

8 years agoadd LAPDm code from osmocom-bb into libosmocore
Harald Welte [Mon, 27 Jun 2011 08:51:37 +0000 (10:51 +0200)]
add LAPDm code from osmocom-bb into libosmocore

8 years agologging: introduce library-internal logging categories
Harald Welte [Mon, 27 Jun 2011 08:29:17 +0000 (10:29 +0200)]
logging: introduce library-internal logging categories

We do this by using a trick: library-internal log categories use
negative subsystem numbers, which are converted into positive
array indexes at the time of logging.

library-internal log categories need to be knwo at compile-time,
while application-specified categories now are of unlimited number,
as they are dynamically allocated.

8 years agolapdm: fix use-after-free
Harald Welte [Mon, 27 Jun 2011 06:40:53 +0000 (08:40 +0200)]
lapdm: fix use-after-free

We cannot msgb_free() the msgb and then later reference msg->l2h!

8 years agoimport gsm0502_calc_paging_group() from openbsc
Harald Welte [Sun, 26 Jun 2011 12:47:16 +0000 (14:47 +0200)]
import gsm0502_calc_paging_group() from openbsc

8 years agoadd some utility functions for paging related calculation (TS 05.02)
Harald Welte [Sun, 26 Jun 2011 12:33:57 +0000 (14:33 +0200)]
add some utility functions for paging related calculation (TS 05.02)

8 years agoadd gsm48_number_of_paging_subchannels() function
Harald Welte [Sun, 26 Jun 2011 12:20:04 +0000 (14:20 +0200)]
add gsm48_number_of_paging_subchannels() function

(from openbsc's rsl_number_of_paging_subchannels)

8 years agoadd MAX() macro as OSMO_MAX
Harald Welte [Sun, 26 Jun 2011 12:19:54 +0000 (14:19 +0200)]
add MAX() macro as OSMO_MAX

8 years agomerge process.[ch] with application.[ch]
Harald Welte [Sun, 26 Jun 2011 11:07:18 +0000 (13:07 +0200)]
merge process.[ch] with application.[ch]

8 years agoMerge commit '2a68c7c8cd2eca65c58c0898d0e1716e9d4c3ecd'
Sylvain Munaut [Sun, 26 Jun 2011 09:43:51 +0000 (11:43 +0200)]
Merge commit '2a68c7c8cd2eca65c58c0898d0e1716e9d4c3ecd'

8 years agogsm/utils: Adding conversion of "mobile power class" to dBm
Andreas Eversberg [Sun, 26 Jun 2011 09:41:48 +0000 (11:41 +0200)]
gsm/utils: Adding conversion of "mobile power class" to dBm

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/l1a: Add a message to safely count the length of a txqueue
Andreas Eversberg [Sat, 25 Jun 2011 20:46:24 +0000 (22:46 +0200)]
fw/l1a: Add a message to safely count the length of a txqueue

(that is by locking)

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/sercomm: Additional locking needed in drv_pull
Sylvain Munaut [Sat, 25 Jun 2011 20:42:38 +0000 (22:42 +0200)]
fw/sercomm: Additional locking needed in drv_pull

Credits to Andreas Eversberg for finding this bug after countless
hours of debug and providing initial patch :)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/sercomm: Fix up the locking using an 'abstraction' layer
Sylvain Munaut [Sat, 25 Jun 2011 20:38:20 +0000 (22:38 +0200)]
fw/sercomm: Fix up the locking using an 'abstraction' layer

Not _that_ abstract but a long is enough to store a ptr if need
be :p

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/comm/msgb: Protect allocation routine with proper locking
Sylvain Munaut [Sat, 4 Jun 2011 10:24:24 +0000 (12:24 +0200)]
fw/comm/msgb: Protect allocation routine with proper locking

Credits to Andreas Eversberg for finding this bug after countless
hours of debug :)

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/comm/msgb: Really panic (i.e. lockup) if we run out of msgb
Sylvain Munaut [Sat, 4 Jun 2011 10:21:52 +0000 (12:21 +0200)]
fw/comm/msgb: Really panic (i.e. lockup) if we run out of msgb

Ideally we should only panic in interrupt context. In user
context, we could wait ...

We could also return NULL and let the calling code deal with it
but it's not ready for that yet.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
8 years agofw/comm: Remove useless include from msgb.c
Sylvain Munaut [Sat, 4 Jun 2011 10:20:32 +0000 (12:20 +0200)]
fw/comm: Remove useless include from msgb.c

Left over from the backlight debug code

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>