- 19 Aug, 2021 1 commit
-
-
Michael Zimmermann authored
Previously, the first element inside the array-array didn't contain the decoded data. Signed-off-by:
Michael Zimmermann <sigmaepsilon92@gmail.com>
-
- 03 Aug, 2021 2 commits
-
-
Anas Nashif authored
Add release notes placeholder for 2.5.1 release. Signed-off-by:
Anas Nashif <anas.nashif@intel.com>
-
Anas Nashif authored
Increase version to 2.5.1-rc1. Signed-off-by:
Anas Nashif <anas.nashif@intel.com>
-
- 21 Jul, 2021 1 commit
-
-
Daniel Leung authored
When calculating the expected interval for threads other than the first one, the test uses ms->ticks->cycles conversion to figure out the bound of cycles permitted. Both lower and upper bound conversions are using the k_*_to_*_floor32(). When numbers involved are not wholly divisible, decimal points are being truncated, resulting in incorrect intervals, and thus failing tests. So change the calculation to appropriate floor() or ceil() based on the boundary. Signed-off-by:
Daniel Leung <daniel.leung@intel.com>
-
- 17 Jul, 2021 1 commit
-
-
Vinayak Kariappa Chettimada authored
Fix a missing encryption procedure state check which allowed out of order receive of START_ENC_RSP PDU, which made the controller to believe its already in an encryption procedure in progress state. Fixes #34392. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
- 29 Jun, 2021 1 commit
-
-
Joakim Andersson authored
When receiving the L2CAP sent callbacks the dynamic L2CAP channel may have been disconnected already. The user of the dynamic channel should have received the disconnected and released callbacks for this channel to release any resources for the data being sent, so simply ignoring this sent callback is enough. Fix sent callbacks by providing the CID to the callback instead of a pointer to potentially released memory, and lookup the CID to check that it is still valid. Signed-off-by:
Joakim Andersson <joakim.andersson@nordicsemi.no>
-
- 11 Jun, 2021 1 commit
-
-
Joakim Andersson authored
Check the length field of the scan response data. Signed-off-by:
Joakim Andersson <joakim.andersson@nordicsemi.no>
-
- 14 May, 2021 1 commit
-
-
Dong Wang authored
do nothing when enter or resume from DEVICE_PM_LOW_POWER_STATE Signed-off-by:
Dong Wang <dong.d.wang@intel.com> Signed-off-by:
Flavio Ceolin <flavio.ceolin@intel.com>
-
- 22 Apr, 2021 3 commits
-
-
Martí Bolívar authored
This was merged by mistake without being tested and is not working properly. We need to avoid doing a BUILD_ASSERT() when the relevant property is missing, because we can't use DT_GPIO_CTLR() on an undefined property. Handle this with COND_CODE_1(). Signed-off-by:
Martí Bolívar <marti.bolivar@nordicsemi.no>
-
Luiz Augusto von Dentz authored
chan_send does restore buffer state in case of an error which is different than how bt_l2cap_send_cb works as it does always unref in case of an error. Signed-off-by:
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-
Luiz Augusto von Dentz authored
This fixes a regression introduced by 10841b9a as it did remove a call to net_buf_ref which was used not only to keep a reference for resending but also to prevent bt_l2cap_send_cb to unref the buffer in case it fails. Signed-off-by:
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-
- 13 Apr, 2021 4 commits
-
-
Vinayak Kariappa Chettimada authored
Fix flash driver sync regression introduced due to changed default ULL_HIGH in the commit 30634334 ("Bluetooth: controller: Fix ULL_HIGH priority to be lower than LLL"). Fixes #33862. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
When ticker job is disabled inside radio events then all advertising, scanning, and slave latency cancel ticker operations will be deferred, requiring increased ticker thread context operation queue count. Relates to #32430. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Minor rearrange order of definition BT_CTLR_MAX_CONNECTABLE to better reuse it. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Consistently use the internal BT_CTLR_ADV_SET value in the controller's implementation. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
- 08 Apr, 2021 1 commit
-
-
Kumar Gala authored
The CMSDK uart interrupts for TX and RX can either be treated as a signel interrupt line or distinct interrupts for TX & RX. In the case that they were distinct we didn't get the ifdef correct based on DTS. If we have 2 interrupts in DTS we assume they are for TX & RX and thus build the interrupt support for distinct TX & RX ISRs. Also, cleanup handling of UART_2..UART_4 to be similar to how UART_0/UART_1 code is using DT_INST_IRQN(x). Fixes #30770 Fixes #25601 Signed-off-by:
Kumar Gala <kumar.gala@linaro.org>
-
- 07 Apr, 2021 3 commits
-
-
Gustavo Romero authored
Add test to check if uart_irq_is_pending() correctly returns 0 (meaning there are no more RX and TX pending interrupts) when all RX and TX data is processed. Signed-off-by:
Gustavo Romero <gustavo.romero@linaro.org>
-
Gustavo Romero authored
Currently CMSDK uart_irq_is_pending does not use RX and TX interrupt bits found in INTSTATUS register to check for pending interrutps but rather it checks for pending interrupts indirectly by checking if RX and TX buffers are, respectively, full and empty, i.e. it checks bits 0 and 1 in STATE register instead of bits meant for interrupt status found in INTSTATUS register. That is particularly problematic because although a RX interrupt implies a RX buffer full and a TX interrupt implies a TX buffer empty, the converse is not true. For instance, a TX buffer might be empty for all data was processed (sent to serial line) already and no further data was pushed into TX buffer so it remained empty, without generating any additional TX interrupt. In that case the current uart_irq_is_pending implementation reports that there are pending interrupts because of the following logic: /* Return true if rx buffer full or tx buffer empty */ return (UART_STRUCT(dev)->state & (UART_RX_BF | UART_TX_BF)) != UART_TX_BF; which will return 1 (true) if STATE[0] = 0 (TX buffer is empty), since UART_TX_BF = 1, so STATE[0] != UART_TX_BF, which is true (assuming here for the sake of simplicity that UART_RX_BF = 0, i.e. RX buffer is empty too). One of the common uses of uart_irq_is_pending is in ISR in contructs like the following: while (uart_irq_update(dev) && uart_irq_is_pending(dev)) { if (uart_irq_rx_ready(dev) == 0) { // RX buffer is empty continue; } // RX buffer is full, process RX data } So the ISR can be called due to a RX interrupt. Upon finishing processing the RX data uart_irq_is_pending is called to check for any pending IRQs and if it happens that TX buffer is empty (like in the case that TX interrupt is totally disabled) execution gets stuck in the while loop because TX buffer will never transition to full again, i.e. it will never have a chance to have STATE[0] = 1, so STATE[0] != UART_TX_BF is always true. This commit fixes that undesirable and problematic behavior by making uart_irq_is_pending use the proper bits in the interrupt status register (INTSTATUS) to determine if there is indeed any pending interrupts. That, on the other hand, requires that the pending interrupt flags are not clearly automatically when calling the ISR, otherwise uart_irq_is_pending() will return immediatly false on the first call without any data being really processed inside the ISR. Thus, because both RX and TX buffer (FIFO) are only 1 byte long, that commit clears the proper interrupts flags precisely when data is processed (fifo_read and fifo_fill) or when the interrupts are disabled (irq_rx_disable and irq_tx_disable). Finally, that commits also takes the chance to update some comments, specially regarding the need to "prime" when enabling the TX interrupts (in uart_cmsdk_apb_irq_tx_enable()). The need to "prime" can be verified in the CMSDK UART reference implementation in Verilog mentioned in the "Arm Cortex-M System Design Kit" [0], on p. 4-8, section 4.3, in cmsdk_apb_uart.v. In that implementation it's also possible to verify that the FIFO is only 1 byte long, justifying the semantics that if buffers are not full (STATE[0] or STATE[1] = 0) they are _completly_ empty, holding no data at all. [0] https://documentation-service.arm.com/static/5e8f1c777100066a414f770b Signed-off-by:
Gustavo Romero <gustavo.romero@linaro.org>
-
Gustavo Romero authored
Currently RAM region specified in the DT for board mps2-an512 to store data (not to run code) is set to start at 0x3000_0000 and a 16M contiguous space is assumed. However, at that address there is no such contiguous space of 16M, rather only a 128K area is available. As a consequence large applications linked with Zephyr might end up using memory regions that are not valid, specially at runtime when the stack grows, causing a BusFault. Application Note 512 only specifies a 16M contiguous space available starting at 0x8000_0000 (please see 'Table 3-4: SSRAM2 and SSRAM3 address mapping' and 'Table 3-6: External PSRAM mapping to Code Memory', on pages 3-7 and 3-8, respectively), which resides in the PSRAM (external RAM). The AN521 also specifies a 4M contiguous space available starting at 0x3800_0000 which can be used as RAM for data storage and which is not currently described in the DT. The current DT also defines a 224M flash region (to run code) which doesn't effectively exist, because most of it is reserved (~148M). That commit fixes the incorrect definition of region 0x3000_0000 (16M) and hence defines a new region called 'sram2_3' that maps to region 0x3800_0000 (4M) which is used as RAM to store data, and fixes the flash region defining a new region 'sram1' (4M) from where code is executed (starting at 0x1000_0000). The board has no real flash memory, rather an auxilary HW populates the appropriate memory regions from images found in a MicroSD card. That commit also defines the missing PSRAM (16M) region ('psram') which can be used by large programs as a general purpose RAM. Finally, it also fixes the DT for the non-secure memory regions to reflect the fixes described above for the secure memory regions. Signed-off-by:
Gustavo Romero <gustavo.romero@linaro.org>
-
- 06 Apr, 2021 16 commits
-
-
Vinayak Kariappa Chettimada authored
Fix race conditional when create connection cancel is called and actually a connection did get setup while initiator is being stopped. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Conditional compile adv_addr which is only used by controller when supporting initiator/central role. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Move the initiated bit flag into role specific union, so that other role specific bit flags can share bit space in the LLL context structure. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Fix PHY update procedure to check transaction violations. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Fix ping procedure to check transaction violations. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Fix data legnth update procedure to check transaction violations. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Fix reject extended indication PDU dispatch to check transaction violations. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Fix unknown control procedure handling to check transaction violations. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Fix Feature Exchange procedure to check transaction violations. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Add control procedure lock flag to detection procedure transaction violations. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Check for interval value in received CONNECT_IND PDU and ignore connection setup. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Fix the leak of node rx buffer used to generate the connection complete and CSA#2 event introduced in the commit 4a5f263e ("Bluetooth: controller: split: Validate chan map and hop value") and the commit 94d5f085 ("Bluetooth: controller: fixing error re. all zero chmap in conn-ind"). Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Replace a development assertion in the implementation of Connection Parameter Request Procedure with an internal comment and handle transaction violation be ignoring the PDU. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Vinayak Kariappa Chettimada authored
Remove the redundant connection initiated check as the event is closed on connection initiated and it is sufficient to check in the prepare_cb function to abort any events in the pipeline after the connection has been initiated. Relates to commit 5ce5dc05 ("Bluetooth: controller: Avoid race between ULL and LLL when initiating conn") and commit 18f5fb99 ("Bluetooth: controller: Remove use of lll_stop"). Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
Wolfgang Puffitsch authored
Remove use of lll_stop and lll_is_stop and rely on "initiated" flag in lll_conn struct instead. Signed-off-by:
Wolfgang Puffitsch <wopu@demant.com>
-
Wolfgang Puffitsch authored
Use an "initiated" flag in the lll_conn struct to guard the processing of PDUs related to connection initiation (CONNECT_IND, AUX_CONNECT_RSP). This avoids races between ULL and LLL when creating a connection. Signed-off-by:
Wolfgang Puffitsch <wopu@demant.com>
-
- 26 Mar, 2021 1 commit
-
-
Eugeniy Paltsev authored
Commit 0a7b65ef tweaked the CREATE_OBJ_LEVEL macro in such a way that it would break the expected sorting order. For example if you had 2, 19, 20, 30 as the level, we'd end up sort these to be 19, 2, 20, 30. Fix this by adding aditional "_" symbol after the init level counter. That allows to keep correct sort order (for both GNU and MWDT toolchains) and distinguish init level counter from section suffix (for MWDT toolchain). Fixes zephyrproject-rtos#33464 Signed-off-by:
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
-
- 22 Mar, 2021 2 commits
-
-
Andriy Gelman authored
CAN_SYNC_SEG and ts1 are in common units. Both need to be scaled by 1000 to calculate the sample point. Signed-off-by:
Andriy Gelman <andriy.gelman@gmail.com>
-
Johan Hedberg authored
We should verify that the buffer has sufficient data before attempting to parse the SDU length field. If we get a too short packet just disconnect the channel. Fixes #32497 Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com>
-
- 19 Mar, 2021 1 commit
-
-
Vinayak Kariappa Chettimada authored
Fix control Tx buffer leak into data Tx pool that happens after a cross-over control procedure response was paused due to currently active encryption setup procedure, and a new control Tx PDU in addition to the paused one is enqueued thereafter. When the control tx PDUs is resumed but not yet enqueued towards the radio, if there is a new control Tx PDU enqueued then the paused control Tx PDU is not set as the head of the control PDUs in the Tx queue. This caused the paused control Tx PDU to be associated with data Tx pool, hence causing the incorrect release into data Tx pool. Relates to the commit bff76b4c ("Bluetooth: controller: split: Fix control tx queue handling") and to the commit 6991d099 ("Bluetooth: controller: Fix control tx queue handling"). Fixes #32898. Signed-off-by:
Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-
- 18 Mar, 2021 1 commit
-
-
Luiz Augusto von Dentz authored
The order of Destination CIDs shall correspond the order of Source CIDs including its amount so errors that don't result in all connection being refused shall not break the order of CIDs. Signed-off-by:
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-