Commit Graph

20 Commits

Author SHA1 Message Date
Harald Welte 482564b422 cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCH
Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096
2019-05-23 19:16:11 +00:00
Harald Welte 590b23ce3c cbch: Add counters; queue length limits and CBCH LOAD reporting
This adds the final missing part to full CBCH support:
* keep a tab on the current queue length for basic + extended CBCH
* keep rate counters about the number of sent / transmitted SMSCB
* send CBCH LOAD information via RSL to the BSC

Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f
2019-05-23 19:16:11 +00:00
Harald Welte 0f9595f462 cbch: Keep SMSCB queue length counter
This avoids having to iterate the list to count the number of elements.

Change-Id: I72c47affeb87c9b898bc2290dc7ed113945f1805
2019-05-21 02:42:00 +02:00
Harald Welte 067824841f cbch: Support Extended CBCH
The logic for Extended CBCH are the same as for the Basic CBCH, we just
need to
* duplicate our related state
* parse the optional RSL_IE_SMSCB_CHAN_INDICATOR IE
* start to send data on the Extended CBCH (TB=4..7)

Change-Id: If2c6dc7da1e2185ab75fc957f8d305ad8db22429
Closes: OS#3535
2019-05-21 00:31:11 +02:00
Harald Welte 89bfea63c9 cbch: Fix memory leak and send error message on invalid SMSCB command
Change-Id: I411d1fb3693a2f7cf7bba3d38b1aaf276a4137ba
Related: OS#4011
2019-05-21 00:31:11 +02:00
Harald Welte 5567d71d39 cbch: Implement support for DEFAULT message
The BSC can not only send us each to-be-sent message separately, but
it can also configure a DEFAULT message, which is then to be sent
instead of the NULL message.  Let's add support for this

Change-Id: I65a79215b54155d128c26d2ca11ff9ff3ed2cdba
Closes: OS#4013
2019-05-21 00:31:11 +02:00
Harald Welte 0b682f4997 cbch: Log every RSL SMSCB COMMAND with type and number of blocks
Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf
2019-05-21 00:31:11 +02:00
Harald Welte dde2f1d5cf cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg
There's no need to keep around a pointer to the next segment
in a SMSCB message.  The way how the multiframe structure is
laid out (and how the tb number works), we can use the result
of a modulo-division on the frame number to determine which
of the segments/blocks inside a SMSCB message (page) we have
to transmit.

This also acts as a simplification in preparation of support
for the SMSCB DEFAULT type.

Change-Id: I48faa19fec4a0852e6112ca2faa98960c678d4c5
Related: OS#4013
2019-05-21 00:31:11 +02:00
Harald Welte 8294368b23 cbch: Implement handling of "Schedule" message
The first block of "schedule" messages must be advertised with
a special sequence number coding, see Table 1 of 3GPP TS 44.012.

Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858
Closes: OS#4012
2019-05-21 00:31:11 +02:00
Harald Welte 6434ba9f90 CBCH: sprinkle some OMSO_ASSERT() and guard against talloc failure
Change-Id: I85fdecbf20de83a6f925765a46b5cd14765da03e
2018-09-17 21:36:59 +02:00
Harald Welte c799c70c59 CBCH: Add FIXME comments on queue overflow/underflow handling
Change-Id: Ida97f25ab4bf7e4d0f03b13396cb37cdfe99ef40
2018-09-17 21:36:59 +02:00
Harald Welte 386c33fa84 CBCH: Use llist_first_entry_or_null() instead of reinventing it
Change-Id: I376111e71d1c7be35a8fd7e392488adc34e21941
2018-09-09 15:40:58 +00:00
Harald Welte d8cd756da4 Get rid of 'struct gsm_bts_role_bts'
gsm_bts_role_bts was introduced at a time when we still shared
gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently
needed a BTS-private structure.  Since that sharing was abandoned quite
some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away
with the bts/btsb dualism in a lot of the code.

Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
2018-03-17 13:40:03 +01:00
Neels Hofmeyr bc9c42663d fix compiler warning: printf format for sizeof()
Change-Id: Id600c5a34ab261736f7595ab2e36e3a30d434175
2016-06-17 15:34:42 +00:00
Harald Welte 8fc2630dd4 SMS-CB: Clean up + centralize generation of NULL block 2014-12-30 13:45:02 +01:00
Harald Welte bd988f6ad3 SMS-CB: Use GSM412_SEQ_NULL_MSG rather than 0xf 2014-12-30 13:34:57 +01:00
Harald Welte 1e245336ec SMS-CB: use gsm412_block_type from libosmocore
.. and not our own local re-definition of the structure.
2014-12-30 13:33:54 +01:00
Harald Welte 4457c0d9ba SMS-CB: Use GSM412_ #defines from libosmocore rather than our own 2014-12-30 13:32:52 +01:00
Harald Welte 660116fb9d CBCH: Implement CBCH block segmentation and RSL_MT_SMS_BC_CMD
* CBCH load indications are not yet sent
* The queue length is not yet limited!
2014-12-30 00:32:13 +01:00
Harald Welte b15d2c9d2f Initial CBCH support
This should handle OML channel combinations with CBCH and activate the
CBCH SAPI towards the DSP correspondingly.  What is still missing is
sending any actual information over the CBCH in respons to the
PH-RTS.ind coming up from L1.
2014-12-30 00:28:31 +01:00