diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-06-22 23:25:20 +0700 |
---|---|---|
committer | fixeria <vyanitskiy@sysmocom.de> | 2023-06-26 14:59:49 +0000 |
commit | 34ab6f14705f7c51e621992b91182944308fc297 (patch) | |
tree | d542c8697db75011732915ec5accbe7aacf9c3ec | |
parent | 235d2bfbc4ee29dd2a5c1656f2c9f9e1c796d86b (diff) |
l1sap: use gsm0502_fn2ccch_block() from libosmogsm
Keep the l1sap specific wrapper because we still want to assert().
Change-Id: I7097ba87f42689d2336014da9173cadbdaa9fdab
Depends: libosmocore.git I8cbd31226754e95887358ed83a928e2f567f4cf3
-rw-r--r-- | TODO-RELEASE | 1 | ||||
-rw-r--r-- | src/common/l1sap.c | 28 |
2 files changed, 2 insertions, 27 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE index 47947da5..3ab39bbc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -12,3 +12,4 @@ libosmogsm >1.8.0 <osmocom/gsm/protocol/gsm_44_060.h> added libosmocoding >1.8.0 gsm0503_tch_hr_encode() extended to accept TS 101 318 format; gsm0503_tch_hr_decode2() new function +libosmogsm >1.8.0 gsm0502_fn2ccch_block() new function diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 9d824e3f..528a7356 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -58,36 +58,10 @@ #include <osmo-bts/pcuif_proto.h> #include <osmo-bts/cbch.h> - -#define CB_FCCH -1 -#define CB_SCH -2 -#define CB_BCCH -3 -#define CB_IDLE -4 - -/* according to TS 05.02 Clause 7 Table 3 of 9 an Figure 8a */ -static const int ccch_block_table[51] = { - CB_FCCH, CB_SCH,/* 0..1 */ - CB_BCCH, CB_BCCH, CB_BCCH, CB_BCCH, /* 2..5: BCCH */ - 0, 0, 0, 0, /* 6..9: B0 */ - CB_FCCH, CB_SCH,/* 10..11 */ - 1, 1, 1, 1, /* 12..15: B1 */ - 2, 2, 2, 2, /* 16..19: B2 */ - CB_FCCH, CB_SCH,/* 20..21 */ - 3, 3, 3, 3, /* 22..25: B3 */ - 4, 4, 4, 4, /* 26..29: B4 */ - CB_FCCH, CB_SCH,/* 30..31 */ - 5, 5, 5, 5, /* 32..35: B5 */ - 6, 6, 6, 6, /* 36..39: B6 */ - CB_FCCH, CB_SCH,/* 40..41 */ - 7, 7, 7, 7, /* 42..45: B7 */ - 8, 8, 8, 8, /* 46..49: B8 */ - -4 /* 50: Idle */ -}; - /* determine the CCCH block number based on the frame number */ unsigned int l1sap_fn2ccch_block(uint32_t fn) { - int rc = ccch_block_table[fn%51]; + int rc = gsm0502_fn2ccch_block(fn); /* if FN is negative, we were called for something that's not CCCH! */ OSMO_ASSERT(rc >= 0); return rc; |