If carrier is ON or OFF, then tell this information to upper IP stack
so that it can act accordingly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add net_eth_carrier_on() and net_eth_carrier_off() functions that
can be called by ethernet device driver when it detects that carrier
is lost or found.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If CONFIG_NET_L2_ETHERNET_MGMT is not enabled, then provide
stubs for ethernet_mgmt_raise_carrier_on_event() and
ethernet_mgmt_raise_carrier_off_event() functions so that those
functions can be called always.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Update the application documentation to discuss the new ability to
use semicolons as separators when there are multiple files. Enabling
semicolon separators also enables CMake lists to manipulate CONF_FILE
from the application side.
Signed-off-by: Michael R Rosen <michael.r.rosen@intel.com>
Modify CONF_FILE variable treatment in the cmake infrastructure
to enable the use of CMake lists and semicolon-separated strings
in setting the CONF_FILE list for multiple configuration files.
This change does not impact the current method of using
single-space-separated strings for multiple files.
Signed-off-by: Michael R Rosen <michael.r.rosen@intel.com>
Doxygen has issues with function macros (those that don't end with a
semicolon). Workaround is to have doxygen treat these as predefined by
the doxygen preprocessor.
Fixes: #7367
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The native_posix board does model irq_offload properly now
and therefore this test can be executed without problems.
So let's enable it.
Related to commit:
86b5364335
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Fix in interrupt wrapping for native_posix so it also
supports meta-interrupts.
Related to commit:
3a0cb2d35d
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
New tests rely on irq_offload() actually being based on an
interrupt.
So let's base it on a new SW interrupt.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The _THREAD_POLLING bit in thread_state was never actually a
legitimate thread "state". It is a clever synchronization trick
introduced to allow the thread to release the irq_lock while looping
over the input event array without dropping events.
Instead, make that flag a word in the "poller" struct that lives on
the stack of the thread calling k_poll. The disadvantage is the 4
bytes of thread space needed. Advantages:
+ Cleaner API, it's now internal to poll instead of being globally
visible.
+ The thread_state bit space is just one byte, and was almost full
already.
+ Smaller code to write/test a full word and not a bitfield
+ Words are atomic, so no need for one of irq lock/unlock pairs.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Use logging settings consistent with other samples/net/sockets/ apps
(which includes error logging enabled by default).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Symbols that are assigned values in .config files must have satisfied
dependencies, and must have a prompt. Otherwise, the assigned value is
ignored. A warning is printed if the symbol ends up with a different
value than the assigned value as a result.
It might be difficult to know how to fix the problem just from seeing
the current warning. Add some hints to it to help out:
- The symbol information dialog in menuconfig is good for figuring out
dependencies that need to be enabled. Mention menuconfig in the
warning.
- The page for the symbol in the autogenerated Kconfig docs can be
helpful too, so link it. There's a slight chance that it'll be
outdated, but it's usually correct when working on the master
branch.
Automatically enabling dependencies is much trickier than it might seem
at first, due to the generality of Kconfig. See
https://github.com/zephyrproject-rtos/zephyr/issues/8181 for some
discussion.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
It's rather confusing to not see current TCP state in any way (it
makes distinguishing different TCP contexts very hard). And nobody
can know/remember that it's printed with CONFIG_NET_DEBUG_TCP
defined. So, just make it be printed always (initially I thought
about printing just numeric value if CONFIG_NET_DEBUG_TCP isn't
defined, but why, if we can print symbolic name easily).
Also, add a hint that defining CONFIG_NET_DEBUG_TCP will still
print even more info (like unacked pkt list) - similarly to
similar helpful hints we have in other parts of net shell.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Let's set it by default when allocating net_pkt. A macro will avoid
ifdefs as well
CONFIG_NET_TX_DEFAULT_PRIORITY is always defined.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
As stated in LIS2DH datasheet in section "5.1.1 I2C Operation",
in order to read/write multiple bytes on I2C it is necessary
to add the autoincrement bit to the subaddress field.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The lis2dh_burst_write used "bus" as an input parameters, while
inside "dev" was referred. Now variable names are aligned.
Signed-off-by: Evgeny Kalugin <evgeny.kalugin@intel.com>
Introduce a custom HCI driver for the native POSIX port, which opens a
HCI User Channel socket to the Linux kernel to gain access to a local
Bluetooth controller.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The queue loop when CONFIG_POLL is in used has an inherent race
between the return of k_poll() and the inspection of the list where no
lock can be held. Other contending readers of the same queue can
sneak in and steal the item out of the list before the current thread
gets to the sys_sflist_get() call, and the current loop will (if it
has a timeout) spuriously return NULL before the timeout expires.
It's not even a hard race to exercise. Consider three threads at
different priorities: High (which can be an ISR too), Mid, and Low:
1. Mid and Low both enter k_queue_get() and sleep inside k_poll() on
an empty queue.
2. High comes along and calls k_queue_insert(). The queue code then
wakes up Mid, and reschedules, but because High is still running Mid
doesn't get to run yet.
3. High inserts a SECOND item. The queue then unpends the next thread
in the list (Low), and readies it to run. But as before, it won't
be scheduled yet.
4. Now High sleeps (or if it's an interrupt, exits), and Mid gets to
run. It dequeues and returns the item it was delivered normally.
5. But Mid is still running! So it re-enters the loop it's sitting in
and calls k_queue_get() again, which sees and returns the second
item in the queue synchronously. Then it calls it a third time and
goes to sleep because the queue is empty.
6. Finally, Low wakes up to find an empty queue, and returns NULL
despite the fact that the timeout hadn't expired.
The fix is simple enough: check the timeout expiration inside the loop
so we don't return early.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
No need to have a category for grove, instead moved the samples to both
sensors and display based on what the sample does.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is not used by Zephyr directly and comes from a test framework. We
do matching in the sample.yaml file now.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The minimal libc source files have been added to 'app'. The Zephyr
build system should not be adding source files to the 'app' library
unless necessary.
This patch creates a new Zephyr CMake Library in lib/libc/minimal and
adds the sources to it.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
With updates to bt_gatt_notify and bt_gatt_indicate it is now possible
to pass the Characteristic attribute instead of its value which makes
the code able to verify if attribute properties are set correctly.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Since BT_GATT_CHARACTERISTIC now expands to 2 attributes it may be
confusing to use bt_gatt_indicate as that expects the Value attribute to
be given which is no longer visible, so this enables the user to use
the Characteristic attribute in addition to its value.
Fixes#8231
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Since BT_GATT_CHARACTERISTIC now expands to 2 attributes it may be
confusing to use bt_gatt_notify as that expects the Value attribute to
be given which is no longer visible, so this enables the user to use
the Characteristic attribute in addition to its value.
Fixes#8231
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Until now, choices have kinda been a black box in the Kconfig reference,
and hid the dependencies of choice symbols (because choice symbols
depend directly on the choice rather than on whatever the choice
'depends on').
Generate separate information pages for choices and turn <choice>
dependencies into links.
One complication is that choices (usually) don't have names. Use the
index of each choice in the Kconfig files (first choice seen = choice 0,
then choice 1, etc.) instead to identify each choice.
Choice reference pages include the same information as symbol reference
pages (minus some things that don't apply for choices), and also list
the choice symbols contained in the choice.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Update Kconfiglib to upstream revision 9fba375c65341 (+ local Zephyr
modifications) to get commit 94020beb311eb ("Make Kconfig._choices
public") in. It will be used to generate Kconfig reference pages for
choices.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Default value of CONFIG_SYSTEM_WORKQUEUE_PRIORITY is -1, which means
it's run by the cooperative thread. Explicitly mention (in the Kconfig
help) that it means that any work handler submited to this default
queue won't be preempted by some other thread (which is generally
good, but worth documenting explicitly).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Only used to add some prereqs to the 'json' target. Put the prereqs
directly on the 'json' target instead.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Identical with the 'doxy' target. Move the 'doxy-code' recipe over to
'doxy' and remove 'doxy-code'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
CONFIG_SHELL seems to be some autoconf thing
(https://www.gnu.org/software/autoconf/manual/autoconf.html). Maybe this
was meant to be SHELL, which Make looks at. Would probably be rare to
run a non-compatible shell here though.
CONFIG_SHELL isn't exported, so it isn't visible to the recursive make
invocations ($(MAKE) -C ...) either.
Remove it.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
When disabling an ethernet interface, only its cache entries need to be
cleared up and not the whole cache. This is meaninful in case there is
2+ ethernet interface instances.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Only the first one requires it. Actually drivers know that already and
handle the frags list correctly.
In case ethernet has to run along with 15.4 on the same SoC, this will
optimize things quite a bit knowing that biggest ethernet frame will be
forcefully split in as many 128 bytes frags as necessary.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Removes the "draft" tag from the 1.12 release notes and adds a 1.12 link
on the release notes page. Adds a link to the 1.12 docs on the home
page.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Because the address and size alignment of MPUv2,
limite the thread numbers for emsk_em7d_v22.
If not, build will faill because of DCCM overflow
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Considering the case of call of printk, interrupt and
other cases, adjust the privileged stack size of arc to
384 bytes to avoid the the overflow of privileged stack.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>