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

(cherry picked from commit f0c393f781f01ffa727f90a8593e26a20869438b)

Details

Provenance
kdAuthored on Aug 31 2021, 12:22 PM
wmaCommitted on Sep 28 2021, 7:03 AM
Differential Revision
D31766: if_cdce: Add support for setting RX filtering
Parents
rG87e560496fc1: ued may be NULL here which will cause a panic... reproducable by
Branches
Unknown
Tags
Unknown