Skip to content

Commit

Permalink
ril.h: Add a failure cause for CDMA call failures, rename
Browse files Browse the repository at this point in the history
RIL_REQUEST_CDMA_VALIDATE_AKEY and minor clarifications
in the interface definitions.

Add failure cause for CDMA call failures due to access blocked by the
network. Specify the fields in RIL_REQUEST_REGISTRATION_STATE response
that are applicable to EVDO. Rename RIL_REQUEST_CDMA_VALIDATE_AKEY to
RIL_REQUEST_VALIDATE_AND_WRITE_AKEY. Elaborate the meaning of Akey in the
RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY message.
  • Loading branch information
Naveen Kalla authored and Wink Saville committed Sep 28, 2009
1 parent 5d621da commit 03c1edf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
25 changes: 17 additions & 8 deletions include/telephony/ril.h
Expand Up @@ -239,6 +239,7 @@ typedef enum {
CALL_FAIL_CDMA_PREEMPTED = 1007,
CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
during emergency callback mode */
CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
} RIL_LastCallFailCause;

Expand Down Expand Up @@ -943,7 +944,9 @@ typedef struct {
* "data" is NULL
* "response" is a "int *"
* ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
* mapped to cause codes defined in TS 24.008 Annex H where possible.
* mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
* failure reasons are derived from the possible call failure scenarios
* described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
*
* The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
* MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
Expand Down Expand Up @@ -1027,13 +1030,13 @@ typedef struct {
* ((const char **)response)[9] is Network ID if registered on a CDMA system or
* NULL if not. Valid System ID are 0 - 65535
* ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
* on a CDMA system or NULL if not. Valid values
* on a CDMA or EVDO system or NULL if not. Valid values
* are 0-255.
* ((const char **)response)[11] indicates whether the current system is in the
* PRL if registered on a CDMA system or NULL if
* PRL if registered on a CDMA or EVDO system or NULL if
* not. 0=not in the PRL, 1=in the PRL
* ((const char **)response)[12] is the default Roaming Indicator from the PRL,
* if registered on a CDMA system or NULL if not.
* if registered on a CDMA or EVDO system or NULL if not.
* Valid values are 0-255.
* ((const char **)response)[13] if registration state is 3 (Registration
* denied) this is an enumerated reason why
Expand Down Expand Up @@ -2528,12 +2531,18 @@ typedef struct {
#define RIL_REQUEST_CDMA_BURST_DTMF 85

/**
* RIL_REQUEST_CDMA_VALIDATE_AKEY
* RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
*
* Validate AKey.
* Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
* If the checksum is valid the 20 digit AKEY is written to NV,
* replacing the existing AKEY no matter what it was before.
*
* "data" is const char *
* ((const char *)data)[0] is a AKey string
* ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
* where the last 6 digits are a checksum of the
* first 20, as specified in TR45.AHAG
* "Common Cryptographic Algorithms, Revision D.1
* Section 2.2"
*
* "response" is NULL
*
Expand All @@ -2543,7 +2552,7 @@ typedef struct {
* GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_VALIDATE_AKEY 86
#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86

/**
* RIL_REQUEST_CDMA_SEND_SMS
Expand Down
2 changes: 1 addition & 1 deletion libril/ril.cpp
Expand Up @@ -2987,7 +2987,7 @@ requestToString(int request) {
case RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG:return "CDMA_GET_BROADCAST_SMS_CONFIG";
case RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG:return "CDMA_SET_BROADCAST_SMS_CONFIG";
case RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION:return "CDMA_SMS_BROADCAST_ACTIVATION";
case RIL_REQUEST_CDMA_VALIDATE_AKEY: return"CDMA_VALIDATE_AKEY";
case RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY: return"CDMA_VALIDATE_AND_WRITE_AKEY";
case RIL_REQUEST_CDMA_SUBSCRIPTION: return"CDMA_SUBSCRIPTION";
case RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM: return "CDMA_WRITE_SMS_TO_RUIM";
case RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM: return "CDMA_DELETE_SMS_ON_RUIM";
Expand Down
2 changes: 1 addition & 1 deletion libril/ril_commands.h
Expand Up @@ -100,7 +100,7 @@
{RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE, dispatchVoid, responseInts},
{RIL_REQUEST_CDMA_FLASH, dispatchString, responseVoid},
{RIL_REQUEST_CDMA_BURST_DTMF, dispatchStrings, responseVoid},
{RIL_REQUEST_CDMA_VALIDATE_AKEY, dispatchString, responseVoid},
{RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY, dispatchString, responseVoid},
{RIL_REQUEST_CDMA_SEND_SMS, dispatchCdmaSms, responseSMS},
{RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE, dispatchCdmaSmsAck, responseVoid},
{RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG, dispatchVoid, responseGsmBrSmsCnf},
Expand Down

0 comments on commit 03c1edf

Please sign in to comment.