diff options
| author | Zixun LI <[email protected]> | 2026-04-30 14:56:13 +0200 |
|---|---|---|
| committer | Zixun LI <[email protected]> | 2026-04-30 14:56:13 +0200 |
| commit | 7cfa0d1b970b6e276e0eca3eee2de43aa3b7c443 (patch) | |
| tree | 97239d63e2cf4d977219ecfeaddfd6f3d0641433 /src/class/net/ncm_device.c | |
| parent | 405dadecc73f2d9268e7872d7ba670d910a8f6eb (diff) | |
add packet filter callback
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Zixun LI <[email protected]>
Diffstat (limited to 'src/class/net/ncm_device.c')
| -rw-r--r-- | src/class/net/ncm_device.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/class/net/ncm_device.c b/src/class/net/ncm_device.c index 83e8bffab..85895361f 100644 --- a/src/class/net/ncm_device.c +++ b/src/class/net/ncm_device.c @@ -138,6 +138,13 @@ typedef struct { static ncm_interface_t ncm_interface; CFG_TUD_MEM_SECTION static ncm_epbuf_t ncm_epbuf; +//--------------------------------------------------------------------+ +// Weak stubs: invoked if no strong implementation is available +//--------------------------------------------------------------------+ +TU_ATTR_WEAK void tud_network_set_packet_filter_cb(uint16_t packet_filter) { + (void) packet_filter; +} + /** * This is the NTB parameter structure * @@ -998,6 +1005,7 @@ bool netd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t } break; case NCM_SET_ETHERNET_PACKET_FILTER: { + tud_network_set_packet_filter_cb(request->wValue); tud_control_xfer(rhport, request, NULL, 0); } break; |
