smscb: Prepare to fill in the info for CBCH in SI4
Pass the number of bytes the rest octet for si4 should fill.
This commit is contained in:
parent
f86852ce0b
commit
7ff77ec713
|
@ -55,7 +55,7 @@ struct gsm48_si_ro_info {
|
|||
int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3);
|
||||
|
||||
/* Generate SI4 Rest Octets (Chapter 10.5.2.35) */
|
||||
int rest_octets_si4(uint8_t *data, const struct gsm48_si_ro_info *si4);
|
||||
int rest_octets_si4(uint8_t *data, const struct gsm48_si_ro_info *si4, int len);
|
||||
|
||||
enum pbcch_carrier_type {
|
||||
PBCCH_BCCH,
|
||||
|
|
|
@ -141,13 +141,13 @@ static int append_lsa_params(struct bitvec *bv,
|
|||
}
|
||||
|
||||
/* Generate SI4 Rest Octets (Chapter 10.5.2.35) */
|
||||
int rest_octets_si4(uint8_t *data, const struct gsm48_si_ro_info *si4)
|
||||
int rest_octets_si4(uint8_t *data, const struct gsm48_si_ro_info *si4, int len)
|
||||
{
|
||||
struct bitvec bv;
|
||||
|
||||
memset(&bv, 0, sizeof(bv));
|
||||
bv.data = data;
|
||||
bv.data_len = 10; /* FIXME: up to ? */
|
||||
bv.data_len = len;
|
||||
|
||||
/* SI4 Rest Octets O */
|
||||
append_selection_params(&bv, &si4->selection_params);
|
||||
|
|
|
@ -595,7 +595,7 @@ static int generate_si4(uint8_t *output, struct gsm_bts *bts)
|
|||
/* SI4 Rest Octets (10.5.2.35), containing
|
||||
Optional Power offset, GPRS Indicator,
|
||||
Cell Identity, LSA ID, Selection Parameter */
|
||||
rc = rest_octets_si4(restoct, &si_info);
|
||||
rc = rest_octets_si4(restoct, &si_info, output + GSM_MACBLOCK_LEN - restoct);
|
||||
|
||||
return l2_plen + 1 + rc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue