mirror of git://git.sysmocom.de/ofono
telit: add pre_sim support to SAP Client
This commit is contained in:
parent
e07b4217aa
commit
93fd2afd02
|
@ -47,6 +47,7 @@ struct bluetooth_sap_driver {
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*enable) (struct ofono_modem *modem, struct ofono_modem *sap_modem,
|
int (*enable) (struct ofono_modem *modem, struct ofono_modem *sap_modem,
|
||||||
int bt_fd);
|
int bt_fd);
|
||||||
|
void (*pre_sim) (struct ofono_modem *modem);
|
||||||
int (*disable) (struct ofono_modem *modem);
|
int (*disable) (struct ofono_modem *modem);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -539,9 +539,24 @@ static int telit_sap_disable(struct ofono_modem *modem)
|
||||||
return -EINPROGRESS;
|
return -EINPROGRESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void telit_pre_sim(struct ofono_modem *modem)
|
||||||
|
{
|
||||||
|
struct telit_data *data = ofono_modem_get_data(modem);
|
||||||
|
|
||||||
|
if (data->sap_modem)
|
||||||
|
modem = data->sap_modem;
|
||||||
|
|
||||||
|
DBG("%p", modem);
|
||||||
|
|
||||||
|
ofono_devinfo_create(modem, 0, "atmodem", data->chat);
|
||||||
|
data->sim = ofono_sim_create(modem, 0, "atmodem", data->chat);
|
||||||
|
ofono_voicecall_create(modem, 0, "atmodem", data->chat);
|
||||||
|
}
|
||||||
|
|
||||||
static struct bluetooth_sap_driver sap_driver = {
|
static struct bluetooth_sap_driver sap_driver = {
|
||||||
.name = "telit",
|
.name = "telit",
|
||||||
.enable = telit_sap_enable,
|
.enable = telit_sap_enable,
|
||||||
|
.pre_sim = telit_pre_sim,
|
||||||
.disable = telit_sap_disable,
|
.disable = telit_sap_disable,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -601,17 +616,6 @@ static void telit_set_online(struct ofono_modem *modem, ofono_bool_t online,
|
||||||
cbd, g_free);
|
cbd, g_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void telit_pre_sim(struct ofono_modem *modem)
|
|
||||||
{
|
|
||||||
struct telit_data *data = ofono_modem_get_data(modem);
|
|
||||||
|
|
||||||
DBG("%p", modem);
|
|
||||||
|
|
||||||
ofono_devinfo_create(modem, 0, "atmodem", data->chat);
|
|
||||||
data->sim = ofono_sim_create(modem, 0, "atmodem", data->chat);
|
|
||||||
ofono_voicecall_create(modem, 0, "atmodem", data->chat);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void telit_post_sim(struct ofono_modem *modem)
|
static void telit_post_sim(struct ofono_modem *modem)
|
||||||
{
|
{
|
||||||
struct telit_data *data = ofono_modem_get_data(modem);
|
struct telit_data *data = ofono_modem_get_data(modem);
|
||||||
|
|
Loading…
Reference in New Issue