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 osmocom-bb[master]: trxcon: test wrong format string passed to LOGPFSML
by fixeria 08 Nov '22

08 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30055 ) Change subject: trxcon: test wrong format string passed to LOGPFSML ...................................................................... trxcon: test wrong format string passed to LOGPFSML Change-Id: Ia40bfb42108d786e76dfb83f7d944de2a5ad929d --- M src/host/trxcon/src/trxcon.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/55/30055/1 diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 838bb6a..b1222b5 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -344,6 +344,8 @@ fi = osmo_fsm_inst_alloc(&trxcon_fsm_def, ctx, NULL, LOGL_DEBUG, NULL); OSMO_ASSERT(fi != NULL); + LOGPFSML(fi, LOGL_ERROR, "Test %s\n", 123, 456, "test"); + trxcon = talloc_zero(fi, struct trxcon_inst); OSMO_ASSERT(trxcon != NULL); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia40bfb42108d786e76dfb83f7d944de2a5ad929d Gerrit-Change-Number: 30055 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: trxcon: maintain full power scan state in the trxcon_fsm
by fixeria 08 Nov '22

08 Nov '22
Attention is currently required from: Hoernchen. Hello Jenkins Builder, Hoernchen, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/30054 to look at the new patch set (#2). Change subject: trxcon: maintain full power scan state in the trxcon_fsm ...................................................................... trxcon: maintain full power scan state in the trxcon_fsm Currently the trxcon_fsm is simply passing start and stop ARFCN values (as received from the L1CTL peer) over the PHYIF, and expecting the PHY to perform the measurements within the given range. This approach requires the PHY implementation to maintain some state internally. Let's simplify the job of the PHY implementation(s) by maintaining the power scan state in the trxcon_fsm and sending a PHYIF_CMDT_MEASURE command for each ARFCN in the given start/stop boundaries separately. Change-Id: Ic5f724a11e225b439ec10aed7697e3e03b7929e5 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/include/osmocom/bb/trxcon/trxcon.h M src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h M src/host/trxcon/src/trx_if.c M src/host/trxcon/src/trxcon.c M src/host/trxcon/src/trxcon_fsm.c 7 files changed, 71 insertions(+), 41 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/54/30054/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic5f724a11e225b439ec10aed7697e3e03b7929e5 Gerrit-Change-Number: 30054 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmocom-bb[master]: trxcon: maintain full power scan state in the trxcon_fsm
by fixeria 08 Nov '22

08 Nov '22
Attention is currently required from: Hoernchen. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30054 ) Change subject: trxcon: maintain full power scan state in the trxcon_fsm ...................................................................... Patch Set 1: (1 comment) File src/host/trxcon/src/trxcon_fsm.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30054/comment/97a2a9de_7824b812 PS1, Line 229: %s (expected %s Hmm, why doesn't gcc complain about wrong format string specifiers? When using LOGPFSML(), the macro expansion chain is as follows: LOGPFSML() -> LOGPFSMLSRC() -> LOGPFSMSLSRC() -> LOGPSRC() -> LOGPSRCC() -> logp2() __attribute__ ((format (printf, 6, 7))) The logp2() has the format attribute, which gives GCC a hint on format string checking. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic5f724a11e225b439ec10aed7697e3e03b7929e5 Gerrit-Change-Number: 30054 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Tue, 08 Nov 2022 14:21:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: fsm: add ignore_invalid_event_mask bit-mask
by lynxis lazus 08 Nov '22

08 Nov '22
lynxis lazus has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29907 ) Change subject: fsm: add ignore_invalid_event_mask bit-mask ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29907 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id010ade76de83ccf428f2d18e9f85bcce1d1ea2c Gerrit-Change-Number: 29907 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
Change in osmocom-bb[master]: trxcon: move the trxcon_fsm related stuff into its own header
by fixeria 07 Nov '22

07 Nov '22
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30030 ) Change subject: trxcon: move the trxcon_fsm related stuff into its own header ...................................................................... Patch Set 2: (1 comment) File src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h: https://gerrit.osmocom.org/c/osmocom-bb/+/30030/comment/3be8e7b3_9b794f2d PS1, Line 2: > Good point. Done -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I32097b27f8de8d2b765a4399ad5fd3a1bdba85f4 Gerrit-Change-Number: 30030 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 07 Nov 2022 21:35:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: move the trxcon_fsm related stuff into its own header
by fixeria 07 Nov '22

07 Nov '22
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30030 ) Change subject: trxcon: move the trxcon_fsm related stuff into its own header ...................................................................... Patch Set 2: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I32097b27f8de8d2b765a4399ad5fd3a1bdba85f4 Gerrit-Change-Number: 30030 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 07 Nov 2022 21:35:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: add handle_full_power_scan_req(), reduce code duplication
by fixeria 07 Nov '22

