aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_nm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-03-14 15:37:43 +0800
committerHarald Welte <laforge@gnumonks.org>2010-03-22 19:02:04 +0800
commit97a282b037408438a876af81e2e9c5194c2bb69e (patch)
tree4b7bc0f413a75d02d8402bf724b889c74d6a93ad /openbsc/src/abis_nm.c
parentd859a24f7d1dca2aed4e69330124e52d674d1589 (diff)
Create new gprs-conf branch with the non-SGSN part of the gprs branch
This new gprs-conf branch is intended to contain everything needed to configure GPRS in the nanoBTS, but without implementing the SGSN/GGSN functionality. The SGSN/GGSN development will happen in a branch based on this branch called "gprs-sgsn"
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r--openbsc/src/abis_nm.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index 99d8dd621..1e5e1c87c 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -856,28 +856,20 @@ static int abis_nm_rx_sw_act_req(struct msgb *mb)
const u_int8_t *sw_config;
int sw_config_len;
int file_id_len;
- int nack = 0;
int ret;
debugp_foh(foh);
DEBUGPC(DNM, "SW Activate Request: ");
- if (foh->obj_class >= 0xf0 && foh->obj_class <= 0xf3) {
- DEBUGPC(DNM, "NACKing for GPRS obj_class 0x%02x\n", foh->obj_class);
- nack = 1;
- } else
- DEBUGPC(DNM, "ACKing and Activating\n");
+ DEBUGP(DNM, "Software Activate Request, ACKing and Activating\n");
ret = abis_nm_sw_act_req_ack(mb->trx->bts, foh->obj_class,
foh->obj_inst.bts_nr,
foh->obj_inst.trx_nr,
- foh->obj_inst.ts_nr, nack,
+ foh->obj_inst.ts_nr, 0,
foh->data, oh->length-sizeof(*foh));
- if (nack)
- return ret;
-
abis_nm_tlv_parse(&tp, mb->trx->bts, foh->data, oh->length-sizeof(*foh));
sw_config = TLVP_VAL(&tp, NM_ATT_SW_CONFIG);
sw_config_len = TLVP_LEN(&tp, NM_ATT_SW_CONFIG);
@@ -2881,6 +2873,14 @@ int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, u_int8_t obj_class,
attr, attr_len);
}
+void abis_nm_ipaccess_cgi(u_int8_t *buf, struct gsm_bts *bts)
+{
+ /* we simply reuse the GSM48 function and overwrite the RAC
+ * with the Cell ID */
+ gsm48_ra_id_by_bts(buf, bts);
+ *((u_int16_t *)(buf + 5)) = htons(bts->cell_identity);
+}
+
void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked)
{
int new_state = locked ? NM_STATE_LOCKED : NM_STATE_UNLOCKED;
@@ -3000,5 +3000,3 @@ int ipac_parse_bcch_info(struct ipac_bcch_info *binf, u_int8_t *buf)
return 0;
}
-
-