diff options
author | Arend van Spriel <arend@broadcom.com> | 2013-01-02 09:22:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-07 15:16:56 -0500 |
commit | a43af515f6252e62604a1bfc139d43fa43ef5b6f (patch) | |
tree | dc9fd15a79f4cfc7fffb5b61a0176b2771dda7af /drivers/net/wireless/brcm80211/brcmfmac/usb.c | |
parent | 3aa7aad2b2da32dd897900ab3eb62348a54d2dc1 (diff) |
brcmfmac: remove brcmf_proto_hdrpull() from bus interface
The use of the function brcmf_proto_hdrpull() is moved to the
common part of the driver and consequently it can be removed
from the bus interface.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/usb.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/usb.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c index 34342ff718db..e15630cc3889 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c | |||
@@ -444,14 +444,14 @@ static void brcmf_usb_rx_complete(struct urb *urb) | |||
444 | struct brcmf_usbdev_info *devinfo = req->devinfo; | 444 | struct brcmf_usbdev_info *devinfo = req->devinfo; |
445 | struct sk_buff *skb; | 445 | struct sk_buff *skb; |
446 | struct sk_buff_head skbq; | 446 | struct sk_buff_head skbq; |
447 | int ifidx = 0; | ||
448 | 447 | ||
449 | brcmf_dbg(USB, "Enter, urb->status=%d\n", urb->status); | 448 | brcmf_dbg(USB, "Enter, urb->status=%d\n", urb->status); |
450 | brcmf_usb_del_fromq(devinfo, req); | 449 | brcmf_usb_del_fromq(devinfo, req); |
451 | skb = req->skb; | 450 | skb = req->skb; |
452 | req->skb = NULL; | 451 | req->skb = NULL; |
453 | 452 | ||
454 | if (urb->status == 0) { | 453 | /* zero lenght packets indicate usb "failure". Do not refill */ |
454 | if (urb->status == 0 && urb->actual_length) { | ||
455 | devinfo->bus_pub.bus->dstats.rx_packets++; | 455 | devinfo->bus_pub.bus->dstats.rx_packets++; |
456 | } else { | 456 | } else { |
457 | devinfo->bus_pub.bus->dstats.rx_errors++; | 457 | devinfo->bus_pub.bus->dstats.rx_errors++; |
@@ -464,17 +464,8 @@ static void brcmf_usb_rx_complete(struct urb *urb) | |||
464 | skb_queue_head_init(&skbq); | 464 | skb_queue_head_init(&skbq); |
465 | skb_queue_tail(&skbq, skb); | 465 | skb_queue_tail(&skbq, skb); |
466 | skb_put(skb, urb->actual_length); | 466 | skb_put(skb, urb->actual_length); |
467 | if (brcmf_proto_hdrpull(devinfo->dev, &ifidx, skb) != 0) { | 467 | brcmf_rx_frames(devinfo->dev, &skbq); |
468 | brcmf_err("rx protocol error\n"); | 468 | brcmf_usb_rx_refill(devinfo, req); |
469 | brcmu_pkt_buf_free_skb(skb); | ||
470 | devinfo->bus_pub.bus->dstats.rx_errors++; | ||
471 | } else | ||
472 | brcmf_rx_frames(devinfo->dev, ifidx, &skbq); | ||
473 | /* zero lenght packets indicate usb "failure". Do not refill */ | ||
474 | if (urb->actual_length) | ||
475 | brcmf_usb_rx_refill(devinfo, req); | ||
476 | else | ||
477 | brcmf_usb_enq(devinfo, &devinfo->rx_freeq, req, NULL); | ||
478 | } else { | 469 | } else { |
479 | brcmu_pkt_buf_free_skb(skb); | 470 | brcmu_pkt_buf_free_skb(skb); |
480 | brcmf_usb_enq(devinfo, &devinfo->rx_freeq, req, NULL); | 471 | brcmf_usb_enq(devinfo, &devinfo->rx_freeq, req, NULL); |