mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 02:29:01 +00:00
210c534ce2
This commit moves the patches for the r8152.c driver to the generic directory. Previously they were only available on the bcm27xx target. With these patches the Realtek RTL8153C, RTL8153D, RTL8156A and RTL8156B chips are supported on all targets by the kmod-usb-net-rtl8152 module. The RTL8156A and RTL8156B are the 2.5Gb/s Ethernet adapters. The patches have been tested on TP-Link UE300 (RTL8153A) and UNITEK 1313B (RTL8156B). Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From 90f1afc7f96c8f7cf19c82e5f4b39e61a63b053d Mon Sep 17 00:00:00 2001
|
|
From: Emil Renner Berthing <kernel@esmil.dk>
|
|
Date: Sun, 31 Jan 2021 00:47:29 +0100
|
|
Subject: [PATCH] net: usb: r8152: use new tasklet API
|
|
|
|
commit f3163f1cb87141c7a41a15a5d4c98b353f807b04 upstream.
|
|
|
|
This converts the driver to use the new tasklet API introduced in
|
|
commit 12cc923f1ccc ("tasklet: Introduce new initialization API")
|
|
|
|
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/usb/r8152.c | 8 +++-----
|
|
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/usb/r8152.c
|
|
+++ b/drivers/net/usb/r8152.c
|
|
@@ -2394,11 +2394,9 @@ static void tx_bottom(struct r8152 *tp)
|
|
} while (res == 0);
|
|
}
|
|
|
|
-static void bottom_half(unsigned long data)
|
|
+static void bottom_half(struct tasklet_struct *t)
|
|
{
|
|
- struct r8152 *tp;
|
|
-
|
|
- tp = (struct r8152 *)data;
|
|
+ struct r8152 *tp = from_tasklet(tp, t, tx_tl);
|
|
|
|
if (test_bit(RTL8152_UNPLUG, &tp->flags))
|
|
return;
|
|
@@ -6718,7 +6716,7 @@ static int rtl8152_probe(struct usb_inte
|
|
mutex_init(&tp->control);
|
|
INIT_DELAYED_WORK(&tp->schedule, rtl_work_func_t);
|
|
INIT_DELAYED_WORK(&tp->hw_phy_work, rtl_hw_phy_work_func_t);
|
|
- tasklet_init(&tp->tx_tl, bottom_half, (unsigned long)tp);
|
|
+ tasklet_setup(&tp->tx_tl, bottom_half);
|
|
tasklet_disable(&tp->tx_tl);
|
|
|
|
netdev->netdev_ops = &rtl8152_netdev_ops;
|