Exemplo n.º 1
0
static int ril_gprs_probe(struct ofono_gprs *gprs,
				unsigned int vendor, void *data)
{
	GRil *ril = data;
	struct gprs_data *gd;

	gd = g_try_new0(struct gprs_data, 1);
	if (gd == NULL)
		return -ENOMEM;

	gd->ril = g_ril_clone(ril);
	gd->ofono_attached = FALSE;
	gd->max_cids = 0;
	gd->rild_status = -1;
	gd->true_status = -1;
	gd->notified = FALSE;
	gd->registerid = -1;
	gd->timer_id = 0;
	gd->fake_timer_id = 0;
	gd->fake_cbd = NULL;

	registered = FALSE;

	ofono_gprs_set_data(gprs, gd);

	ril_gprs_registration_status(gprs, NULL, NULL);

	return 0;
}
Exemplo n.º 2
0
Arquivo: gprs.c Projeto: yongsu/oFono
static void at_gprs_remove(struct ofono_gprs *gprs)
{
	struct gprs_data *gd = ofono_gprs_get_data(gprs);

	ofono_gprs_set_data(gprs, NULL);
	g_free(gd);
}
Exemplo n.º 3
0
Arquivo: gprs.c Projeto: saukko/ofono
static void ril_gprs_remove(struct ofono_gprs *gprs)
{
	struct gprs_data *gd = ofono_gprs_get_data(gprs);

	DBG("");

	ofono_gprs_set_data(gprs, NULL);

	g_ril_unref(gd->ril);
	g_free(gd);
}
Exemplo n.º 4
0
void ril_gprs_remove(struct ofono_gprs *gprs)
{
	struct ril_gprs_data *gd = ofono_gprs_get_data(gprs);

	DBG("");

	if (gd->status_retry_cb_id != 0)
		g_source_remove(gd->status_retry_cb_id);

	ofono_gprs_set_data(gprs, NULL);

	g_ril_unref(gd->ril);
	g_free(gd);
}
Exemplo n.º 5
0
void ril_gprs_start(struct ril_gprs_driver_data *driver_data,
			struct ofono_gprs *gprs, struct ril_gprs_data *gd)
{
	gd->ril = g_ril_clone(driver_data->gril);
	gd->modem = driver_data->modem;
	gd->ofono_attached = FALSE;
	gd->max_cids = 0;
	gd->rild_status = -1;
	gd->tech = RADIO_TECH_UNKNOWN;
	/* AOSP RILD tracks data network state together with voice */
	gd->state_changed_unsol =
		RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED;

	ofono_gprs_set_data(gprs, gd);

	get_active_data_calls(gprs);
}
Exemplo n.º 6
0
Arquivo: gprs.c Projeto: yongsu/oFono
static int at_gprs_probe(struct ofono_gprs *gprs,
					unsigned int vendor, void *data)
{
	GAtChat *chat = data;
	struct gprs_data *gd;

	gd = g_new0(struct gprs_data, 1);
	gd->chat = chat;
	gd->vendor = vendor;

	ofono_gprs_set_data(gprs, gd);

	g_at_chat_send(chat, "AT+CGDCONT=?", cgdcont_prefix,
			at_cgdcont_test_cb, gprs, NULL);

	return 0;
}
Exemplo n.º 7
0
static void ril_gprs_remove(struct ofono_gprs *gprs)
{
	struct gprs_data *gd = ofono_gprs_get_data(gprs);

	DBG("");

	remove_fake_timer(gd);

	ofono_gprs_set_data(gprs, NULL);

	if (gd->registerid != -1)
		g_ril_unregister(gd->ril, gd->registerid);

	if (gd->timer_id > 0)
		g_source_remove(gd->timer_id);

	g_ril_unref(gd->ril);
	g_free(gd);
}
Exemplo n.º 8
0
static int ril_gprs_probe(struct ofono_gprs *gprs,
				unsigned int vendor, void *data)
{
	GRil *ril = data;
	struct gprs_data *gd;

        DBG("");

	gd = g_try_new0(struct gprs_data, 1);
	if (gd == NULL)
		return -ENOMEM;

	gd->ril = g_ril_clone(ril);
	gd->max_cids = 0;
	gd->status = -1;

	ofono_gprs_set_data(gprs, gd);

	ril_gprs_registration_status(gprs, NULL, NULL);

	return 0;
}