Пример #1
0
static void atgen_post_sim(struct ofono_modem *modem)
{
    GAtChat *chat = ofono_modem_get_data(modem);
    struct ofono_message_waiting *mw;
    struct ofono_gprs *gprs;
    struct ofono_gprs_context *gc;

    DBG("%p", modem);

    ofono_ussd_create(modem, 0, "atmodem", chat);
    ofono_call_forwarding_create(modem, 0, "atmodem", chat);
    ofono_call_settings_create(modem, 0, "atmodem", chat);
    ofono_netreg_create(modem, 0, "atmodem", chat);
    ofono_call_meter_create(modem, 0, "atmodem", chat);
    ofono_call_barring_create(modem, 0, "atmodem", chat);
    ofono_ssn_create(modem, 0, "atmodem", chat);
    ofono_sms_create(modem, 0, "atmodem", chat);
    ofono_phonebook_create(modem, 0, "atmodem", chat);
    gprs = ofono_gprs_create(modem,0, "atmodem", chat);
    gc = ofono_gprs_context_create(modem, 0, "atmodem", chat);
    if (gprs && gc)
        ofono_gprs_add_context(gprs, gc);

    mw = ofono_message_waiting_create(modem);
    if (mw)
        ofono_message_waiting_register(mw);
}
Пример #2
0
static void cinterion_post_online(struct ofono_modem *modem)
{
	GAtChat *chat = ofono_modem_get_data(modem);
	struct ofono_message_waiting *mw;
	struct ofono_gprs *gprs;
	struct ofono_gprs_context *gc;

	DBG("%p", modem);

	ofono_ussd_create(modem, 0, "atmodem", chat);
	ofono_call_forwarding_create(modem, 0, "atmodem", chat);
	ofono_call_settings_create(modem, 0, "atmodem", chat);
	ofono_netreg_create(modem, OFONO_VENDOR_CINTERION, "atmodem", chat);
	ofono_call_meter_create(modem, 0, "atmodem", chat);
	ofono_call_barring_create(modem, 0, "atmodem", chat);

	gprs = ofono_gprs_create(modem, 0, "atmodem", chat);
	gc = ofono_gprs_context_create(modem, 0, "atmodem", chat);

	if (gprs && gc)
		ofono_gprs_add_context(gprs, gc);

	mw = ofono_message_waiting_create(modem);
	if (mw)
		ofono_message_waiting_register(mw);
}
Пример #3
0
void ril_post_online(struct ofono_modem *modem)
{
	struct ril_data *rd = ofono_modem_get_data(modem);
	struct ofono_gprs *gprs;
	struct ofono_gprs_context *gc;

	ofono_cbs_create(modem, rd->vendor, RILMODEM, rd->ril);
	ofono_netreg_create(modem, rd->vendor, RILMODEM, rd->ril);
	ofono_ussd_create(modem, rd->vendor, RILMODEM, rd->ril);
	ofono_call_settings_create(modem, rd->vendor, RILMODEM, rd->ril);
	ofono_call_barring_create(modem, rd->vendor, RILMODEM, rd->ril);
	gprs = ofono_gprs_create(modem, rd->vendor, RILMODEM, rd->ril);
	gc = ofono_gprs_context_create(modem, rd->vendor, RILMODEM, rd->ril);

	if (gc) {
		ofono_gprs_context_set_type(gc,
					OFONO_GPRS_CONTEXT_TYPE_INTERNET);
		ofono_gprs_add_context(gprs, gc);
	}

	gc = ofono_gprs_context_create(modem, rd->vendor, RILMODEM, rd->ril);

	if (gc) {
		ofono_gprs_context_set_type(gc, OFONO_GPRS_CONTEXT_TYPE_MMS);
		ofono_gprs_add_context(gprs, gc);
	}
}
Пример #4
0
static void telit_post_online(struct ofono_modem *modem)
{
	struct telit_data *data = ofono_modem_get_data(modem);
	struct ofono_message_waiting *mw;
	struct ofono_gprs *gprs;
	struct ofono_gprs_context *gc;

	DBG("%p", modem);

	ofono_netreg_create(modem, OFONO_VENDOR_TELIT, "atmodem", data->chat);
	ofono_ussd_create(modem, 0, "atmodem", data->chat);
	ofono_call_forwarding_create(modem, 0, "atmodem", data->chat);
	ofono_call_settings_create(modem, 0, "atmodem", data->chat);
	ofono_call_meter_create(modem, 0, "atmodem", data->chat);
	ofono_call_barring_create(modem, 0, "atmodem", data->chat);

	gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
	gc = ofono_gprs_context_create(modem, 0, "atmodem", data->chat);

	if (gprs && gc)
		ofono_gprs_add_context(gprs, gc);

	mw = ofono_message_waiting_create(modem);
	if (mw)
		ofono_message_waiting_register(mw);
}
Пример #5
0
void ril_post_online(struct ofono_modem *modem)
{
	struct ril_data *rd = ofono_modem_get_data(modem);

	ofono_netreg_create(modem, rd->vendor, RILMODEM, rd->ril);
	ofono_ussd_create(modem, rd->vendor, RILMODEM, rd->ril);
	ofono_call_settings_create(modem, rd->vendor, RILMODEM, rd->ril);
	ofono_call_barring_create(modem, rd->vendor, RILMODEM, rd->ril);
}
Пример #6
0
static void ril_post_online(struct ofono_modem *modem)
{
	struct ril_data *ril = ofono_modem_get_data(modem);

	ofono_call_volume_create(modem, 0, RILMODEM, ril->modem);
	ofono_netreg_create(modem, 0, RILMODEM, ril->modem);
	ofono_ussd_create(modem, 0, RILMODEM, ril->modem);
	ofono_call_settings_create(modem, 0, RILMODEM, ril->modem);
	ofono_radio_settings_create(modem, 0, RILMODEM, ril->modem);
}
Пример #7
0
static void phonesim_post_online(struct ofono_modem *modem)
{
	struct phonesim_data *data = ofono_modem_get_data(modem);
	struct ofono_message_waiting *mw;
	struct ofono_gprs *gprs;
	struct ofono_gprs_context *gc1, *gc2;

	DBG("%p", modem);

	ofono_ussd_create(modem, 0, "atmodem", data->chat);
	ofono_call_settings_create(modem, 0, "atmodem", data->chat);

	if (data->calypso)
		ofono_netreg_create(modem, OFONO_VENDOR_CALYPSO,
							"atmodem", data->chat);
	else
		ofono_netreg_create(modem, OFONO_VENDOR_PHONESIM,
							"atmodem", data->chat);

	ofono_call_meter_create(modem, 0, "atmodem", data->chat);
	ofono_call_barring_create(modem, 0, "atmodem", data->chat);
	ofono_call_volume_create(modem, 0, "atmodem", data->chat);

	if (!data->calypso)
		ofono_cbs_create(modem, 0, "atmodem", data->chat);

	gc1 = ofono_gprs_context_create(modem, 0, "phonesim", data->chat);
	gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
	gc2 = ofono_gprs_context_create(modem, 0, "phonesim", data->chat);

	if (gprs && gc1)
		ofono_gprs_add_context(gprs, gc1);

	if (gprs && gc2)
		ofono_gprs_add_context(gprs, gc2);

	mw = ofono_message_waiting_create(modem);
	if (mw)
		ofono_message_waiting_register(mw);

	ofono_gnss_create(modem, 0, "atmodem", data->chat);
}
Пример #8
0
static void localhfp_pre_sim(struct ofono_modem *modem)
{
	struct hfp_slc_info *info = ofono_modem_get_data(modem);

	DBG("%p", modem);

	ofono_voicecall_create(modem, 0, "hfpmodem", info);
	ofono_netreg_create(modem, 0, "hfpmodem", info);
	ofono_call_volume_create(modem, 0, "hfpmodem", info);
	ofono_handsfree_create(modem, 0, "hfpmodem", info);
}
Пример #9
0
static void ril_post_online(struct ofono_modem *modem)
{
	DBG("");
	struct ril_data *ril = ofono_modem_get_data(modem);

	ofono_call_volume_create(modem, 0, "rilmodem", ril->modem);

	ofono_netreg_create(modem, 0, "rilmodem", ril->modem);
	ofono_ussd_create(modem, 0, "rilmodem", ril->modem);
	ofono_call_settings_create(modem, 0, "rilmodem", ril->modem);
	ofono_oem_raw_create(modem, 0, "rilmodem", ril->modem);
}
Пример #10
0
static void hfp_pre_sim(struct ofono_modem *modem)
{
	struct hfp_data *data = ofono_modem_get_data(modem);

	DBG("%p", modem);

	ofono_devinfo_create(modem, 0, "hfpmodem", data->handsfree_address);
	ofono_voicecall_create(modem, 0, "hfpmodem", &data->info);
	ofono_netreg_create(modem, 0, "hfpmodem", &data->info);
	ofono_call_volume_create(modem, 0, "hfpmodem", &data->info);
	ofono_handsfree_create(modem, 0, "hfpmodem", &data->info);
	ofono_siri_create(modem, 0, "hfpmodem", &data->info);
}
Пример #11
0
static void hfp_pre_sim(struct ofono_modem *modem)
{
	struct hfp *hfp = ofono_modem_get_data(modem);
	char *address = (char *) ofono_modem_get_string(modem, "Remote");

	DBG("%p", modem);

	ofono_devinfo_create(modem, 0, "hfpmodem", address);
	ofono_voicecall_create(modem, 0, "hfpmodem", &hfp->info);
	ofono_netreg_create(modem, 0, "hfpmodem", &hfp->info);
	ofono_handsfree_create(modem, 0, "hfpmodem", &hfp->info);
	ofono_call_volume_create(modem, 0, "hfpmodem", &hfp->info);
}
Пример #12
0
static void u8500_post_online(struct ofono_modem *modem)
{
	struct isi_data *isi = ofono_modem_get_data(modem);

	DBG("(%p) with %s", modem, isi->ifname);

	ofono_netreg_create(modem, 0, "isimodem", isi->modem);
	ofono_sms_create(modem, 0, "isimodem", isi->modem);
	ofono_cbs_create(modem, 0, "isimodem", isi->modem);
	ofono_ussd_create(modem, 0, "isimodem", isi->modem);
	ofono_call_settings_create(modem, 0, "isimodem", isi->modem);
	ofono_call_barring_create(modem, 0, "isimodem", isi->modem);
	ofono_call_meter_create(modem, 0, "isimodem", isi->modem);
	ofono_gprs_create(modem, 0, "isimodem", isi->modem);
}
Пример #13
0
static void ril_post_online(struct ofono_modem *modem)
{
	struct ril_data *rd = ofono_modem_get_data(modem);

	ofono_netreg_create(modem, 0, "rilmodem", rd->ril);

	if (ofono_modem_get_boolean(modem, MODEM_PROP_LTE_CAPABLE))
		ofono_radio_settings_create(modem, 0, "rilmodem", rd->ril);
	else
		ofono_radio_settings_create(modem, OFONO_RIL_VENDOR_IMC_SOFIA3GR,
						"rilmodem", rd->ril);

	ofono_ussd_create(modem, 0, "rilmodem", rd->ril);
	ofono_netmon_create(modem, 0, "rilmodem", rd->ril);
}
Пример #14
0
Файл: ifx.c Проект: intgr/ofono
static void ifx_post_online(struct ofono_modem *modem)
{
	struct ifx_data *data = ofono_modem_get_data(modem);
	struct ofono_message_waiting *mw;
	struct ofono_gprs *gprs;
	struct ofono_gprs_context *gc;

	DBG("%p", modem);

	ofono_netreg_create(modem, OFONO_VENDOR_IFX,
					"atmodem", data->dlcs[NETREG_DLC]);

	ofono_cbs_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
	ofono_ussd_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);

	ofono_gnss_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);

	ofono_call_settings_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
	ofono_call_meter_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
	ofono_call_barring_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
	ofono_call_volume_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);

	mw = ofono_message_waiting_create(modem);
	if (mw)
		ofono_message_waiting_register(mw);

	gprs = ofono_gprs_create(modem, OFONO_VENDOR_IFX,
					"atmodem", data->dlcs[NETREG_DLC]);
	if (gprs == NULL)
		return;

	if (data->mux_ldisc < 0) {
		gc = ofono_gprs_context_create(modem, 0,
					"ifxmodem", data->dlcs[GPRS1_DLC]);
		if (gc)
			ofono_gprs_add_context(gprs, gc);

		gc = ofono_gprs_context_create(modem, 0,
					"ifxmodem", data->dlcs[GPRS2_DLC]);
		if (gc)
			ofono_gprs_add_context(gprs, gc);

		gc = ofono_gprs_context_create(modem, 0,
					"ifxmodem", data->dlcs[GPRS3_DLC]);
		if (gc)
			ofono_gprs_add_context(gprs, gc);
	}
}
Пример #15
0
static void sierra_post_online(struct ofono_modem *modem)
{
	struct sierra_data *data = ofono_modem_get_data(modem);
	struct ofono_gprs *gprs;
	struct ofono_gprs_context *gc;

	DBG("%p", modem);

	ofono_netreg_create(modem, 0, "atmodem", data->modem);

	gprs = ofono_gprs_create(modem, 0, "atmodem", data->modem);
	gc = ofono_gprs_context_create(modem, 0, "swmodem", data->modem);

	if (gprs && gc)
		ofono_gprs_add_context(gprs, gc);
}
Пример #16
0
static void telit_post_online(struct ofono_modem *modem)
{
	struct telit_data *data = ofono_modem_get_data(modem);
	struct ofono_message_waiting *mw;

	if(data->sap_modem)
		modem = data->sap_modem;

	DBG("%p", modem);

	ofono_netreg_create(modem, OFONO_VENDOR_TELIT, "atmodem", data->chat);
	ofono_ussd_create(modem, 0, "atmodem", data->chat);
	ofono_call_forwarding_create(modem, 0, "atmodem", data->chat);
	ofono_call_settings_create(modem, 0, "atmodem", data->chat);
	ofono_call_meter_create(modem, 0, "atmodem", data->chat);
	ofono_call_barring_create(modem, 0, "atmodem", data->chat);

	mw = ofono_message_waiting_create(modem);
	if (mw)
		ofono_message_waiting_register(mw);
}
Пример #17
0
static void ifx_post_online(struct ofono_modem *modem)
{
	struct ifx_data *data = ofono_modem_get_data(modem);
	struct ofono_message_waiting *mw;

	DBG("%p", modem);

	ofono_netreg_create(modem, OFONO_VENDOR_IFX,
					"atmodem", data->dlcs[NETREG_DLC]);

	ofono_cbs_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
	ofono_ussd_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);

	ofono_gnss_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);

	ofono_call_settings_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
	ofono_call_meter_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
	ofono_call_barring_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
	ofono_call_volume_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);

	mw = ofono_message_waiting_create(modem);
	if (mw)
		ofono_message_waiting_register(mw);
}
Пример #18
0
/*
 * sim_state_watch listens to SIM state changes and creates/removes atoms
 * accordingly. This is needed because we cannot rely on the modem core code,
 * which handles modem state transitions, to do this due to the SIM not being
 * accessible in the offline state for mtk modems. This causes a mismatch
 * between what the core thinks it can do in some states and what the mtk modem
 * can really do in those. This is a workaround to solve that.
 */
