diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 1026474..9efe402 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -64,6 +64,7 @@
 #include <openbsc/gprs_sgsn.h>
 #include <openbsc/gprs_gmm.h>
 #include <openbsc/gprs_utils.h>
+#include <openbsc/gprs_subscriber.h>
 #include <openbsc/sgsn.h>
 #include <openbsc/signal.h>
 #include <openbsc/iu.h>
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index 260e032..727524e 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -31,7 +31,7 @@
 #include <osmocom/gprs/gprs_bssgp.h>
 #include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
 
-#include <openbsc/gsm_subscriber.h>
+#include <openbsc/gprs_subscriber.h>
 #include <openbsc/debug.h>
 #include <openbsc/gprs_sgsn.h>
 #include <openbsc/sgsn.h>
@@ -321,9 +321,9 @@
 
 	/* Detach from subscriber which is possibly freed then */
 	if (mm->subscr) {
-		struct gsm_subscriber *subscr = subscr_get(mm->subscr);
+		struct gprs_subscr *subscr = gprs_subscr_get(mm->subscr);
 		gprs_subscr_cleanup(subscr);
-		subscr_put(subscr);
+		gprs_subscr_put(subscr);
 	}
 
 	sgsn_mm_ctx_free(mm);
diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c
index 57f73c5..5f426f8 100644
--- a/openbsc/src/gprs/gprs_subscriber.c
+++ b/openbsc/src/gprs/gprs_subscriber.c
@@ -23,7 +23,8 @@
 #include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
 #include <osmocom/gsm/gsup.h>
 #include <osmocom/core/utils.h>
-#include <openbsc/gsm_subscriber.h>
+#include <osmocom/core/logging.h>
+#include <openbsc/gprs_subscriber.h>
 #include <openbsc/gsup_client.h>
 
 #include <openbsc/sgsn.h>
@@ -35,6 +36,7 @@
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <limits.h>
 
 #define SGSN_SUBSCR_MAX_RETRIES 3
 #define SGSN_SUBSCR_RETRY_INTERVAL 10
@@ -46,6 +48,9 @@
 
 extern void *tall_bsc_ctx;
 
