Commit Graph
49 Commits
Author SHA1 Message Date
Yunlian Jiang c48b97b118 libqcdm: use NULL instead of 0 for empty pointer
When I use clang 3.5 to build it, I got

commands.c:1444:16: error: expression which evaluates to zero treated as a
null
      pointer constant of type 'QcdmResult *' (aka 'struct QcdmResult *')
      [-Werror,-Wnon-literal-null-conversion]
        return FALSE;
               ^~~~~
./utils.h:29:15: note: expanded from macro 'FALSE'
#define FALSE ((u_int8_t) 0)
              ^~~~~~~~~~~~~~
commands.c:1464:20: error: expression which evaluates to zero treated as a
null
      pointer constant of type 'QcdmResult *' (aka 'struct QcdmResult *')
      [-Werror,-Wnon-literal-null-conversion]
            return FALSE;
                   ^~~~~
./utils.h:29:15: note: expanded from macro 'FALSE'
#define FALSE ((u_int8_t) 0)
              ^~~~~~~~~~~~~~
2 errors generated.
make[3]: *** [libqcdm_la-commands.lo] Error 1
make[3]: *** Waiting for unfinished jobs....

Below is the patch that fixes it
2014-02-06 03:18:15 -06:00
Bjørn Mork 13552aa8b6 qcdm: add IPv6 nvram setting
Some Qualcomm firmwares disable IPv6 unless this flag is set in nvram, at
least for the LTE default bearer. The firmware will happily let you
configure the IPV6 and IPV4V6 PDP types, also including the default
profile, but any attempt to connect will fail.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:09 -06:00
Dan Williams 9fa5b9001a qcdm: fix CDMA1x Pilot Sets pilot handling
The helper functions got the return code of qcdm_result_* wrong
and thus failed all requests for pilot sets.
2013-04-17 17:21:28 -05:00
Dan Williams b67a3948b5 qcdm: fix IM*I buffer sizes for GSM and WCDMA state info requests
Found by Enrico Murador.
2013-04-02 12:10:54 -05:00
Dan Williams 5efb1ceb5e qcdm: fix up NV Mode Pref item handling
While the QCDM and DIAG_NV are the same, in reality they shouldn't
be and there should be a mapping between them.  That wasn't happening,
so fix that up and add a few missing modes to the NV item defines.
2013-03-12 13:01:31 -05:00
Dan Williams 67fcac2541 qcdm: fix handling of active pilot set
Typo caused candidate or remaining sets to be treated as the
active pilot set.
2013-02-08 09:15:55 -06:00
Dan Williams 74e94e624d qcdm: add Novatel ERI subsystem support
Returns various ERI information like Indicator ID/Index, Icon
ID/Index, Icon Mode, and banner.
2013-02-06 11:57:00 -06:00
Dan Williams bf07f02cff qcdm: rename Novatel subsystem defines 2013-02-06 11:57:00 -06:00
Dan Williams b74741e642 qcdm: get/set functions for hybrid preference 2012-11-14 11:11:03 -06:00
Dan Williams fb65cba607 qcdm: add qcdm_cmd_control_new() to set operating mode 2012-09-27 10:55:20 -05:00
Dan Williams 1e286f80ea qcdm: interpret MCC value from StatusSnapshot command 2012-08-08 16:23:02 -05:00
Dan Williams 0737a24f43 qcdm: clarify IMxI conversions a bit; fix up WCDMA L1 states 2012-01-21 11:23:17 -06:00
Dan Williams 04e87e70ff qcdm: some devices do implement SW_VERSION
Like the MF627 for some reason.  Also, the format appears to be
more like the DM_CMD_VERSION_INFO response where at least the
comp_date and comp_time fields are the same size as
VERSION_INFO, just with some padding between.
2012-01-18 17:10:23 -06:00
Dan Williams 43e6039cee qcdm: GSM MCC, MNC, LAC and CI don't seem to valid in WCDMA mode
So don't bother trying to parse them.
2012-01-18 13:44:20 -06:00
Dan Williams 178f30bdd3 qcdm: fill in some GSM and WCDMA stuff 2012-01-17 18:49:18 -06:00
Dan Williams 474d9136ba qcdm: fix warning when no log codes are enabled 2012-01-11 17:55:10 -06:00
Dan Williams b14044bc9a qcdm: only warn on unknown mode pref NV item values 2012-01-11 16:10:02 -06:00
Dan Williams 29a1385e6c qcdm: LOG_CONFIG fixups
Fix some buffer overruns.  Log codes are also 16-bit not 32.
2012-01-11 15:30:45 -06:00
Dan Williams f3208bf3a6 qcdm: add support for Log Config command
This appears to be a newer version of EXT_LOGMASK that also
works with GSM/UMTS and other subsystems.
2012-01-11 14:25:23 -06:00
Dan Williams ff838972cf qcdm: don't segfault getting number of log items
Not sure how this worked before at all.
2012-01-10 18:14:40 -06:00
Dan Williams 62d26479ff qcdm: better handle NV item read/write status codes 2012-01-05 12:29:03 -06:00
Dan Williams 6e961ddd83 qcdm: fix up live testcase for recent changes
And interpret all the recent mode preferences.
2012-01-05 11:05:32 -06:00
Dan Williams 7b14063f46 qcdm: remove usage of glib
People have asked for this at various times.
2012-01-03 00:21:05 -06:00
Dan Williams b3f0ca9233 qcdm: add some more CDMA band classes 2011-05-16 18:44:11 -05:00
Dan Williams 7a2031613a qcdm: add HDR revision preference
Not sure if that's exactly what the NV item is, but the UML290 uses
it for Rev0, RevA, and eHRPD preference.
2011-01-06 22:01:45 -06:00
Dan Williams f3024b46b4 qcdm: add event reporting on/off command
Doesn't parse any events yet since we don't know what any events
are.  We also need to fix up ModemManager to handle unsolicited
responses in the QcdmSerialPort class.
2010-09-01 10:51:22 -05:00
Dan Williams ee53c3c3c4 qcdm: add bits for getting/setting the log mask
No code to actually start logging yet, just sets the mask.
2010-08-25 19:57:58 -05:00
Dan Williams 48b8826cbd qcdm: add Status Snapshot enum 2010-08-16 12:20:49 -05:00
Dan Williams dbbac27f1e qcdm: add generic status snapshot command support 2010-08-05 22:51:29 -05:00
Dan Williams 52f9c721d3 core: add SPC lock error 2010-08-05 22:51:28 -05:00
Dan Williams 0f6f381e87 qcdm: generic functions for band_class/prev conversion 2010-05-07 11:16:57 -07:00
Dan Williams fb965695ec qcdm: add Novatel Modem Snapshot command support 2010-05-07 04:58:22 -07:00
Dan Williams 0ae176c63c qcdm: add Pilot Set retrieval for signal strength calculations
Determined from various	sources	including RTManager and
"Technical Introduction to CDMA" (Course RF100 Chapter 7).
2010-03-30 00:32:27 -07:00
Dan Williams a98fa8a4b3 qcdm: fix up CDMA Status command fields and values
Found in two sources:
a) Руководство пользования тестером CDMA-450
b) RTManager
2010-03-29 00:08:46 -07:00
Dan Williams 6ab36bacf3 qcdm: add ZTE signal strength request 2010-03-22 13:03:53 -07:00
Dan Williams 4006ca4dec qcdm: better checking of NV read/write command results 2010-03-20 02:28:01 -07:00
Dan Williams c4a1a78c43 qcdm: complete mode preference implementation 2010-03-20 00:09:38 -07:00
Dan Williams 26c1402aae qcdm: add initial roaming and mode preference bits 2010-03-19 19:18:02 -07:00
Dan Williams 0815597d8d qcdm: fix command buffer initialization
Use the right buffer size to initialize.
2010-03-17 00:40:13 -07:00
Dan Williams 06415201cb qcdm: add HDR State Info command 2010-02-22 18:34:12 -08:00
Dan Williams 928f8a9ff2 qcdm: add Call Manager subsystem STATE_INFO command 2010-02-22 17:35:28 -08:00
Dan Williams c937d1399b qcdm: add SW_VERSION command 2010-02-22 16:15:19 -08:00
Dan Williams bdfddd57e7 qcdm: fix STATUS command SID & NID reporting 2010-02-22 15:53:06 -08:00
Dan Williams c0e227a16b qcdm: add status command and rework testcases a bit
Status command not completely working yet.
2010-02-22 13:27:25 -08:00
Dan Williams 3d617b7bf6 qcdm: add command to get MDN (ie, phone number) 2010-02-22 12:17:27 -08:00
Dan Williams 7d151e6ae0 qcdm: add DIAG_CMD_ESN 2010-02-22 11:33:44 -08:00
Dan Williams 10e5e6561f qcdm: handle more command error responses 2010-02-22 11:06:50 -08:00
Dan Williams 0f9d4d2a1a qcdm: fix QCDM packet decapsulation
Rename and document the encapsulate/decapsulate functions, CRC-check
the incoming packet, and make callers aware of the difference in how
big the decapsulated packet is versus how many bytes they should
discard from the buffer (since the decapsulated packet is at least
3 bytes shorter than the incoming packet due to the CRC + framing).
2010-02-22 10:52:59 -08:00
Dan Williams 6239d2e351 qcdm: implement command handling and minimal infrastructure 2010-02-16 09:58:47 -08:00