Page MenuHomeFreeBSD

if_cdce: Add support for setting RX filtering
ClosedPublic

Authored by kd on Sep 1 2021, 9:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 30, 4:18 AM
Unknown Object (File)
Sep 18 2024, 4:51 PM
Unknown Object (File)
Sep 18 2024, 11:25 AM
Unknown Object (File)
Sep 14 2024, 9:13 AM
Unknown Object (File)
Sep 2 2024, 6:04 AM
Unknown Object (File)
Sep 1 2024, 3:32 AM
Unknown Object (File)
Jul 8 2024, 12:53 PM
Unknown Object (File)
Jun 23 2024, 8:22 AM
Subscribers
None

Details

Summary

We can now set promisc and allmulti modes.
Filtering of given multicast addresses is not supported.
Changing the mode is done by sending a command described in:
"USB CDC Subclass Specification for Ethernet Devices v1.2, section 6.2.4".
This means that at least in theory this feature should work with all
modems that are using this driver.

This fixes Huawei E3372h-320 running new firmware in "HiLink" mode.
Previously it would reset a few seconds after its mode was changed with "usb_modeswitch".
Setting RX filter to default value at the end of attach function fixed that.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kd requested review of this revision.Sep 1 2021, 9:44 AM
kd created this revision.
hselasky added inline comments.
sys/dev/usb/net/if_cdcereg.h
40

Call this CDCE_BIT to avoid conflicts with the LinuxKPI?

This revision is now accepted and ready to land.Sep 1 2021, 10:02 AM
This revision was automatically updated to reflect the committed changes.