HomeFreeBSD

if_cdce: Add support for setting RX filtering

Description

if_cdce: Add support for setting RX filtering

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.

Sponsored by: Stormshield
Obtained from: Semihalf
Differential revision: https://reviews.freebsd.org/D31766
MFC after: 2 weeks
Reviewed by: hps

Details

Provenance
kdAuthored on Aug 31 2021, 12:22 PM
wmaCommitted on Sep 1 2021, 10:27 AM
Differential Revision
D31766: if_cdce: Add support for setting RX filtering
Parents
rGce3ea45047c7: pf: import pf_set_protostate() from OpenBSD
Branches
Unknown
Tags
Unknown