Commit Graph

634 Commits

Author SHA1 Message Date
Dan Williams 2c25286fc2 qmidb: a few more updates; handle variable length arrays 2012-01-03 12:46:57 -06:00
Dan Williams 15a4b26b8b gobi: add new codeaurora Gobi translated drop
It's got some structs and enums translated from the QMI database
to C structures and enums.  Which is quite nice.  It doesn't have
all of them though.  Interesting are some of the bits about LTE,
but those  may have been misnamed.
2012-01-03 11:51:17 -06:00
Dan Williams 3ce6ff92e0 qmidb.py: fix up some array and string size handling
And some name mangling.
2011-11-28 02:10:23 -06:00
Dan Williams 36f440d2a9 qmidb.py: make flow clearer by breaking up database components
Split up the parsing to make the relationships between the
different database components clearer.  Also fix up some
name sanitizing issues.
2011-11-23 12:23:56 -06:00
Dan Williams 5e64ef86aa upstream: apply changes from GobiAPI_2011-07-29-1026 2011-10-12 10:56:05 -05:00
Dan Williams 4748c8ef57 qmi: fix up type handling for fields
The fields 'type' isn't	the actual C member type, it's either
the C member type (QC calls this a "STD" type) or it's an enum
type.  If it's an enum type, use that type in the struct.  Also
handle fixed-length ANSI string types, which are essentially a
pointer to a string with the length encoded the previous struct
member.
2011-07-26 23:48:58 -05:00
Dan Williams 01b7ef4438 qmi: emit struct fields in order
Wasn't paying attention to the ordering of fields in the structs,
do that by taking advantage of how python keeps dict values in
sorted order.
2011-07-26 22:25:57 -05:00
Dan Williams 2a4db117da qmi: newline between struct forward declarations and the structs themselves 2011-07-26 21:24:54 -05:00
Dan Williams 13a5bcf6c5 qmi: more enum fixups
E_UTRA -> EUTRA, remove commas.
2011-07-26 21:04:56 -05:00
Dan Williams a3dffb91e3 qmi: fix up enum names more
Handle plural -> singular and various words we should be removing
like UNSUPPORTED.
2011-07-26 20:52:17 -05:00
Dan Williams b2b5b90a2f qmi: filter () from constant names
Prevents eg "GOBI_QMI_NAS_RADIO_INTERFACES_NONE_(NO_SERVICE)" which
isn't legal C.  We should probably ignore stuff in parentheses but
then we'd loose items like GOBI_QMI_ROAMING_INDICATORS_ROAMING_PARTNER
where the comment was "Roaming (partner)" which is pretty critical
information.
2011-07-26 15:28:58 -05:00
Dan Williams 807126af79 qmi: add start of a parser for the QMI database
Should allow us to start de-obfuscating QMI and creating a saner,
easier to read and use C-based implementation of QMI using actual
structs and enums instead of tree-walking code that doesn't let
you see what's actually going on.
2011-07-26 12:07:38 -05:00
Dan Williams 2470df454a gobi: add forgotten header file
Oops, should have been added in c831028555
2011-07-12 16:52:16 -05:00
Dan Williams a867ea4254 gobi: fix distcheck 2011-07-12 16:51:50 -05:00
ttuttle a5e26cca81 Fix bugs found in security audit of gobi3k-sdk
BUG=chromeos-partner:4395
TEST=Adhoc

Change-Id: I038c69daf7a88eeafd546cb0bb1beec921326c87
Reviewed-on: https://gerrit-int.chromium.org/2051
Reviewed-by: Elly Jones <ellyjones@google.com>
Reviewed-by: Jason Glasgow <jglasgow@google.com>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2011-07-12 16:32:22 -05:00
Elly Jones 0287908d5c gobi3k-sdk: fix GetDeviceType() on Novatel Gobi 2000
GetDeviceType() misinterpreted the wildcard marker for Novatel's gobi 2k in the
list of devices, causing it to falsely return unknown.

BUG=chromium-os:15790
TEST=Adhoc
modem_set_carrier with a Novatel gobi 2k

Change-Id: I79ad1f7b1923adfa5f2345a3f2e46a97d5ddd5e7
Signed-off-by: Elly Jones <ellyjones@google.com>
Reviewed-on: https://gerrit-int.chromium.org/1764
Reviewed-by: Jason Glasgow <jglasgow@google.com>
2011-07-12 16:31:05 -05:00
Elly Jones c831028555 gobi3k-sdk: Add GetDeviceType()
This function returns the type of device we're connected to, which allows us to
decide whether to use the 2K or 3K firmware download API.

BUG=chromium-os:15295
TEST=Adhoc
Hack gobi-cromo-plugin to log the result of GetDeviceType() and grep for that.

Change-Id: Ib8dad138e67e003dbf55b5ffc912241da70d3d75
Signed-off-by: Elly Jones <ellyjones@google.com>
Reviewed-on: https://gerrit-int.chromium.org/1410
Reviewed-by: Jason Glasgow <jglasgow@google.com>
2011-07-12 16:29:33 -05:00
Elly Jones 05c2833731 gobi3k-sdk: Use lock instead of trylock
Trylock appears to be used here as part of some kind of fancy-but-unnecessary
deadlock-detection system; we're better off just writing deadlock-free code to
begin with.

