follow gprs_ns2 API enum changes

All gprs_ns2 enums have now GPRS_NS2 as prefix.

Depends-on: I548ff12f7277cbb7e1a630a3dc02b738ce89be72 (libosmocore)
Change-Id: Ifdc7956318c07d680feab33c22bc2c6f20927bf9
This commit is contained in:
Alexander Couzens 2021-01-25 20:28:38 +01:00 committed by pespin
parent 91e3567a15
commit f7ec52560f
3 changed files with 14 additions and 14 deletions

View File

@ -576,10 +576,10 @@ int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
void gprs_ns_prim_status_cb(struct osmo_gprs_ns2_prim *nsp)
{
switch (nsp->u.status.cause) {
case NS_AFF_CAUSE_SNS_CONFIGURED:
case GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED:
LOGP(DPCU, LOGL_NOTICE, "NS-NSE %d SNS configured.\n", nsp->nsei);
break;
case NS_AFF_CAUSE_RECOVERY:
case GPRS_NS2_AFF_CAUSE_RECOVERY:
LOGP(DPCU, LOGL_NOTICE, "NS-NSE %d became available\n", nsp->nsei);
if (!the_pcu->bssgp.nsvc_unblocked) {
the_pcu->bssgp.bvc_sig_reset = 0;
@ -588,7 +588,7 @@ void gprs_ns_prim_status_cb(struct osmo_gprs_ns2_prim *nsp)
bvc_timeout(NULL);
}
break;
case NS_AFF_CAUSE_FAILURE:
case GPRS_NS2_AFF_CAUSE_FAILURE:
LOGP(DPCU, LOGL_NOTICE, "NS-NSE %d became unavailable\n", nsp->nsei);
if (the_pcu->bssgp.nsvc_unblocked) {
the_pcu->bssgp.nsvc_unblocked = 0;
@ -598,7 +598,7 @@ void gprs_ns_prim_status_cb(struct osmo_gprs_ns2_prim *nsp)
the_pcu->bssgp.bvc_unblocked = 0;
}
break;
case NS_AFF_CAUSE_SNS_FAILURE:
case GPRS_NS2_AFF_CAUSE_SNS_FAILURE:
break;
default:
LOGP(DPCU, LOGL_DEBUG,
@ -628,7 +628,7 @@ int gprs_ns_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
}
switch (oph->primitive) {
case PRIM_NS_UNIT_DATA:
case GPRS_NS2_PRIM_UNIT_DATA:
/* hand the message into the BSSGP implementation */
/* add required msg fields for Gb layer */
msgb_bssgph(oph->msg) = oph->msg->l3h;
@ -636,10 +636,10 @@ int gprs_ns_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
msgb_nsei(oph->msg) = nsp->nsei;
rc = gprs_bssgp_pcu_rcvmsg(oph->msg);
break;
case PRIM_NS_STATUS:
case GPRS_NS2_PRIM_STATUS:
gprs_ns_prim_status_cb(nsp);
break;
case PRIM_NS_CONGESTION:
case GPRS_NS2_PRIM_CONGESTION:
break;
default:
LOGP(DPCU, LOGL_DEBUG,
@ -663,7 +663,7 @@ int gprs_gp_send_cb(void *ctx, struct msgb *msg)
struct osmo_gprs_ns2_prim nsp = {};
nsp.nsei = msgb_nsei(msg);
nsp.bvci = msgb_bvci(msg);
osmo_prim_init(&nsp.oph, SAP_NS, PRIM_NS_UNIT_DATA,
osmo_prim_init(&nsp.oph, SAP_NS, GPRS_NS2_PRIM_UNIT_DATA,
PRIM_OP_REQUEST, msg);
return gprs_ns2_recv_prim(nsi, &nsp.oph);
}
@ -1029,7 +1029,7 @@ static int ns_create_nsvc(struct gprs_rlcmac_bts *bts,
continue;
/* FIXME: for SNS we just use the first successful NS-VC instead of all for the initial connect */
if (the_pcu->vty.ns_dialect == NS2_DIALECT_SNS) {
if (the_pcu->vty.ns_dialect == GPRS_NS2_DIALECT_SNS) {
rc = gprs_ns2_sns_add_endpoint(bts->nse, &remote[i]);
if (!rc)
return rc;
@ -1099,7 +1099,7 @@ int gprs_ns_config(struct gprs_rlcmac_bts *bts, uint16_t nsei,
gprs_ns2_free_nses(the_pcu->nsi);
gprs_ns2_free_binds(the_pcu->nsi);
rc = ns_create_nsvc(bts, nsei, local, remote, nsvci, valid);
} else if (the_pcu->vty.ns_dialect == NS2_DIALECT_SNS) {
} else if (the_pcu->vty.ns_dialect == GPRS_NS2_DIALECT_SNS) {
/* SNS: check if the initial nsvc is the same, if not recreate it */
const struct osmo_sockaddr *initial = gprs_ns2_nse_sns_remote(bts->nse);
unsigned int i;

View File

@ -91,7 +91,7 @@ struct gprs_pcu *gprs_pcu_alloc(void *ctx)
pcu->vty.mcs_lqual_ranges[7].high = 24;
pcu->vty.mcs_lqual_ranges[8].low = 23;
pcu->vty.mcs_lqual_ranges[8].high = 256;
pcu->vty.ns_dialect = NS2_DIALECT_IPACCESS;
pcu->vty.ns_dialect = GPRS_NS2_DIALECT_IPACCESS;
/* TODO: increase them when CRBB decoding is implemented */
pcu->vty.ws_base = 64;
pcu->vty.ws_pdch = 0;

View File

@ -244,7 +244,7 @@ static int config_write_pcu(struct vty *vty)
}
}
if (the_pcu->vty.ns_dialect == NS2_DIALECT_SNS)
if (the_pcu->vty.ns_dialect == GPRS_NS2_DIALECT_SNS)
vty_out(vty, " gb-dialect ip-sns%s", VTY_NEWLINE);
else
vty_out(vty, " gb-dialect classic%s", VTY_NEWLINE);
@ -1010,9 +1010,9 @@ DEFUN_USRATTR(cfg_pcu_gb_dialect,
"Modern Gb interface with IP-SNS (Sub Network Service) and dynamic configuration\n")
{
if (!strcmp(argv[0], "ip-sns")) {
the_pcu->vty.ns_dialect = NS2_DIALECT_SNS;
the_pcu->vty.ns_dialect = GPRS_NS2_DIALECT_SNS;
} else {
the_pcu->vty.ns_dialect = NS2_DIALECT_IPACCESS;
the_pcu->vty.ns_dialect = GPRS_NS2_DIALECT_IPACCESS;
}
return CMD_SUCCESS;