brcm80211: fmac: change function proto_hdrpull parameter
authorFranky Lin <frankyl@broadcom.com>
Sat, 17 Dec 2011 02:37:01 +0000 (18:37 -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_proto_hdrpull 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_cdc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_proto.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

index 87003f8fadea78f49a8d034f01e5fec0667b40a8..3f0b316e5ba4a8c6fcb3bf4c9cf4ee92188c90da 100644 (file)
@@ -376,10 +376,12 @@ void brcmf_proto_hdrpush(struct brcmf_pub *drvr, int ifidx,
        BDC_SET_IF_IDX(h, ifidx);
 }
 
-int brcmf_proto_hdrpull(struct brcmf_pub *drvr, int *ifidx,
+int brcmf_proto_hdrpull(struct device *dev, int *ifidx,
                        struct sk_buff *pktbuf)
 {
        struct brcmf_proto_bdc_header *h;
+       struct brcmf_bus *bus_if = dev_get_drvdata(dev);
+       struct brcmf_pub *drvr = bus_if->drvr;
 
        brcmf_dbg(TRACE, "Enter\n");
 
index 3efa301a7b34147645e86d8f2ec9997aa67fc77f..576cdc418b0ea00abe276ff14427effc4dea5325 100644 (file)
@@ -470,7 +470,7 @@ void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success)
        struct brcmf_bus *bus_if = dev_get_drvdata(dev);
        struct brcmf_pub *drvr = bus_if->drvr;
 
-       brcmf_proto_hdrpull(drvr, &ifidx, txp);
+       brcmf_proto_hdrpull(dev, &ifidx, txp);
 
        eh = (struct ethhdr *)(txp->data);
        type = ntohs(eh->h_proto);
index 4ee1ea846f6d7f82718a4be0e9549e5a5ef7ad65..130a8474b00f67f553b0a37b13a8296ad9b52aa3 100644 (file)
@@ -42,7 +42,7 @@ extern void brcmf_proto_hdrpush(struct brcmf_pub *, int ifidx,
                                struct sk_buff *txp);
 
 /* Remove any protocol-specific data header. */
-extern int brcmf_proto_hdrpull(struct brcmf_pub *, int *ifidx,
+extern int brcmf_proto_hdrpull(struct device *dev, int *ifidx,
                               struct sk_buff *rxp);
 
 /* Use protocol to issue command to dongle */
index 7de002b84f14f2534501f05c2a57fdae6250f2c6..a54abaf262b07a1c2cbb023c930a01f434966c18 100644 (file)
@@ -1437,8 +1437,8 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_sdio *bus, u8 rxseq)
                                skb_unlink(pfirst, &bus->glom);
                                brcmu_pkt_buf_free_skb(pfirst);
                                continue;
-                       } else if (brcmf_proto_hdrpull(bus->drvr, &ifidx,
-                                                      pfirst) != 0) {
+                       } else if (brcmf_proto_hdrpull(bus->sdiodev->dev,
+                                                      &ifidx, pfirst) != 0) {
                                brcmf_dbg(ERROR, "rx protocol error\n");
                                bus->drvr->rx_errors++;
                                skb_unlink(pfirst, &bus->glom);
@@ -2053,7 +2053,8 @@ deliver:
                if (pkt->len == 0) {
                        brcmu_pkt_buf_free_skb(pkt);
                        continue;
-               } else if (brcmf_proto_hdrpull(bus->drvr, &ifidx, pkt) != 0) {
+               } else if (brcmf_proto_hdrpull(bus->sdiodev->dev, &ifidx,
+                          pkt) != 0) {
                        brcmf_dbg(ERROR, "rx protocol error\n");
                        brcmu_pkt_buf_free_skb(pkt);
                        bus->drvr->rx_errors++;