]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
brcmfmac: remove rx helper function from bus interface
authorArend van Spriel <arend@broadcom.com>
Wed, 2 Jan 2013 14:22:42 +0000 (15:22 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Jan 2013 20:16:56 +0000 (15:16 -0500)
The bus interface provided a wrapper function to pass a single
packet to the common driver part filling a skb queue with one
packet. For clarity the caller now sets up the skb queue and
call the rx bus interface function.

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>
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/usb.c

index 358b54fff79517966fa349fa1a7c179301330ef0..639bc2a2d03c834370b210e4ee65b3b3fc878712 100644 (file)
@@ -138,17 +138,8 @@ extern bool brcmf_c_prec_enq(struct device *dev, struct pktq *q,
                         struct sk_buff *pkt, int prec);
 
 /* Receive frame for delivery to OS.  Callee disposes of rxp. */
-extern void brcmf_rx_frame(struct device *dev, u8 ifidx,
-                          struct sk_buff_head *rxlist);
-static inline void brcmf_rx_packet(struct device *dev, int ifidx,
-                                  struct sk_buff *pkt)
-{
-       struct sk_buff_head q;
-
-       skb_queue_head_init(&q);
-       skb_queue_tail(&q, pkt);
-       brcmf_rx_frame(dev, ifidx, &q);
-}
+extern void brcmf_rx_frames(struct device *dev, u8 ifidx,
+                           struct sk_buff_head *rxlist);
 
 /* Indication from bus module regarding presence/insertion of dongle. */
 extern int brcmf_attach(uint bus_hdrlen, struct device *dev);
index 6520b587d4c8661f58740fcc8da83acfce286bb4..a820f58100b70e10460119c7381d2c32605e429d 100644 (file)
@@ -248,8 +248,8 @@ void brcmf_txflowblock(struct device *dev, bool state)
                }
 }
 
-void brcmf_rx_frame(struct device *dev, u8 ifidx,
-                   struct sk_buff_head *skb_list)
+void brcmf_rx_frames(struct device *dev, u8 ifidx,
+                    struct sk_buff_head *skb_list)
 {
        unsigned char *eth;
        uint len;
index 651474bc1ce3b1e8d22f8f731139f3a70b1b8526..13ea9b48acdb431cccf4f624e7a506edf0bd80e4 100644 (file)
@@ -1405,7 +1405,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_sdio *bus, u8 rxseq)
                }
                /* sent any remaining packets up */
                if (bus->glom.qlen)
-                       brcmf_rx_frame(bus->sdiodev->dev, ifidx, &bus->glom);
+                       brcmf_rx_frames(bus->sdiodev->dev, ifidx, &bus->glom);
 
                bus->sdcnt.rxglomframes++;
                bus->sdcnt.rxglompkts += bus->glom.qlen;
@@ -1556,6 +1556,7 @@ static void brcmf_pad(struct brcmf_sdio *bus, u16 *pad, u16 *rdlen)
 static uint brcmf_sdio_readframes(struct brcmf_sdio *bus, uint maxframes)
 {
        struct sk_buff *pkt;            /* Packet for event or data frames */
+       struct sk_buff_head pktlist;    /* needed for bus interface */
        u16 pad;                /* Number of pad bytes to read */
        uint rxleft = 0;        /* Remaining number of frames allowed */
        int sdret;              /* Return code from calls */
@@ -1766,7 +1767,9 @@ static uint brcmf_sdio_readframes(struct brcmf_sdio *bus, uint maxframes)
                        continue;
                }
 
-               brcmf_rx_packet(bus->sdiodev->dev, ifidx, pkt);
+               skb_queue_head_init(&pktlist);
+               skb_queue_tail(&pktlist, pkt);
+               brcmf_rx_frames(bus->sdiodev->dev, ifidx, &pktlist);
        }
 
        rxcount = maxframes - rxleft;
index 1df85955ad935b113e9ba4842429e5aa311ed944..34342ff718db05f5462cd75ab9c65efa2657f6ba 100644 (file)
@@ -443,6 +443,7 @@ static void brcmf_usb_rx_complete(struct urb *urb)
        struct brcmf_usbreq  *req = (struct brcmf_usbreq *)urb->context;
        struct brcmf_usbdev_info *devinfo = req->devinfo;
        struct sk_buff *skb;
+       struct sk_buff_head skbq;
        int ifidx = 0;
 
        brcmf_dbg(USB, "Enter, urb->status=%d\n", urb->status);
@@ -460,13 +461,15 @@ static void brcmf_usb_rx_complete(struct urb *urb)
        }
 
        if (devinfo->bus_pub.state == BRCMFMAC_USB_STATE_UP) {
+               skb_queue_head_init(&skbq);
+               skb_queue_tail(&skbq, skb);
                skb_put(skb, urb->actual_length);
                if (brcmf_proto_hdrpull(devinfo->dev, &ifidx, skb) != 0) {
                        brcmf_err("rx protocol error\n");
                        brcmu_pkt_buf_free_skb(skb);
                        devinfo->bus_pub.bus->dstats.rx_errors++;
                } else
-                       brcmf_rx_packet(devinfo->dev, ifidx, skb);
+                       brcmf_rx_frames(devinfo->dev, ifidx, &skbq);
                /* zero lenght packets indicate usb "failure". Do not refill */
                if (urb->actual_length)
                        brcmf_usb_rx_refill(devinfo, req);