Commit graph

41120 commits

Author SHA1 Message Date
Johan Hedberg
24c7397160 Bluetooth: Controller: Increase default TX buffer count
Only 1 TX buffer is sub-optimal for performance since the controller
would always have to wait for the host TX thread to give it another
buffer. Increase the value to 2 so the controller can keep
transmitting data without waiting for the host.

Change-Id: I4841a6c5010f294996d6fe0fe63260b848a6a437
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-21 17:05:42 -07:00
Vinayak Chettimada
f1aabd8ba2 Bluetooth: controller: Replace 0 for pointers with NULL keyword
Updated controller code to use NULL keyword instead of
using 0 for pointers.

Change-id: I5ebff53dfeeba670fb7afe4740596b2662eb0334
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Johan Hedberg
94831a7589 Bluetooth: Introduce public big-endian AES API
There may be use cases where input and output is in big-endian rather
than little-endian. Introduce a native big-endian API to avoid
excessive byte order reversals in these cases.

Change-Id: Ia7b3e01bb0a07c4560b23f60c2f615ec614eb431
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-21 17:05:42 -07:00
Johan Hedberg
6cb853fc04 Bluetooth: Controller: Introduce big-endian variant for ECB
There are some use cases where all parameters are in big-endian. To
avoid excessive byte order reversals introduce a native big-endian
API.

Change-Id: I58fe9156c8819a3a43d715e70b6ba358bd2f844b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-21 17:05:42 -07:00
Johan Hedberg
579551ed06 Bluetooth: Controller: Factor out ECB core code from ecb_encrypt()
Do this in preparation of a purely big-endian API (all three
parameters as big-endian).

Change-Id: I815f74549caffd5ac387b5bb84e5851aa96639b9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-21 17:05:42 -07:00
Johan Hedberg
042624fb62 Bluetooth: Move crypto APIs to dedicated header file
This avoids overpopulating the high-level bluetooth.h

Change-Id: Icab8500be92003aa45d837ff111a8d93689865cc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-21 17:05:42 -07:00
Sathish Narasimman
f5383b07a2 Bluetooth: AT: Fix reset the state during error
1. Reset the state when error occurs
2. This patch avoids checking for the AT_STATE_UNSOLICITED_CMD state
as the loop exits with possix error. So check for at->state
AT_STATE_START is sufficient for loop termination.
3. Fix different sign warning.

Change-Id: I80a1ca582112f1783690ac8a4125036bb706705f
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2017-03-21 17:05:42 -07:00
Sathish Narasimman
d33ea09968 Bluetooth: HFP HF: SCO Initiate Audio connection
This patch adds support to initiate audio connection from the stack.

< HCI Command: Setup Synchronous... (0x01|0x0028) plen 17  [hci0]
        Handle: 256
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 7
        Setting: 0x0060
          Input Coding: Linear
          Input Data Format: 2's complement
          Input Sample Size: 16-bit
          # of bits padding at MSB: 0
          Air Coding Format: CVSD
        Retransmission effort: Optimize for power consumption (0x01)
        Packet type: 0x003e
          HV2 may be used
          HV3 may be used
          EV3 may be used
          EV4 may be used
          EV5 may be used

Change-Id: I4f4c0788760c9bdaf75651825511ff6bcd06df59
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2017-03-21 17:05:42 -07:00
Sathish Narasimman
dcf9a97b18 Bluetooth: HFP HF: SCO: Handle SCO Disconnect
This patch handles the SCO disconnection part also unref the connected
corresponding ACL conn.

Change-Id: Ic2de68560cfd7d847e6011578c4424e24800d2ac
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2017-03-21 17:05:42 -07:00
Sathish Narasimman
e0363fd45b Bluetooth: SCO: Rename 'conn' to 'acl'
This patch renames the 'conn' variable to 'acl' which is reference
to ACL connection for SCO connection.

Change-Id: I5f0a60bc5d80de08fa5b963cf545c71552909401
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2017-03-21 17:05:42 -07:00
Kaustav Dey Biswas
495ff6730c Bluetooth: SDP: Server: Support ServiceSearchAttributeRequest
This change adds support for handling Service Search Attribute
Requests.

