This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/25696 )
Change subject: Introduce gsm_lchan_name_init() function helper
......................................................................
Introduce gsm_lchan_name_init() function helper
Let's move lchan specific struct stuff into lchan.c
Change-Id: I9cb96707c63b8b7d76591d25fe906f02e34bb76b
---
M include/osmo-bts/gsm_data.h
M src/common/bts_trx.c
M src/common/lchan.c
3 files changed, 13 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/96/25696/1
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index fe2862d..ce410a8 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -556,6 +556,7 @@
const char *gsm_lchant_name(enum gsm_chan_t c);
char *gsm_ts_name(const struct gsm_bts_trx_ts *ts);
char *gsm_ts_and_pchan_name(const struct gsm_bts_trx_ts *ts);
+void gsm_lchan_name_init(struct gsm_lchan *lchan, struct gsm_bts_trx_ts *ts, unsigned int lchan_nr);
void gsm_lchan_name_update(struct gsm_lchan *lchan);
const char *gsm_lchans_name(enum gsm_lchan_state s);
diff --git a/src/common/bts_trx.c b/src/common/bts_trx.c
index 127e797..f4f8ae8 100644
--- a/src/common/bts_trx.c
+++ b/src/common/bts_trx.c
@@ -59,14 +59,7 @@
for (ln = 0; ln < ARRAY_SIZE(ts->lchan); ln++) {
struct gsm_lchan *lchan = &ts->lchan[ln];
-
- lchan->ts = ts;
- lchan->nr = ln;
- lchan->type = GSM_LCHAN_NONE;
- gsm_lchan_name_update(lchan);
-
- INIT_LLIST_HEAD(&lchan->sapi_cmds);
- INIT_LLIST_HEAD(&lchan->dl_tch_queue);
+ gsm_lchan_name_init(lchan, ts, ln);
}
}
diff --git a/src/common/lchan.c b/src/common/lchan.c
index dcec0a3..08ef1b8 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -25,6 +25,17 @@
#include <osmo-bts/bts.h>
#include <osmo-bts/rsl.h>
+void gsm_lchan_name_init(struct gsm_lchan *lchan, struct gsm_bts_trx_ts *ts, unsigned int lchan_nr)
+{
+ lchan->ts = ts;
+ lchan->nr = lchan_nr;
+ lchan->type = GSM_LCHAN_NONE;
+ gsm_lchan_name_update(lchan);
+
+ INIT_LLIST_HEAD(&lchan->sapi_cmds);
+ INIT_LLIST_HEAD(&lchan->dl_tch_queue);
+}
+
void early_rr_ia_delay_cb(void *data)
{
struct gsm_lchan *lchan = data;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25696
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I9cb96707c63b8b7d76591d25fe906f02e34bb76b
Gerrit-Change-Number: 25696
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211006/75af97e1/attachment.htm>