Commit Graph

32 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 8d380dcadd bsc_api: Change submit dtap to allow to automatically use the SACH
For SAPI=3 on a TCH it might be nice to use the SACH to submit
the message. The api allows to automatically use the SACH if
a message like this is submitted.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther 2603c1f545 bsc_api: Clarify the parameters of the assignment command 2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther 4be7d41a50 bsc_api: Implement sending the cipher mode method
This will set the encryption algorithm, key and then
send the RR Cipher Mode message to the MS. The method
is also verifying the input.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther 2f169d64dd bsc_api: Make the cipher_mode take the 'include imei sv' argument
The cipher mode command should enable encryption and send the
right RR message to the other side.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther 45b575fd94 bsc_api: The rr_cause is optional, pass it as a pointer 2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther 46caa3048d bsc_api: Provide the link_id in the dtap callback. 2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther b094171c9f bsc_api: Add needed parameters to the assignment complete callback
Provide the chosen channel and more information in the assignment
complete method.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther 6c199e7d99 bsc_api: Look into the msg and call the right API functions
For certain messages we will need to call other GSM0808 functions. To
keep the bsc_hack working we will try to send this through the normal
messages first and then fallback to dtap if no handler is registered.

The gsm_04_08.c code is not forced to handle the IPA activation
and channel modify ack anymore. This is done transparently by the
BSC API now.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther 05c68841a8 bsc_api: Fix a use after free error in the Clear Request path
The implementation of bsc_hack would call subscr_con_free before
the BSC API has had the chance to call gsm0808_clear to try to
release other channels. Fix that by adding a return value.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther 85531cc60d misc: Once again go from "On Waves" to "On-Waves"..
Try to get the company name of our sponsor right...
2010-10-06 20:38:36 +08:00
Holger Hans Peter Freyther adb6e1cce1 janitor: Move the * to the variable name 2010-09-18 06:44:24 +08:00
Holger Hans Peter Freyther 1f69b4653b bsc: Fix the clear to release resources first, then set to NULL
This is fixing a crash reported by Nico. Somehow I staged an
unfinished version of this code. The crash should be gone.
2010-09-16 22:50:19 +08:00
Holger Hans Peter Freyther aaa40b8688 bsc_api: Do not free the subscriber conn on clear and clear request
Do not free the GSM Subscriber Connection when a channel is failing
or if a clear is requested, instead just give up _all_ the channels,
reset them to NULL and free the remaining channels.
2010-09-16 20:53:04 +08:00
Holger Hans Peter Freyther 79f763fe91 bsc: Keep all active subscriber connections in a list. 2010-09-16 02:16:02 +08:00
Holger Hans Peter Freyther a2aedad005 bsc: Move the subscriber_con code into the bsc_api 2010-09-16 02:16:01 +08:00
Holger Hans Peter Freyther dbc62db8db bsc_api: Add stub for the cipher mode command. 2010-07-23 17:15:15 +08:00
Holger Hans Peter Freyther c354de8f94 bsc_api: Create dummy stub for the assignment command. 2010-07-23 17:15:15 +08:00
Holger Hans Peter Freyther 49ab278b6f bsc_api: Only forward L3 messages when the channel is active
Avoid forwarding messages from a channel that is already being
closed. Harald has forwarded a crash report where this was failing.
2010-07-05 11:38:37 +08:00
Holger Hans Peter Freyther f2553a6c3a handover: Call bsc_handover_clear from gsm0808_clear
The bsc_handover_clear will release an in-progress handover
and free the lchana and the data associated with this handover
2010-06-30 13:02:08 +08:00
Holger Hans Peter Freyther d06516557a bsc_api: Avoid use after free kind of error on the lchan. 2010-06-30 12:17:35 +08:00
Holger Hans Peter Freyther 4049455d74 bsc_msc: Remove use_count from the subscriber connection
A channel will be released in case of
    * Errors via the clear_request callback...
    * no more transactions and operations are going on.

This means that if we do something without a transaction
the channel might be closed down right away. The bug fix
will be to create a transaction/operation.
2010-06-28 18:01:47 +08:00
Holger Hans Peter Freyther 2412a07965 bsc_api: Allocate the subscriber_connection dynamically
This is a big change to the way we use the subscriber
connection. From now on it is is dynamically allocated
and we will slowly move from a 1:1 lchan to conn to
having more than one lchan per connection.

This is the first commit, the subscr_con* methods will
move to gsm_data once the use_count is removed from the
connection, the freeing of the connection will also change.
2010-06-28 16:12:39 +08:00
Holger Hans Peter Freyther 94d625bfa0 Revert "bsc_api: Move debug context for subscriber into the bsc_api.c"
This is breaking the filtering for the Measurement Report case, revert
the patch for now.

This reverts commit 69e8f8285b.
2010-06-28 13:38:19 +08:00
Holger Hans Peter Freyther 69e8f8285b bsc_api: Move debug context for subscriber into the bsc_api.c 2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther f6d0e06940 bsc_api: Set the l3h header from within the dtap method
This is fixing USSD which broke when the code was
switched to use the BSC API.
2010-06-17 17:48:13 +08:00
Holger Hans Peter Freyther 9764331062 bsc_api: Move gsm48_rcvmsg into the BSC API and dispatch.
The next step in the way to the BSC API. We have a clear a
new connection was opened signal now... and the MSC could
use it...
2010-06-17 16:41:25 +08:00
Holger Hans Peter Freyther 77008464be bsc_api: Move BSC API between MSC and RSL code...
The lowlevel BSC paging API is a simple wrapper around
the RSL command. The BTS will automatically repeat these
messages but if we end up with two MSC inputs we will
need to count these messages somewhere...
2010-06-16 15:42:40 +08:00
Holger Hans Peter Freyther 9c595b7474 bsc_api: Implement transparent RLL establishment and SAPI n REJECT
When submitting a DTAP message, the BSC API will attempt to
establish the RLL layer and then send the message or send an
SAPI n REJECT. This will be used by the SMS code.
2010-06-15 12:04:34 +08:00
Holger Hans Peter Freyther 0cfbe26cb9 bsc_api: Add newline to the end of the file. 2010-06-15 12:04:34 +08:00
Holger Hans Peter Freyther abcddf1152 bsc_api: Add init, dispatch the clear request when a channel is going missing 2010-06-14 18:26:09 +08:00
Holger Hans Peter Freyther 2a9285c028 bsc_api: Move some parts over to the BSC API. 2010-06-14 18:26:09 +08:00
Holger Hans Peter Freyther ec32b5860e bsc: Start creating 08.08 like API
The 08.08 API will interface with the internal BSC code and it is
the boundary between MSC and BSC. So nothing that calls the BSC
functionality should know about lchan or such.
2010-03-25 09:07:28 +01:00