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
F140733365: D31766.id94474.diff
Sat, Dec 27, 10:28 AM
F140694020: D31766.id94468.diff
Fri, Dec 26, 11:37 PM
Unknown Object (File)
Thu, Dec 25, 8:37 AM
Unknown Object (File)
Thu, Dec 25, 8:23 AM
Unknown Object (File)
Tue, Dec 23, 9:46 AM
Unknown Object (File)
Sat, Dec 20, 2:27 AM
Unknown Object (File)
Nov 27 2025, 2:09 PM
Unknown Object (File)
Nov 26 2025, 9:01 PM
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.