brcm80211: fmac: change function bus_rxctl parameter
authorFranky Lin <frankyl@broadcom.com>
Wed, 23 Nov 2011 01:21:54 +0000 (17:21 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 28 Nov 2011 19:43:43 +0000 (14:43 -0500)
brcmf_sdbrcm_bus_rxctl acts as an interface function of bus layer.
Change parameter from struct brcmf_sdio to device pointer in order to
provide a more compatible interface for different bus layers. 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>
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_bus.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

index a104b74e0004aa84123fae961d443a1aa6cd0c9b..b68d1363105c5ca10aff59c8855aa5fe98214d4e 100644 (file)
@@ -591,6 +591,7 @@ struct brcmf_pub {
        struct brcmf_proto *prot;
        struct brcmf_info *info;
        struct brcmf_cfg80211_dev *config;
+       struct device *dev;             /* fullmac dongle device pointer */
 
        /* Internal brcmf items */
        bool up;                /* Driver up/down (to OS) */
index 81fc1dbccc5552845fb7f5362aae6f62d7e9fb13..44f46d1261862ea74ae5c8cd5915cbd7a45bcceb 100644 (file)
@@ -46,7 +46,7 @@ extern int
 brcmf_sdbrcm_bus_txctl(struct brcmf_sdio *bus, unsigned char *msg, uint msglen);
 
 extern int
-brcmf_sdbrcm_bus_rxctl(struct brcmf_sdio *bus, unsigned char *msg, uint msglen);
+brcmf_sdbrcm_bus_rxctl(struct device *dev, unsigned char *msg, uint msglen);
 
 extern void brcmf_sdbrcm_wd_timer(struct brcmf_sdio *bus, uint wdtick);
 
index 8e46bc64ca5f24068ddba7e468c9cf3a2ed033fc..5ab8671d9f3c6c617b44410f291d4647f8dde7e1 100644 (file)
@@ -128,7 +128,7 @@ static int brcmf_proto_cdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len)
        brcmf_dbg(TRACE, "Enter\n");
 
        do {
-               ret = brcmf_sdbrcm_bus_rxctl(drvr->bus,
+               ret = brcmf_sdbrcm_bus_rxctl(drvr->dev,
                                (unsigned char *)&prot->msg,
                                len + sizeof(struct brcmf_proto_cdc_dcmd));
                if (ret < 0)
index c13b30f6d22069ad60205b0a2802cd2f745195e6..c20c72df73ab517c05b7e79de2d0f2a7b5762818 100644 (file)
@@ -963,6 +963,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_sdio *bus, uint bus_hdrlen,
        drvr_priv->pub.bus = bus;
        drvr_priv->pub.hdrlen = bus_hdrlen;
        drvr_priv->pub.bus_if = dev_get_drvdata(dev);
+       drvr_priv->pub.dev = dev;
 
        /* Attach and link in the protocol */
        if (brcmf_proto_attach(&drvr_priv->pub) != 0) {
index 885d16a57c803f2d5e93925ed093a36776381974..e13c9e90fbdfaf314de5cb3e194640f77bbf96f3 100644 (file)
@@ -2912,11 +2912,14 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_sdio *bus, unsigned char *msg, uint msglen)
 }
 
 int
-brcmf_sdbrcm_bus_rxctl(struct brcmf_sdio *bus, unsigned char *msg, uint msglen)
+brcmf_sdbrcm_bus_rxctl(struct device *dev, unsigned char *msg, uint msglen)
 {
        int timeleft;
        uint rxlen = 0;
        bool pending;
+       struct brcmf_bus *bus_if = dev_get_drvdata(dev);
+       struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv;
+       struct brcmf_sdio *bus = sdiodev->bus;
 
        brcmf_dbg(TRACE, "Enter\n");