Commit graph

41120 commits

Author SHA1 Message Date
Johan Hedberg
4599255871 Bluetooth: drivers/Kconfig: Fix inconsistency issues
Fix issues with tab vs space as well as missing license/copyright
header in hci/Kconfig.

Change-Id: Id766308dc8eda2d598ea749e5e0d2166014db929
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
326901397f Bluetooth: samples/hci-uart: Make sure we yield in tx_fiber
Whenever the writer of a FIFO is an ISR and the reader a fiber it's
important to make sure that we give the chance for other fibers to run
in case the FIFO keeps getting new data from the ISR without ever
running empty.

Change-Id: I6b40461713d4acfdc6fcec13ff90c9697ff01935
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
6989bf88e1 Bluetooth: Rename bt_driver to bt_hci_driver
The bt_driver API was created when Zephyr only had a Bluetooth host
stack, but no controller-side functionality. The only "driver" that
was needed for the host was the HCI driver, and hence "HCI" was
omitted from the name.

With support both for host and controller Zephyr will be getting more
Bluetooth driver types, in particular radio drivers. To prepare for
this, move all HCI drivers to drivers/bluetooth/hci/ and rename the
bt_driver API bt_hci_driver.

Change-Id: I82829da80aa61f26c2bb2005380f1e88d069ac7d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Carles Cufi
d1fe8e0189 Bluetooth: Controller: Fix net_buf memory leak in RX path
Since RSSI events trigger interrupts and signal the RX path
semaphore with a resulting event lenght of 0. Due to this
fact the Controller HCI driver was leaking (i.e. not freeing)
those events, grinding the recv_fiber to a halt.

Issue identified by Szymon Janc.

Change-Id: I3e259b2823717b523ac331f8f787252414fb9290
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Szymon Janc
f187ab3b77 Bluetooth: drivers: Fix non-ASCII characters in NBLE code comments
Change-Id: I52377bd00e8890d30128b7cd3b3796abc4d6431d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
ca1e885914 Bluetooth: drivers: Remove usued variables from H5 driver
Some variables were never used.

Change-Id: Ic6af13ab3292f1859120b9b939da5dfab7813194
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Luiz Augusto von Dentz
5b99294b6c Bluetooth: GATT: Add helper to discover next range
This moves duplicated code that has handling discover rounds into a
helper function.

Change-Id: I0d2d0f64ecee73b83f588949df634f5adda552eb
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
19138eb2f4 Bluetooth: samples: Remove redundant CONFIG_ARC_INIT=n
CONFIG_ARC_INIT defaults to 'n' now days so there's no reason to try
to explicitly disable it in the sample config files.

Change-Id: I88df06ba23bdac697f0767384f7b88e3bd9fced9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Carles Cufi
a78e8addad Bluetooth: hci-uart: Add a sample configuration file for nRF5x
Add a config file for boards using the Nordic Semiconductor nRF5x
ICs with reasonable defaults in terms of UART configuration and
controller settings.

Change-Id: Iaa5904c96c0f40a2749b7dda0398dd35fa809f24
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Szymon Janc
9292a83424 Bluetooth: hci-uart: Don't include nanokernel.h
Include zephyr.h instead which properly includes nano or unified kernel
headers.

Change-Id: I41c848092d022e2b0737ae6b2b53084eaf9bc6a7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
167dd07d4c Bluetooth: Expose BLUETOOTH_MAX_CONN for controller-only build
The controller implementation also uses BLUETOOTH_MAX_CONN, so it
needs to be available even when the host hasn't been configured to be
part of the build.

Change-Id: I31ab42a4f0abe21ae613f5408391446eaf72b35f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Luiz Augusto von Dentz
26543fd616 Bluetooth: L2CAP: Delete fragments as they are processed
Once fragments no longer have any data delete them.

Change-Id: I71e4360d5fb56dea061248210159daf542c3dab1
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
8b831e0ffe Bluetooth: A2DP: Remove includes from internal header
Those are not needed as convention for internal headers is that
c-file includes required headers in correct order.

Change-Id: Ia5bc0fa056921675e32da4e513d096e1479a38e5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Carles Cufi
86912a5e83 Bluetooth: HCI: Remove "EDR" and "HS" marketing terms from macros
Remove "EDR" and "HS" postfixes from the version names, since
those are only relevant from a marketing point of view, and
not at all for HCI compatibility purposes.

Change-Id: Id8b4b010ed8b80dd63898c4baf85062e51b2635a
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Anas Nashif
465de4a1a0 Bluetooth: tests optimize testcase.ini for shell and init
Change-Id: Ia3f09e33684075394bf5d3e91ade53aaf4443a17
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-28 08:09:08 +03:00
Anas Nashif
d6e2de744b Bluetooth: cleanup testcase.ini and adapt to current platforms
Change-Id: If5df39337aee31c0e72dad8c1a38c69e6c1b0a72
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-28 08:09:08 +03:00
Carles Cufi
3a670fce6d Bluetooth: hci-uart: Use a fiber to offload TX from ISR
Due to the fact that ISRs run at priority 1, the LE_Rand
command was not being rescheduled after CPU sleep to be
able to fill its buffers. By performing all TX (to controller)
work on a fiber, the RNG ISR is able to run and the command
can be executed synchronously in the fiber context.