> ACL data: handle 256 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 1]
        SDP SSA Req: tid 0x0 len 0xf
          pat uuid-16 0x1002 (PubBrwsGrp)
          max 65535
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 256 flags 0x00 dlen 109
    L2CAP(d): cid 0x0040 len 105 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x64
          count 97
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10000
              aid 0x0002 (SrvRecState)
                 uint 0x0
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x111f (Handsfree AG) uuid-16 0x1203 (Audio)
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0x3 > >
              aid 0x0100 (SrvName)
                 str "HFP AG Service"
              aid 0x0311 (SuppFeatures)
                 uint 0x0
          cont 00

Change-Id: Ib742b09b70271f79aa6462acce25f4c08a9e1a15
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2017-03-21 17:05:42 -07:00
Vinayak Chettimada
a91dd34830 Bluetooth: Make LE Encrypt helpers public
Expose LE Encrypt helpers to applications. If software-
based controller is compiled-in, then controller's AES
hardware will be used by the exposed helper interface.

Change-id: I2bac9dfa5ccb3dd50447079affb52d920ae5bd81
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>.
2017-03-21 17:05:42 -07:00
Kaustav Dey Biswas
3994f4d5b7 Bluetooth: SDP: Server: Send ServiceAttributeResponse
Now that we have all the requested attributes of the service, form
the response packet and send it.

This also renames create_attrib_resp() to create_attrib_list() since
it is basically creating the list of attributes based on the filter.

> ACL Data RX: Handle 256 flags 0x02 dlen 21
      Channel: 64 len 17 [PSM 1 mode 0] {chan 0}
      SDP: Service Attribute Request (0x04) tid 28258 len 12
        Record handle: 0x10000
        Max attribute bytes: 4096
        Attribute list: [len 5]
          Sequence (6) with 3 bytes [8 extra bits] len 5
            Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
              0x0004
        Continuation state: 0
< ACL Data TX: Handle 256 flags 0x00 dlen 32
      Channel: 64 len 28 [PSM 1 mode 0] {chan 0}
      SDP: Service Attribute Response (0x05) tid 28258 len 23
        Attribute bytes: 20
          Attribute list: [len 17] {position 0}
            Attribute: Protocol Descriptor List (0x0004) [len 2]
              Sequence (6) with 3 bytes [8 extra bits] len 5
                UUID (3) with 2 bytes [0 extra bits] len 3
                  L2CAP (0x0100)
              Sequence (6) with 5 bytes [8 extra bits] len 7
                UUID (3) with 2 bytes [0 extra bits] len 3
                  RFCOMM (0x0003)
                Unsigned Integer (1) with 1 byte [0 extra bits] len 2
                  0x05
        Continuation state: 0

Change-Id: I54ba00f7700cbb72182dce745d61f5281f83437a
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2017-03-21 17:05:42 -07:00
Johan Hedberg
e085ff49b9 Bluetooth: shell: Add command to start continuous passive scanning
Change-Id: I0d9c2f47014464a27ff24ac79a16ee956bbcf62c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-21 17:05:42 -07:00
Johan Hedberg
1ce1c3484e Bluetooth: shell: Fix missing initialization of param.own_addr
Add proper logging for errors in the same go.

Change-Id: I8bd4fa8d5b143e51024496bfba0056525ad35964
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-21 17:05:42 -07:00
Vinayak Chettimada
32f03a42c7 Bluetooth: controller: Move bt_rand into separate file
Move crypto related interface provided by the
software-based Controller bt_rand into separate file,
crypto.c.

Change-id: I9998a43fe45799b479969ca195f324199418b8c2
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Vinayak Chettimada
5bf86ea209 Bluetooth: controller: Use explicit paths to internal headers
Use explicit path while including internal header files.

Change-id: Ide80eb23007574a7362850173ac227943bda21d5
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Carles Cufi
4b10d75fbe Bluetooth: controller: Move LL code from driver to ll_sw
The current hci_driver.c contained all the software Link Layer
initialization code. To decouple HCI from the actual LL, most of the
functionality that is actually part of the LL has been moved to the
ll_sw folder, opening the possibility for future hardware-based LL
implementations.

Change-Id: I1b54d655568a4ec02409da2f1a0addb4d64beed0
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Carles Cufi
8dd0374214 Bluetooth: controller: Remove public address config option
Since this presents a risk of public Bluetooth address duplication in
the wild by compiling once with a particular address and then flashing
the same image to multiple devices, a decision has been taken to remove
that config option and replace it later with another mechanism.

