diff options
author | Franky Lin <frankyl@broadcom.com> | 2011-11-22 20:21:57 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-28 14:43:46 -0500 |
commit | fa20b91143c616d402f1ed61f27693477279d0c6 (patch) | |
tree | 055d3d1cb7f637fc506eb4ddc0b5f99181610132 /drivers/net/wireless/brcm80211/brcmfmac | |
parent | bf347bb9768ab0da028a0d9f92142df738211deb (diff) |
brcm80211: fmac: change function bus_init parameter
Change parameter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_init. 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>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 12 |
3 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h index c73679ebc567..cfcf5a9c1d23 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h | |||
@@ -34,7 +34,7 @@ extern struct device *brcmf_bus_get_device(struct brcmf_sdio *bus); | |||
34 | extern void brcmf_sdbrcm_bus_stop(struct brcmf_sdio *bus); | 34 | extern void brcmf_sdbrcm_bus_stop(struct brcmf_sdio *bus); |
35 | 35 | ||
36 | /* Initialize bus module: prepare for communication w/dongle */ | 36 | /* Initialize bus module: prepare for communication w/dongle */ |
37 | extern int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr); | 37 | extern int brcmf_sdbrcm_bus_init(struct device *dev); |
38 | 38 | ||
39 | /* Send a data frame to the dongle. Callee disposes of txp. */ | 39 | /* Send a data frame to the dongle. Callee disposes of txp. */ |
40 | extern int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *txp); | 40 | extern int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *txp); |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c index 1cfe9f3dbe0e..f8c0ae4eb2e0 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | |||
@@ -993,7 +993,7 @@ int brcmf_bus_start(struct brcmf_pub *drvr) | |||
993 | brcmf_dbg(TRACE, "\n"); | 993 | brcmf_dbg(TRACE, "\n"); |
994 | 994 | ||
995 | /* Bring up the bus */ | 995 | /* Bring up the bus */ |
996 | ret = brcmf_sdbrcm_bus_init(&drvr_priv->pub); | 996 | ret = brcmf_sdbrcm_bus_init(drvr_priv->pub.dev); |
997 | if (ret != 0) { | 997 | if (ret != 0) { |
998 | brcmf_dbg(ERROR, "brcmf_sdbrcm_bus_init failed %d\n", ret); | 998 | brcmf_dbg(ERROR, "brcmf_sdbrcm_bus_init failed %d\n", ret); |
999 | return ret; | 999 | return ret; |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index f80151b3696b..8c00014a760c 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |||
@@ -3408,9 +3408,11 @@ void brcmf_sdbrcm_bus_stop(struct brcmf_sdio *bus) | |||
3408 | up(&bus->sdsem); | 3408 | up(&bus->sdsem); |
3409 | } | 3409 | } |
3410 | 3410 | ||
3411 | int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr) | 3411 | int brcmf_sdbrcm_bus_init(struct device *dev) |
3412 | { | 3412 | { |
3413 | struct brcmf_sdio *bus = drvr->bus; | 3413 | struct brcmf_bus *bus_if = dev_get_drvdata(dev); |
3414 | struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv; | ||
3415 | struct brcmf_sdio *bus = sdiodev->bus; | ||
3414 | unsigned long timeout; | 3416 | unsigned long timeout; |
3415 | uint retries = 0; | 3417 | uint retries = 0; |
3416 | u8 ready, enable; | 3418 | u8 ready, enable; |
@@ -3420,7 +3422,7 @@ int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr) | |||
3420 | brcmf_dbg(TRACE, "Enter\n"); | 3422 | brcmf_dbg(TRACE, "Enter\n"); |
3421 | 3423 | ||
3422 | /* try to download image and nvram to the dongle */ | 3424 | /* try to download image and nvram to the dongle */ |
3423 | if (drvr->bus_if->state == BRCMF_BUS_DOWN) { | 3425 | if (bus_if->state == BRCMF_BUS_DOWN) { |
3424 | if (!(brcmf_sdbrcm_download_firmware(bus))) | 3426 | if (!(brcmf_sdbrcm_download_firmware(bus))) |
3425 | return -1; | 3427 | return -1; |
3426 | } | 3428 | } |
@@ -3486,7 +3488,7 @@ int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr) | |||
3486 | SBSDIO_WATERMARK, 8, &err); | 3488 | SBSDIO_WATERMARK, 8, &err); |
3487 | 3489 | ||
3488 | /* Set bus state according to enable result */ | 3490 | /* Set bus state according to enable result */ |
3489 | drvr->bus_if->state = BRCMF_BUS_DATA; | 3491 | bus_if->state = BRCMF_BUS_DATA; |
3490 | } | 3492 | } |
3491 | 3493 | ||
3492 | else { | 3494 | else { |
@@ -3501,7 +3503,7 @@ int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr) | |||
3501 | SBSDIO_FUNC1_CHIPCLKCSR, saveclk, &err); | 3503 | SBSDIO_FUNC1_CHIPCLKCSR, saveclk, &err); |
3502 | 3504 | ||
3503 | /* If we didn't come up, turn off backplane clock */ | 3505 | /* If we didn't come up, turn off backplane clock */ |
3504 | if (drvr->bus_if->state != BRCMF_BUS_DATA) | 3506 | if (bus_if->state != BRCMF_BUS_DATA) |
3505 | brcmf_sdbrcm_clkctl(bus, CLK_NONE, false); | 3507 | brcmf_sdbrcm_clkctl(bus, CLK_NONE, false); |
3506 | 3508 | ||
3507 | exit: | 3509 | exit: |