Change-Id: I3b658e1cab3f80ae655cc88566639a122a361a08
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Carles Cufi
40b8ea136a Bluetooth: Controller: Set HCI version to 4.2
Report the HCI version supported by the Controller as 4.2,
since it was set as 0 (1.0b) and this confused certain Host
implementations, such as BlueZ.

Change-Id: I809721ee9c2b55e77e6a3ca63688c802a9ffa0ba
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Szymon Janc
e97deb4093 Bluetooth: RFCOMM: Use helper for accessing nano_sem count
This fix unified kernel build with RFCOMM debugs enabled.

Change-Id: I183924ac66a25793a5a99f3d85a5be0b4c5e6dfe
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
bcea1d4e4b Bluetooth: L2CAP: Use helper for accessing nano_sem count
This fix unified kernel build with L2CAP debugs enabled.

Change-Id: I995db11a7f2bc266866693e2d633f69387069b85
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
9d04ff3365 Bluetooth: samples/README: Document hci-usb and hci-uart
Add short descriptions for what the hci-usb and hci-uart applications.

Change-Id: Ie06cfa1678243e97b49e5594a00086cbf3c343be
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
8c118f8673 Bluetooth: L2CAP: Fix build with unified kernel
Use helper for accesing nano_sem count. This fix build error on unified
kernel where nano_sem is wrapped by k_sem.

Change-Id: Iad840e3c635a0fbc3b5eeee2e61479fa3d39ca30
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
15c473e290 Bluetooth: Remove not needed includes
Those were leftovers copied around when new files were added.

Change-Id: I283d59255a302f15fb027764ae9f761ebf646961
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
21243bddb7 Bluetooth: A2DP: Cleanup headers includes
Make sure global headers are included before local.

Change-Id: I5b80dad1ecc75e3e40249da2e5f7fd7f8d7b3e8f
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
43192b9788 Bluetooth: Include zephyr.h instead of kernel specific headers
zephyr.h includes required kernel header depending on selected
configuration.

Change-Id: I94c6cc2641e0146c79c4f8ed697e9e0d84667746
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Arkadiusz Lichwa
a6f2d703bc Bluetooth: L2CAP: Minor cleanup in conn request
Remove redundant stack var. The status of connection response is set
directly in l2cap_br_conn_req_reply() based on result parameter.

Change-Id: I6f1f5def51a1a027751930b67caf31eed383e4e6
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-28 08:09:08 +03:00
Arkadiusz Lichwa
6de63cee65 Bluetooth: L2CAP: Minor cleanup in naming
Uses more apropriate semantically value to status field applied to
connection response by default.

Change-Id: Icfd9cc6a25674ef1df49138f3fcc79e58f419759
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-28 08:09:08 +03:00
Anas Nashif
f8dcad4a5b sanitycheck: filter out the prebuilt.elf introduced by Makefile cleanup
commit 018b831a36 keeps another elf file in the
outdir which confused the sanitycheck script.

Change-Id: I87a9bcee6afe6526ecc24f1f5d9cf38101247ce2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 18:30:27 -04:00
Anas Nashif
27043d71e0 tests: move quark_se boot stub to tests
Lets not confuse user with this code, it is clearly not a sample.

Change-Id: I3a0209fb34b2c97383b0f5382f156b80470fdaf7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:53 +00:00
Anas Nashif
b5427473fc samples: add light sensor sample using the grove kit
Change-Id: Idf88aac781b2fd2314694c38dfa20d36fee517f9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:33 +00:00
Anas Nashif
2af8eb17c1 samples: add temperature sensor sample using the grove kit
Change-Id: I94a3648f2a3b0928f38baabcfe4ef47d23a7b9fd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:32 +00:00
Anas Nashif
b152246a83 sensors: make grove sensors depend on CONFIG_SENSOR
The grove sensors use the sensor interface, so make them depend
on it just like the other sensors.

Change-Id: I9b62a3fa26f54dd683c65ca154c1af7c7c92772f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:32 +00:00
Anas Nashif
adf8a30b80 samples: move grove lcd to samples/grove
Change-Id: Ibf97ad2a4bd1234960f6da9585eff122e5876f62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:31 +00:00
Anas Nashif
fa06c5b879 samples: move basic samples to samples/basic
Change-Id: I0915158424d9f105959e436af3378dc52753347c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:31 +00:00
Anas Nashif
cc7b36cd70 test: test_hmac: cleanup excludes
Change-Id: Ib973339191a15b1dbb4fd5f3fa2fc5fe886521a3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:13:36 +00:00
Anas Nashif
36e1e2dbaf move tests from samples to tests/
Change-Id: Ib183936134d27ff84d9af57e8e2e2d9f0cc2670f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:13:36 +00:00
Anas Nashif
5662110ec4 ci: sanitycheck: now that we do not run footprint script, reenable those
build footprint test as part of the main sanitycheck job, we do not run
the script comparing footprint anymore, it will move to somewhere else.