+LLIST_HEAD(_gprs_subscribers);
+struct llist_head * const gprs_subscribers = &_gprs_subscribers;
+
 static int gsup_read_cb(struct gsup_client *gsupc, struct msgb *msg);
 
 /* TODO: Some functions are specific to the SGSN, but this file is more general
@@ -86,7 +91,7 @@
 	return rc;
 }
 
-int gprs_subscr_purge(struct gsm_subscriber *subscr);
+int gprs_subscr_purge(struct gprs_subscr *subscr);
 
 static struct sgsn_subscriber_data *sgsn_subscriber_data_alloc(void *ctx)
 {
@@ -117,28 +122,53 @@
 	return pdata;
 }
 
-struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi)
+struct gprs_subscr *gprs_subscr_get_by_imsi(const char *imsi)
 {
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *gsub;
 
-	subscr = subscr_get_or_create(NULL, imsi);
-	if (!subscr)
+	if (!imsi || !*imsi)
 		return NULL;
 
-	if (!subscr->sgsn_data)
-		subscr->sgsn_data = sgsn_subscriber_data_alloc(subscr);
-	return subscr;
+	llist_for_each_entry(gsub, gprs_subscribers, entry) {
+		if (!strcmp(gsub->imsi, imsi))
+			return gprs_subscr_get(gsub);
+	}
+	return NULL;
 }
 
-struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi)
+static struct gprs_subscr *gprs_subscr_alloc(void)
 {
-	return subscr_active_by_imsi(NULL, imsi);
+	struct gprs_subscr *gsub;
+	gsub = talloc_zero(tall_bsc_ctx, struct gprs_subscr);
+	if (!gsub)
+		return NULL;
+	llist_add_tail(&gsub->entry, gprs_subscribers);
+	gsub->use_count = 1;
+	gsub->tmsi = GSM_RESERVED_TMSI;
+	return gsub;
 }
 
-void gprs_subscr_cleanup(struct gsm_subscriber *subscr)
+struct gprs_subscr *gprs_subscr_get_or_create(const char *imsi)
+{
+	struct gprs_subscr *gsub;
+
+	gsub = gprs_subscr_get_by_imsi(imsi);
+	if (!gsub) {
+		gsub = gprs_subscr_alloc();
+		if (!gsub)
+			return NULL;
+		strncpy(gsub->imsi, imsi, sizeof(gsub->imsi));
+	}
+
+	if (!gsub->sgsn_data)
+		gsub->sgsn_data = sgsn_subscriber_data_alloc(gsub);
+	return gsub;
+}
+
+void gprs_subscr_cleanup(struct gprs_subscr *subscr)
 {
 	if (subscr->sgsn_data->mm) {
-		subscr_put(subscr->sgsn_data->mm->subscr);
+		gprs_subscr_put(subscr->sgsn_data->mm->subscr);
 		subscr->sgsn_data->mm->subscr = NULL;
 		subscr->sgsn_data->mm = NULL;
 	}
@@ -149,7 +179,7 @@
 	}
 }
 
-void gprs_subscr_cancel(struct gsm_subscriber *subscr)
+void gprs_subscr_cancel(struct gprs_subscr *subscr)
 {
 	subscr->authorized = 0;
 	subscr->flags |= GPRS_SUBSCRIBER_CANCELLED;
@@ -159,7 +189,7 @@
 	gprs_subscr_cleanup(subscr);
 }
 
-static int gprs_subscr_tx_gsup_message(struct gsm_subscriber *subscr,
+static int gprs_subscr_tx_gsup_message(struct gprs_subscr *subscr,
 				       struct osmo_gsup_message *gsup_msg)
 {
 	struct msgb *msg = gsup_client_msgb_alloc();
@@ -181,7 +211,7 @@
 	return gsup_client_send(sgsn->gsup_client, msg);
 }
 
-static int gprs_subscr_tx_gsup_error_reply(struct gsm_subscriber *subscr,
+static int gprs_subscr_tx_gsup_error_reply(struct gprs_subscr *subscr,
 					   struct osmo_gsup_message *gsup_orig,
 					   enum gsm48_gmm_cause cause)
 {
@@ -196,7 +226,7 @@
 	return gprs_subscr_tx_gsup_message(subscr, &gsup_reply);
 }
 
-static int gprs_subscr_handle_gsup_auth_res(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_gsup_auth_res(struct gprs_subscr *subscr,
 					    struct osmo_gsup_message *gsup_msg)
 {
 	unsigned idx;
@@ -235,7 +265,7 @@
 	return 0;
 }
 
-static int gprs_subscr_pdp_data_clear(struct gsm_subscriber *subscr)
+static int gprs_subscr_pdp_data_clear(struct gprs_subscr *subscr)
 {
 	struct sgsn_subscriber_pdp_data *pdp, *pdp2;
 	int count = 0;
@@ -250,7 +280,7 @@
 }
 
 static struct sgsn_subscriber_pdp_data *gprs_subscr_pdp_data_get_by_id(
-	struct gsm_subscriber *subscr, unsigned context_id)
+	struct gprs_subscr *subscr, unsigned context_id)
 {
 	struct sgsn_subscriber_pdp_data *pdp;
 
@@ -263,7 +293,7 @@
 }
 
 
-static void gprs_subscr_gsup_insert_data(struct gsm_subscriber *subscr,
+static void gprs_subscr_gsup_insert_data(struct gprs_subscr *subscr,
 					 struct osmo_gsup_message *gsup_msg)
 {
 	struct sgsn_subscriber_data *sdata = subscr->sgsn_data;
@@ -340,7 +370,7 @@
 	}
 }
 
-static int gprs_subscr_handle_gsup_upd_loc_res(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_gsup_upd_loc_res(struct gprs_subscr *subscr,
 					       struct osmo_gsup_message *gsup_msg)
 {
 	/* contrary to MAP, we allow piggy-backing subscriber data onto
@@ -357,7 +387,7 @@
 	return 0;
 }
 
-static int gprs_subscr_handle_gsup_dsd_req(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_gsup_dsd_req(struct gprs_subscr *subscr,
 					   struct osmo_gsup_message *gsup_msg)
 {
 	struct osmo_gsup_message gsup_reply = {0};
@@ -377,7 +407,7 @@
 	return gprs_subscr_tx_gsup_message(subscr, &gsup_reply);
 }
 
-static int gprs_subscr_handle_gsup_isd_req(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_gsup_isd_req(struct gprs_subscr *subscr,
 					   struct osmo_gsup_message *gsup_msg)
 {
 	struct osmo_gsup_message gsup_reply = {0};
@@ -409,7 +439,7 @@
 	}
 }
 
-static int gprs_subscr_handle_gsup_auth_err(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_gsup_auth_err(struct gprs_subscr *subscr,
 					    struct osmo_gsup_message *gsup_msg)
 {
 	unsigned idx;
@@ -462,7 +492,7 @@
 	return -gsup_msg->cause;
 }
 
-static int gprs_subscr_handle_gsup_upd_loc_err(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_gsup_upd_loc_err(struct gprs_subscr *subscr,
 					       struct osmo_gsup_message *gsup_msg)
 {
 	int cause_err;
@@ -523,7 +553,7 @@
 	return 0;
 }
 
-static int gprs_subscr_handle_gsup_purge_res(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_gsup_purge_res(struct gprs_subscr *subscr,
 					     struct osmo_gsup_message *gsup_msg)
 {
 	LOGGSUBSCRP(LOGL_INFO, subscr, "Completing purge MS\n");
@@ -535,7 +565,7 @@
 	return 0;
 }
 
-static int gprs_subscr_handle_gsup_purge_err(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_gsup_purge_err(struct gprs_subscr *subscr,
 					     struct osmo_gsup_message *gsup_msg)
 {
 	LOGGSUBSCRP(LOGL_NOTICE, subscr,
@@ -568,7 +598,7 @@
 	return -gsup_msg->cause;
 }
 
-static int gprs_subscr_handle_loc_cancel_req(struct gsm_subscriber *subscr,
+static int gprs_subscr_handle_loc_cancel_req(struct gprs_subscr *subscr,
 					     struct osmo_gsup_message *gsup_msg)
 {
 	struct osmo_gsup_message gsup_reply = {0};
@@ -629,7 +659,7 @@
 	int rc = 0;
 
 	struct osmo_gsup_message gsup_msg = {0};
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 
 	rc = osmo_gsup_decode(data, data_len, &gsup_msg);
 	if (rc < 0) {
@@ -715,12 +745,12 @@
 		break;
 	};
 
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 
 	return rc;
 }
 
-int gprs_subscr_purge(struct gsm_subscriber *subscr)
+int gprs_subscr_purge(struct gprs_subscr *subscr)
 {
 	struct sgsn_subscriber_data *sdata = subscr->sgsn_data;
 	struct osmo_gsup_message gsup_msg = {0};
@@ -736,7 +766,7 @@
 	return gprs_subscr_tx_gsup_message(subscr, &gsup_msg);
 }
 
-int gprs_subscr_query_auth_info(struct gsm_subscriber *subscr)
+int gprs_subscr_query_auth_info(struct gprs_subscr *subscr)
 {
 	struct osmo_gsup_message gsup_msg = {0};
 
@@ -747,7 +777,7 @@
 	return gprs_subscr_tx_gsup_message(subscr, &gsup_msg);
 }
 
-int gprs_subscr_location_update(struct gsm_subscriber *subscr)
+int gprs_subscr_location_update(struct gprs_subscr *subscr)
 {
 	struct osmo_gsup_message gsup_msg = {0};
 
@@ -758,60 +788,59 @@
 	return gprs_subscr_tx_gsup_message(subscr, &gsup_msg);
 }
 
-void gprs_subscr_update(struct gsm_subscriber *subscr)
+void gprs_subscr_update(struct gprs_subscr *subscr)
 {
 	LOGGSUBSCRP(LOGL_DEBUG, subscr, "Updating subscriber data\n");
 
 	subscr->flags &= ~GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING;
-	subscr->flags &= ~GSM_SUBSCRIBER_FIRST_CONTACT;
+	subscr->flags &= ~GPRS_SUBSCRIBER_FIRST_CONTACT;
 
 	if (subscr->sgsn_data->mm)
 		sgsn_update_subscriber_data(subscr->sgsn_data->mm);
 }
 
-void gprs_subscr_update_auth_info(struct gsm_subscriber *subscr)
+void gprs_subscr_update_auth_info(struct gprs_subscr *subscr)
 {
 	LOGGSUBSCRP(LOGL_DEBUG, subscr,
 		"Updating subscriber authentication info\n");
 
 	subscr->flags &= ~GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING;
-	subscr->flags &= ~GSM_SUBSCRIBER_FIRST_CONTACT;
+	subscr->flags &= ~GPRS_SUBSCRIBER_FIRST_CONTACT;
 
 	if (subscr->sgsn_data->mm)
 		sgsn_update_subscriber_data(subscr->sgsn_data->mm);
 }
 
-struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mmctx)
+struct gprs_subscr *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mmctx)
 {
-	struct gsm_subscriber *subscr = NULL;
+	struct gprs_subscr *subscr = NULL;
 
 	if (mmctx->subscr)
-		return subscr_get(mmctx->subscr);
+		return gprs_subscr_get(mmctx->subscr);
 
 	if (mmctx->imsi[0])
 		subscr = gprs_subscr_get_by_imsi(mmctx->imsi);
 
 	if (!subscr) {
 		subscr = gprs_subscr_get_or_create(mmctx->imsi);
-		subscr->flags |= GSM_SUBSCRIBER_FIRST_CONTACT;
+		subscr->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT;
 		subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE;
 	}
 
-	osmo_strlcpy(subscr->equipment.imei, mmctx->imei,
-		     sizeof(subscr->equipment.imei));
+	osmo_strlcpy(subscr->imei, mmctx->imei, sizeof(subscr->imei));
 
 	if (subscr->lac != mmctx->ra.lac)
 		subscr->lac = mmctx->ra.lac;
 
 	subscr->sgsn_data->mm = mmctx;
-	mmctx->subscr = subscr_get(subscr);
+	mmctx->subscr = gprs_subscr_get(subscr);
 
 	return subscr;
 }
 
 int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx)
 {
-	struct gsm_subscriber *subscr = NULL;
+	struct gprs_subscr *subscr = NULL;
 	int rc;
 
 	LOGMMCTXP(LOGL_DEBUG, mmctx, "Requesting subscriber data update\n");
@@ -821,13 +850,13 @@
 	subscr->flags |= GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING;
 
 	rc = gprs_subscr_location_update(subscr);
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 	return rc;
 }
 
 int gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx)
 {
-	struct gsm_subscriber *subscr = NULL;
+	struct gprs_subscr *subscr = NULL;
 	int rc;
 
 	LOGMMCTXP(LOGL_DEBUG, mmctx, "Requesting subscriber authentication info\n");
@@ -837,6 +866,40 @@
 	subscr->flags |= GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING;
 
 	rc = gprs_subscr_query_auth_info(subscr);
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 	return rc;
 }
+
+static void gprs_subscr_free(struct gprs_subscr *gsub)
+{
+	llist_del(&gsub->entry);
+	talloc_free(gsub);
+}
+
+struct gprs_subscr *_gprs_subscr_get(struct gprs_subscr *gsub,
+				     const char *file, int line)
+{
+	OSMO_ASSERT(gsub->use_count < INT_MAX);
+	gsub->use_count++;
+	LOGPSRC(DREF, LOGL_DEBUG, file, line,
+		"subscr %s usage increases to: %d\n",
+		gsub->imsi, gsub->use_count);
+	return gsub;
+}
+
+struct gprs_subscr *_gprs_subscr_put(struct gprs_subscr *gsub,
+				     const char *file, int line)
+{
+	gsub->use_count--;
+	LOGPSRC(DREF, gsub->use_count >= 0? LOGL_DEBUG : LOGL_ERROR,
+		file, line,
+		"subscr %s usage decreases to: %d%s\n",
+		gsub->imsi, gsub->use_count,
+		gsub->keep_in_ram? ", keep-in-ram flag is set" : "");
+	if (gsub->use_count > 0)
+		return gsub;
+	if (gsub->keep_in_ram)
+		return gsub;
+	gprs_subscr_free(gsub);
+	return NULL;
+}
diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c
index 1fa7fc4..df7ee37 100644
--- a/openbsc/src/gprs/sgsn_auth.c
+++ b/openbsc/src/gprs/sgsn_auth.c
@@ -24,7 +24,7 @@
 #include <openbsc/sgsn.h>
 #include <openbsc/gprs_sgsn.h>
 #include <openbsc/gprs_gmm.h>
-#include <openbsc/gsm_subscriber.h>
+#include <openbsc/gprs_subscriber.h>
 #include <openbsc/debug.h>
 
 const struct value_string auth_state_names[] = {
@@ -151,7 +151,7 @@
  */
 int sgsn_auth_request(struct sgsn_mm_ctx *mmctx)
 {
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 	struct gsm_auth_tuple *at;
 	int need_update_location;
 	int rc;
@@ -169,7 +169,7 @@
 
 	/* This has the side effect of registering the subscr with the mmctx */
 	subscr = gprs_subscr_get_or_create_by_mmctx(mmctx);
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 
 	OSMO_ASSERT(mmctx->subscr != NULL);
 
@@ -207,7 +207,7 @@
 void sgsn_auth_update(struct sgsn_mm_ctx *mmctx)
 {
 	enum sgsn_auth_state auth_state;
-	struct gsm_subscriber *subscr = mmctx->subscr;
+	struct gprs_subscr *subscr = mmctx->subscr;
 	struct gsm_auth_tuple *at;
 	int gmm_cause;
 
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c
index 062de44..dde1e5e 100644
--- a/openbsc/src/gprs/sgsn_libgtp.c
+++ b/openbsc/src/gprs/sgsn_libgtp.c
@@ -48,7 +48,7 @@
 #include <openbsc/gprs_llc.h>
 #include <openbsc/gprs_sgsn.h>
 #include <openbsc/gprs_gmm.h>
-#include <openbsc/gsm_subscriber.h>
+#include <openbsc/gprs_subscriber.h>
 #include <openbsc/gprs_sndcp.h>
 
 #ifdef BUILD_IU
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index 3ce054f..a730635 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -657,40 +657,37 @@
 }
 
 /* Subscriber */
-#include <openbsc/gsm_subscriber.h>
+#include <openbsc/gprs_subscriber.h>
 
-static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr, int pending)
+static void subscr_dump_full_vty(struct vty *vty, struct gprs_subscr *gsub, int pending)
 {
+#if 0
 	char expire_time[200];
+#endif
 	struct gsm_auth_tuple *at;
 	int at_idx;
 	struct sgsn_subscriber_pdp_data *pdp;
 
-	vty_out(vty, "    ID: %llu, Authorized: %d%s", subscr->id,
-		subscr->authorized, VTY_NEWLINE);
-	if (strlen(subscr->name))
-		vty_out(vty, "    Name: '%s'%s", subscr->name, VTY_NEWLINE);
-	if (strlen(subscr->extension))
-		vty_out(vty, "    Extension: %s%s", subscr->extension,
-			VTY_NEWLINE);
+	vty_out(vty, "    Authorized: %d%s",
+		gsub->authorized, VTY_NEWLINE);
 	vty_out(vty, "    LAC: %d/0x%x%s",
-		subscr->lac, subscr->lac, VTY_NEWLINE);
-	vty_out(vty, "    IMSI: %s%s", subscr->imsi, VTY_NEWLINE);
-	if (subscr->tmsi != GSM_RESERVED_TMSI)
-		vty_out(vty, "    TMSI: %08X%s", subscr->tmsi,
+		gsub->lac, gsub->lac, VTY_NEWLINE);
+	vty_out(vty, "    IMSI: %s%s", gsub->imsi, VTY_NEWLINE);
+	if (gsub->tmsi != GSM_RESERVED_TMSI)
+		vty_out(vty, "    TMSI: %08X%s", gsub->tmsi,
 			VTY_NEWLINE);
-	if (subscr->sgsn_data->msisdn_len > 0)
+	if (gsub->sgsn_data->msisdn_len > 0)
 		vty_out(vty, "    MSISDN (BCD): %s%s",
-			osmo_hexdump(subscr->sgsn_data->msisdn,
-					subscr->sgsn_data->msisdn_len),
+			osmo_hexdump(gsub->sgsn_data->msisdn,
+				     gsub->sgsn_data->msisdn_len),
 			VTY_NEWLINE);
 
-	if (strlen(subscr->equipment.imei) > 0)
-		vty_out(vty, "    IMEI: %s%s", subscr->equipment.imei, VTY_NEWLINE);
+	if (strlen(gsub->imei) > 0)
+		vty_out(vty, "    IMEI: %s%s", gsub->imei, VTY_NEWLINE);
 
-	for (at_idx = 0; at_idx < ARRAY_SIZE(subscr->sgsn_data->auth_triplets);
+	for (at_idx = 0; at_idx < ARRAY_SIZE(gsub->sgsn_data->auth_triplets);
 	     at_idx++) {
-		at = &subscr->sgsn_data->auth_triplets[at_idx];
+		at = &gsub->sgsn_data->auth_triplets[at_idx];
 		if (at->key_seq == GSM_KEY_SEQ_INVAL)
 			continue;
 
@@ -722,36 +719,38 @@
 		}
 	}
 
-	llist_for_each_entry(pdp, &subscr->sgsn_data->pdp_list, list) {
+	llist_for_each_entry(pdp, &gsub->sgsn_data->pdp_list, list) {
 		vty_out(vty, "    PDP info: Id: %d, Type: 0x%04x, APN: '%s' QoS: %s%s",
 			pdp->context_id, pdp->pdp_type, pdp->apn_str,
 			osmo_hexdump(pdp->qos_subscribed, pdp->qos_subscribed_len),
 			VTY_NEWLINE);
 	}
 
+#if 0
 	/* print the expiration time of a subscriber */
-	if (subscr->expire_lu) {
+	if (gsub->expire_lu) {
 		strftime(expire_time, sizeof(expire_time),
-			 "%a, %d %b %Y %T %z", localtime(&subscr->expire_lu));
+			 "%a, %d %b %Y %T %z", localtime(&gsub->expire_lu));
 		expire_time[sizeof(expire_time) - 1] = '\0';
 		vty_out(vty, "    Expiration Time: %s%s", expire_time, VTY_NEWLINE);
 	}
+#endif
 
-	if (subscr->flags)
+	if (gsub->flags)
 		vty_out(vty, "    Flags: %s%s%s%s%s%s",
-			subscr->flags & GSM_SUBSCRIBER_FIRST_CONTACT ?
+			gsub->flags & GPRS_SUBSCRIBER_FIRST_CONTACT ?
 			"FIRST_CONTACT " : "",
-			subscr->flags & GPRS_SUBSCRIBER_CANCELLED ?
+			gsub->flags & GPRS_SUBSCRIBER_CANCELLED ?
 			"CANCELLED " : "",
-			subscr->flags & GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING ?
+			gsub->flags & GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING ?
 			"UPDATE_LOCATION_PENDING " : "",
-			subscr->flags & GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING ?
+			gsub->flags & GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING ?
 			"AUTH_INFO_PENDING " : "",
-			subscr->flags & GPRS_SUBSCRIBER_ENABLE_PURGE ?
+			gsub->flags & GPRS_SUBSCRIBER_ENABLE_PURGE ?
 			"ENABLE_PURGE " : "",
 			VTY_NEWLINE);
 
-	vty_out(vty, "    Use count: %u%s", subscr->use_count, VTY_NEWLINE);
+	vty_out(vty, "    Use count: %u%s", gsub->use_count, VTY_NEWLINE);
 }
 
 DEFUN(show_subscr_cache,
@@ -760,9 +759,9 @@
 	SHOW_STR "Show information about subscribers\n"
 	"Display contents of subscriber cache\n")
 {
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 
-	llist_for_each_entry(subscr, &active_subscribers, entry) {
+	llist_for_each_entry(subscr, gprs_subscribers, entry) {
 		vty_out(vty, "  Subscriber:%s", VTY_NEWLINE);
 		subscr_dump_full_vty(vty, subscr, 0);
 	}
@@ -794,7 +793,7 @@
 	const char *kc_str = argv[4];
 	struct gsm_auth_tuple at = {0,};
 
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 
 	subscr = gprs_subscr_get_by_imsi(imsi);
 	if (!subscr) {
@@ -825,12 +824,12 @@
 	subscr->sgsn_data->auth_triplets[cksn] = at;
 	subscr->sgsn_data->auth_triplets_updated = 1;
 
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 
 	return CMD_SUCCESS;
 
 failed:
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 	return CMD_SUCCESS;
 }
 
@@ -844,7 +843,7 @@
 	const char *imsi = argv[0];
 	const char *cancel_type = argv[1];
 
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 
 	subscr = gprs_subscr_get_by_imsi(imsi);
 	if (!subscr) {
@@ -859,7 +858,7 @@
 		subscr->sgsn_data->error_cause = GMM_CAUSE_IMPL_DETACHED;
 
 	gprs_subscr_cancel(subscr);
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 
 	return CMD_SUCCESS;
 }
@@ -871,7 +870,7 @@
 {
 	const char *imsi = argv[0];
 
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 
 	subscr = gprs_subscr_get_by_imsi(imsi);
 	if (subscr) {
@@ -882,7 +881,7 @@
 
 	subscr = gprs_subscr_get_or_create(imsi);
 	subscr->keep_in_ram = 1;
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 
 	return CMD_SUCCESS;
 }
@@ -894,7 +893,7 @@
 {
 	const char *imsi = argv[0];
 
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 
 	subscr = gprs_subscr_get_by_imsi(imsi);
 	if (!subscr) {
@@ -909,7 +908,7 @@
 	if (subscr->use_count > 1)
 		vty_out(vty, "%% subscriber is still in use%s",
 			VTY_NEWLINE);
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 
 	return CMD_SUCCESS;
 }
@@ -934,7 +933,7 @@
 	const char *imsi = argv[0];
 	const char *ret_code_str = argv[1];
 
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 
 	const struct value_string cause_mapping[] = {
 		{ GMM_CAUSE_NET_FAIL,		"system-failure" },
@@ -963,7 +962,7 @@
 
 	gprs_subscr_update(subscr);
 
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 
 	return CMD_SUCCESS;
 }
@@ -975,7 +974,7 @@
 {
 	const char *imsi = argv[0];
 
-	struct gsm_subscriber *subscr;
+	struct gprs_subscr *subscr;
 
 	subscr = gprs_subscr_get_by_imsi(imsi);
 	if (!subscr) {
@@ -986,7 +985,7 @@
 
 	gprs_subscr_update_auth_info(subscr);
 
-	subscr_put(subscr);
+	gprs_subscr_put(subscr);
 
 	return CMD_SUCCESS;
 }
