system_information: ip.access wants L2_PLEN, BS-11 doesn't
It seems that depending on the manufacturer, there is a need to include
the L2 pseudo-length in the SI5+SI6 messasges (SACCH FILLING)
Thanks to Dieter for pointing this out.
diff --git a/openbsc/src/system_information.c b/openbsc/src/system_information.c
index b404e51..df4f1a0 100644
--- a/openbsc/src/system_information.c
+++ b/openbsc/src/system_information.c
@@ -316,10 +316,16 @@
static int generate_si5(u_int8_t *output, struct gsm_bts *bts)
{
- struct gsm48_system_information_type_5 *si5 =
- (struct gsm48_system_information_type_5 *) output;
- int rc;
+ struct gsm48_system_information_type_5 *si5;
+ int rc, l2_plen = 18;
+ /* ip.access nanoBTS needs l2_plen!! */
+ if (is_ipaccess_bts(bts)) {
+ *output++ = (l2_plen << 2) | 1;
+ l2_plen++;
+ }
+
+ si5 = (struct gsm48_system_information_type_5 *) output;
memset(si5, GSM_MACBLOCK_PADDING, GSM_MACBLOCK_LEN);
/* l2 pseudo length, not part of msg: 18 */
@@ -331,14 +337,21 @@
return rc;
/* 04.08 9.1.37: L2 Pseudo Length of 18 */
- return 18;
+ return l2_plen;
}
static int generate_si6(u_int8_t *output, struct gsm_bts *bts)
{
- struct gsm48_system_information_type_6 *si6 =
- (struct gsm48_system_information_type_6 *) output;
+ struct gsm48_system_information_type_6 *si6;
+ int l2_plen = 11;
+ /* ip.access nanoBTS needs l2_plen!! */
+ if (is_ipaccess_bts(bts)) {
+ *output++ = (l2_plen << 2) | 1;
+ l2_plen++;
+ }
+
+ si6 = (struct gsm48_system_information_type_6 *) output;
memset(si6, GSM_MACBLOCK_PADDING, GSM_MACBLOCK_LEN);
/* l2 pseudo length, not part of msg: 11 */
@@ -354,7 +367,7 @@
/* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */
- return 18;
+ return l2_plen;
}
static struct gsm48_si13_info si13_default = {