- replaced a test point with ztest API
- separated the main file into two:
- main.c, which has ztest entry
- xip.c, which has the original routine
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- added a ztest test point
- separated the main file into two files:
- main.c, which has ztest entry
- multilib.c, which has the original routine
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- file already had ztest functions
- separated the main file into two:
- main.c, which has the ztest entry
- libraries.c, which has the original routines
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- file does not use ztest asserts
- separated the main file into two files:
- main.c, which has ztest entry
- arm_runtime_nmi.c, which has the original routine
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- file already had ztest functions
- separated the main file into two:
- main.c, which has the ztest entry
- arm_irq_vector_table.c, which has the original routines
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Sample code such as the adc_simple driver test set a sampling delay of
12, however that caused this calculation to underflow so the real
delay came out to more like 65534.
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
The existing check for the TargetA address in directed advertising
events was incorrect. In fact the specification states:
"An initiator that has been instructed by the Host to use
Resolvable Private Addresses shall not respond to directed connectable
advertising events that contain Public or Static addresses for the
target’s address (TargetA field)."
Hence, reject TargetA values that have not been successfully resolved
when the controller is generating its own RPAs.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The IEEE 802.15.4 settings are applied automatically by
net_app_init() function is is enabled by default.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Unlikely to happen but make sure parent neighbor exists when
probing it.
Coverity-CID: 173635
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If there is no parent found with a specific dag, then we have
to check this in order not to access NULL pointer.
Coverity-CID: 173637
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the parent is not found when adding DAG, then just return.
We must check the parent pointer as it can be NULL.
Coverity-CID: 173638
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
No need to complex overflow checks that are error prone.
Coverity complained that the original diff check was always
false.
Coverity-CID: 173639
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There was dead code when handling IPv6 Hop-by-hop option.
The extra option value check can be removed as it is useless.
Coverity-CID: 173642
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Coverity complains about non-checked return values here. This is false
positive as the return values do not need checking in this special
case because we are closing the socket.
Coverity-CID: 173646
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Coverity complains about reversed src and dst fields when sending
DAO ack back to originator. This is false positive.
Coverity-CID: 173650
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Check the return value of k_poll() as instructed by Coverity.
If debugging is enabled we print error if this happens, otherwise
this error is ignored. In our case the return value should always
be 0.
Coverity-CID: 173652
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It is be possible that the local address was not properly
resolved in which case the local_addr variable could be NULL.
This will cause NULL pointer access if the variable is used.
Coverity-CID: 173656
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The RPL route entry variable "extra" was resolved inside an
if-statement and the code was always returning from it.
This meant the the later code dealing with "extra" was never
executed. Fixed by moving the resolving of "extra" a bit
earlier so that the "extra" variable has always a proper value.
Coverity-CID: 173659
Coverity-CID: 173654
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The TX send function will return status < 0 if there is an error
when sending. This status value was incorrectly checked.
Coverity-CID: 173660
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This introduces an schema-based YAML validation process when loading
any YAML file, before doing any operations on them. An exception will
be raised at SanityConfigParser() if the file fails to verify with the
given schema.
Schemas are defined for the platform files in board///*.yaml and for
the (sample|testcase).yaml files. The verification is done using the
pykwalify python library. If not installed, a warning is printed and
the verification schema is skipped. At some point, we might want to
force it being installed.
The verification library is made a separate module (scl.py) so it can
be easily imported by others.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
AFAIK an ini file system was ported to a yaml file system. But some
ini file references still remain.
This patch changes all ini file mentions into yaml.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix compiler warnings resulting from passing C string literals to
functions expecting an unsigned char pointer.
Jira: 2443
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
To be able to get a hit on the AAR whenever a Scan Response is received,
enable it in the state transition.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add missing checks for the logic that discriminates between whitelisting
and non-whitelisting filtering, so that we do not fall into an
unsuspected false positive.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Don't call net configuration explicitly, instead rely on net_app
auto init service.
Thus, the only difference between POSIX and Zephyr versions of these
samples are different include files. The application code is 100%
the same.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Using bullets was too dense and not easy to read. Definition lists makes
this document more pleasant to read.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As we buffer incoming packets in receive callbacks, we must decrease
receive window to avoid situation that incoming stream for one socket
uses up all buffers in the system and causes deadlock. Once user app
consumes queued data using recv() call, we increase window again.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This fixes the existing situation that "if application buffers data,
it's the problem of application". It's actually the problem of the
stack, as it doesn't allow application to control receive window,
and without this control, any buffer will overflow, peer packets
will be dropped, peer won't receive acks for them, and will employ
exponential backoff, the connection will crawl to a halt.
This patch adds net_context_tcp_recved() function which an
application must explicitly call when it *processes* data, to
advance receive window.
Jira: ZEP-1999
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The led demo does not even enable Bluetooth by default, and in case a
custom enables it shall use CONFIG_NET_APP_BLUETOOTH_NODE.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This enables IPSP node role which requires IPSS GATT service to be
registered.
Jira: ZEP-2451
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds NET_REQUEST_BT_ADVERTISE which can be used to advertise
IPSS service so the remote devices can connect to it.
Jira: ZEP-2451
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Some network interfaces such as bluetooth 6lowpan can start without
an assigned IP address and then later once the connection is up a
router advertisement broadcast will assign the IP address.
The net_app framework will timeout out during network init if a value
cannot be parsed from CONFIG_NET_APP_MY_IPV6_ADDR. Let's adjust
the framework to handle a missing value there and fill it in later
when the IPv6 address is added to the interface.
Signed-off-by: Michael Scott <michael.scott@linaro.org>