The trylock-using code was losing events; if it tried to get the lock and
failed, it'd drop the incoming event on the floor, which means response latency
would nondeterministically spike up to the max timeout (thus the test failures
with timeout = 1000 instead of 100). If we just wait until the lock is free,
we'll never discard events. Go us.

(This also makes the timeout unnecessary in most cases, but I have not removed
it in this CL yet.)

BUG=chromium-os:13475
TEST=network_3GStressEnable

Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>

Review URL: https://chromereviews.googleplex.com/2727013
2011-07-12 16:22:14 -05:00
Elly Jones 454be50636 gobi3k-sdk: Fix UpdateFirmware()
UpdateFirmware() was trying to use the gobi 3000 firmware download protocol (and
gobi 3000 firmware images) to download gobi 2000 firmware onto a gobi 2000
device. Oops.

BUG=None
TEST=Adhoc
With gobi2k, modem_set_carrier; with gobi3k, gobi-fw.
Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>

Review URL: https://chromereviews.googleplex.com/2707019
2011-07-12 16:21:19 -05:00
Elly Jones 9abb5a0911 gobi3k-sdk: add -lpthreads to GobiQDLService makefile
This placates gold.

BUG=None
TEST=Adhoc
Built.

Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: raymes <raymes@google.com>

Review URL: https://chromereviews.googleplex.com/2686017
2011-07-12 16:18:05 -05:00
Dan Williams c3f7bb3142 gobi: add GobiQDLService files
When I created the 'fixed' directory these didn't get added due to
the erroneous .gitignore.
2011-07-12 16:17:06 -05:00
Dan Williams 12fb080170 trivial: stop ignoring the whole GobiQDLService directory 2011-07-12 16:14:59 -05:00
Elly Jones 58e622b754 gobi3k-sdk: Always supply -lpthread to placate gold
BUG=None
TEST=Adhoc
Built.

Signed-off-by: Chris Masone <cmasone@google.com>
Signed-off-by: Elly Jones <ellyjones@google.com>

Review URL: https://chromereviews.googleplex.com/2691013
2011-07-12 16:12:11 -05:00
Elly Jones b4379c69b2 gobi3k-sdk: QDL: search by driver, not vid:pid
Being able to set the vid:pid was always a bad hack to allow us to start working
on gobi3k support; the proper way to do this is to look for ports by driver
name. This also lets us chop out a bunch of code, which is always fun.

As a side-effect, GobiEnumerateQDLDevices() really returns *all* QDL devices,
not just those that match the current vid:pid.

BUG=chromium-os:12380
TEST=Adhoc
Using the 'gobi-fw' tool from gobi3k-lib (not yet committed): gobi-fw list

Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: David Rochberg <rochberg@google.com>

Review URL: https://chromereviews.googleplex.com/2657021
2011-07-12 16:07:58 -05:00
Elly Jones 07e34abc7d Install Gobi headers
As part of this, remove the double definitions of the builtin types.

BUG=chromium-os:12380
TEST=Adhoc
install and gobi3k image-list; also ls /usr/include/gobi.

Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>

Review URL: https://chromereviews.googleplex.com/2627017
2011-07-12 16:06:31 -05:00
Elly Jones 283c2d4971 Support all gobi devices.
1) Use the ioctl() supplied by the unified kernel driver;
2) Instead of looking for the device by vid:pid (?), look for it by owning
driver.

BUG=chromium-os:12380
TEST=Adhoc
shim ebuild + emerge-$board gobi3k-sdk
Plug in a G3K, `modem status`; plug in a G2K, `modem status`.

Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>

Review URL: https://chromereviews.googleplex.com/2647025
2011-07-12 15:56:56 -05:00
Dan Williams cc95d8fdda gobi: CodeAurora stuff is BSD, not GPLv3 like autotools thinks the world should be 2011-07-12 13:52:59 -05:00
Dan Williams 254f647f1b gobi: duplicate upstream GobiAPI so we can change it 2011-07-12 13:23:09 -05:00
Dan Williams 5f0ca4eb56 gobi: add dummy C file for database static lib
I don't know the autotools magic for building a lib from only
precompiled .o files, so lets do it this way instead.
2011-07-11 20:24:24 -05:00
Dan Williams 9c7e07cea9 gobi: ensure m4/ directory is created or autogen.sh bails 2011-07-11 20:24:04 -05:00
Dan Williams 7c2e0be62d core: add .gitignore file 2011-07-11 20:21:01 -05:00
Dan Williams eca93cf1ed gobi: remove hand-rolled makefiles 2011-07-11 20:17:48 -05:00
Dan Williams f9aa19c63f gobi: autotool everything 2011-07-11 20:17:14 -05:00
Dan Williams c91eb07bcf gobi: initial commit of CodeAurora Gobi SDK 2011-07-11 20:12:48 -05:00