summarylogtreecommitdiffstats
path: root/MT7630E-3.15.patch
blob: afcbd61fc68997ec7172ab7359a7491e42ed775c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
diff -U 3 -b -B -d -p -r -- a/rt2x00/rt2800usb.c b/rt2x00/rt2800usb.c
--- a/rt2x00/rt2800usb.c	2014-10-25 01:34:02.129618972 +0200
+++ b/rt2x00/rt2800usb.c	2014-10-25 01:33:55.466285690 +0200
@@ -763,7 +763,7 @@ static int rt2800usb_probe_hw(struct rt2
 	/*
 	 * Overwrite TX done handler
 	 */
-	PREPARE_WORK(&rt2x00dev->txdone_work, rt2800usb_work_txdone);
+    rt2x00dev->txdone_workfn = rt2800usb_work_txdone;
 
 	return 0;
 }
diff -U 3 -b -B -d -p -r -- a/rt2x00/rt2x00.h b/rt2x00/rt2x00.h
--- a/rt2x00/rt2x00.h	2014-10-25 01:34:02.129618972 +0200
+++ b/rt2x00/rt2x00.h	2014-10-25 01:33:55.472952357 +0200
@@ -2349,6 +2349,7 @@ struct rt2x00_dev {
 	 */
 	struct work_struct rxdone_work;
 	struct work_struct txdone_work;
+    work_func_t txdone_workfn;
 
 	/*
 	 * Powersaving work
diff -U 3 -b -B -d -p -r -- a/rt2x00/rt2x00usb.c b/rt2x00/rt2x00usb.c
--- a/rt2x00/rt2x00usb.c	2014-10-25 01:34:02.129618972 +0200
+++ b/rt2x00/rt2x00usb.c	2014-10-25 01:33:55.469619023 +0200
@@ -237,6 +237,12 @@ static void rt2x00usb_work_txdone_entry(
 		rt2x00lib_txdone_noinfo(entry, TXDONE_UNKNOWN);
 }
 
+static void rt2x00usb_work_txdonefn(struct work_struct *work)
+{
+    struct rt2x00_dev *peer = container_of(work, struct rt2x00_dev, txdone_work);
+    peer->txdone_workfn(work);
+}
+
 static void rt2x00usb_work_txdone(struct work_struct *work)
 {
 	struct rt2x00_dev *rt2x00dev =
@@ -810,7 +816,8 @@ int rt2x00usb_probe(struct usb_interface
 	rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_USB);
 
 	INIT_WORK(&rt2x00dev->rxdone_work, rt2x00usb_work_rxdone);
-	INIT_WORK(&rt2x00dev->txdone_work, rt2x00usb_work_txdone);
+	INIT_WORK(&rt2x00dev->txdone_work, rt2x00usb_work_txdonefn);
+    rt2x00dev->txdone_workfn = rt2x00usb_work_txdone;
 	hrtimer_init(&rt2x00dev->txstatus_timer, CLOCK_MONOTONIC,
 		     HRTIMER_MODE_REL);