07 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30053 ) Change subject: trxcon: add handle_full_power_scan_req(), reduce code duplication ...................................................................... trxcon: add handle_full_power_scan_req(), reduce code duplication Allow TRXCON_ST_{FULL_POWER_SCAN->FULL_POWER_SCAN} state transition so that we can call osmo_fsm_inst_state_chg() unconditionally. Change-Id: I1ea69561a2d3cf73009c6244b1d0f090d744d7b2 Related: OS#5599 --- M src/host/trxcon/src/trxcon_fsm.c 1 file changed, 20 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/53/30053/1 diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index 5268bc6..38b95ec 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -121,6 +121,22 @@ } } +static void handle_full_power_scan_req(struct osmo_fsm_inst *fi, + const struct trxcon_param_full_power_scan_req *req) +{ + struct trxcon_inst *trxcon = fi->priv; + const struct phyif_cmd phycmd = { + .type = PHYIF_CMDT_MEASURE, + .param.measure = { + .band_arfcn_start = req->band_arfcn_start, + .band_arfcn_stop = req->band_arfcn_stop, + }, + }; + + osmo_fsm_inst_state_chg(fi, TRXCON_ST_FULL_POWER_SCAN, 0, 0); /* TODO: timeout */ + phyif_handle_cmd(trxcon->phyif, &phycmd); +} + static void trxcon_st_reset_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { @@ -156,20 +172,8 @@ break; } case TRXCON_EV_FULL_POWER_SCAN_REQ: - { - const struct trxcon_param_full_power_scan_req *req = data; - const struct phyif_cmd phycmd = { - .type = PHYIF_CMDT_MEASURE, - .param.measure = { - .band_arfcn_start = req->band_arfcn_start, - .band_arfcn_stop = req->band_arfcn_stop, - }, - }; - - osmo_fsm_inst_state_chg(fi, TRXCON_ST_FULL_POWER_SCAN, 0, 0); /* TODO: timeout */ - phyif_handle_cmd(trxcon->phyif, &phycmd); + handle_full_power_scan_req(fi, (const struct trxcon_param_full_power_scan_req *)data); break; - } default: OSMO_ASSERT(0); } @@ -189,19 +193,8 @@ break; } case TRXCON_EV_FULL_POWER_SCAN_REQ: - { - const struct trxcon_param_full_power_scan_req *req = data; - const struct phyif_cmd phycmd = { - .type = PHYIF_CMDT_MEASURE, - .param.measure = { - .band_arfcn_start = req->band_arfcn_start, - .band_arfcn_stop = req->band_arfcn_stop, - }, - }; - - phyif_handle_cmd(trxcon->phyif, &phycmd); + handle_full_power_scan_req(fi, (const struct trxcon_param_full_power_scan_req *)data); break; - } default: OSMO_ASSERT(0); } @@ -528,7 +521,8 @@ }, [TRXCON_ST_FULL_POWER_SCAN] = { .name = "FULL_POWER_SCAN", - .out_state_mask = S(TRXCON_ST_RESET), + .out_state_mask = S(TRXCON_ST_RESET) + | S(TRXCON_ST_FULL_POWER_SCAN), .in_event_mask = S(TRXCON_EV_FULL_POWER_SCAN_RES) | S(TRXCON_EV_FULL_POWER_SCAN_REQ), .action = &trxcon_st_full_power_scan_action, -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I1ea69561a2d3cf73009c6244b1d0f090d744d7b2 Gerrit-Change-Number: 30053 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: trxcon: maintain full power scan state in the trxcon_fsm
by fixeria 07 Nov '22

