lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40690?usp=email ) Change subject: routing area: move cell.cell_id behind a geran union ...................................................................... routing area: move cell.cell_id behind a geran union To prepare for Iu support, use the SGSN RA cell for both, a GERAN Cell and a UTRAN Service Area. Change-Id: I0c24d98dd699748842dca271b93e58d27cf02285 --- M include/osmocom/sgsn/gprs_routing_area.h M src/sgsn/gprs_routing_area.c 2 files changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/90/40690/1 diff --git a/include/osmocom/sgsn/gprs_routing_area.h b/include/osmocom/sgsn/gprs_routing_area.h index a484a10..018e986 100644 --- a/include/osmocom/sgsn/gprs_routing_area.h +++ b/include/osmocom/sgsn/gprs_routing_area.h @@ -56,13 +56,13 @@ struct sgsn_ra *ra; enum sgsn_ra_ran_type ran_type; - - uint16_t cell_id; union { struct { uint16_t nsei; uint16_t bvci; + uint16_t cell_id; } geran; + struct { /* TODO: unused */ uint16_t rncid; diff --git a/src/sgsn/gprs_routing_area.c b/src/sgsn/gprs_routing_area.c index 1c27310..3c84008 100644 --- a/src/sgsn/gprs_routing_area.c +++ b/src/sgsn/gprs_routing_area.c @@ -101,8 +101,8 @@ return NULL; cell->ra = ra; - cell->cell_id = cell_id; cell->ran_type = RA_TYPE_GERAN_Gb; + cell->u.geran.cell_id = cell_id; cell->u.geran.bvci = bvci; cell->u.geran.nsei = nsei; @@ -206,7 +206,10 @@ return NULL; llist_for_each_entry(cell, &ra->cells, list) { - if (cell->cell_id == cell_id) + if (cell->ran_type != RA_TYPE_GERAN_Gb) + continue; + + if (cell->u.geran.cell_id == cell_id) return cell; } @@ -229,7 +232,10 @@ continue; llist_for_each_entry(cell, &ra->cells, list) { - if (cell->cell_id == cell_id) + if (cell->ran_type != RA_TYPE_GERAN_Gb) + continue; + + if (cell->u.geran.cell_id == cell_id) return cell; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40690?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I0c24d98dd699748842dca271b93e58d27cf02285 Gerrit-Change-Number: 40690 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis@fe80.eu>