bis_nm_ipaccess_set_nvattr() executes on a TRX, not a BTS

This commit is contained in:
Harald Welte 2010-01-07 20:39:42 +01:00
parent cbcfe24fee
commit 2ef156db43
3 changed files with 8 additions and 8 deletions

View File

@ -808,7 +808,7 @@ int abis_nm_ipaccess_msg(struct gsm_bts *bts, u_int8_t msg_type,
u_int8_t obj_class, u_int8_t bts_nr, u_int8_t obj_class, u_int8_t bts_nr,
u_int8_t trx_nr, u_int8_t ts_nr, u_int8_t trx_nr, u_int8_t ts_nr,
u_int8_t *attr, int attr_len); u_int8_t *attr, int attr_len);
int abis_nm_ipaccess_set_nvattr(struct gsm_bts *bts, u_int8_t *attr, int abis_nm_ipaccess_set_nvattr(struct gsm_bts_trx *trx, u_int8_t *attr,
int attr_len); int attr_len);
int abis_nm_ipaccess_restart(struct gsm_bts *bts); int abis_nm_ipaccess_restart(struct gsm_bts *bts);
int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, u_int8_t obj_class, int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, u_int8_t obj_class,

View File

@ -2899,11 +2899,11 @@ int abis_nm_ipaccess_msg(struct gsm_bts *bts, u_int8_t msg_type,
} }
/* set some attributes in NVRAM */ /* set some attributes in NVRAM */
int abis_nm_ipaccess_set_nvattr(struct gsm_bts *bts, u_int8_t *attr, int abis_nm_ipaccess_set_nvattr(struct gsm_bts_trx *trx, u_int8_t *attr,
int attr_len) int attr_len)
{ {
return abis_nm_ipaccess_msg(bts, NM_MT_IPACC_SET_NVATTR, return abis_nm_ipaccess_msg(trx->bts, NM_MT_IPACC_SET_NVATTR,
NM_OC_BASEB_TRANSC, 0, 0, 0xff, attr, NM_OC_BASEB_TRANSC, 0, trx->nr, 0xff, attr,
attr_len); attr_len);
} }

View File

@ -268,7 +268,7 @@ static int swload_cbfn(unsigned int hook, unsigned int event, struct msgb *_msg,
msg->l2h[1] = msgb_l3len(msg) >> 8; msg->l2h[1] = msgb_l3len(msg) >> 8;
msg->l2h[2] = msgb_l3len(msg) & 0xff; msg->l2h[2] = msgb_l3len(msg) & 0xff;
printf("Foo l2h: %p l3h: %p... length l2: %u l3: %u\n", msg->l2h, msg->l3h, msgb_l2len(msg), msgb_l3len(msg)); printf("Foo l2h: %p l3h: %p... length l2: %u l3: %u\n", msg->l2h, msg->l3h, msgb_l2len(msg), msgb_l3len(msg));
abis_nm_ipaccess_set_nvattr(bts, msg->l2h, msgb_l2len(msg)); abis_nm_ipaccess_set_nvattr(bts->c0, msg->l2h, msgb_l2len(msg));
msgb_free(msg); msgb_free(msg);
break; break;
case NM_MT_LOAD_END_NACK: case NM_MT_LOAD_END_NACK:
@ -313,7 +313,7 @@ static void bootstrap_om(struct gsm_bts *bts)
memcpy(buf+3, unit_id, len); memcpy(buf+3, unit_id, len);
buf[3+len] = 0; buf[3+len] = 0;
printf("setting Unit ID to '%s'\n", unit_id); printf("setting Unit ID to '%s'\n", unit_id);
abis_nm_ipaccess_set_nvattr(bts, buf, 3+len+1); abis_nm_ipaccess_set_nvattr(bts->c0, buf, 3+len+1);
} }
if (prim_oml_ip) { if (prim_oml_ip) {
struct in_addr ia; struct in_addr ia;
@ -337,7 +337,7 @@ static void bootstrap_om(struct gsm_bts *bts)
*cur++ = 0; *cur++ = 0;
printf("setting primary OML link IP to '%s'\n", inet_ntoa(ia)); printf("setting primary OML link IP to '%s'\n", inet_ntoa(ia));
oml_state = 1; oml_state = 1;
abis_nm_ipaccess_set_nvattr(bts, buf, 3+len); abis_nm_ipaccess_set_nvattr(bts->c0, buf, 3+len);
} }
if (nv_mask) { if (nv_mask) {
len = 4; len = 4;
@ -351,7 +351,7 @@ static void bootstrap_om(struct gsm_bts *bts)
*cur++ = nv_mask >> 8; *cur++ = nv_mask >> 8;
printf("setting NV Flags/Mask to 0x%04x/0x%04x\n", printf("setting NV Flags/Mask to 0x%04x/0x%04x\n",
nv_flags, nv_mask); nv_flags, nv_mask);
abis_nm_ipaccess_set_nvattr(bts, buf, 3+len); abis_nm_ipaccess_set_nvattr(bts->c0, buf, 3+len);
} }
if (restart && !prim_oml_ip && !software) { if (restart && !prim_oml_ip && !software) {