Change-Id: I068db25b2996c2409630554b1819b6adc48226cd
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Carles Cufi
a7f6656998 Bluetooth: controller: Move ll.h to an include folder
To present a common interface to both software and hardware Link Layers
the API in ll.h now lives in its own separate include/ folder.

Change-Id: I2b0ab0d11b47b9c35a5759bcc30f347e6c616648
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Johan Hedberg
5517893543 Bluetooth: Make bt_hci_driver instances link-time constants
Declaring these as const lets the linker generate more optimal code.
Some extra care is needed with hci_ecc.c since it was overwriting the
send callback. Now the choice of send() call is done directly in the
bt_send() function

Change-Id: Iac74f5ee9bee097bbb34c11bd13d1d886700f5cc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-21 17:05:42 -07:00
Kaustav Dey Biswas
61706ca021 Bluetooth: SDP: Server: Find the attributes in the record
Retrieves the record specified by the record handle, go over each
attribute in the record and check whether the attribute is there
in the list provided in the request.

Change-Id: I8f09e0fbb7811a20bb25dc0029cd7c79a9345c88
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2017-03-21 17:05:42 -07:00
Carles Cufi
841c5432cc Bluetooth: controller: Introduce BLUETOOTH_LL_SW
In preparation for future hardware implementations of the BLE
Link Layer, this patch introduces the BLUETOOTH_LL_SW
configuration option to specify that the default software
LL is to be built.

Change-Id: I8b9d5b5e0d2926d18f9e8c8f042a74326895bf95
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Sathish Narasimman
befc6510f1 Bluetooth: HFP HF: SCO: Handle synchronous_conn_complete
Handle the synchronous connection complete event received from the
controller and update the event details received.

> HCI Event: Synchronous Connect Complete (0x2c) plen 17
        Status: Success (0x00)
        Handle: 266
        Address: 48:9D:24:1F:4D:1D (BlackBerry RTS)
        Link type: eSCO (0x02)
        Transmission interval: 0x06
        Retransmission window: 0x02
        RX packet length: 30
        TX packet length: 30
        Air mode: CVSD (0x02)

Change-Id: I4bcd0488f798b112af504245e80180a70b32a882
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2017-03-21 17:05:42 -07:00
Kaustav Dey Biswas
383bc7712d Bluetooth: SDP: Server: Handle ServiceAttributeRequest
Handles the ServiceAttributeRequest, populates the attributes to be
searched in the record specified by the record handle.

Change-Id: I3b702eaf05615f795d32aa30dbfaf91f5b2ce560
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
2017-03-21 17:05:42 -07:00
Carles Cufi
be060208e9 Bluetooth: controller: Rename downstream API calls
Rename all LL downstream API calls from radio_ to ll_ so that they
reflect the layer they are actually targeting. Additionally they have
been moved to ll.h so as to expose a proper interface.

Change-Id: I4fb3946597920c9fafaacb6d87d34d83d75e8f27
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Carles Cufi
7e0a900e05 Bluetooth: controller: Remove unused H:4 tag macros
Remove the H:4 packet type macros that were unused in this file.

Change-Id: If161ddbf2d3adb2871cadd76de0e6c3bb50a16db
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Vinayak Chettimada
e3d00bf338 Bluetooth: Controller: Version 5.0 and PDU type rename
Report as Bluetooth 5.0 compliant controller as there are
no mandatory features.

Rename PDU types as per the changes in Bluetooth 5.0
Specification.

Change-id: I1363e054eafd37c2bdca0f69b2638c7edb785787
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Vinayak Chettimada
00d8a902b7 Bluetooth: Controller: Add Kconfig range check for public address
Bluetooth device address is 48-bit, added Kconfig range
field to restrict input to 48-bit hexadecimal value.

Change-id: I650343eab5809535137e164e783c9dd4f3e2a6f2
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Matthias Ringwald
34b6c53c46 Bluetooth: Controller: Kconfig company id and subversion number
Add Kconfig option to set the Controller's company id and
subversion number.

Change-id: I3508aba18bf0b79fd423c7b4142b6fc57eaf55d7
Signed-off-by: Matthias Ringwald <matthias@bluekitchen-gmbh.com>
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Vinayak Chettimada
0d75faf02d Bluetooth: Controller: Add advertisement event indication feature
Add a Controller event that indicates everytime
advertisement event has been transmitted on air.

