| 725 | } |
| 726 | |
| 727 | static void test_callback(struct netdev *netdev, enum netdev_cb_type type) |
| 728 | { |
| 729 | callback_called = RT_TRUE; |
| 730 | last_callback_type = type; |
| 731 | rt_kprintf("Callback called: type=%d, netdev=%s\n", type, netdev->name); |
| 732 | |
| 733 | /* Track specific callback types */ |
| 734 | switch (type) |
| 735 | { |
| 736 | case NETDEV_CB_ADDR_IP: |
| 737 | ip_callback_called = RT_TRUE; |
| 738 | break; |
| 739 | case NETDEV_CB_ADDR_GATEWAY: |
| 740 | gw_callback_called = RT_TRUE; |
| 741 | break; |
| 742 | case NETDEV_CB_STATUS_DHCP_ENABLE: |
| 743 | dhcp_callback_called = RT_TRUE; |
| 744 | break; |
| 745 | default: |
| 746 | break; |
| 747 | } |
| 748 | |
| 749 | /* Send event to synchronize */ |
| 750 | if (callback_event) |
| 751 | { |
| 752 | rt_event_send(callback_event, 1 << type); |
| 753 | } |
| 754 | } |
| 755 | |
| 756 | static void empty_callback(struct netdev *netdev, enum netdev_cb_type type) |
| 757 | { |
nothing calls this directly
no test coverage detected