summaryrefslogtreecommitdiffstats
path: root/src/gsm/lapdm.c
Commit message (Collapse)AuthorAgeFilesLines
* LAPDm: Allow sending unit data on DCCHAndreas Eversberg2013-07-061-10/+18
| | | | It is used to transfer PHYSICAL INFORMATION message to the MS.
* Fix of potential memory leaks at lapdm.cAndreas Eversberg2013-04-061-4/+17
|
* lapd: Check in rslms_rx_rll() if lapdm context was initialized earlierDaniel Willmann2012-12-261-2/+18
| | | | | | | | | | | | | | | | | | This was found while implementing handover on a sysmobts. When we receive a channel release request for a channel that was never really activated (set_lapdm_context() was not called) we segfault in lapd_recv_dlsap(). We now return early with -EINVAL in rslms_rx_rll() if we receive a message that assumes set_lapdm_context() was already called. These are: * RSL_MT_UNIT_DATA_REQ * RSL_MT_DATA_REQ * RSL_MT_SUSP_REQ * RSL_MT_REL_REQ A test case was added to trigger the issue.
* LAPDm: Ensure there is no payload in DISC framesHarald Welte2012-04-261-1/+6
| | | | | | When we send DISC frames (especially generated from RSL), we don't want any remaining bytes from the RSL message showing up as bogus DISC payload.
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* lapdm: fix RSL message format in RLL ERROR INDICATIONHarald Welte2012-04-051-1/+0
| | | | | | In rsl_rll_error() we don't need to re-set the msg->l2h as that would corrupt the message. The recipient would interpret any cause value as 0.
* lapdm: Make sure that the msgb_l3len(msg) == length...Holger Hans Peter Freyther2012-01-121-4/+4
| | | | | | | | | | This code should not play with the internals of the msgb like this, this code got introduced in af48bed55607931307 and is breaking the osmo-bts usecase of forwarding an RSL message. Add a test case that fails without the new code. I would prefer if we could get rid of the manipulating the msgb like this, it is prone to errors like this one.
* gsm/lapdm: Display SAPI in debug message for easier debugAndreas.Eversberg2011-11-121-2/+2
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/lapdm: Fix UI frames from BTS->MS have length (B4 format)Andreas.Eversberg2011-11-121-7/+11
| | | | | | | | | | This is part of a set of commit to fix LAPDm to handle datalink connection on ACCH (SAPI 3) This is required to transfer SMS on SACCH of TCH/f or SDCCH/8 (4). Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/lapdm: Fix TA and power level handling in the ACCH headerAndreas.Eversberg2011-11-121-6/+14
| | | | | | | | | | | | | Timing advance and power level indicated by MS (measurement reports) and BTS (SI 5/6) are now stored for use at ACCH data link connection. This is part of a set of commit to fix LAPDm to handle datalink connection on ACCH (SAPI 3) This is required to transfer SMS on SACCH of TCH/f or SDCCH/8 (4). Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/lapdm: Set N201 depending on the frame typeAndreas.Eversberg2011-11-121-5/+5
| | | | | | | | | | This is part of a set of commit to fix LAPDm to handle datalink connection on ACCH (SAPI 3) This is required to transfer SMS on SACCH of TCH/f or SDCCH/8 (4). Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/lapdm: Make T200 timer depends on the link type (SACCH is slower)Andreas.Eversberg2011-11-121-5/+6
| | | | | | | | | | This is part of a set of commit to fix LAPDm to handle datalink connection on ACCH (SAPI 3) This is required to transfer SMS on SACCH of TCH/f or SDCCH/8 (4). Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/lapdm: Add missing msgb_free in rslms_rx_rll error casesAndreas.Eversberg2011-11-121-0/+2
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Added defines to use primitive/operation tuples in switch/case statementsAndreas Eversberg2011-10-101-58/+20
|
* Split of LAPDm into a core part and a GSM specific partroot2011-10-101-1620/+327
| | | | | | | | | | | | | | Instead of mixing together the GSM layer 1 interface and RSL interface with the implementation of LAPD, the core function of LAPD is now extracted from LAPDm. The core implementation is now in lapd_core.c and lapd_core.h respectively. The lapd_core.c implements exactly one datalink instance for one SAP. The surrounding implementation "lapdm.c" codes/decodes the layer 2 headers and handles multiplexing and datalink instances, as well as translates primitives from/to RSL layer. lapd_core.c can now be used for other LAPD implementations. (ISDN/ABIS)
* LAPDm: Fix encoding of RLL ERROR IEHarald Welte2011-09-031-1/+0
|
* doxygen: Add documentation for LAPDm codeHarald Welte2011-08-171-4/+38
|
* lapdm: fix memory leak due to unreachable codeHarald Welte2011-07-161-1/+0
| | | | detected by Smatch
* lapdm: make sure we flush all queues whenever entering IDLE stateHarald Welte2011-06-291-0/+11
| | | | | this fixes a memory leak where the final UA would always remain in memory after a LAPDm entity has been disconnected.
* LAPDm: Uplink SACCH frames use format B, not format B4Harald Welte2011-06-291-5/+12
|
* LAPDm: When Rx DATA from L1, L1 does not know the SAPIHarald Welte2011-06-271-13/+14
| | | | We have to determine the SAPI ourselves inside the LAPDm header.
* add LAPDm code from osmocom-bb into libosmocoreHarald Welte2011-06-271-0/+2510