static void sim_state_watch(enum ofono_sim_state new_state, void *data)
{
	struct ofono_modem *modem = data;
	struct mtk_data *md = ofono_modem_get_data(modem);

	if (new_state == OFONO_SIM_STATE_READY) {
		struct ofono_gprs_context *gc;
		struct ril_gprs_driver_data gprs_data = { md->ril, modem };
		struct ril_gprs_context_data inet_ctx =
			{ md->ril, OFONO_GPRS_CONTEXT_TYPE_INTERNET };
		struct ril_gprs_context_data mms_ctx =
			{ md->ril, OFONO_GPRS_CONTEXT_TYPE_MMS };

		DBG("SIM ready, creating more atoms");

		/*
		 * TODO: this function should setup:
		 *  - stk ( SIM toolkit )
		 */
		md->sms = ofono_sms_create(modem, OFONO_RIL_VENDOR_MTK,
						RILMODEM, md->ril);

		/* netreg needs access to the SIM (SPN, SPDI) */
		md->netreg = ofono_netreg_create(modem, OFONO_RIL_VENDOR_MTK,
							RILMODEM, md->ril);
		md->ussd = ofono_ussd_create(modem, OFONO_RIL_VENDOR_MTK,
						RILMODEM, md->ril);
		md->call_settings =
			ofono_call_settings_create(modem, OFONO_RIL_VENDOR_MTK,
							RILMODEM, md->ril);
		md->call_forwarding =
			ofono_call_forwarding_create(modem,
							OFONO_RIL_VENDOR_MTK,
							RILMODEM, md->ril);
		md->call_barring =
			ofono_call_barring_create(modem, OFONO_RIL_VENDOR_MTK,
							RILMODEM, md->ril);
		md->phonebook =
			ofono_phonebook_create(modem, OFONO_RIL_VENDOR_MTK,
						RILMODEM, modem);
		md->gprs = ofono_gprs_create(modem, OFONO_RIL_VENDOR_MTK,
						MTKMODEM, &gprs_data);

		gc = ofono_gprs_context_create(modem, OFONO_RIL_VENDOR_MTK,
						RILMODEM, &inet_ctx);
		if (gc) {
			ofono_gprs_context_set_type(gc,
					OFONO_GPRS_CONTEXT_TYPE_INTERNET);
			ofono_gprs_add_context(md->gprs, gc);
		}

		gc = ofono_gprs_context_create(modem, OFONO_RIL_VENDOR_MTK,
						RILMODEM, &mms_ctx);
		if (gc) {
			ofono_gprs_context_set_type(gc,
					OFONO_GPRS_CONTEXT_TYPE_MMS);
			ofono_gprs_add_context(md->gprs, gc);
		}

		md->message_waiting = ofono_message_waiting_create(modem);
		if (md->message_waiting)
			ofono_message_waiting_register(md->message_waiting);

		/*
		 * Now that we can access IMSI, see if a FW change is needed.
		 */

	 	md->sim_plmn_type = get_plmn_type(ofono_sim_get_imsi(md->sim));

		check_modem_fw(modem);

	} else if (new_state == OFONO_SIM_STATE_LOCKED_OUT) {

		DBG("SIM locked, removing atoms");

		if (md->message_waiting) {
			ofono_message_waiting_remove(md->message_waiting);
			md->message_waiting = NULL;
		}
		if (md->gprs) {
			ofono_gprs_remove(md->gprs);
			md->gprs = NULL;
		}
		if (md->phonebook) {
			ofono_phonebook_remove(md->phonebook);
			md->phonebook = NULL;
		}
		if (md->call_barring) {
			ofono_call_barring_remove(md->call_barring);
			md->call_barring = NULL;
		}
		if (md->call_forwarding) {
			ofono_call_forwarding_remove(md->call_forwarding);
			md->call_forwarding = NULL;
		}
		if (md->call_settings) {
			ofono_call_settings_remove(md->call_settings);
			md->call_settings = NULL;
		}
		if (md->ussd) {
			ofono_ussd_remove(md->ussd);
			md->ussd = NULL;
		}
		if (md->netreg) {
			ofono_netreg_remove(md->netreg);
			md->netreg = NULL;
		}
		if (md->sms) {
			ofono_sms_remove(md->sms);
			md->sms = NULL;
		}
	}
}