Lines Matching full:cb
159 struct net_mgmt_event_callback *cb, *tmp; in mgmt_rebuild_global_event_mask() local
167 SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&event_callbacks, cb, tmp, node) { in mgmt_rebuild_global_event_mask()
168 mgmt_add_event_mask(cb->event_mask); in mgmt_rebuild_global_event_mask()
188 struct net_mgmt_event_callback *cb, *tmp; in mgmt_run_slist_callbacks() local
196 SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&event_callbacks, cb, tmp, node) { in mgmt_run_slist_callbacks()
198 NET_MGMT_GET_LAYER(cb->event_mask)) || in mgmt_run_slist_callbacks()
200 NET_MGMT_GET_LAYER_CODE(cb->event_mask)) || in mgmt_run_slist_callbacks()
202 NET_MGMT_GET_COMMAND(cb->event_mask) && in mgmt_run_slist_callbacks()
204 NET_MGMT_GET_COMMAND(cb->event_mask)))) { 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()
213 cb->info = NULL; in mgmt_run_slist_callbacks()
214 cb->info_length = 0; in mgmt_run_slist_callbacks()
218 if (NET_MGMT_EVENT_SYNCHRONOUS(cb->event_mask)) { in mgmt_run_slist_callbacks()
220 CONTAINER_OF(cb->sync_call, in mgmt_run_slist_callbacks()
228 NET_DBG("Unlocking %p synchronous call", cb); in mgmt_run_slist_callbacks()
230 cb->raised_event = mgmt_event->event; in mgmt_run_slist_callbacks()
233 sys_slist_remove(&event_callbacks, prev, &cb->node); in mgmt_run_slist_callbacks()
235 k_sem_give(cb->sync_call); in mgmt_run_slist_callbacks()
238 cb, cb->handler); in mgmt_run_slist_callbacks()
240 cb->handler(cb, mgmt_event->event, mgmt_event->iface); in mgmt_run_slist_callbacks()
241 prev = &cb->node; in mgmt_run_slist_callbacks()
341 void net_mgmt_add_event_callback(struct net_mgmt_event_callback *cb) in net_mgmt_add_event_callback() argument
343 NET_DBG("Adding event callback %p", cb); in net_mgmt_add_event_callback()
348 sys_slist_find_and_remove(&event_callbacks, &cb->node); in net_mgmt_add_event_callback()
350 sys_slist_prepend(&event_callbacks, &cb->node); in net_mgmt_add_event_callback()
352 mgmt_add_event_mask(cb->event_mask); in net_mgmt_add_event_callback()
357 void net_mgmt_del_event_callback(struct net_mgmt_event_callback *cb) in net_mgmt_del_event_callback() argument
359 NET_DBG("Deleting event callback %p", cb); in net_mgmt_del_event_callback()
363 sys_slist_find_and_remove(&event_callbacks, &cb->node); in net_mgmt_del_event_callback()