lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

November 2022

  • 2 participants
  • 2503 discussions
Change in libosmocore[master]: LAPD: move tx_hist code into static function
by fixeria 20 Nov '22

20 Nov '22
Attention is currently required from: msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30244 ) Change subject: LAPD: move tx_hist code into static function ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibf3b08c8d874416796b94ba3a672a02d614313b1 Gerrit-Change-Number: 30244 Gerrit-PatchSet: 4 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Nov 2022 21:33:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: make l1sched_trigger() accept the [advanced] TDMA Fn
by msuraev 20 Nov '22

20 Nov '22
Attention is currently required from: fixeria. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30238 ) Change subject: trxcon: make l1sched_trigger() accept the [advanced] TDMA Fn ...................................................................... Patch Set 2: (1 comment) File src/host/trxcon/src/sched_clck.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30238/comment/100d9183_87882520 PS2, Line 45: /* Advance TDMA frame number in order to give the transceiver That's pretty confusing: you accept as parameter exact same thing which was computed internally before - what's the point? Is there a case where l1sched_trigger() would be called with a different fn value? -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30238 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Icc9127bfacfbb78ab9d74103b2db03be850f3d4f Gerrit-Change-Number: 30238 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Nov 2022 21:26:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: separate l1sched_clck_handle() from BURST.ind handling
by msuraev 20 Nov '22

20 Nov '22
Attention is currently required from: fixeria. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30243 ) Change subject: trxcon: separate l1sched_clck_handle() from BURST.ind handling ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ieeee25573d1142aec2fee28d884127f14573b681 Gerrit-Change-Number: 30243 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Nov 2022 21:18:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: implement Ready-to-Send PHYIF API
by msuraev 20 Nov '22

20 Nov '22
Attention is currently required from: fixeria. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30241 ) Change subject: trxcon: implement Ready-to-Send PHYIF API ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic8f74413f5fad277340e007dd4296f890155a2c1 Gerrit-Change-Number: 30241 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Nov 2022 21:15:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: rx_sch_fn(): do not use sched->fn_counter_proc
by msuraev 20 Nov '22

20 Nov '22
Attention is currently required from: fixeria. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30242 ) Change subject: trxcon: rx_sch_fn(): do not use sched->fn_counter_proc ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I56027876b50e53b474c2f54ac216cd141142020e Gerrit-Change-Number: 30242 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Nov 2022 21:11:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: LAPD: move tx_hist code into static function
by msuraev 20 Nov '22

20 Nov '22
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30244 ) Change subject: LAPD: move tx_hist code into static function ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibf3b08c8d874416796b94ba3a672a02d614313b1 Gerrit-Change-Number: 30244 Gerrit-PatchSet: 4 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sun, 20 Nov 2022 20:39:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Add define for unset Frame Number
by msuraev 20 Nov '22

20 Nov '22
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30245 ) Change subject: Add define for unset Frame Number ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I641f1a1bf1e86ced8ffe89e88bc48afb79823393 Gerrit-Change-Number: 30245 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sun, 20 Nov 2022 20:39:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: use 'trxcon_phyif_' prefix for the PHYIF API
by fixeria 20 Nov '22

20 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30221 ) Change subject: trxcon: use 'trxcon_phyif_' prefix for the PHYIF API ...................................................................... trxcon: use 'trxcon_phyif_' prefix for the PHYIF API Change-Id: Icd2fc41cb3f42a791bf619c5f7b8fa4154371ba4 Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/phyif.h M src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h M src/host/trxcon/src/trx_if.c M src/host/trxcon/src/trxcon_fsm.c M src/host/trxcon/src/trxcon_main.c M src/host/trxcon/src/trxcon_shim.c 6 files changed, 97 insertions(+), 97 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h index 7a5740d..43363cb 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h @@ -5,72 +5,72 @@ #include <osmocom/core/bits.h> /* PHYIF command type */ -enum phyif_cmd_type { - PHYIF_CMDT_RESET, - PHYIF_CMDT_POWERON, - PHYIF_CMDT_POWEROFF, - PHYIF_CMDT_MEASURE, - PHYIF_CMDT_SETFREQ_H0, - PHYIF_CMDT_SETFREQ_H1, - PHYIF_CMDT_SETSLOT, - PHYIF_CMDT_SETTA, +enum trxcon_phyif_cmd_type { + TRXCON_PHYIF_CMDT_RESET, + TRXCON_PHYIF_CMDT_POWERON, + TRXCON_PHYIF_CMDT_POWEROFF, + TRXCON_PHYIF_CMDT_MEASURE, + TRXCON_PHYIF_CMDT_SETFREQ_H0, + TRXCON_PHYIF_CMDT_SETFREQ_H1, + TRXCON_PHYIF_CMDT_SETSLOT, + TRXCON_PHYIF_CMDT_SETTA, }; -/* param of PHYIF_CMDT_SETFREQ_H0 */ -struct phyif_cmdp_setfreq_h0 { +/* param of TRXCON_PHYIF_CMDT_SETFREQ_H0 */ +struct trxcon_phyif_cmdp_setfreq_h0 { uint16_t band_arfcn; }; -/* param of PHYIF_CMDT_SETFREQ_H1 */ -struct phyif_cmdp_setfreq_h1 { +/* param of TRXCON_PHYIF_CMDT_SETFREQ_H1 */ +struct trxcon_phyif_cmdp_setfreq_h1 { uint8_t hsn; uint8_t maio; const uint16_t *ma; unsigned int ma_len; }; -/* param of PHYIF_CMDT_SETSLOT */ -struct phyif_cmdp_setslot { +/* param of TRXCON_PHYIF_CMDT_SETSLOT */ +struct trxcon_phyif_cmdp_setslot { uint8_t tn; uint8_t pchan; /* enum gsm_phys_chan_config */ }; -/* param of PHYIF_CMDT_SETTA */ -struct phyif_cmdp_setta { +/* param of TRXCON_PHYIF_CMDT_SETTA */ +struct trxcon_phyif_cmdp_setta { int8_t ta; /* intentionally signed */ }; -/* param of PHYIF_CMDT_MEASURE (command) */ -struct phyif_cmdp_measure { +/* param of TRXCON_PHYIF_CMDT_MEASURE (command) */ +struct trxcon_phyif_cmdp_measure { uint16_t band_arfcn; }; -/* param of PHYIF_CMDT_MEASURE (response) */ -struct phyif_rspp_measure { +/* param of TRXCON_PHYIF_CMDT_MEASURE (response) */ +struct trxcon_phyif_rspp_measure { uint16_t band_arfcn; int dbm; }; -struct phyif_cmd { - enum phyif_cmd_type type; +struct trxcon_phyif_cmd { + enum trxcon_phyif_cmd_type type; union { - struct phyif_cmdp_setfreq_h0 setfreq_h0; - struct phyif_cmdp_setfreq_h1 setfreq_h1; - struct phyif_cmdp_setslot setslot; - struct phyif_cmdp_setta setta; - struct phyif_cmdp_measure measure; + struct trxcon_phyif_cmdp_setfreq_h0 setfreq_h0; + struct trxcon_phyif_cmdp_setfreq_h1 setfreq_h1; + struct trxcon_phyif_cmdp_setslot setslot; + struct trxcon_phyif_cmdp_setta setta; + struct trxcon_phyif_cmdp_measure measure; } param; }; -struct phyif_rsp { - enum phyif_cmd_type type; +struct trxcon_phyif_rsp { + enum trxcon_phyif_cmd_type type; union { - struct phyif_rspp_measure measure; + struct trxcon_phyif_rspp_measure measure; } param; }; /* BURST.req - a burst to be transmitted */ -struct phyif_burst_req { +struct trxcon_phyif_burst_req { uint32_t fn; uint8_t tn; uint8_t pwr; @@ -79,7 +79,7 @@ }; /* BURST.ind - a received burst */ -struct phyif_burst_ind { +struct trxcon_phyif_burst_ind { uint32_t fn; uint8_t tn; int16_t toa256; @@ -89,8 +89,8 @@ }; -int phyif_handle_burst_ind(void *priv, const struct phyif_burst_ind *bi); -int phyif_handle_burst_req(void *phyif, const struct phyif_burst_req *br); -int phyif_handle_cmd(void *phyif, const struct phyif_cmd *cmd); -int phyif_handle_rsp(void *priv, const struct phyif_rsp *rsp); -void phyif_close(void *phyif); +int trxcon_phyif_handle_burst_ind(void *priv, const struct trxcon_phyif_burst_ind *bi); +int trxcon_phyif_handle_burst_req(void *phyif, const struct trxcon_phyif_burst_req *br); +int trxcon_phyif_handle_cmd(void *phyif, const struct trxcon_phyif_cmd *cmd); +int trxcon_phyif_handle_rsp(void *priv, const struct trxcon_phyif_rsp *rsp); +void trxcon_phyif_close(void *phyif); diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h index 92de3b0..0243dd5 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h @@ -55,5 +55,5 @@ struct trx_instance *trx_if_open(const struct trx_if_params *params); void trx_if_close(struct trx_instance *trx); -int trx_if_handle_phyif_burst_req(struct trx_instance *trx, const struct phyif_burst_req *br); -int trx_if_handle_phyif_cmd(struct trx_instance *trx, const struct phyif_cmd *cmd); +int trx_if_handle_phyif_burst_req(struct trx_instance *trx, const struct trxcon_phyif_burst_req *br); +int trx_if_handle_phyif_cmd(struct trx_instance *trx, const struct trxcon_phyif_cmd *cmd); diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index fd6a3b0..5a662f0 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -275,7 +275,7 @@ */ static int trx_if_cmd_setslot(struct trx_instance *trx, - const struct phyif_cmdp_setslot *cmdp) + const struct trxcon_phyif_cmdp_setslot *cmdp) { /* Values correspond to 'enum ChannelCombination' in osmo-trx.git */ static const uint8_t chan_types[_GSM_PCHAN_MAX] = { @@ -308,7 +308,7 @@ */ static int trx_if_cmd_rxtune(struct trx_instance *trx, - const struct phyif_cmdp_setfreq_h0 *cmdp) + const struct trxcon_phyif_cmdp_setfreq_h0 *cmdp) { uint16_t freq10; @@ -323,7 +323,7 @@ } static int trx_if_cmd_txtune(struct trx_instance *trx, - const struct phyif_cmdp_setfreq_h0 *cmdp) + const struct trxcon_phyif_cmdp_setfreq_h0 *cmdp) { uint16_t freq10; @@ -350,7 +350,7 @@ */ static int trx_if_cmd_measure(struct trx_instance *trx, - const struct phyif_cmdp_measure *cmdp) + const struct trxcon_phyif_cmdp_measure *cmdp) { uint16_t freq10; @@ -382,15 +382,15 @@ return; } - const struct phyif_rsp rsp = { - .type = PHYIF_CMDT_MEASURE, + const struct trxcon_phyif_rsp rsp = { + .type = TRXCON_PHYIF_CMDT_MEASURE, .param.measure = { .band_arfcn = band_arfcn, .dbm = dbm, }, }; - phyif_handle_rsp(trx->priv, &rsp); + trxcon_phyif_handle_rsp(trx->priv, &rsp); } /* @@ -407,7 +407,7 @@ */ static int trx_if_cmd_setta(struct trx_instance *trx, - const struct phyif_cmdp_setta *cmdp) + const struct trxcon_phyif_cmdp_setta *cmdp) { return trx_ctrl_cmd(trx, 0, "SETTA", "%d", cmdp->ta); } @@ -426,7 +426,7 @@ */ static int trx_if_cmd_setfh(struct trx_instance *trx, - const struct phyif_cmdp_setfreq_h1 *cmdp) + const struct trxcon_phyif_cmdp_setfreq_h1 *cmdp) { /* Reserve some room for CMD SETFH <HSN> <MAIO> */ char ma_buf[TRXC_BUF_SIZE - 24]; @@ -560,38 +560,38 @@ return -EIO; } -int trx_if_handle_phyif_cmd(struct trx_instance *trx, const struct phyif_cmd *cmd) +int trx_if_handle_phyif_cmd(struct trx_instance *trx, const struct trxcon_phyif_cmd *cmd) { int rc; switch (cmd->type) { - case PHYIF_CMDT_RESET: + case TRXCON_PHYIF_CMDT_RESET: if ((rc = trx_if_cmd_poweroff(trx)) != 0) return rc; rc = trx_if_cmd_echo(trx); break; - case PHYIF_CMDT_POWERON: + case TRXCON_PHYIF_CMDT_POWERON: rc = trx_if_cmd_poweron(trx); break; - case PHYIF_CMDT_POWEROFF: + case TRXCON_PHYIF_CMDT_POWEROFF: rc = trx_if_cmd_poweroff(trx); break; - case PHYIF_CMDT_MEASURE: + case TRXCON_PHYIF_CMDT_MEASURE: rc = trx_if_cmd_measure(trx, &cmd->param.measure); break; - case PHYIF_CMDT_SETFREQ_H0: + case TRXCON_PHYIF_CMDT_SETFREQ_H0: if ((rc = trx_if_cmd_rxtune(trx, &cmd->param.setfreq_h0)) != 0) return rc; if ((rc = trx_if_cmd_txtune(trx, &cmd->param.setfreq_h0)) != 0) return rc; break; - case PHYIF_CMDT_SETFREQ_H1: + case TRXCON_PHYIF_CMDT_SETFREQ_H1: rc = trx_if_cmd_setfh(trx, &cmd->param.setfreq_h1); break; - case PHYIF_CMDT_SETSLOT: + case TRXCON_PHYIF_CMDT_SETSLOT: rc = trx_if_cmd_setslot(trx, &cmd->param.setslot); break; - case PHYIF_CMDT_SETTA: + case TRXCON_PHYIF_CMDT_SETTA: rc = trx_if_cmd_setta(trx, &cmd->param.setta); break; default: @@ -628,7 +628,7 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what) { struct trx_instance *trx = ofd->data; - struct phyif_burst_ind bi; + struct trxcon_phyif_burst_ind bi; uint8_t buf[TRXD_BUF_SIZE]; ssize_t read_len; @@ -644,7 +644,7 @@ return -EINVAL; } - bi = (struct phyif_burst_ind) { + bi = (struct trxcon_phyif_burst_ind) { .tn = buf[0], .fn = osmo_load32be(buf + 1), .rssi = -(int8_t) buf[5], @@ -675,11 +675,11 @@ "RX burst tn=%u fn=%u rssi=%d toa=%d\n", bi.tn, bi.fn, bi.rssi, bi.toa256); - return phyif_handle_burst_ind(trx->priv, &bi); + return trxcon_phyif_handle_burst_ind(trx->priv, &bi); } int trx_if_handle_phyif_burst_req(struct trx_instance *trx, - const struct phyif_burst_req *br) + const struct trxcon_phyif_burst_req *br) { uint8_t buf[TRXD_BUF_SIZE]; size_t length; diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index 9980344..d3420f2 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -41,7 +41,7 @@ uint32_t event, void *data) { struct trxcon_inst *trxcon = fi->priv; - struct phyif_cmd phycmd = { }; + struct trxcon_phyif_cmd phycmd = { }; switch (event) { case TRXCON_EV_PHYIF_FAILURE: @@ -58,8 +58,8 @@ osmo_fsm_inst_state_chg(fi, TRXCON_ST_RESET, 0, 0); l1sched_reset(trxcon->sched, true); - phycmd.type = PHYIF_CMDT_RESET; - phyif_handle_cmd(trxcon->phyif, &phycmd); + phycmd.type = TRXCON_PHYIF_CMDT_RESET; + trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd); break; case TRXCON_EV_RESET_SCHED_REQ: l1sched_reset(trxcon->sched, false); @@ -70,16 +70,16 @@ switch (req->type) { case TRXCON_PHY_CFGT_PCHAN_COMB: - phycmd.type = PHYIF_CMDT_SETSLOT; + phycmd.type = TRXCON_PHYIF_CMDT_SETSLOT; phycmd.param.setslot.tn = req->pchan_comb.tn; phycmd.param.setslot.pchan = req->pchan_comb.pchan; - phyif_handle_cmd(trxcon->phyif, &phycmd); + trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd); break; case TRXCON_PHY_CFGT_TX_PARAMS: if (trxcon->l1p.ta != req->tx_params.timing_advance) { - phycmd.type = PHYIF_CMDT_SETTA; + phycmd.type = TRXCON_PHYIF_CMDT_SETTA; phycmd.param.setta.ta = req->tx_params.timing_advance; - phyif_handle_cmd(trxcon->phyif, &phycmd); + trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd); } trxcon->l1p.tx_power = req->tx_params.tx_power; trxcon->l1p.ta = req->tx_params.timing_advance; @@ -144,7 +144,7 @@ trxcon->fi_data = talloc_memdup(fi, req, sizeof(*req)); OSMO_ASSERT(trxcon->fi_data != NULL); - /* trxcon_st_full_power_scan_onenter() sends the initial PHYIF_CMDT_MEASURE */ + /* trxcon_st_full_power_scan_onenter() sends the initial TRXCON_PHYIF_CMDT_MEASURE */ osmo_fsm_inst_state_chg(fi, TRXCON_ST_FULL_POWER_SCAN, 0, 0); /* TODO: timeout */ } @@ -164,8 +164,8 @@ /* Only if current ARFCN differs */ if (trxcon->l1p.band_arfcn != req->band_arfcn) { - const struct phyif_cmd phycmd = { - .type = PHYIF_CMDT_SETFREQ_H0, + const struct trxcon_phyif_cmd phycmd = { + .type = TRXCON_PHYIF_CMDT_SETFREQ_H0, .param.setfreq_h0 = { .band_arfcn = req->band_arfcn, }, @@ -175,11 +175,11 @@ trxcon->l1p.band_arfcn = req->band_arfcn; /* Tune transceiver to required ARFCN */ - phyif_handle_cmd(trxcon->phyif, &phycmd); + trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd); } - const struct phyif_cmd phycmd = { .type = PHYIF_CMDT_POWERON }; - phyif_handle_cmd(trxcon->phyif, &phycmd); + const struct trxcon_phyif_cmd phycmd = { .type = TRXCON_PHYIF_CMDT_POWERON }; + trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd); break; } case TRXCON_EV_FULL_POWER_SCAN_REQ: @@ -197,14 +197,14 @@ const struct trxcon_param_full_power_scan_req *req = trxcon->fi_data; /* req->band_arfcn_start holds the current ARFCN */ - const struct phyif_cmd phycmd = { - .type = PHYIF_CMDT_MEASURE, + const struct trxcon_phyif_cmd phycmd = { + .type = TRXCON_PHYIF_CMDT_MEASURE, .param.measure = { .band_arfcn = req->band_arfcn_start, }, }; - phyif_handle_cmd(trxcon->phyif, &phycmd); + trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd); } static void trxcon_st_full_power_scan_action(struct osmo_fsm_inst *fi, @@ -234,7 +234,7 @@ if (res->band_arfcn < req->band_arfcn_stop) { l1ctl_tx_pm_conf(trxcon, res->band_arfcn, res->dbm, false); - /* trxcon_st_full_power_scan_onenter() sends the next PHYIF_CMDT_MEASURE */ + /* trxcon_st_full_power_scan_onenter() sends the next TRXCON_PHYIF_CMDT_MEASURE */ req->band_arfcn_start = res->band_arfcn + 1; osmo_fsm_inst_state_chg(fi, TRXCON_ST_FULL_POWER_SCAN, 0, 0); /* TODO: timeout */ } else { @@ -332,8 +332,8 @@ } if (req->hopping) { - const struct phyif_cmd phycmd = { - .type = PHYIF_CMDT_SETFREQ_H1, + const struct trxcon_phyif_cmd phycmd = { + .type = TRXCON_PHYIF_CMDT_SETFREQ_H1, .param.setfreq_h1 = { .hsn = req->h1.hsn, .maio = req->h1.maio, @@ -343,21 +343,21 @@ }; /* Apply the freq. hopping parameters */ - if (phyif_handle_cmd(trxcon->phyif, &phycmd) != 0) + if (trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd) != 0) return; /* Set current ARFCN to an invalid value */ trxcon->l1p.band_arfcn = 0xffff; } else { - const struct phyif_cmd phycmd = { - .type = PHYIF_CMDT_SETFREQ_H0, + const struct trxcon_phyif_cmd phycmd = { + .type = TRXCON_PHYIF_CMDT_SETFREQ_H0, .param.setfreq_h0 = { .band_arfcn = req->h0.band_arfcn, }, }; /* Tune transceiver to required ARFCN */ - if (phyif_handle_cmd(trxcon->phyif, &phycmd) != 0) + if (trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd) != 0) return; /* Update current ARFCN */ @@ -549,7 +549,7 @@ if (trxcon->l2if != NULL) trxcon_l1ctl_close(trxcon); if (trxcon->phyif != NULL) - phyif_close(trxcon->phyif); + trxcon_phyif_close(trxcon->phyif); talloc_free(trxcon); fi->priv = NULL; diff --git a/src/host/trxcon/src/trxcon_main.c b/src/host/trxcon/src/trxcon_main.c index 54a8067..cf04679 100644 --- a/src/host/trxcon/src/trxcon_main.c +++ b/src/host/trxcon/src/trxcon_main.c @@ -86,17 +86,17 @@ static void *tall_trxcon_ctx = NULL; -int phyif_handle_burst_req(void *phyif, const struct phyif_burst_req *br) +int trxcon_phyif_handle_burst_req(void *phyif, const struct trxcon_phyif_burst_req *br) { return trx_if_handle_phyif_burst_req(phyif, br); } -int phyif_handle_cmd(void *phyif, const struct phyif_cmd *cmd) +int trxcon_phyif_handle_cmd(void *phyif, const struct trxcon_phyif_cmd *cmd) { return trx_if_handle_phyif_cmd(phyif, cmd); } -void phyif_close(void *phyif) +void trxcon_phyif_close(void *phyif) { trx_if_close(phyif); } @@ -138,7 +138,7 @@ l1c->priv = trxcon; trxcon->l2if = l1c; - const struct trx_if_params phyif_params = { + const struct trx_if_params trxcon_phyif_params = { .local_host = app_data.trx_bind_ip, .remote_host = app_data.trx_remote_ip, .base_port = app_data.trx_base_port, @@ -150,7 +150,7 @@ }; /* Init transceiver interface */ - trxcon->phyif = trx_if_open(&phyif_params); + trxcon->phyif = trx_if_open(&trxcon_phyif_params); if (trxcon->phyif == NULL) { /* TRXCON_EV_PHYIF_FAILURE triggers l1ctl_client_conn_close() */ osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_PHYIF_FAILURE, NULL); diff --git a/src/host/trxcon/src/trxcon_shim.c b/src/host/trxcon/src/trxcon_shim.c index 29c3a14..6434461 100644 --- a/src/host/trxcon/src/trxcon_shim.c +++ b/src/host/trxcon/src/trxcon_shim.c @@ -74,7 +74,7 @@ const struct l1sched_burst_req *br) { struct trxcon_inst *trxcon = sched->priv; - const struct phyif_burst_req phybr = { + const struct trxcon_phyif_burst_req phybr = { .fn = br->fn, .tn = br->tn, .pwr = br->pwr, @@ -82,7 +82,7 @@ .burst_len = br->burst_len, }; - return phyif_handle_burst_req(trxcon->phyif, &phybr); + return trxcon_phyif_handle_burst_req(trxcon->phyif, &phybr); } /* External L2 API for the scheduler */ @@ -220,7 +220,7 @@ } /* External L1 API for the PHYIF */ -int phyif_handle_burst_ind(void *priv, const struct phyif_burst_ind *bi) +int trxcon_phyif_handle_burst_ind(void *priv, const struct trxcon_phyif_burst_ind *bi) { struct trxcon_inst *trxcon = priv; const struct l1sched_meas_set meas = { @@ -240,14 +240,14 @@ return 0; } -int phyif_handle_rsp(void *priv, const struct phyif_rsp *rsp) +int trxcon_phyif_handle_rsp(void *priv, const struct trxcon_phyif_rsp *rsp) { struct trxcon_inst *trxcon = priv; switch (rsp->type) { - case PHYIF_CMDT_MEASURE: + case TRXCON_PHYIF_CMDT_MEASURE: { - const struct phyif_rspp_measure *meas = &rsp->param.measure; + const struct trxcon_phyif_rspp_measure *meas = &rsp->param.measure; struct trxcon_param_full_power_scan_res res = { .band_arfcn = meas->band_arfcn, .dbm = meas->dbm, -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Icd2fc41cb3f42a791bf619c5f7b8fa4154371ba4 Gerrit-Change-Number: 30221 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: drop unneeded imports in trxcon_main.c
by fixeria 20 Nov '22

20 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30104 ) Change subject: trxcon: drop unneeded imports in trxcon_main.c ...................................................................... trxcon: drop unneeded imports in trxcon_main.c Change-Id: I2868f83f55a6cbf3efc59f35ab7666671d22cf93 --- M src/host/trxcon/src/trxcon_main.c 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/src/trxcon_main.c b/src/host/trxcon/src/trxcon_main.c index cf04679..95e5549 100644 --- a/src/host/trxcon/src/trxcon_main.c +++ b/src/host/trxcon/src/trxcon_main.c @@ -28,8 +28,6 @@ #include <errno.h> #include <time.h> -#include <arpa/inet.h> - #include <osmocom/core/fsm.h> #include <osmocom/core/msgb.h> #include <osmocom/core/talloc.h> @@ -39,14 +37,11 @@ #include <osmocom/core/gsmtap_util.h> #include <osmocom/core/gsmtap.h> -#include <osmocom/gsm/gsm_utils.h> - #include <osmocom/bb/trxcon/trxcon.h> #include <osmocom/bb/trxcon/trxcon_fsm.h> #include <osmocom/bb/trxcon/phyif.h> #include <osmocom/bb/trxcon/trx_if.h> #include <osmocom/bb/trxcon/logging.h> -#include <osmocom/bb/trxcon/l1ctl.h> #include <osmocom/bb/trxcon/l1ctl_server.h> #define COPYRIGHT \ -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I2868f83f55a6cbf3efc59f35ab7666671d22cf93 Gerrit-Change-Number: 30104 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: reorganize the core logic into libtrxcon.la
by fixeria 20 Nov '22

20 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30101 ) Change subject: trxcon: reorganize the core logic into libtrxcon.la ...................................................................... trxcon: reorganize the core logic into libtrxcon.la This is needed for the integration with osmo-trx-ms. It was decided to run the scheduler within the transceiver process, so that we can reduce scheduling latency. The idea is to maintain trxcon as a sub- module in osmo-trx.git and link osmo-trx-ms against the libtrxcon. We cannot use hard-coded logging categoris in a library, so add new API for setting them: trxcon_set_log_cfg(). Use DLGLOBAL by default. Change-Id: Idf207947f620a7394e0a0e5bf2c37bcd8df64bbe Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h M src/host/trxcon/src/Makefile.am M src/host/trxcon/src/l1ctl.c M src/host/trxcon/src/logging.c M src/host/trxcon/src/trxcon_fsm.c M src/host/trxcon/src/trxcon_inst.c M src/host/trxcon/src/trxcon_main.c 7 files changed, 111 insertions(+), 44 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h index e5ba5ec..ed6adc3 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h @@ -31,6 +31,16 @@ } l1p; }; +enum trxcon_log_cat { + TRXCON_LOGC_FSM, /* trxcon_fsm */ + TRXCON_LOGC_L1C, /* L1CTL control */ + TRXCON_LOGC_L1D, /* L1CTL data */ + TRXCON_LOGC_SCHC, /* l1sched control */ + TRXCON_LOGC_SCHD, /* l1sched data */ +}; + +void trxcon_set_log_cfg(const int *logc, unsigned int logc_num); + struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance); void trxcon_inst_free(struct trxcon_inst *trxcon); diff --git a/src/host/trxcon/src/Makefile.am b/src/host/trxcon/src/Makefile.am index e0dc337..e0ce6a2 100644 --- a/src/host/trxcon/src/Makefile.am +++ b/src/host/trxcon/src/Makefile.am @@ -35,20 +35,30 @@ $(NULL) +noinst_LTLIBRARIES += libtrxcon.la + +libtrxcon_la_SOURCES = \ + trxcon_inst.c \ + trxcon_fsm.c \ + l1ctl.c \ + $(NULL) + +libtrxcon_la_LIBADD = \ + libl1sched.la \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(NULL) + + bin_PROGRAMS = trxcon trxcon_SOURCES = \ l1ctl_server.c \ - l1ctl.c \ - trx_if.c \ - logging.c \ - trxcon_fsm.c \ - trxcon_inst.c \ trxcon_main.c \ + logging.c \ + trx_if.c \ $(NULL) trxcon_LDADD = \ - libl1sched.la \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ + libtrxcon.la \ $(NULL) diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c index 17c136a..47998d6 100644 --- a/src/host/trxcon/src/l1ctl.c +++ b/src/host/trxcon/src/l1ctl.c @@ -32,6 +32,7 @@ #include <osmocom/core/fsm.h> #include <osmocom/core/msgb.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/logging.h> #include <osmocom/gsm/gsm0502.h> #include <osmocom/gsm/gsm_utils.h> @@ -45,6 +46,10 @@ #define L1CTL_LENGTH 256 #define L1CTL_HEADROOM 32 +/* Logging categories configurable via trxcon_set_log_cfg() */ +int g_logc_l1c = DLGLOBAL; +int g_logc_l1d = DLGLOBAL; + static const char *arfcn2band_name(uint16_t arfcn) { enum gsm_band band; @@ -67,7 +72,7 @@ msg = msgb_alloc_headroom(L1CTL_LENGTH + L1CTL_HEADROOM, L1CTL_HEADROOM, "l1ctl_tx_msg"); if (!msg) { - LOGP(DL1C, LOGL_ERROR, "Failed to allocate memory\n"); + LOGP(g_logc_l1c, LOGL_ERROR, "Failed to allocate memory\n"); return NULL; } @@ -88,7 +93,7 @@ if (!msg) return -ENOMEM; - LOGPFSMSL(fi, DL1C, LOGL_DEBUG, + LOGPFSMSL(fi, g_logc_l1c, LOGL_DEBUG, "Send PM Conf (%s %d = %d dBm)\n", arfcn2band_name(band_arfcn), band_arfcn & ~ARFCN_FLAG_MASK, dbm); @@ -116,7 +121,7 @@ if (!msg) return -ENOMEM; - LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send Reset Ind (%u)\n", type); + LOGPFSMSL(fi, g_logc_l1c, LOGL_DEBUG, "Send Reset Ind (%u)\n", type); res = (struct l1ctl_reset *) msgb_put(msg, sizeof(*res)); res->type = type; @@ -134,7 +139,7 @@ if (!msg) return -ENOMEM; - LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send Reset Conf (%u)\n", type); + LOGPFSMSL(fi, g_logc_l1c, LOGL_DEBUG, "Send Reset Conf (%u)\n", type); res = (struct l1ctl_reset *) msgb_put(msg, sizeof(*res)); res->type = type; @@ -183,7 +188,7 @@ fbsb_conf_make(msg, 255, 0); - LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send FBSB Conf (timeout)\n"); + LOGPFSMSL(fi, g_logc_l1c, LOGL_DEBUG, "Send FBSB Conf (timeout)\n"); return trxcon_l1ctl_send(trxcon, msg); } @@ -209,7 +214,7 @@ /* FIXME: set proper value */ conf->initial_freq_err = 0; - LOGPFSMSL(fi, DL1C, LOGL_DEBUG, + LOGPFSMSL(fi, g_logc_l1c, LOGL_DEBUG, "Send FBSB Conf (result=%u, bsic=%u)\n", conf->result, conf->bsic); @@ -323,7 +328,7 @@ return GSM_PCHAN_CCCH_SDCCH4_CBCH; default: - LOGP(DL1C, LOGL_NOTICE, "Undandled CCCH mode (%u), " + LOGP(g_logc_l1c, LOGL_NOTICE, "Undandled CCCH mode (%u), " "assuming non-combined configuration\n", mode); return GSM_PCHAN_CCCH; } @@ -337,7 +342,7 @@ fbsb = (struct l1ctl_fbsb_req *) msg->l1h; if (msgb_l1len(msg) < sizeof(*fbsb)) { - LOGPFSMSL(fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, g_logc_l1c, LOGL_ERROR, "MSG too short FBSB Req: %u\n", msgb_l1len(msg)); rc = -EINVAL; @@ -350,7 +355,7 @@ .band_arfcn = ntohs(fbsb->band_arfcn), }; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received FBSB request (%s %d, timeout %u ms)\n", arfcn2band_name(req.band_arfcn), req.band_arfcn & ~ARFCN_FLAG_MASK, @@ -371,7 +376,7 @@ pmr = (struct l1ctl_pm_req *) msg->l1h; if (msgb_l1len(msg) < sizeof(*pmr)) { - LOGPFSMSL(fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, g_logc_l1c, LOGL_ERROR, "MSG too short PM Req: %u\n", msgb_l1len(msg)); rc = -EINVAL; @@ -383,7 +388,7 @@ .band_arfcn_stop = ntohs(pmr->range.band_arfcn_to), }; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received power measurement request (%s: %d -> %d)\n", arfcn2band_name(req.band_arfcn_start), req.band_arfcn_start & ~ARFCN_FLAG_MASK, @@ -404,14 +409,14 @@ res = (struct l1ctl_reset *) msg->l1h; if (msgb_l1len(msg) < sizeof(*res)) { - LOGPFSMSL(fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, g_logc_l1c, LOGL_ERROR, "MSG too short Reset Req: %u\n", msgb_l1len(msg)); rc = -EINVAL; goto exit; } - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received reset request (%u)\n", res->type); switch (res->type) { @@ -422,7 +427,7 @@ osmo_fsm_inst_dispatch(fi, TRXCON_EV_RESET_SCHED_REQ, NULL); break; default: - LOGPFSMSL(fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, g_logc_l1c, LOGL_ERROR, "Unknown L1CTL_RESET_REQ type\n"); goto exit; } @@ -440,8 +445,8 @@ struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_hdr *l1h; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Recv Echo Req\n"); - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Send Echo Conf\n"); + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Recv Echo Req\n"); + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Send Echo Conf\n"); /* Nothing to do, just send it back */ l1h = (struct l1ctl_hdr *) msg->l1h; @@ -459,14 +464,14 @@ mode_req = (struct l1ctl_ccch_mode_req *)msg->l1h; if (msgb_l1len(msg) < sizeof(*mode_req)) { - LOGPFSMSL(fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, g_logc_l1c, LOGL_ERROR, "MSG too short Reset Req: %u\n", msgb_l1len(msg)); rc = -EINVAL; goto exit; } - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received CCCH mode request (%u)\n", + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received CCCH mode request (%u)\n", mode_req->ccch_mode); /* TODO: add value-string for ccch_mode */ struct trxcon_param_set_ccch_tch_mode_req req = { @@ -501,7 +506,7 @@ .is_11bit = true, }; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received 11-bit RACH request " "(offset=%u, synch_seq=%u, ra11=0x%02hx)\n", req.offset, req.synch_seq, req.ra); @@ -513,7 +518,7 @@ .ra = rr->ra, }; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received 8-bit RACH request " "(offset=%u, ra=0x%02x)\n", req.offset, req.ra); } @@ -521,7 +526,7 @@ /* The controlling L1CTL side always does include the UL info header, * but may leave it empty. We assume RACH is on TS0 in this case. */ if (ul->chan_nr == 0x00) { - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "The UL info header is empty, assuming RACH is on TS0\n"); req.chan_nr = RSL_CHAN_RACH; req.link_id = 0x00; @@ -542,7 +547,7 @@ { req->h0.band_arfcn = ntohs(h->band_arfcn); - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "L1CTL_DM_EST_REQ indicates single ARFCN %s %u\n", arfcn2band_name(req->h0.band_arfcn), req->h0.band_arfcn & ~ARFCN_FLAG_MASK); @@ -556,18 +561,18 @@ { unsigned int i; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "L1CTL_DM_EST_REQ indicates a Frequency " "Hopping (hsn=%u, maio=%u, chans=%u) channel\n", h->hsn, h->maio, h->n); /* No channels?!? */ if (!h->n) { - LOGPFSMSL(fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, g_logc_l1c, LOGL_ERROR, "No channels in mobile allocation?!?\n"); return -EINVAL; } else if (h->n > ARRAY_SIZE(h->ma)) { - LOGPFSMSL(fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, g_logc_l1c, LOGL_ERROR, "More than 64 channels in mobile allocation?!?\n"); return -EINVAL; } @@ -599,7 +604,7 @@ .hopping = est_req->h, }; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received L1CTL_DM_EST_REQ " "(tn=%u, chan_nr=0x%02x, tsc=%u, tch_mode=0x%02x)\n", req.chan_nr & 0x07, req.chan_nr, req.tsc, req.tch_mode); @@ -623,7 +628,7 @@ { struct osmo_fsm_inst *fi = trxcon->fi; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received L1CTL_DM_REL_REQ\n"); + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received L1CTL_DM_REL_REQ\n"); osmo_fsm_inst_dispatch(fi, TRXCON_EV_DEDICATED_RELEASE_REQ, NULL); @@ -651,7 +656,7 @@ .data = ul->payload, }; - LOGPFSMSL(fi, DL1D, LOGL_DEBUG, + LOGPFSMSL(fi, g_logc_l1d, LOGL_DEBUG, "Recv %s Req (chan_nr=0x%02x, link_id=0x%02x, len=%zu)\n", traffic ? "TRAFFIC" : "DATA", req.chan_nr, req.link_id, req.data_len); @@ -678,7 +683,7 @@ ul = (struct l1ctl_info_ul *) msg->l1h; par_req = (struct l1ctl_par_req *) ul->payload; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received L1CTL_PARAM_REQ (ta=%d, tx_power=%u)\n", par_req->ta, par_req->tx_power); @@ -704,7 +709,7 @@ mode_req = (struct l1ctl_tch_mode_req *)msg->l1h; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "Received L1CTL_TCH_MODE_REQ (tch_mode=%u, audio_mode=%u)\n", mode_req->tch_mode, mode_req->audio_mode); @@ -747,7 +752,7 @@ .key = cr->key, }; - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, g_logc_l1c, LOGL_NOTICE, "L1CTL_CRYPTO_REQ (algo=A5/%u, key_len=%u)\n", req.a5_algo, req.key_len); @@ -800,13 +805,13 @@ case L1CTL_TBF_CFG_REQ: case L1CTL_DM_FREQ_REQ: case L1CTL_SIM_REQ: - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(trxcon->fi, g_logc_l1c, LOGL_NOTICE, "Ignoring unsupported message (type=%u)\n", l1h->msg_type); msgb_free(msg); return -ENOTSUP; default: - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, "Unknown MSG type %u: %s\n", + LOGPFSMSL(trxcon->fi, g_logc_l1c, LOGL_ERROR, "Unknown MSG type %u: %s\n", l1h->msg_type, osmo_hexdump(msgb_data(msg), msgb_length(msg))); msgb_free(msg); return -EINVAL; diff --git a/src/host/trxcon/src/logging.c b/src/host/trxcon/src/logging.c index 747b1ad..2222577 100644 --- a/src/host/trxcon/src/logging.c +++ b/src/host/trxcon/src/logging.c @@ -21,6 +21,7 @@ #include <osmocom/core/logging.h> #include <osmocom/core/utils.h> +#include <osmocom/bb/trxcon/trxcon.h> #include <osmocom/bb/trxcon/logging.h> static struct log_info_cat trxcon_log_info_cat[] = { @@ -73,6 +74,14 @@ .num_cat = ARRAY_SIZE(trxcon_log_info_cat), }; +static const int trxcon_log_cfg[] = { + [TRXCON_LOGC_FSM] = DAPP, + [TRXCON_LOGC_L1C] = DL1C, + [TRXCON_LOGC_L1D] = DL1D, + [TRXCON_LOGC_SCHC] = DSCH, + [TRXCON_LOGC_SCHD] = DSCHD, +}; + int trxcon_logging_init(void *tall_ctx, const char *category_mask) { osmo_init_logging2(tall_ctx, &trxcon_log_info); @@ -80,5 +89,7 @@ if (category_mask) log_parse_category_mask(osmo_stderr_target, category_mask); + trxcon_set_log_cfg(&trxcon_log_cfg[0], ARRAY_SIZE(trxcon_log_cfg)); + return 0; } diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index 28a4ecb..9980344 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -26,11 +26,11 @@ #include <osmocom/core/fsm.h> #include <osmocom/core/msgb.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/logging.h> #include <osmocom/bb/trxcon/trxcon.h> #include <osmocom/bb/trxcon/trxcon_fsm.h> #include <osmocom/bb/trxcon/phyif.h> -#include <osmocom/bb/trxcon/logging.h> #include <osmocom/bb/trxcon/l1ctl.h> #include <osmocom/bb/l1sched/l1sched.h> #include <osmocom/bb/l1sched/logging.h> @@ -649,7 +649,7 @@ .name = "trxcon", .states = trxcon_fsm_states, .num_states = ARRAY_SIZE(trxcon_fsm_states), - .log_subsys = DAPP, + .log_subsys = DLGLOBAL, .event_names = trxcon_fsm_event_names, .allstate_event_mask = S(TRXCON_EV_PHYIF_FAILURE) | S(TRXCON_EV_L2IF_FAILURE) diff --git a/src/host/trxcon/src/trxcon_inst.c b/src/host/trxcon/src/trxcon_inst.c index c3a85da..7d3813e 100644 --- a/src/host/trxcon/src/trxcon_inst.c +++ b/src/host/trxcon/src/trxcon_inst.c @@ -26,6 +26,38 @@ #include <osmocom/bb/trxcon/trxcon.h> #include <osmocom/bb/trxcon/trxcon_fsm.h> #include <osmocom/bb/l1sched/l1sched.h> +#include <osmocom/bb/l1sched/logging.h> + +extern int g_logc_l1c; +extern int g_logc_l1d; + +void trxcon_set_log_cfg(const int *logc, unsigned int logc_num) +{ + int schc = DLGLOBAL; + int schd = DLGLOBAL; + + for (unsigned int i = 0; i < logc_num; i++) { + switch ((enum trxcon_log_cat)i) { + case TRXCON_LOGC_FSM: + trxcon_fsm_def.log_subsys = logc[i]; + break; + case TRXCON_LOGC_L1C: + g_logc_l1c = logc[i]; + break; + case TRXCON_LOGC_L1D: + g_logc_l1d = logc[i]; + break; + case TRXCON_LOGC_SCHC: + schc = logc[i]; + break; + case TRXCON_LOGC_SCHD: + schd = logc[i]; + break; + } + } + + l1sched_logging_init(schc, schd); +} struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance) { diff --git a/src/host/trxcon/src/trxcon_main.c b/src/host/trxcon/src/trxcon_main.c index 1ed2f89..94deeab 100644 --- a/src/host/trxcon/src/trxcon_main.c +++ b/src/host/trxcon/src/trxcon_main.c @@ -543,7 +543,6 @@ /* Init logging system */ trxcon_logging_init(tall_trxcon_ctx, app_data.debug_mask); - l1sched_logging_init(DSCH, DSCHD); /* Configure pretty logging */ log_set_print_extended_timestamp(osmo_stderr_target, 1); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Idf207947f620a7394e0a0e5bf2c37bcd8df64bbe Gerrit-Change-Number: 30101 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.