One of the bullet list items didn't get rendered properly because
continuation line wasn't indented.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The code for checking duplicates in the existing settings store was
incorrectly identifying a new value with the same initial content but
shorter length as a duplicate. Fix this by doing an early check on a
new vs old length mismatch, and immediately flag this as not a
duplicate.
Fixes#14840
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Enforce that NULL value is never given with a non-zero length. This
way we don't need to check this over and over again further down the
call path.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is throwing errors in static analysis, complaining that comparing
that a prior is higher and lower is impossible. That is wrong per my
eyes (I swear I think it might be cueing off the names of the
functions, which invert "higher" and "lower" to match our reversed
priority numbers).
But frankly this was never a very readable macro to begin with.
Refactor to put the bounds into the term, so the static analyzer can
prove it locally, and add a build assertion to catch any errors (there
are none currently) where the low<->high priority range is invalid.
Long term, we should probably remove this macro, it doesn't provide
much value. But removing it in response to a static analysis failure
is... not very responsible as a development practice.
Fixes#14816Fixes#14820
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
fs_dirent.name is MAX_FILE_NAME + 1 bytes long, not PATH_MAX. Just
fixing it to avoid access invalid memory.
Coverity CID: 186037
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Checking the return of sensor_trigger_set and if it fails log the
problem and exits.
Coverity CID: 186196
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
FPU's control and status register (FPCSR) for a thread is not
initialized. Random values are written to this register and this leads
to failure on fp_sharing test.
FPCSR register is set to 0 according to the value of FPDSCR.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
As em7d is configured with HARVARD, CCM will be used not DDR,
SRAM should point to DCCM.
This bug will cause the wrong caculation of heap area,
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Fix a bug where the controller would use the length
field of the advertisement packet before checking
if the length field was valid.
It is possible that the controller has received a packet
that passes CRC check but has a length field that is invalid.
This would cause the scanner to overwrite the scan report
buffer
Fixes: #14741
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
When using V0.10.0 SDK, flashing is not working anymore on
stm32f4_disco.
Using st_nucleo_f4.cfg instead of stm32f4discovery.cfg solves
the issue.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
net_pkt_read may fail in which case the error shall be reported back
instead of always assuming the whole packet was read.
Fixes#14817
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Move the original documentation in the arduino_101 board to a common
section in the Bluetooth documentation and document the use of `btmon`
in general.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add the bt-mon-uart chosen node to all the nRF-based boards so that they
can all use CONFIG_BT_DEBUG_MONITOR without additional changes.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The dhcpv4-client is more usable if it has net-shell. For testing
with qemu_x86, the e1000 overlay config is very useful.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove old unused code sending media status, sending this packet
causes Windows problems although Linux works with it. Removing this
code does not affect RNDIS functionality.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use standard NET_ETH_MAX_FRAME_SIZE for frame size calculation. This
changes buffer from 1522 to 1514 + 2 + 4. Remove also magic numbers.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use standard defined frame size for buffer and wMaxSegmentSize
parameter. Changes frame size from 1522 to 1514.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The code for clearing model bindings and subscriptions was flawed in
that proper "cleared" entries were never stored in settings. The code
must pass 0 and NULL to settings_save_one() in case the entry is
desired to be cleared.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The code was storing a "cleared" entry in storage for every model,
regardless of them having any subscriptions or not. Update hte
mod_sub_list_clear() function to return a "cleared entries" count so
that the calling code can decide whether any action is needed or not.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Remove redundant "val (null)" logs and add a few missing BT_DBG()
calls to make the tracing of storage handling easier.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The le_conn_param_req() function was missing a return statement in
case of a failed connection lookup. This could lead to replying to the
connection parameter request twice as well as passing NULL to
bt_conn_unref(). The latter issue also triggered a Coverity warning.
Fixes CID 196638
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Prepend -m32 to existing flags as opposed to silently override and
discard them:
- set(CMAKE_<tool>_FLAGS -m32 )
+ string(PREPEND CMAKE_<tool>_FLAGS " -m32")
This stops discarding additional flags passed with either cmake
-DCMAKE_<tool>_FLAGS="-fu -bar" or cmake -C params.cmake.
Note this bug was affecting only the combination of x86 and
CMAKE_<tool>_FLAGS. x86_64 wasn't affected and other, non-empty
CMAKE_<tool>_FLAGS_[DEBUG/RELEASE/etc.] weren't affected either.
Also convert flags string to list when invoking --print-libgcc-file-name
to support more than one CMAKE_C_FLAGS.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The code was probing the byte immediately after the last byte
of the buffer, instead of the last byte of the buffer.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Since commit 0906a51dac, the driver
fails the test: tests/drivers/adc/adc_api. Some of the workflow
turns out to be incorrect (e.g. not doing dummy conversion after
getting out of deep power down, and not clearing interrupt status
bits). So take some time to overhaul the driver. Also rename
the driver to adc_intel_quark_se_c1000_ss because the inner
working of this driver is tied to Quark SE C1000 SoC.
Fixes: #12632
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The logic in sampling is incorrect. The code sets up the hardware
to do multiple conversions, but in reality, each call is simply
one conversion. So fix it.
Fixes#12632
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The "is this packet for us?" filter in net_ipv4_input() has a minor
logic error which fails to discard many packets which are.. not for us.
Fixes: #14647
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Patch removes dead, replaced code which was accidentally not
removed within the stream-codec PR #9521.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The context_alloc_pkt() might run out of memory, and if that
happens we must not try to set the context pointer in it.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The pointer arithmetic used didn't account for ARC
supervisor mode stacks, which are allocated at the
end of the stack object. Use the new macro to know
exactly how much space is reserved.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This is used to have each arch canonically state how much
room in the stack object is reserved for non-thread use.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
In the conversion of net_pkt_read_new to net_pkt_read, we missed
changing the function in the eth_smsc911x and eswifi_offload.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If CONFIG_LOG_IMMEDIATE is enabled, then we need to handle
the output strings using a different output function.
The issue was noticed with native_posix board where no syslog
output strings were sent to network.
Fixes#14661
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Changing the example to not use IPv6 when it is not configured,
given IPv6 is not enabled on some platforms such as cc3220sf_launchxl.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit implements fcntl() in the SimpleLink Wifi driver to set and
get the non-blocking mode on a socket.
Fixes#11891.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>