07 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30054 ) Change subject: trxcon: maintain full power scan state in the trxcon_fsm ...................................................................... trxcon: maintain full power scan state in the trxcon_fsm Currently the trxcon_fsm is simply passing start and stop ARFCN values (as received from the L1CTL peer) over the PHYIF, and expecting the PHY to perform the measurements within the given range. This approach requires the PHY implementation to maintain some state internally. Let's simplify the job of the PHY implementation(s) by maintaining the power scan state in the trxcon_fsm and sending a PHYIF_CMDT_MEASURE command for each ARFCN in the given start/stop boundaries separately. Change-Id: Ic5f724a11e225b439ec10aed7697e3e03b7929e5 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/include/osmocom/bb/trxcon/trxcon.h M src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h M src/host/trxcon/src/trx_if.c M src/host/trxcon/src/trxcon.c M src/host/trxcon/src/trxcon_fsm.c 7 files changed, 71 insertions(+), 41 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/54/30054/1 diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h index ae272dd..a92cb89 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h @@ -42,13 +42,11 @@ /* param of PHYIF_CMDT_MEASURE (command) */ struct phyif_cmdp_measure { - uint16_t band_arfcn_start; - uint16_t band_arfcn_stop; + uint16_t band_arfcn; }; /* param of PHYIF_CMDT_MEASURE (response) */ struct phyif_rspp_measure { - bool last; uint16_t band_arfcn; int dbm; }; 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 bfab0ad..92de3b0 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h @@ -29,10 +29,6 @@ uint32_t prev_state; bool powered_up; - /* GSM L1 specific */ - uint16_t pm_band_arfcn_start; - uint16_t pm_band_arfcn_stop; - /* Some private data */ void *priv; }; diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h index ad00a05..fbbd9e6 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h @@ -19,6 +19,9 @@ /* L2 interface (e.g. L1CTL) */ void *l2if; + /* State specific data of trxcon_fsm */ + void *fi_data; + /* L1 parameters */ struct { uint16_t band_arfcn; diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h index e1ab84d..bb57d25 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h @@ -47,7 +47,6 @@ /* param of TRXCON_EV_FULL_POWER_SCAN_RES */ struct trxcon_param_full_power_scan_res { - bool last_result; uint16_t band_arfcn; int dbm; }; diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index 928ad5d..77001ac 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -354,15 +354,11 @@ { uint16_t freq10; - /* Update ARFCN range for measurement */ - trx->pm_band_arfcn_start = cmdp->band_arfcn_start; - trx->pm_band_arfcn_stop = cmdp->band_arfcn_stop; - /* Calculate a frequency for current ARFCN (DL) */ - freq10 = gsm_arfcn2freq10(cmdp->band_arfcn_start, 0); + freq10 = gsm_arfcn2freq10(cmdp->band_arfcn, 0); if (freq10 == 0xffff) { LOGPFSML(trx->fi, LOGL_ERROR, - "ARFCN %d not defined\n", cmdp->band_arfcn_start); + "ARFCN %d not defined\n", cmdp->band_arfcn); return -ENOTSUP; } @@ -379,36 +375,22 @@ sscanf(resp, "%u %d", &freq10, &dbm); freq10 /= 100; - /* Check received ARFCN against expected */ band_arfcn = gsm_freq102arfcn((uint16_t) freq10, 0); - if (band_arfcn != trx->pm_band_arfcn_start) { - LOGPFSML(trx->fi, LOGL_ERROR, "Power measurement error: " - "response ARFCN=%u doesn't match expected ARFCN=%u\n", - band_arfcn & ~ARFCN_FLAG_MASK, - trx->pm_band_arfcn_start & ~ARFCN_FLAG_MASK); + if (band_arfcn == 0xffff) { + LOGPFSML(trx->fi, LOGL_ERROR, + "Failed to parse ARFCN from RSP MEASURE: %s\n", resp); return; } const struct phyif_rsp rsp = { .type = PHYIF_CMDT_MEASURE, .param.measure = { - .last = band_arfcn == trx->pm_band_arfcn_stop, .band_arfcn = band_arfcn, .dbm = dbm, }, }; phyif_handle_rsp(trx, &rsp); - - /* Schedule a next measurement */ - if (band_arfcn != trx->pm_band_arfcn_stop) { - const struct phyif_cmdp_measure cmdp = { - .band_arfcn_start = ++band_arfcn, - .band_arfcn_stop = trx->pm_band_arfcn_stop, - }; - - trx_if_cmd_measure(trx, &cmdp); - } } /* diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 4eea55a..838bb6a 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -188,7 +188,6 @@ { const struct phyif_rspp_measure *meas = &rsp->param.measure; struct trxcon_param_full_power_scan_res res = { - .last_result = meas->last, .band_arfcn = meas->band_arfcn, .dbm = meas->dbm, }; diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index 38b95ec..bbbf51a 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -53,6 +53,7 @@ osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); break; case TRXCON_EV_RESET_FULL_REQ: + TALLOC_FREE(trxcon->fi_data); if (fi->state != TRXCON_ST_RESET) osmo_fsm_inst_state_chg(fi, TRXCON_ST_RESET, 0, 0); l1sched_reset(trxcon->sched, true); @@ -125,16 +126,26 @@ const struct trxcon_param_full_power_scan_req *req) { struct trxcon_inst *trxcon = fi->priv; - const struct phyif_cmd phycmd = { - .type = PHYIF_CMDT_MEASURE, - .param.measure = { - .band_arfcn_start = req->band_arfcn_start, - .band_arfcn_stop = req->band_arfcn_stop, - }, - }; + enum gsm_band band_start, band_stop; + if (trxcon->fi_data != NULL) { + LOGPFSML(fi, LOGL_ERROR, "Full power scan is already in progress\n"); + return; + } + + /* The start and stop ARFCNs must be in the same band */ + if (gsm_arfcn2band_rc(req->band_arfcn_start, &band_start) != 0 || + gsm_arfcn2band_rc(req->band_arfcn_stop, &band_stop) != 0 || + band_start != band_stop) { + LOGPFSML(fi, LOGL_ERROR, "Full power scan request has invalid params\n"); + return; + } + + 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 */ osmo_fsm_inst_state_chg(fi, TRXCON_ST_FULL_POWER_SCAN, 0, 0); /* TODO: timeout */ - phyif_handle_cmd(trxcon->phyif, &phycmd); } static void trxcon_st_reset_action(struct osmo_fsm_inst *fi, @@ -179,6 +190,23 @@ } } +static void trxcon_st_full_power_scan_onenter(struct osmo_fsm_inst *fi, + uint32_t prev_state) +{ + const struct trxcon_inst *trxcon = fi->priv; + 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, + .param.measure = { + .band_arfcn = req->band_arfcn_start, + }, + }; + + phyif_handle_cmd(trxcon->phyif, &phycmd); +} + static void trxcon_st_full_power_scan_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { @@ -187,9 +215,33 @@ switch (event) { case TRXCON_EV_FULL_POWER_SCAN_RES: { + struct trxcon_param_full_power_scan_req *req = trxcon->fi_data; const struct trxcon_param_full_power_scan_res *res = data; - l1ctl_tx_pm_conf(trxcon->l2if, res->band_arfcn, res->dbm, res->last_result); + if (req == NULL) { + LOGPFSML(fi, LOGL_ERROR, "Rx unexpected power scan result\n"); + break; + } + + /* req->band_arfcn_start holds the expected ARFCN */ + if (res->band_arfcn != req->band_arfcn_start) { + LOGPFSML(fi, LOGL_ERROR, "Rx power scan result " + "with unexpected ARFCN %s (expected %s)\n", + res->band_arfcn & ~ARFCN_FLAG_MASK, + req->band_arfcn_start & ~ARFCN_FLAG_MASK); + break; + } + + if (res->band_arfcn < req->band_arfcn_stop) { + l1ctl_tx_pm_conf(trxcon->l2if, res->band_arfcn, res->dbm, false); + /* trxcon_st_full_power_scan_onenter() sends the next 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 { + l1ctl_tx_pm_conf(trxcon->l2if, res->band_arfcn, res->dbm, true); + LOGPFSML(fi, LOGL_INFO, "Full power scan completed\n"); + TALLOC_FREE(trxcon->fi_data); + } break; } case TRXCON_EV_FULL_POWER_SCAN_REQ: @@ -525,6 +577,7 @@ | S(TRXCON_ST_FULL_POWER_SCAN), .in_event_mask = S(TRXCON_EV_FULL_POWER_SCAN_RES) | S(TRXCON_EV_FULL_POWER_SCAN_REQ), + .onenter = &trxcon_st_full_power_scan_onenter, .action = &trxcon_st_full_power_scan_action, }, [TRXCON_ST_FBSB_SEARCH] = { -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic5f724a11e225b439ec10aed7697e3e03b7929e5 Gerrit-Change-Number: 30054 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: trxcon: add missing imports to trxcon.h
by fixeria 07 Nov '22