Change-Id: I36d475bfc3d985bf06a872649eae8c19e1a43aa4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:12:32 +00:00
Benjamin Walsh
b452817b67 kernel: merge _IS_IN_ISR() with _is_in_isr()
They were the same, standardize on the lowercase one.

Change-Id: I8bca080e45f3e0970697d4451e468b9081f96f5f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-27 21:45:03 +00:00
Anas Nashif
539003b697 samples: hello world: unify sample and use unified kernel
Change-Id: I4d4124245f394030b19a6b80160685798bd6ae72
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 21:19:36 +00:00
Ramesh Thomas
c7ce43a7b9 samples: power_mgmt: Create unified kernel version of power mgr app
Created unified kernel build setup for the power_mgr sample
app. Currently it shares the same source file between
micro and unified kernels. This is to help test and add new
features from unified kernel. In future, separate source will
be created for unified kernel. After transition is completed,
microkernel version will be removed.

Jira: ZEP-1140
Change-Id: Ic3a0b5cb3adc0749a7084ad785a041fee5875f56
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-10-27 21:18:44 +00:00
Ramesh Thomas
3e0f20a7d5 power_mgmt: Update changes in k_idle.c missing in idle.c
Some changes that went into k_idle.c were missing in idle.c
causing errors while building power management code for
unified kernel. Added the missing changes.

Tested with power_mgr app built for unified kernel.

Jira: ZEP-1139
Change-Id: I9fe005544f7ee69d3cb3ff10c649be28037fcf15
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-10-27 21:18:43 +00:00
Dmitriy Korovkin
6072e455f3 unified/tests: Adapt test_aes for unified kernel
Unified kernel invokes main() function in the init thread. This
eliminates the need for a separate thread for the test.

Change-Id: I4ff2e160213d152ca7c5d8422162f3464d935119
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-27 21:03:07 +00:00
Dmitriy Korovkin
81c94161f5 unified/tests: Adapt test_sha256 for unified kernel
Unified kernel invokes main() function in the init thread. This
eliminates the need for a separate thread for the test.

Change-Id: I4e6c4f212615d2135adf7971df32db1ad392c0e2
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-27 21:01:53 +00:00
Anas Nashif
febe9f5571 samples: add basic blinky application
The mandatory blinky sample at your service.

Change-Id: I999215fbda338effd6f7b65a2a165acf9b850a9a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 20:56:13 +00:00
Anas Nashif
513c1c91fc boards: define LED pin on boards with LED
Those defined will be used in sample applications that deal with
on-board LEDs.

Change-Id: Ia447adfd33547e01206a9fd7ceeae420ba806f31
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 20:56:08 +00:00
Andrew Boie
779aa6ec0b sanitycheck: remove default qemu_support=false
This directive is the default, no need to have an ever-expanding
enumeration of these.

Change-Id: Ic5147fe04de033cb7e97fc5cbe45edd1779d1120
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-27 20:54:44 +00:00
Andy Ross
018b831a36 Makefile: Don't hide the "prebuilt" kernel
The pass 1 linkage on x86 produces a real intermediate file that users
might plausibly want to inspect.  There's no reason to give it a
hidden file name or call it "temporary".  Show it off.

Change-Id: I606ee41f7f106ddd00474cdebe7803bcfb01889d
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-10-27 20:10:27 +00:00
Flavio Santes
36c09442d9 test/crypto: Fix RAM overflow error in ISSM
According to feedback received in ZEP-1130, decreasing the stack
size in the prj.mdef file solves the RAM overflow issue reported
by ISSM.

Jira: ZEP-1130

Change-Id: I761531e535a9e54ccd024b397d5d92d7666be817
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-10-27 19:56:15 +00:00
Jesus Sanchez-Palencia
5750354f7a dma: Fix QMSI shim by setting the DMA xfer type
Set DMA transfer to QM_DMA_TYPE_SINGLE for all channels.
This keeps the previous behavior as of QMSI 1.1.

In the future, we may consider adding support for using other DMA
transfer types. This, however, will demand adding new API to Zephyr's
dma.h .

Change-Id: I8071555190662a72279069ff9fce3d4b9e861629
Signed-off-by: Maciej Kuc <maciejx.kuc@intel.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-10-27 11:22:58 -07:00
Amit Kucheria
9cbd41ab13 arm: defconfig: Remove platform-specific options
SOC_TI_LM3S6965 and UART_STELLARIS are platform-specific, remove from
arch/arm/defconfig.

Change-Id: I3b37bc2ddfabb1da4e7538b5ab0e553fb2464584
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-10-27 15:00:47 +00:00