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, May 8, 1:37 AM
Unknown Object (File)
Wed, May 8, 1:21 AM
Unknown Object (File)
Wed, May 8, 1:21 AM
Unknown Object (File)
Tue, May 7, 8:34 PM
Unknown Object (File)
Feb 20 2024, 5:27 PM
Unknown Object (File)
Jan 1 2024, 5:13 AM
Unknown Object (File)
Dec 20 2023, 5:56 AM
Unknown Object (File)
Dec 19 2023, 11:07 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.