Lines Matching refs:mgmt_event
54 static void mgmt_run_callbacks(const struct mgmt_event_entry * const mgmt_event);
70 static inline void mgmt_push_event(uint32_t mgmt_event, struct net_if *iface, in mgmt_push_event() argument
89 mgmt_event, length, NET_EVENT_INFO_MAX_SIZE); in mgmt_push_event()
97 new_event.event = mgmt_event; in mgmt_push_event()
105 mgmt_event); in mgmt_push_event()
115 struct mgmt_event_entry mgmt_event; in mgmt_event_work_handler() local
119 while (k_msgq_get(&event_msgq, &mgmt_event, K_NO_WAIT) == 0) { in mgmt_event_work_handler()
122 mgmt_run_callbacks(&mgmt_event); in mgmt_event_work_handler()
138 const struct mgmt_event_entry mgmt_event = { in mgmt_push_event() local
147 mgmt_run_callbacks(&mgmt_event); in mgmt_push_event()
172 static inline bool mgmt_is_event_handled(uint32_t mgmt_event) in mgmt_is_event_handled() argument
174 return (((NET_MGMT_GET_LAYER(mgmt_event) & in mgmt_is_event_handled()
176 NET_MGMT_GET_LAYER(mgmt_event)) && in mgmt_is_event_handled()
177 ((NET_MGMT_GET_LAYER_CODE(mgmt_event) & in mgmt_is_event_handled()
179 NET_MGMT_GET_LAYER_CODE(mgmt_event)) && in mgmt_is_event_handled()
180 ((NET_MGMT_GET_COMMAND(mgmt_event) & in mgmt_is_event_handled()
182 NET_MGMT_GET_COMMAND(mgmt_event))); in mgmt_is_event_handled()
185 static inline void mgmt_run_slist_callbacks(const struct mgmt_event_entry * const mgmt_event) in mgmt_run_slist_callbacks() argument
192 NET_MGMT_GET_LAYER(mgmt_event->event) + 1, in mgmt_run_slist_callbacks()
193 NET_MGMT_GET_LAYER_CODE(mgmt_event->event), in mgmt_run_slist_callbacks()
194 NET_MGMT_GET_COMMAND(mgmt_event->event)); in mgmt_run_slist_callbacks()
197 if (!(NET_MGMT_GET_LAYER(mgmt_event->event) == in mgmt_run_slist_callbacks()
199 !(NET_MGMT_GET_LAYER_CODE(mgmt_event->event) == in mgmt_run_slist_callbacks()
201 (NET_MGMT_GET_COMMAND(mgmt_event->event) && in mgmt_run_slist_callbacks()
203 !(NET_MGMT_GET_COMMAND(mgmt_event->event) & in mgmt_run_slist_callbacks()
209 if (mgmt_event->info_length) { in mgmt_run_slist_callbacks()
210 cb->info = (void *)mgmt_event->info; in mgmt_run_slist_callbacks()
211 cb->info_length = mgmt_event->info_length; in mgmt_run_slist_callbacks()
224 sync_data->iface != mgmt_event->iface) { in mgmt_run_slist_callbacks()
230 cb->raised_event = mgmt_event->event; in mgmt_run_slist_callbacks()
231 sync_data->iface = mgmt_event->iface; in mgmt_run_slist_callbacks()
240 cb->handler(cb, mgmt_event->event, mgmt_event->iface); in mgmt_run_slist_callbacks()
250 static inline void mgmt_run_static_callbacks(const struct mgmt_event_entry * const mgmt_event) in mgmt_run_static_callbacks() argument
253 if (!(NET_MGMT_GET_LAYER(mgmt_event->event) == in mgmt_run_static_callbacks()
255 !(NET_MGMT_GET_LAYER_CODE(mgmt_event->event) == in mgmt_run_static_callbacks()
257 (NET_MGMT_GET_COMMAND(mgmt_event->event) && in mgmt_run_static_callbacks()
259 !(NET_MGMT_GET_COMMAND(mgmt_event->event) & in mgmt_run_static_callbacks()
264 it->handler(mgmt_event->event, mgmt_event->iface, in mgmt_run_static_callbacks()
266 (void *)mgmt_event->info, mgmt_event->info_length, in mgmt_run_static_callbacks()
274 static void mgmt_run_callbacks(const struct mgmt_event_entry * const mgmt_event) in mgmt_run_callbacks() argument
279 mgmt_run_static_callbacks(mgmt_event); in mgmt_run_callbacks()
280 mgmt_run_slist_callbacks(mgmt_event); in mgmt_run_callbacks()
370 void net_mgmt_event_notify_with_info(uint32_t mgmt_event, struct net_if *iface, in net_mgmt_event_notify_with_info() argument
373 if (mgmt_is_event_handled(mgmt_event)) { in net_mgmt_event_notify_with_info()
376 NET_MGMT_GET_LAYER(mgmt_event) + 1, in net_mgmt_event_notify_with_info()
377 NET_MGMT_GET_LAYER_CODE(mgmt_event), in net_mgmt_event_notify_with_info()
378 NET_MGMT_GET_COMMAND(mgmt_event)); in net_mgmt_event_notify_with_info()
380 mgmt_push_event(mgmt_event, iface, info, length); in net_mgmt_event_notify_with_info()