Change-id: I4722488bbfeca987e66983faf5b26467407a89c9
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Vinayak Chettimada
d8f28bc96a Bluetooth: Controller: Fix RSSI feature conditional compilation
Add ARG_UNUSED on rssi_ready local variable when the RSSI
feature is compiled out.

Change-id: I04f8f11cbc3530f7b85ffa72f27373e213b6e35e
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-21 17:05:42 -07:00
Kaustav Dey Biswas
4b534bc403 Bluetooth: SDP: Server: Send service search response
Now that we have all the records which has the uuids in the
service serach pattern, take the handle of each of those records,
prepare and send the service search response.

> ACL data: handle 256 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x6b6f len 0x8
          pat uuid-16 0x0100 (L2CAP)
          max 256
          cont 00
< ACL data: handle 256 flags 0x00 dlen 26
    L2CAP(d): cid 0x0040 len 22 [psm 1]
        SDP SS Rsp: tid 0x6b6f len 0x11
          count 3
          handles 0x10000 0x10001 0x10002
          cont 00

Change-Id: I85ec8ee384d0bf8090265577ec3ef805e75d4766
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2017-03-21 17:05:42 -07:00
Luiz Augusto von Dentz
4fb0724a55 Bluetooth: ipsp: Fix checking for NULL pointer
This may cause static analyser error such as the following:

  Null-checking "tmp" suggests that it may be null, but it has already
  been dereferenced on all paths leading to the check.
             if (tmp) {

Change-Id: Id04f8d052d8128003d5b91f7a8303940529ef261
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-03-21 17:05:42 -07:00
Carles Cufi
e4aa74125c doc: Fix minor issues in Windows installation guide
Minor fixes and cosmetic changes.

Change-Id: Ibf98f84934b523860adf27acc743fd1ec359e773
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-21 13:46:16 +00:00
Carles Cufi
b4aff7dc79 arch: nrf5x: Define additional compiler macros
The current nordic hal layer in ext/ requires additional macros to
include the correct files. This will be corrected in an upcoming version
of the hal layer itself but for now add the required macros so that
users can benefit from the hal peripheral code.

Change-Id: I95127d0a98d7e882fdc779f961718fa223d504eb
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-21 13:38:59 +00:00
Anas Nashif
3dc9af66ca sensors: BME280: added support for SPI communication
Support connection via SPI and keep I2C as the default.

Jira: ZEP-1698
Change-Id: I42a76131577a37429375364deb07e451107f5d81
Signed-off-by: Dario Pennisi <dario@iptronix.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-21 10:39:27 +01:00
Anas Nashif
23a4eca861 panther: set SPI slave select for bme280
Change-Id: If1bd1a3f3fa1855907fbc356066b97013fe37996
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-20 23:08:15 -04:00
Jean-Paul Etienne
4b8ae8863c riscv32: riscv-privilege: Platform-Level Interrupt Controller support
Updated the riscv-privilege SOC family to account for SOCs supporting
a Platform-level Interrupt Controller (PLIC) as specified by the
riscv privilege architecture.

riscv-privilege SOCs supporting a PLIC have to implement the following
list of APIs:
void riscv_plic_irq_enable(uint32_t irq);
void riscv_plic_irq_disable(uint32_t irq);
int riscv_plic_irq_is_enabled(uint32_t irq);
void riscv_plic_set_priority(uint32_t irq, uint32_t priority);
int riscv_plic_get_irq(void);

Change-Id: I0228574967348d572afc98a79257c697efc4309e
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-03-20 23:19:36 +00:00
Jean-Paul Etienne
d1bd80a4a9 riscv32: added the riscv-privilege SOC_FAMILY
added the riscv-privilege SOC_FAMILY, under which all
riscv SOCs supporting the riscv privilege architecture
specifcation shall reside. These SOCs shall notably have
a common base for handling IRQs.

Moved riscv32-qemu under the riscv-privilege SOC_FAMILY

Change-Id: I5372cb38e3eaed78886f22b212ab4f881ef30b3f
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-03-20 23:19:35 +00:00
Inaky Perez-Gonzalez
c9cff15a8a samples/shell: print the actual params passed
The params command is not printing the arguments, which makes this not
so useful to verify how things work, so added it to the sample.

Change-Id: I2d71ee064f12c7353ba83144824ae46803e2ad39
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-03-20 21:48:54 +00:00
Carles Cufi
6f422bae81 doc: Add MSYS2 to the Windows setup guide
Since MSYS2 is far more stable, reliable, maintained and easy
to set up than MinGW as a Windows development environment,
default to it for the official Windows Getting Started guide,
including instructions to compile for both x86 and ARM with it.

Change-Id: Iaba61498b3b16a8ee1edbff953de16c275282c7b
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-20 21:46:06 +00:00
Michał Kruszewski
46a00d4b7c scripts:nrf: Add 'make flash' for nrf boards.
Tested on nrf52_pca10040 and nrf51_pca10028 using hello_world sample.

Change-Id: I7cdf1d21e7f8232da737a06e5afbfb1eaec05cde
Signed-off-by: Michał Kruszewski <mkru1992@gmail.com>
2017-03-20 13:44:58 +00:00
Anas Nashif
7d7b3b732b Merge "Merge net branch into master" 2017-03-19 20:51:32 +00:00
Piotr Mienkowski
b6480cd5ae flash: openocd: make 'make flash' target work without Zephyr SDK
At present 'make flash' target for boards that support flashing with
OpenOCD works only with Zephyr SDK. This patch enables flashing
without Zephyr SDK as long as openocd itself is installed.

Change-Id: I4594d795225e54b7638839d590e4c0620f9ca88c
Jira: ZEP-1893
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-03-19 20:22:22 +00:00
David B. Kinder
3e20df33fc doc: Add 1.5 release notes to release-notes.rst
The only copy of the release notes for releases prior to 1.6 is on
the zephyrproject.org/downloads site.  Preserving the release notes
history in the git repo would be a good thing.  Here are the notes
for 1.5 (more to come).

Also added an auto table-of-contents header to make it easier to
navigate.

Change-Id: Ibd8b5a8d3816f7f5c376216adc2d52bb9467214d
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-18 23:34:18 +00:00
David B. Kinder
570ad1d328 doc: add example clarifing duration/period
A recent mailing list question asked for clarify about
the duration and period parameters for starting a timer.

Change-Id: I9bf8dd93dbbb9bbb94c95c2d7072f446ea1d6b01
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-18 23:33:20 +00:00
Carles Cufi
1436e44aa6 build: Add support for MSYS2
MSYS2 is a modern fork of Cygwin that is widely supported
and provides frequent releases and good support. It is
also the framework used by the official Windows Git port.
This patch adds MSYS2 support so that builds on Windows using
MSYS2 work properly.

Change-Id: Ia5743a410d1cff983a7aab37f8e3d8228cb8ae8e
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-03-17 17:34:56 +01:00
Jukka Rissanen
cfaf64c042 Merge net branch into master
Main changes:

- HTTP sample application Basic Auth support
- DNS parsing fixes
- SLIP MAC address can be set from Kconfig
- SLIP driver memory corruption fix
- IPv6 neighbor unreachability detection (NUD) fixes
- ICMPv6 fixes
- Compiler warning fixes
- IEEE 802.15.4 CC2520 MAC address can be set from Kconfig
- Multiple k_delayed_work_init() call fixes in network stack
- 6lo (IPv6 header compression) fix
- Atmel SAM family GMAC ethernet driver update
- RPL protocol header fixes
- mbedtls CoAP fixes
- Management API supports now synchronous event waiting
- RX and TX thread startup fix
- net_buf leak fixes in error cases

----------------------------------------------------------------
Flavio Santes (6):
      samples/http: Match header field ctr with Kconfig variable
      net/http: Move some statements to the right place
      samples/net/http: Add the HTTP Basic Authentication routine
      net/dns: Fix wrong name in DNS answer type routine
      net/dns: Fix DNS answer RR computation
      tests/net/dns: Add routines to evaluate DNS responses

Inaky Perez-Gonzalez (1):
      drivers: slip: Allow specifying the MAC address from config file

Jukka Rissanen (32):
      net: ipv6: Add debug function to convert nbr state to string
      net: ipv6: Print IPv6 neighbor state changes
      net: ipv6: Send NS when neighbor is added
      net: ipv6: Return the prefix lifetime in seconds
      net: shell: Print more detailed neighbor information
      net: ipv6: Wrong timer was used when reachability timer expired
      net: ipv6: Add more debugging to reachability timer
      net: ipv6: Properly enter DELAY state in NUD
      net: utils: Byte to hex converter had wrong prototype
      samples: net: zperf: Fix compiler warnings
      net: tests: nbuf: Fix compiler warnings
      net: shell: Add cmd to remove IPv6 neighbor from cache
      net: shell: Pretty print the neighbor cache info
      net: tests: Fix the default MAC address
      net: Synchronize TX and RX threads startup
      net: Ignore everything in RX if interface is not up
      net: ipv6: Use net_nbuf_unref() to get better debug prints
      net: ipv6: Make sure there is data to be sent
      net: ipv6: Clear pending buf if NS cannot be sent
      net: ipv6: Enhance debug print when handling pending packet
      drivers: slip: Use always the initialized network interface
      net: Print error if buf or interface are NULL when receiving pkt
      net: ipv6: Make config options more fine grained
      drivers: slip: Fix memory corruption when receiving packet
      net: ipv6: Cancel the prefix timer before setting it again
      net: ipv6: Prefix length was incorrectly set
      net: icmp: Gracefully timeout net_buf get in RX path
      net: icmp: Update ICMP statistics for every ICMP packet
      net: icmp: Fix return values of ICMP error send function
      net: tcp: Print TCP trace in one line
      samples: net: coaps_client: Fix the parameters when setting callbacks
      drivers: ieee802154: cc2520: User can set the MAC address

Luiz Augusto von Dentz (5):
      net: if: Don't check NET_IF_UP in net_if_prepare_events
      net: bt: Fix warnings when debug is enabled
      net: if: Make sure k_delayed_work_init is only called once
      net: ipv6: Make sure k_delayed_work_init is only called once
      net: rpl: Make sure k_delayed_work_init is only called once

Michael Scott (2):
      net: 6lo: Fix typo in compress bit calculation
      net/http: let HTTP_SERVER, HTTP_CLIENT and HTTP_PARSER select HTTP

Paul Sokolovsky (2):
      net: connection: Move proto2str() to utils.c, rename to net_proto2str()
      net: context: For bind debug logging, include context protocol.

Piotr Mienkowski (1):
      drivers: Update Atmel SAM family GMAC Ethernet driver

Ravi kumar Veeramally (9):
      net: core: Fix IPv6 RPL extension parsing
      net: rpl: Add RPL header revert utility
      net: ipv6: Fix handling of RA 6CO options
      net: icmpv6: Add support for HBH and RPL option handling
      net: context: Fix setting of appdata ptr and length
      net: rpl: Fix compilation warnings about format specifier
      net: rpl: Add API to access default rpl instance
      net: Modify IPv4/6 packet finalize API's
      net: samples: leds_demo: Fix memory leak

Sergio Rodriguez (2):
      samples: mbedtls coap: Fixing entropy source
      samples: mbedTLS coap: Cleaning prj.conf for QEMU

Tomasz Bursztyka (7):
      net/ieee802154: Add missing line breaks in the shell module
      net/ieee802154: Fix net mgmt request to get core settings
      net/mgmt: Add a function to wait on a event synchronously
      net/mgmt: Add a network interface based synchronous event listener
      tests/net/mgmt: Add 2 unit tests around synchronous event listeners.
      net/mgmt: Remove a useless k_sem_init() and use K_SEM_DEFINE instead
      net/mgmt: Remove the list node before unlocking the semaphore

 .known-issues/doc/networking.conf                 |  12 +
 drivers/ethernet/Kconfig.sam_gmac                 |  16 +-
 drivers/ethernet/eth_sam_gmac.c                   |  82 +++++-
 drivers/ethernet/eth_sam_gmac_priv.h              |   6 +-
 drivers/ieee802154/Kconfig.cc2520                 |  37 +++
 drivers/ieee802154/ieee802154_cc2520.c            |  15 +-
 drivers/slip/Kconfig                              |  11 +
 drivers/slip/slip.c                               |  64 ++++-
 include/net/net_mgmt.h                            |  92 ++++++-
 samples/net/coaps_client/src/coaps_client.c       |  17 +-
 samples/net/coaps_server/prj_qemu_x86.conf        |   5 +-
 samples/net/coaps_server/src/coaps_server.c       |  13 +-
 samples/net/echo_server/prj_sam_e70_xplained.conf |   3 -
 samples/net/http_client/prj_frdm_k64f.conf        |   1 -
 samples/net/http_client/prj_qemu_x86.conf         |   1 -
 samples/net/http_server/README.rst                |  21 ++
 samples/net/http_server/prj_frdm_k64f.conf        |   1 -
 samples/net/http_server/prj_qemu_x86.conf         |   1 -
 samples/net/http_server/src/config.h              |   9 +
 samples/net/http_server/src/http_server.c         |  19 +-
 samples/net/http_server/src/http_server.h         |   2 +
 samples/net/http_server/src/http_types.h          |   4 +-
 samples/net/http_server/src/http_write_utils.c    |  18 ++
 samples/net/http_server/src/http_write_utils.h    |   4 +
 samples/net/http_server/src/main.c                |   1 +
 samples/net/leds_demo/src/leds-demo.c             |  36 ++-
 samples/net/zperf/src/zperf_udp_receiver.c        |   2 +-
 samples/net/zperf/src/zperf_udp_uploader.c        |  24 +-
 subsys/net/ip/6lo.c                               |   2 +-
 subsys/net/ip/Kconfig.ipv6                        |  10 +-
 subsys/net/ip/connection.c                        |  24 +-
 subsys/net/ip/icmpv4.c                            |  28 +-
 subsys/net/ip/icmpv6.c                            |  78 ++++--
 subsys/net/ip/ipv4.c                              |   8 +-
 subsys/net/ip/ipv4.h                              |  10 +-
 subsys/net/ip/ipv6.c                              | 305 +++++++++++++++-------
 subsys/net/ip/ipv6.h                              |  65 +++--
 subsys/net/ip/l2/bluetooth.c                      |   8 +-
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.c     |   2 +-
 subsys/net/ip/l2/ieee802154/ieee802154_shell.c    |   8 +-
 subsys/net/ip/net_context.c                       |  98 +++----
 subsys/net/ip/net_core.c                          |  30 ++-
 subsys/net/ip/net_if.c                            | 189 ++++++++------
 subsys/net/ip/net_mgmt.c                          | 108 +++++++-
 subsys/net/ip/net_private.h                       |   6 +-
 subsys/net/ip/net_shell.c                         |  68 +++--
 subsys/net/ip/rpl.c                               | 223 +++++++++++-----
 subsys/net/ip/rpl.h                               |  30 ++-
 subsys/net/ip/tcp.c                               |  85 +++---
 subsys/net/ip/utils.c                             |  18 ++
 subsys/net/lib/dns/dns_pack.c                     |   4 +-
 subsys/net/lib/dns/dns_pack.h                     |  11 +-
 subsys/net/lib/http/Kconfig                       |   6 +-
 subsys/net/lib/http/http_server.c                 |  10 +-
 tests/net/6lo/src/main.c                          |   4 +-
 tests/net/arp/src/main.c                          |  10 +-
 tests/net/context/prj.conf                        |   3 +
 tests/net/context/src/main.c                      |  10 +-
 tests/net/dhcpv4/prj.conf                         |   1 +
 tests/net/dhcpv4/src/main.c                       |  24 +-
 tests/net/iface/src/main.c                        |  10 +-
 tests/net/ip-addr/src/main.c                      |  10 +-
 tests/net/ipv6/src/main.c                         |  10 +-
 tests/net/lib/dns_packet/src/dns_packet.c         | 266 ++++++++++++++++++-
 tests/net/lib/http_header_fields/prj.conf         |   1 -
 tests/net/mgmt/src/mgmt.c                         |  57 +++-
 tests/net/mld/src/main.c                          |  12 +-
 tests/net/nbuf/src/main.c                         |  28 +-
 tests/net/route/src/main.c                        |  14 +-
 tests/net/rpl/src/main.c                          |  10 +-
 tests/net/tcp/src/main.c                          |  10 +-
 tests/net/udp/src/main.c                          |  10 +-
 72 files changed, 1780 insertions(+), 661 deletions(-)

Change-Id: I6f911be46eec8ae760fc5077d473aca6c47e91ae
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-17 14:23:11 +02:00
Luiz Augusto von Dentz
7aa5ae1feb net: rpl: Make sure k_delayed_work_init is only called once
k_delayed_work_init shall only be called once per work and not every
time before as that can trash the workqueue list if the work is pending.

Change-Id: Ib04b6689c59d03328687b0b579e80012dbd2f853
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-03-17 11:37:48 +02:00