Beispiel #1
0
static void radio_query_modem_rats(struct ofono_radio_settings *rs)
{
	if (rs->driver->query_modem_rats == NULL) {
		radio_send_properties_reply(rs);
		return;
	}

	rs->driver->query_modem_rats(rs, radio_modem_rats_query_callback, rs);
}
Beispiel #2
0
static void radio_query_fast_dormancy(struct ofono_radio_settings *rs)
{
	if (rs->driver->query_fast_dormancy == NULL) {
		radio_send_properties_reply(rs);
		return;
	}

	rs->driver->query_fast_dormancy(rs, radio_fast_dormancy_query_callback,
					rs);
}
Beispiel #3
0
static void radio_query_available_rats(struct ofono_radio_settings *rs)
{
	/* Modem technology is not supposed to change, so one query is enough */
	if (rs->driver->query_available_rats == NULL || rs->available_rats) {
		radio_send_properties_reply(rs);
		return;
	}

	rs->driver->query_available_rats(
				rs, radio_available_rats_query_callback, rs);
}
Beispiel #4
0
static void radio_available_rats_query_callback(const struct ofono_error *error,
						unsigned int available_rats,
						void *data)
{
	struct ofono_radio_settings *rs = data;

	if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
		rs->available_rats = available_rats & 0x7;
	else
		DBG("Error while querying available rats");

	radio_send_properties_reply(rs);
}
Beispiel #5
0
static void radio_fast_dormancy_query_callback(const struct ofono_error *error,
						ofono_bool_t enable, void *data)
{
	struct ofono_radio_settings *rs = data;
	DBusMessage *reply;

	if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
		DBG("Error during fast dormancy query");

		reply = __ofono_error_failed(rs->pending);
		__ofono_dbus_pending_reply(&rs->pending, reply);

		return;
	}

	radio_set_fast_dormancy(rs, enable);
	radio_send_properties_reply(rs);
}
Beispiel #6
0
static void radio_modem_rats_query_callback(const struct ofono_error *error,
						const ofono_bool_t rats[],
						void *data)
{
	struct ofono_radio_settings *rs = data;
	DBusMessage *reply;

	if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
		DBG("Error during modem rats query");

		reply = __ofono_error_failed(rs->pending);
		__ofono_dbus_pending_reply(&rs->pending, reply);

		return;
	}

	radio_set_modem_rats(rs, rats);
	radio_send_properties_reply(rs);
}
Beispiel #7
0
static void radio_fast_dormancy_query_callback(const struct ofono_error *error,
						ofono_bool_t enable, void *data)
{
	struct ofono_radio_settings *rs = data;
	DBusMessage *reply;

	if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
		DBG("Error during fast dormancy query");

		reply = __ofono_error_failed(rs->pending);
		__ofono_dbus_pending_reply(&rs->pending, reply);

		return;
	}

	radio_set_fast_dormancy(rs, enable);

	/* Modem technology is not supposed to change, so one query is enough */
	if (rs->modem_rats_filled)
		radio_send_properties_reply(rs);
	else
		radio_query_modem_rats(rs);
}