net: l2: ieee802154: Add missing scan callback registration
Initializing an event callback with net_mgmt_init_event_callback() just sets some of the callback fields but do not propagate those masks in the core. If we want to use the callback, it is necessary to also call net_mgmt_add_event_callback(). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
6a11e79b4b
commit
9ce8c26d34
1 changed files with 1 additions and 0 deletions
|
@ -228,6 +228,7 @@ static int cmd_ieee802154_scan(const struct shell *shell,
|
|||
|
||||
net_mgmt_init_event_callback(&scan_cb, scan_result_cb,
|
||||
NET_EVENT_IEEE802154_SCAN_RESULT);
|
||||
net_mgmt_add_event_callback(&scan_cb);
|
||||
|
||||
if (!strcmp(argv[1], "active")) {
|
||||
scan_type = NET_REQUEST_IEEE802154_ACTIVE_SCAN;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue