brcm80211: fmac: change function brcmf_c_prec_enq parameter
authorFranky Lin <frankyl@broadcom.com>
Sat, 17 Dec 2011 02:36:59 +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_c_prec_enq. 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_common.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

index bfceba3a34cc0417af260f8dafaf640d00e52f4f..e403ad09c406f2f9e68cee0f0f1785d8acc05312 100644 (file)
@@ -708,7 +708,7 @@ extern void brcmf_detach(struct device *dev);
 /* Indication from bus module to change flow-control state */
 extern void brcmf_txflowcontrol(struct device *dev, int ifidx, bool on);
 
-extern bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
+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. */
index e9f7d66b7ec67d65e8c8133a28d005eb12cc7aca..279ae76a8e8237755d3234f7c720ddca9ba7a3cf 100644 (file)
@@ -83,12 +83,14 @@ brcmf_c_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen)
        return len;
 }
 
-bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
+bool brcmf_c_prec_enq(struct device *dev, struct pktq *q,
                      struct sk_buff *pkt, int prec)
 {
        struct sk_buff *p;
        int eprec = -1;         /* precedence to evict from */
        bool discard_oldest;
+       struct brcmf_bus *bus_if = dev_get_drvdata(dev);
+       struct brcmf_pub *drvr = bus_if->drvr;
 
        /* Fast case, precedence queue is not full and we are also not
         * exceeding total queue length
index 16a05e9806c5cd0a75cfd032fd2acf80f5492ef5..5d392c9b469fd691d999c0987381ed3098bde994 100644 (file)
@@ -2590,7 +2590,8 @@ int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt)
 
        /* Priority based enq */
        spin_lock_bh(&bus->txqlock);
-       if (brcmf_c_prec_enq(bus->drvr, &bus->txq, pkt, prec) == false) {
+       if (brcmf_c_prec_enq(bus->sdiodev->dev, &bus->txq, pkt, prec) ==
+           false) {
                skb_pull(pkt, SDPCM_HDRLEN);
                brcmf_txcomplete(bus->sdiodev->dev, pkt, false);
                brcmu_pkt_buf_free_skb(pkt);