mirror of git://git.sysmocom.de/ofono
rilmodem: Don't expose private structures
This commit is contained in:
parent
6fbb1e18f8
commit
55cedbf109
|
@ -42,7 +42,6 @@
|
|||
|
||||
#include "grilunsol.h"
|
||||
|
||||
#include "gprs.h"
|
||||
#include "rilmodem.h"
|
||||
|
||||
#define NUM_DEACTIVATION_RETRIES 4
|
||||
|
@ -243,10 +242,6 @@ static void ril_gprs_context_activate_primary(struct ofono_gprs_context *gc,
|
|||
{
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
struct ofono_modem *modem = ofono_gprs_context_get_modem(gc);
|
||||
struct ofono_atom *gprs_atom =
|
||||
__ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_GPRS);
|
||||
struct ofono_gprs *gprs = NULL;
|
||||
struct ril_gprs_data *gd = NULL;
|
||||
struct cb_data *cbd = cb_data_new(cb, data, gc);
|
||||
struct parcel rilp;
|
||||
char buf[256];
|
||||
|
@ -255,15 +250,13 @@ static void ril_gprs_context_activate_primary(struct ofono_gprs_context *gc,
|
|||
const char *profile;
|
||||
int auth_type;
|
||||
|
||||
gprs = __ofono_atom_get_data(gprs_atom);
|
||||
gd = ofono_gprs_get_data(gprs);
|
||||
tech = ofono_modem_get_integer(modem, "RilDataRadioTechnology");
|
||||
|
||||
/*
|
||||
* 0: CDMA 1: GSM/UMTS, 2...
|
||||
* anything 2+ is a RadioTechnology value +2
|
||||
*/
|
||||
DBG("*gc: %p activating cid: %d; curr_tech: %d", gc, ctx->cid,
|
||||
gd->tech);
|
||||
DBG("*gc: %p activating cid: %d; curr_tech: %d", gc, ctx->cid, tech);
|
||||
|
||||
parcel_init(&rilp);
|
||||
|
||||
|
@ -272,13 +265,12 @@ static void ril_gprs_context_activate_primary(struct ofono_gprs_context *gc,
|
|||
|
||||
parcel_w_int32(&rilp, num_param);
|
||||
|
||||
if (gd->tech == RADIO_TECH_UNKNOWN) {
|
||||
if (tech == RADIO_TECH_UNKNOWN) {
|
||||
ofono_error("%s: radio tech for apn: %s UNKNOWN!", __func__,
|
||||
gcd->apn);
|
||||
tech = 1;
|
||||
} else if (gd->tech <= RADIO_TECH_GSM) {
|
||||
tech = gd->tech + 2;
|
||||
} else
|
||||
tech = tech + 2;
|
||||
|
||||
sprintf(buf, "%d", tech);
|
||||
parcel_w_string(&rilp, buf);
|
||||
|
|
|
@ -126,6 +126,7 @@ static void ril_data_reg_cb(struct ril_msg *message, gpointer user_data)
|
|||
ofono_gprs_status_cb_t cb = cbd->cb;
|
||||
struct ofono_gprs *gprs = cbd->user;
|
||||
struct ril_gprs_data *gd = ofono_gprs_get_data(gprs);
|
||||
struct ofono_modem *modem;
|
||||
struct parcel rilp;
|
||||
int num_str;
|
||||
char **strv;
|
||||
|
@ -256,11 +257,9 @@ static void ril_data_reg_cb(struct ril_msg *message, gpointer user_data)
|
|||
}
|
||||
}
|
||||
|
||||
if (gd->tech != tech) {
|
||||
gd->tech = tech;
|
||||
|
||||
ofono_gprs_bearer_notify(gprs, ril_tech_to_bearer_tech(tech));
|
||||
}
|
||||
modem = ofono_gprs_get_modem(gprs);
|
||||
ofono_modem_set_integer(modem, "RilDataRadioTechnology", tech);
|
||||
ofono_gprs_bearer_notify(gprs, ril_tech_to_bearer_tech(tech));
|
||||
|
||||
if (cb)
|
||||
CALLBACK_WITH_SUCCESS(cb, status, cbd->data);
|
||||
|
@ -474,7 +473,6 @@ static int ril_gprs_probe(struct ofono_gprs *gprs, unsigned int vendor,
|
|||
gd->ril = g_ril_clone(ril);
|
||||
gd->ofono_attached = FALSE;
|
||||
gd->rild_status = -1;
|
||||
gd->tech = RADIO_TECH_UNKNOWN;
|
||||
|
||||
ofono_gprs_set_data(gprs, gd);
|
||||
|
||||
|
|
|
@ -26,6 +26,5 @@ struct ril_gprs_data {
|
|||
struct ofono_modem *modem;
|
||||
gboolean ofono_attached;
|
||||
int rild_status;
|
||||
int tech;
|
||||
int pending_deact_req;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue