summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeng Wang <mewan@google.com>2016-05-12 14:54:36 -0700
committerTrafalgar Square <schneller.demian@gmail.com>2016-11-20 15:05:34 +0100
commit1531cf5a3d6f80a33da241514b228d3f69122a2a (patch)
tree709f30448c4e8b720a8686ffe5bab51ea1c28f16
parentb5717671ab77b1fa38666e3d052d541b0c3d5c14 (diff)
i9300: squash ril header updates
Add RIL command RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_REQUEST_GET_CARRIER_RESTRICTIONS Bug: 28564314 Change-Id: I38792d59c4602a3e2126c58ac0b8c2487cccff04 Add support for UNSOL PCO Data. bug:28961371 bug:28567303 Change-Id: Ibbb415c9f5799d666b1599ed0abf97ec24642a3a Move struct def out of an #ifdef It was only visible if the vendor used a particular style (SHLIB). bug:28961371 bug:28567303 Change-Id: I54256e17170a69bdb6fbb9b38924b42906b85896 Add support for LTE CarrierAgregation Note this may be redesigned in O to better handle the various bitrate/channel combinations in a sane way. bug:27360321 Change-Id: I36a548b3229bf344ac2e4b714d8dc1dfa47af064 Add comment for RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_REQUEST_GET_CARRIER_RESTRICTIONS Added modem behavior convention for vendor's reference Bug: 29409395 Change-Id: Ic7bbf24ca8d62e14353ad4d7ea8f1e5fabaf96f9 Fix documentation of RIL_Request in ril.h Bug: 30380273 Change-Id: If086f5ea6f986a0da0d6f0729c28d913103b01ed
-rw-r--r--include/telephony/ril.h160
1 files changed, 143 insertions, 17 deletions
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index 1c91997..efb3896 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -66,6 +66,11 @@ extern "C" {
*
* RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
* strongly versioned version it enforces structure use.
+ * RIL_VERSION = 14 : New data structures are added, namely RIL_CarrierMatchType,
+ * RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data.
+ * New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS,
+ * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and
+ * RIL_UNSOL_PCO_DATA
*/
#define RIL_VERSION 12
#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
@@ -241,7 +246,8 @@ typedef enum {
RADIO_TECH_HSPAP = 15, // HSPA+
RADIO_TECH_GSM = 16, // Only supports voice
RADIO_TECH_TD_SCDMA = 17,
- RADIO_TECH_IWLAN = 18
+ RADIO_TECH_IWLAN = 18,
+ RADIO_TECH_LTE_CA = 19
} RIL_RadioTechnology;
typedef enum {
@@ -263,6 +269,7 @@ typedef enum {
RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
RAF_GSM = (1 << RADIO_TECH_GSM),
RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
+ RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
} RIL_RadioAccessFamily;
typedef enum {
@@ -536,7 +543,10 @@ typedef struct {
RIL_CDMA_SMS_Message* cdmaMessage;
/* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
- char** gsmMessage;
+ char** gsmMessage; /* This is an array of pointers where pointers
+ are contiguous but elements pointed by those pointers
+ are not contiguous
+ */
} message;
} RIL_IMS_SMS_Message;
@@ -687,6 +697,36 @@ typedef struct {
*/
} RIL_LceDataInfo;
+typedef enum {
+ RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
+ RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
+ RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
+ RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
+ RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
+} RIL_CarrierMatchType;
+
+typedef struct {
+ const char * mcc;
+ const char * mnc;
+ RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
+ * If it’s RIL_MATCH_ALL, match_data is null;
+ * otherwise, match_data is the value for the match type.
+ */
+ const char * match_data;
+} RIL_Carrier;
+
+typedef struct {
+ int32_t len_allowed_carriers; /* length of array allowed_carriers */
+ int32_t len_excluded_carriers; /* length of array excluded_carriers */
+ RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
+ RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
+ * which match allowed_carriers. Eg. allowed_carriers match
+ * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
+ * is ABCD. It means except the carrier whose gid1 is ABCD,
+ * all carriers with the same mcc/mnc are allowed.
+ */
+} RIL_CarrierRestrictions;
+
/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
typedef enum {
CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
@@ -894,9 +934,10 @@ typedef struct {
#define RIL_CARD_MAX_APPS 8
typedef enum {
- RIL_CARDSTATE_ABSENT = 0,
- RIL_CARDSTATE_PRESENT = 1,
- RIL_CARDSTATE_ERROR = 2
+ RIL_CARDSTATE_ABSENT = 0,
+ RIL_CARDSTATE_PRESENT = 1,
+ RIL_CARDSTATE_ERROR = 2,
+ RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
} RIL_CardState;
typedef enum {
@@ -5083,17 +5124,55 @@ typedef struct {
#define RIL_REQUEST_GET_ACTIVITY_INFO 135
/**
- * RIL_RESPONSE_ACKNOWLEDGEMENT
+ * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
*
- * This is used by Asynchronous solicited messages and Unsolicited messages
- * to acknowledge the receipt of those messages in RIL.java so that the ack
- * can be used to let ril.cpp to release wakelock.
+ * Set carrier restrictions for this sim slot. Expected modem behavior:
+ * If never receives this command
+ * - Must allow all carriers
+ * Receives this command with data being NULL
+ * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
+ * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
+ * Receives this command with a list of carriers
+ * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
+ * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
+ * the allowed list, modem must detach from the registered network and only keep emergency
+ * service, and notify Android SIM refresh reset with new SIM state being
+ * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
*
- * Valid errors
- * SUCCESS
- * RADIO_NOT_AVAILABLE
+ * "data" is const RIL_CarrierRestrictions *
+ * A list of allowed carriers and possibly a list of excluded carriers.
+ * If data is NULL, means to clear previous carrier restrictions and allow all carriers
+ *
+ * "response" is int *
+ * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
+ * On success, it should match the length of list data->allowed_carriers.
+ * If data is NULL, the value must be 0.
+ *
+ * Valid errors:
+ * RIL_E_SUCCESS
+ * RIL_E_INVALID_ARGUMENTS
+ * RIL_E_RADIO_NOT_AVAILABLE
+ * RIL_E_REQUEST_NOT_SUPPORTED
*/
-#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
+#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
+
+/**
+ * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
+ *
+ * Get carrier restrictions for this sim slot. Expected modem behavior:
+ * Return list of allowed carriers, or null if all carriers are allowed.
+ *
+ * "data" is NULL
+ *
+ * "response" is const RIL_CarrierRestrictions *.
+ * If response is NULL, it means all carriers are allowed.
+ *
+ * Valid errors:
+ * RIL_E_SUCCESS
+ * RIL_E_RADIO_NOT_AVAILABLE
+ * RIL_E_REQUEST_NOT_SUPPORTED
+ */
+#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
/* SAMSUNG REQUESTS */
#undef RIL_REQUEST_SIM_OPEN_CHANNEL
@@ -5150,9 +5229,22 @@ typedef struct {
#define RIL_REQUEST_GET_PREFERRED_NETWORK_LIST 10051
#define RIL_REQUEST_HANGUP_VT 10052
-
/***********************************************************************/
+/**
+ * RIL_RESPONSE_ACKNOWLEDGEMENT
+ *
+ * This is used by Asynchronous solicited messages and Unsolicited messages
+ * to acknowledge the receipt of those messages in RIL.java so that the ack
+ * can be used to let ril.cpp to release wakelock.
+ *
+ * Valid errors
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ */
+#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
+
+/***********************************************************************/
#define RIL_UNSOL_RESPONSE_BASE 1000
@@ -5750,6 +5842,18 @@ typedef struct {
*/
#define RIL_UNSOL_LCEDATA_RECV 1045
+/**
+ * RIL_UNSOL_PCO_DATA
+ *
+ * Called when there is new Carrier PCO data received for a data call. Ideally
+ * only new data will be forwarded, though this is not required. Multiple
+ * boxes of carrier PCO data for a given call should result in a series of
+ * RIL_UNSOL_PCO_DATA calls.
+ *
+ * "data" is the RIL_PCO_Data structure.
+ *
+ */
+#define RIL_UNSOL_PCO_DATA 1046
/* SAMSUNG RESPONSE */
#define SAMSUNG_UNSOL_RESPONSE_BASE 11000
@@ -5795,8 +5899,13 @@ typedef struct {
* @param request is one of RIL_REQUEST_*
* @param data is pointer to data defined for that RIL_REQUEST_*
* data is owned by caller, and should not be modified or freed by callee
+ * structures passed as data may contain pointers to non-contiguous memory
* @param t should be used in subsequent call to RIL_onResponse
- * @param datalen the length of data
+ * @param datalen is the length of "data" which is defined as other argument. It may or may
+ * not be equal to sizeof(data). Refer to the documentation of individual structures
+ * to find if pointers listed in the structure are contiguous and counted in the datalen
+ * length or not.
+ * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
*
*/
typedef void (*RIL_RequestFunc) (int request, void *data,
@@ -5816,8 +5925,13 @@ typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
* @param request is one of RIL_REQUEST_*
* @param data is pointer to data defined for that RIL_REQUEST_*
* data is owned by caller, and should not be modified or freed by callee
+ * structures passed as data may contain pointers to non-contiguous memory
* @param t should be used in subsequent call to RIL_onResponse
- * @param datalen the length of data
+ * @param datalen is the length of "data" which is defined as other argument. It may or may
+ * not be equal to sizeof(data). Refer to the documentation of individual structures
+ * to find if pointers listed in the structure are contiguous and counted in the datalen
+ * length or not.
+ * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
*
*/
typedef void (*RIL_RequestFunc) (int request, void *data,
@@ -5895,6 +6009,19 @@ typedef struct {
NULL if no value. */
} RIL_SimAuthentication;
+typedef struct {
+ int cid; /* Context ID, uniquely identifies this call */
+ char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
+ For example, "IP", "IPV6", "IPV4V6" */
+ int pco_id; /* The protocol ID for this box. Note that only IDs from
+ FF00H - FFFFH are accepted. If more than one is included
+ from the network, multiple calls should be made to send all
+ of them. */
+ int contents_length; /* The number of octets in the contents. */
+ char *contents; /* Carrier-defined content. It is binary, opaque and
+ loosely defined in LTE Layer 3 spec 24.008 */
+} RIL_PCO_Data;
+
#ifdef RIL_SHLIB
struct RIL_Env {
/**
@@ -6050,7 +6177,6 @@ void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
void RIL_requestTimedCallback (RIL_TimedCallback callback,
void *param, const struct timeval *relativeTime);
-
#endif /* RIL_SHLIB */
#ifdef __cplusplus