]> Git Repo - linux.git/commit
rndis_host: enable the bogus MAC fixup for ZTE devices from cdc_ether
authorLech Perczak <[email protected]>
Wed, 13 Apr 2022 01:44:15 +0000 (03:44 +0200)
committerPaolo Abeni <[email protected]>
Thu, 14 Apr 2022 13:08:12 +0000 (15:08 +0200)
commit36e747972d8b4c09e6e3275e31a3acba46e2c4d2
tree5dcda5520b55f5d846491c5c29cbf922ddfcf303
parent64b97df995f0c943be469a019d6117c89e2131bc
rndis_host: enable the bogus MAC fixup for ZTE devices from cdc_ether

Certain ZTE modems, namely: MF823. MF831, MF910, built-in modem from
MF286R, expose both CDC-ECM and RNDIS network interfaces.
They have a trait of ignoring the locally-administered MAC address
configured on the interface both in CDC-ECM and RNDIS part,
and this leads to dropping of incoming traffic by the host.
However, the workaround was only present in CDC-ECM, and MF286R
explicitly requires it in RNDIS mode.

Re-use the workaround in rndis_host as well, to fix operation of MF286R
module, some versions of which expose only the RNDIS interface. Do so by
introducing new flag, RNDIS_DRIVER_DATA_DST_MAC_FIXUP, and testing for it
in rndis_rx_fixup. This is required, as RNDIS uses frame batching, and all
of the packets inside the batch need the fixup. This might introduce a
performance penalty, because test is done for every returned Ethernet
frame.

Apply the workaround to both "flavors" of RNDIS interfaces, as older ZTE
modems, like MF823 found in the wild, report the USB_CLASS_COMM class
interfaces, while MF286R reports USB_CLASS_WIRELESS_CONTROLLER.

Suggested-by: Bjørn Mork <[email protected]>
Cc: Kristian Evensen <[email protected]>
Cc: Oliver Neukum <[email protected]>
Signed-off-by: Lech Perczak <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
drivers/net/usb/rndis_host.c
include/linux/usb/rndis_host.h
This page took 0.05876 seconds and 4 git commands to generate.