This source file includes following definitions.
- rsi_usb_rx_thread
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #include <linux/firmware.h>
19 #include "rsi_usb.h"
20
21
22
23
24
25
26
27
28 void rsi_usb_rx_thread(struct rsi_common *common)
29 {
30 struct rsi_hw *adapter = common->priv;
31 struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;
32 int status;
33 struct sk_buff *skb;
34
35 do {
36 rsi_wait_event(&dev->rx_thread.event, EVENT_WAIT_FOREVER);
37 rsi_reset_event(&dev->rx_thread.event);
38
39 while (true) {
40 if (atomic_read(&dev->rx_thread.thread_done))
41 goto out;
42
43 skb = skb_dequeue(&dev->rx_q);
44 if (!skb)
45 break;
46 status = rsi_read_pkt(common, skb->data, 0);
47 if (status) {
48 rsi_dbg(ERR_ZONE, "%s: Failed To read data",
49 __func__);
50 break;
51 }
52 dev_kfree_skb(skb);
53 }
54 } while (1);
55
56 out:
57 rsi_dbg(INFO_ZONE, "%s: Terminated thread\n", __func__);
58 skb_queue_purge(&dev->rx_q);
59 complete_and_exit(&dev->rx_thread.completion, 0);
60 }
61