zephyr/include/net
Marcin Niestroj c1f7b9f45a net: l2: ethernet: fix k_work API usage in carrier on/off handling
net_eth_carrier_on() and net_eth_carrier_off() call k_work_init() on
work item that can be pending or still be processed in another thread.
This results in undefined behavior.

Initialize work item once and use an atomic flag to switch between
up/down carrier state. Submit work to workqueue whenever up/down carrier
state changes, so that last state is always properly propagated to
network interface layer.

While at it, save network interface pointer during ethernet context
initialization, so that is becomes static (and thread-safe) during whole
ethernet context lifetime.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-03-23 16:18:29 +02:00
..
bt.h
buf.h net: buf: Simplify querying maximum len 2021-02-22 19:33:16 +02:00
can.h
coap_link_format.h
coap.h net: coap: acknowledgement initialization helper 2021-02-15 10:17:11 +02:00
dhcpv4.h
dns_resolve.h net: dns: update to new k_work API 2021-03-15 17:19:54 +02:00
dns_sd.h net: dns: dns-sd: support dns service discovery 2020-11-09 16:15:02 -08:00
dsa.h eth: Add support for Distributed Switch Architecture [DSA] switches 2021-01-20 10:03:42 +02:00
dummy.h
ethernet_mgmt.h
ethernet_vlan.h
ethernet.h net: l2: ethernet: fix k_work API usage in carrier on/off handling 2021-03-23 16:18:29 +02:00
gptp.h doc: fix @param usage in callbacks 2020-12-18 12:18:28 +01:00
hostname.h net: hostname: define public macro representing maximum hostname length 2020-11-17 19:21:43 -05:00
http_client.h
http_parser_state.h license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
http_parser_url.h license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
http_parser.h license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
ieee802154_mgmt.h
ieee802154_radio.h drivers: ieee802154: cc13xx_cc26xx: sub-ghz support 2020-11-09 10:25:24 +02:00
ieee802154.h
ipv4_autoconf.h
lldp.h
lwm2m_path.h net: lwm2m: Add path generation macro 2020-11-10 14:10:44 +02:00
lwm2m.h net: lwm2m: Add data validation callback 2021-03-10 14:55:22 -05:00
mii.h
mqtt.h net: mqtt: Return -1 if keepalive messages are disabled. 2020-12-08 14:08:36 -05:00
net_config.h drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
net_conn_mgr.h
net_context.h net: Remove legacy TCP stack 2021-03-22 13:06:54 -04:00
net_core.h net: mqtt: log struct mqtt_utf8 with hexdump 2021-03-05 12:49:22 +02:00
net_event.h
net_if.h net: if: Mark not used args as unused 2021-03-17 21:58:49 +02:00
net_ip.h net: ipv6: add function checking if given address is ULA 2021-02-15 10:15:18 +02:00
net_l2.h
net_linkaddr.h
net_mgmt.h doc: fix @param usage in callbacks 2020-12-18 12:18:28 +01:00
net_offload.h kernel: Remove CONFIG_LEGACY_TIMEOUT_API 2021-01-14 21:33:16 -05:00
net_pkt.h net: Remove legacy TCP stack 2021-03-22 13:06:54 -04:00
net_stats.h net: stats: Separate dropped TCP data segments and TCP packets 2020-11-06 09:50:02 -06:00
net_timeout.h net: timeout: refactor to fix multiple problems 2021-01-07 11:14:38 +02:00
openthread.h openthread: add openthread_api_mutex_try_lock() 2020-10-20 16:39:22 +03:00
ppp.h net: l2: ppp: fix k_work API usage in carrier on/off handling 2021-03-23 16:18:29 +02:00
promiscuous.h
ptp_time.h
sntp.h
socket_can.h
socket_net_mgmt.h
socket_offload.h
socket_select.h net: include: Add missing brace to socket_select.h 2021-01-20 12:01:27 +02:00
socket_types.h net: socket: Implement SO_RCVTIMEO timeout option 2021-01-19 17:11:25 -05:00
socket.h net: sockets: Implement MSG_TRUNC flag 2021-03-23 13:16:30 +02:00
socketutils.h
tftp.h
tls_credentials.h
trickle.h
udp.h
websocket.h doc: fix @param usage in callbacks 2020-12-18 12:18:28 +01:00
wifi_mgmt.h
wifi.h