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 6577fc5c614b940fcebf82391182886fa082a079..bfceba3a34cc0417af260f8dafaf640d00e52f4f 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 f82f87c0e753759c2dc3138003c57ca4126b3c59..e095b6f146ff672685cdd895c30ff96ab72ab191 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 2253f7a05c6f98629edb20936af70d0721fd9ade..16a05e9806c5cd0a75cfd032fd2acf80f5492ef5 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;