07 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30052 ) Change subject: trxcon: add missing imports to trxcon.h ...................................................................... trxcon: add missing imports to trxcon.h Change-Id: I0fa507e80a638ca7ed2ff421303e9722b33e20ea Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/52/30052/1 diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h index 117f3fd..b553fe4 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h @@ -1,5 +1,10 @@ #pragma once +#include <stdint.h> +#include <stdbool.h> + +#include <osmocom/core/fsm.h> + struct l1sched_state; extern struct osmo_fsm trxcon_fsm_def; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30052 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I0fa507e80a638ca7ed2ff421303e9722b33e20ea Gerrit-Change-Number: 30052 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: fw: Add initial support for Sony Ericsson K200i/K220i phones
by fixeria 07 Nov '22

07 Nov '22
Attention is currently required from: steve-m. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30051 ) Change subject: fw: Add initial support for Sony Ericsson K200i/K220i phones ...................................................................... Patch Set 1: Code-Review+1 (3 comments) Patchset: PS1: Looks good to me in general. File src/target/firmware/board/se_k2x0/init.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30051/comment/f7d6ad19_67f50652 PS1, Line 62: compal loader There's actually no Compal's loader in these SE phones (unlike the J100i). Is this also relevant for the TI's boot ROM? https://gerrit.osmocom.org/c/osmocom-bb/+/30051/comment/5f855081_09401023 PS1, Line 116: LCD driver There is no LCD support ATM, right? Looks like the comment needs to be updated. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I711702862b1cec5a8089dac071f8a171ca026003 Gerrit-Change-Number: 30051 Gerrit-PatchSet: 1 Gerrit-Owner: steve-m <steve(a)steve-m.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: steve-m <steve(a)steve-m.de> Gerrit-Comment-Date: Mon, 07 Nov 2022 21:31:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.