diff options
author | Arend van Spriel <arend@broadcom.com> | 2012-12-05 15:25:54 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-12-10 15:33:05 -0500 |
commit | d9cb2596503d937ccf68b83d3aff1056765a6b1e (patch) | |
tree | 0f385f591bed005428b860700ef4104cf7853fa3 /drivers/net/wireless/brcm80211/brcmfmac/usb.c | |
parent | 9e2ff36beae4bedbad2a69d458f9404f35fcb528 (diff) | |
download | op-kernel-dev-d9cb2596503d937ccf68b83d3aff1056765a6b1e.zip op-kernel-dev-d9cb2596503d937ccf68b83d3aff1056765a6b1e.tar.gz |
brcmfmac: rework bus interface
Rework the bus interface between common driver part and bus-specific
driver part. It prepares for adding tracing in bus-specific callback
functions.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/usb.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/usb.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c index 39a5baa..5eb7bf8 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c @@ -1228,6 +1228,14 @@ error: return NULL; } +static struct brcmf_bus_ops brcmf_usb_bus_ops = { + .txdata = brcmf_usb_tx, + .init = brcmf_usb_up, + .stop = brcmf_usb_down, + .txctl = brcmf_usb_tx_ctlpkt, + .rxctl = brcmf_usb_rx_ctlpkt, +}; + static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo) { struct brcmf_bus *bus = NULL; @@ -1246,14 +1254,11 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo) goto fail; } + bus->dev = dev; bus_pub->bus = bus; - bus->brcmf_bus_txdata = brcmf_usb_tx; - bus->brcmf_bus_init = brcmf_usb_up; - bus->brcmf_bus_stop = brcmf_usb_down; - bus->brcmf_bus_txctl = brcmf_usb_tx_ctlpkt; - bus->brcmf_bus_rxctl = brcmf_usb_rx_ctlpkt; bus->bus_priv.usb = bus_pub; dev_set_drvdata(dev, bus); + bus->ops = &brcmf_usb_bus_ops; /* Attach to the common driver interface */ ret = brcmf_attach(0, dev); |