Bug 946311 - 1/6: don't mix cid with the index to data_context array.

Signed-off-by: You-Sheng Yang (楊有勝) <vicamo@gmail.com>
Bug 946311 - 2/6: fix +CGDCONT/+CGACT

Three things to fix here:

1. From 3GPP TS 27.007 subclause 10.1.10 "PDP context activate or
deactivate +CGACT", "The read command returns the current activation
states for all the defined PDP contexts." but now we return only
active ones.

2. From 3GPP TS 27.007 subclause 10.1.1 "Define PDP context
+CGDCONT", "(about <PDP_addr>) The read form of the command will
continue to return the null string even if an address has been
allocated during the PDP startup procedure." So we should return the
given <PDP_addr> in the response of the read form.

3. Return correct supported cid range <1-MAX_DATA_CONTEXTS> in the
test form of +CGDCONT.

Signed-off-by: You-Sheng Yang (楊有勝) <vicamo@gmail.com>
Bug 946311 - 3/6: intantiate additional rmnet nics.

Create <MAX_NET_CLIENTS> additional NIC instances when radio is
enabled. These NICs will have the name "rmnet<N>".

Signed-off-by: You-Sheng Yang (楊有勝) <vicamo@gmail.com>
Bug 946311 - 4/6: support link down for SMC91C111

Original SMC91C111 doesn't support link up/down reporting (EPHSR).
This patch implement it and one may call |do_set_link| to change the
link status.

Signed-off-by: You-Sheng Yang (楊有勝) <vicamo@gmail.com>
Bug 946311 - 5/6: link up/down in AT+CGACT handler.

Signed-off-by: You-Sheng Yang (楊有勝) <vicamo@gmail.com>
Bug 946311 - 6/6: implement AT+CGCONTRDP.

Signed-off-by: You-Sheng Yang (楊有勝) <vicamo@gmail.com>
Bug 916883: Added LLCP constants and primitives

The Logical Link Control Protocol (LLCP) is used to establish
connections over NFC. It's completely independend of NFC and
can also be used over any other networking technology.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Added NFC infrastructure

This commit adds some infrastructure for NFC debugging and logging.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Added NFC RF

The NFC RF data structure represents the state of an RF interface.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Added NFC device state

The NFC device state is an abstract implementation on the state
of a device. The state currently contains information about the
device's initialization, and a number of configuration options.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Added NCI parser

The NFC Controller Interface (NCI) is the standardized protocol
for talking to local NFC controllers. This commit implements a
number of NIC protocol primitives for the bcm2079x driver. There
are more primitives specified, which can be added when necessary.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Added HCI parser

The Host Controller Interface is an older interface for talking
to NFC chipsets. This commit only adds minimum support for HCI,
so that the bcm2079x driver's initialization completes. HCI is
deprecated and shouldn't be used otherwise.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Added Goldfish NFC device

This patch adds an NCI-compatible NFC device to the Goldfish
emulator. The NFC Communication Interface (NCI) is a standardized
protocol for communicating with NFC chipsets. The protocol is
generic enough to be vendor and chipset independend and can be
implemented by devices with NFC-like characteristics.

The NFC device in the Goldfish emulator handles NCI messages, and
responds accordingly. This will allow for simulating basic
functionality of an NFC chipset. Some HCI and proprietary commands
are also supported to allow for use of the BCM2079x driver in the
guest system.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Added NFC Remote Endpoint

A remote endpoint implements an external NFC device, such as a
tag. Remote endpoints with different properties can be implemented
and used in the emulator.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Added NFC console commands

There are currently 3 console commands for NFC, which allow
for injecting rf_discovery and rf_intf_activated notificatons,
and data messages into the emulated NFC device.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Fix STATUS_{NCI|HCI}_CMND in status register while processing command

This commit fixes the state of the status register during
command processing.

While the NFC device processes a command, no other command
might be submitted. Command processing is signalled to the
driver by setting STATUS_{NCI|HCI}_CMND in the status
register.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 916863: Fix HCI event for WRITE_SLEEP_MODE

The returned HCI event for WRITE_SLEEP_MODE did not include the
final status value. The user-space driver thus worked with an
undefined value.

This patch fixes the bug and cleans up the HCI command handling.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 970212 - B2G Emulator: Enhance GSM/UMTS Signal Strength on Emulator. r=Vicamo.

Trigger amodem_unsol_buffered to send RIL_UNSOL_SIGNAL_STRENGTH after
"gsm signal" command to update signal strength on status bar promptly.
Merge pull request #53 from vicamo/bugzilla/946311/emulator-rmnet

Bugzilla/946311/emulator rmnet
Merge pull request #56 from chenghuk/master

Bug 970212 - B2G Emulator: Enhance GSM/UMTS Signal Strength on Emulator.