~ubuntu-branches/ubuntu/wily/ofono/wily-proposed

« back to all changes in this revision

Viewing changes to drivers/mtkmodem/mtkreply.c

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Tony Espy, Vicamo Yang, Alfonso Sanchez-Beato
  • Date: 2015-02-04 09:18:00 UTC
  • mfrom: (1.3.30)
  • Revision ID: package-import@ubuntu.com-20150204091800-ptp0cyfidrf69ar1
Tags: 1.12.bzr6886+15.04.20150204-0ubuntu1
[ Tony Espy ]
* test/rilmodem/sim: add new SIM test scripts
* test: fix test-call-forwarding script (LP: #1396323)

[ Vicamo Yang ]
* mtkmodem, rilmodem: re-factor naming
  This change makes the naming of GRil, mtk_data,
  ofono_modem, and ril_data instances consistent.
* rilmodem: fix duplicate APPSTATE* constants
* gril: get rid of duplicate ringbuffer.h (LP: #1408250)
* mtk.c: use RIL_RADIO_POWER request for single slot modems

[ Alfonso Sanchez-Beato ]
* gril, unit, mtk.c: SIM mode and session ID fixes for arale
  For MTK modems, DUAL_SIM_MODE requests aren't necessary.  Also
  add session-id to SIM IO requests for newer MTK modems.
* rilmodem, mtk.c, ril.c: add auto-answer support
  This change adds auto-answer support which is triggered
  by usage of a special test SIM (MCC/MNC 001/01 or 001/001).
* mtkmodem, unit, mtk.c: support arale firmware switch
  This change will cause the correct modem firmware to
  be loaded based upon the SIM MCC and MNC.  If new
  firmware is loaded, a modem reset is triggered.
* mtkmodem, unit, mtk.c: handle suspend events
  RIL_RESUME_REGISTRATION requests are not sent to
  MTK modems if suspend events are received.
* gril, include, mbpi, rilmodem, mtkmodem, rilmodem,
  gprs, unit, modem, ril.c, mtk.c: LTE updates
  This changes detection logic for LTE modems to rilmodem
  ( via an environment var ) and mtkmodem ( via a modem
  query ).  If detected, a RIL_INITIAL_ATTACH_APN request
  is not sent to the modem during gprs initialization.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
error:
66
66
        return -1;
67
67
}
 
68
 
 
69
int g_mtk_reply_parse_query_modem_type(GRil *gril,
 
70
                                        const struct ril_msg *message)
 
71
{
 
72
        struct parcel rilp;
 
73
        int numint, type;
 
74
 
 
75
        g_ril_init_parcel(message, &rilp);
 
76
 
 
77
        numint = parcel_r_int32(&rilp);
 
78
        if (numint != 1) {
 
79
                ofono_error("%s Wrong format", __func__);
 
80
                goto error;
 
81
        }
 
82
 
 
83
        type = parcel_r_int32(&rilp);
 
84
 
 
85
        if (rilp.malformed) {
 
86
                ofono_error("%s: malformed parcel", __func__);
 
87
                goto error;
 
88
        }
 
89
 
 
90
        g_ril_append_print_buf(gril, "{%d}", type);
 
91
        g_ril_print_response(gril, message);
 
92
 
 
93
        return type;
 
94
 
 
95
error:
 
96
        return -1;
 
97
 
 
98
}