From: Lech Perczak <lech.perczak@gmail.com>
To: netdev@vger.kernel.org, linux-usb@vger.kernel.org
Cc: "Lech Perczak" <lech.perczak@gmail.com>,
"Kristian Evensen" <kristian.evensen@gmail.com>,
"Bjørn Mork" <bjorn@mork.no>, "Oliver Neukum" <oliver@neukum.org>
Subject: [PATCH 0/3] rndis_host: handle bogus MAC addresses in ZTE RNDIS devices
Date: Thu, 7 Apr 2022 02:19:23 +0200 [thread overview]
Message-ID: <20220407001926.11252-1-lech.perczak@gmail.com> (raw)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When porting support of ZTE MF286R to OpenWrt [1], it was discovered,
that its built-in LTE modem fails to adjust its target MAC address,
when a random MAC address is assigned to the interface, due to detection of
"locally-administered address" bit. This leads to dropping of ingress
trafficat the host. The modem uses RNDIS as its primary interface,
with some variants exposing both of them simultaneously.
Then it was discovered, that cdc_ether driver contains a fixup for that
exact issue, also appearing on CDC ECM interfaces.
I discussed how to proceed with that with Bjørn Mork at OpenWrt forum [3],
with the first approach would be to trust the locally-administered MAC
again, and add a quirk for the problematic ZTE devices, as suggested by
Kristian Evensen. before [4], but reusing the fixup from cdc_ether looks
like a safer and more generic solution.
Finally, according to Bjørn's suggestion. limit the scope of bogus MAC
addressdetection to ZTE devices, the same way as it is done in cdc_ether,
as this trait wasn't really observed outside of ZTE devices.
Do that for both flavours of RNDIS devices, with interface classes
02/02/ff and e0/01/03, as both types are reported by different modems.
[1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=7ac8da00609f42b8aba74b7efc6b0d055b7cef3e
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfe9b9d2df669a57a95d641ed46eb018e204c6ce
[3] https://forum.openwrt.org/t/problem-with-modem-in-zte-mf286r/120988
[4] https://lore.kernel.org/all/CAKfDRXhDp3heiD75Lat7cr1JmY-kaJ-MS0tt7QXX=s8RFjbpUQ@mail.gmail.com/T/
Cc: Kristian Evensen <kristian.evensen@gmail.com>
Cc: Bjørn Mork <bjorn@mork.no>
Cc: Oliver Neukum <oliver@neukum.org>
Lech Perczak (3):
cdc_ether: export usbnet_cdc_zte_rx_fixup
rndis_host: enable the bogus MAC fixup for ZTE devices from cdc_ether
rndis_host: limit scope of bogus MAC address detection to ZTE devices
drivers/net/usb/cdc_ether.c | 3 ++-
drivers/net/usb/rndis_host.c | 39 ++++++++++++++++++++++++++++++++----
include/linux/usb/usbnet.h | 1 +
3 files changed, 38 insertions(+), 5 deletions(-)
--
2.30.2
next reply other threads:[~2022-04-07 0:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 0:19 Lech Perczak [this message]
2022-04-07 0:19 ` [PATCH 1/3] cdc_ether: export usbnet_cdc_zte_rx_fixup Lech Perczak
2022-04-07 0:19 ` [PATCH 2/3] rndis_host: enable the bogus MAC fixup for ZTE devices from cdc_ether Lech Perczak
2022-04-07 6:25 ` Bjørn Mork
2022-04-07 20:51 ` Lech Perczak
2022-04-12 22:32 ` Lech Perczak
2022-04-07 0:19 ` [PATCH 3/3] rndis_host: limit scope of bogus MAC address detection to ZTE devices Lech Perczak
2022-04-07 6:43 ` Bjørn Mork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220407001926.11252-1-lech.perczak@gmail.com \
--to=lech.perczak@gmail.com \
--cc=bjorn@mork.no \
--cc=kristian.evensen@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).