Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0d3bfb9e in mainline


Ignore:
Timestamp:
2018-05-30T21:01:30Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
121ee4fd
Parents:
0a087ae
Message:

Add virtio_net broadcast mode change handler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/virtio-net/virtio-net.c

    r0a087ae r0d3bfb9e  
    252252}
    253253
     254static errno_t virtio_net_on_broadcast_mode_change(nic_t *nic,
     255    nic_broadcast_mode_t new_mode)
     256{
     257        switch (new_mode) {
     258        case NIC_BROADCAST_BLOCKED:
     259                return ENOTSUP;
     260        case NIC_BROADCAST_ACCEPTED:
     261                return EOK;
     262        default:
     263                return ENOTSUP;
     264        }
     265}
     266
    254267static errno_t virtio_net_dev_add(ddf_dev_t *dev)
    255268{
     
    269282        nic_set_ddf_fun(nic, fun);
    270283        ddf_fun_set_ops(fun, &virtio_net_dev_ops);
     284
     285        nic_set_filtering_change_handlers(nic, NULL, NULL,
     286            virtio_net_on_broadcast_mode_change, NULL, NULL);
    271287
    272288        rc = ddf_fun_bind(fun);
Note: See TracChangeset for help on using the changeset viewer.