088e731322fca66061ea23f5dc6d8e9d4d83e92a
[oweals/openwrt.git] /
1 From 2b78e5f5223666d403d4fdb30af4ad65c8da3cdb Mon Sep 17 00:00:00 2001
2 From: Piotr Figiel <p.figiel@camlintechnologies.com>
3 Date: Fri, 8 Mar 2019 15:25:06 +0000
4 Subject: [PATCH] brcmfmac: remove pending parameter from brcmf_usb_free_q
5
6 brcmf_usb_free_q is no longer called with pending=true thus this boolean
7 parameter is no longer needed.
8
9 Signed-off-by: Piotr Figiel <p.figiel@camlintechnologies.com>
10 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
11 ---
12  .../wireless/broadcom/brcm80211/brcmfmac/usb.c    | 15 ++++++---------
13  1 file changed, 6 insertions(+), 9 deletions(-)
14
15 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
16 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
17 @@ -445,9 +445,10 @@ fail:
18  
19  }
20  
21 -static void brcmf_usb_free_q(struct list_head *q, bool pending)
22 +static void brcmf_usb_free_q(struct list_head *q)
23  {
24         struct brcmf_usbreq *req, *next;
25 +
26         int i = 0;
27         list_for_each_entry_safe(req, next, q, list) {
28                 if (!req->urb) {
29 @@ -455,12 +456,8 @@ static void brcmf_usb_free_q(struct list
30                         break;
31                 }
32                 i++;
33 -               if (pending) {
34 -                       usb_kill_urb(req->urb);
35 -               } else {
36 -                       usb_free_urb(req->urb);
37 -                       list_del_init(&req->list);
38 -               }
39 +               usb_free_urb(req->urb);
40 +               list_del_init(&req->list);
41         }
42  }
43  
44 @@ -1029,8 +1026,8 @@ static void brcmf_usb_detach(struct brcm
45         brcmf_dbg(USB, "Enter, devinfo %p\n", devinfo);
46  
47         /* free the URBS */
48 -       brcmf_usb_free_q(&devinfo->rx_freeq, false);
49 -       brcmf_usb_free_q(&devinfo->tx_freeq, false);
50 +       brcmf_usb_free_q(&devinfo->rx_freeq);
51 +       brcmf_usb_free_q(&devinfo->tx_freeq);
52  
53         usb_free_urb(devinfo->ctl_urb);
54         usb_free_urb(devinfo->bulk_urb);