net/usb/r8153_ecm: support ECM mode for RTL8153
authorHayes Wang <hayeswang@realtek.com>
Wed, 4 Nov 2020 02:19:22 +0000 (10:19 +0800)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Mon, 19 Apr 2021 21:43:59 +0000 (22:43 +0100)
commite2529c892e68a4d346274d610ec546853c3c8fdf
treee919b7b714d5316eb2e6e8f7fb98d086e38368d1
parentacc2e698f5de4e19d6e1033cf1303b19aeee38a2
net/usb/r8153_ecm: support ECM mode for RTL8153

commit c1aedf015ebdd0232757a66e2daccf1246bd609c upstream.

Support ECM mode based on cdc_ether with relative mii functions,
when CONFIG_USB_RTL8152 is not set, or the device is not supported
by r8152 driver.

Both r8152 and r8153_ecm would check the return value of
rtl8152_get_version() in porbe(). If rtl8152_get_version()
return none zero value, the r8152 is used for the device
with vendor mode. Otherwise, the r8153_ecm is used for the
device with ECM mode.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Link: https://lore.kernel.org/r/1394712342-15778-392-Taiwan-albertk@realtek.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/Makefile
drivers/net/usb/r8152.c
drivers/net/usb/r8153_ecm.c [new file with mode: 0644]
include/linux/usb/r8152.h [new file with mode: 0644]