brcm80211: fmac: change function txcomplete parameter
authorFranky Lin <frankyl@broadcom.com>
Sat, 17 Dec 2011 02:36:58 +0000 (18:36 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Dec 2011 19:40:44 +0000 (14:40 -0500)
Change parameter to device pointer for bus layer interface function
brcmf_txcomplete. This is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

index 6577fc5..bfceba3 100644 (file)
@@ -728,7 +728,7 @@ static inline void brcmf_rx_packet(struct brcmf_pub *drvr, int ifidx,
 extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx);
 
 /* Notify tx completion */
-extern void brcmf_txcomplete(struct brcmf_pub *drvr, struct sk_buff *txp,
+extern void brcmf_txcomplete(struct device *dev, struct sk_buff *txp,
                             bool success);
 
 /* Query dongle */
index f82f87c..e095b6f 100644 (file)
@@ -460,11 +460,13 @@ void brcmf_rx_frame(struct brcmf_pub *drvr, int ifidx,
        }
 }
 
-void brcmf_txcomplete(struct brcmf_pub *drvr, struct sk_buff *txp, bool success)
+void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success)
 {
        uint ifidx;
        struct ethhdr *eh;
        u16 type;
+       struct brcmf_bus *bus_if = dev_get_drvdata(dev);
+       struct brcmf_pub *drvr = bus_if->drvr;
 
        brcmf_proto_hdrpull(drvr, &ifidx, txp);
 
index 2253f7a..16a05e9 100644 (file)
@@ -2230,7 +2230,7 @@ done:
        /* restore pkt buffer pointer before calling tx complete routine */
        skb_pull(pkt, SDPCM_HDRLEN + pad);
        up(&bus->sdsem);
-       brcmf_txcomplete(bus->drvr, pkt, ret != 0);
+       brcmf_txcomplete(bus->sdiodev->dev, pkt, ret != 0);
        down(&bus->sdsem);
 
        if (free_pkt)
@@ -2592,7 +2592,7 @@ int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt)
        spin_lock_bh(&bus->txqlock);
        if (brcmf_c_prec_enq(bus->drvr, &bus->txq, pkt, prec) == false) {
                skb_pull(pkt, SDPCM_HDRLEN);
-               brcmf_txcomplete(bus->drvr, pkt, false);
+               brcmf_txcomplete(bus->sdiodev->dev, pkt, false);
                brcmu_pkt_buf_free_skb(pkt);
                brcmf_dbg(ERROR, "out of bus->txq !!!\n");
                ret = -ENOSR;