aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFranky Lin <frankyl@broadcom.com>2011-12-16 21:37:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-19 14:40:47 -0500
commitb9692d17e842fadb8c18faf24f550db80886763e (patch)
tree93df2a186ede1219b06887d55ad9862c39e29dd1 /drivers/net
parent99a0b8ff9105d9b78e7e4e6aaa077264707e4e1c (diff)
brcm80211: fmac: abstract bus_txdata interface function pointer
Abstract bus layer brcmf_bus_txdata function pointer for common layer. This patch 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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h5
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c2
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c3
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
index 5d5f2afed1ff..d5e0ec36d202 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
@@ -53,6 +53,8 @@ struct brcmf_bus {
53 void (*brcmf_bus_stop)(struct device *); 53 void (*brcmf_bus_stop)(struct device *);
54 /* Initialize bus module: prepare for communication w/dongle */ 54 /* Initialize bus module: prepare for communication w/dongle */
55 int (*brcmf_bus_init)(struct device *); 55 int (*brcmf_bus_init)(struct device *);
56 /* Send a data frame to the dongle. Callee disposes of txp. */
57 int (*brcmf_bus_txdata)(struct device *, struct sk_buff *);
56}; 58};
57 59
58/* 60/*
@@ -99,9 +101,6 @@ extern int brcmf_add_if(struct device *dev, int ifidx,
99/* 101/*
100 * Exported from brcmf bus module (brcmf_usb, brcmf_sdio) 102 * Exported from brcmf bus module (brcmf_usb, brcmf_sdio)
101 */ 103 */
102/* Send a data frame to the dongle. Callee disposes of txp. */
103extern int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *txp);
104
105/* Send/receive a control message to/from the dongle. 104/* Send/receive a control message to/from the dongle.
106 * Expects caller to enforce a single outstanding transaction. 105 * Expects caller to enforce a single outstanding transaction.
107 */ 106 */
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 62b457545ac6..72bee2c04957 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -291,7 +291,7 @@ int brcmf_sendpkt(struct brcmf_pub *drvr, int ifidx, struct sk_buff *pktbuf)
291 brcmf_proto_hdrpush(drvr, ifidx, pktbuf); 291 brcmf_proto_hdrpush(drvr, ifidx, pktbuf);
292 292
293 /* Use bus module to send data frame */ 293 /* Use bus module to send data frame */
294 return brcmf_sdbrcm_bus_txdata(drvr->dev, pktbuf); 294 return drvr->bus_if->brcmf_bus_txdata(drvr->dev, pktbuf);
295} 295}
296 296
297static int brcmf_netdev_start_xmit(struct sk_buff *skb, struct net_device *ndev) 297static int brcmf_netdev_start_xmit(struct sk_buff *skb, struct net_device *ndev)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index 5089b6444bec..6a3095038dd6 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -2655,7 +2655,7 @@ static int brcmf_sdbrcm_dpc_thread(void *data)
2655 return 0; 2655 return 0;
2656} 2656}
2657 2657
2658int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt) 2658static int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt)
2659{ 2659{
2660 int ret = -EBADE; 2660 int ret = -EBADE;
2661 uint datalen, prec; 2661 uint datalen, prec;
@@ -3955,6 +3955,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
3955 /* Assign bus interface call back */ 3955 /* Assign bus interface call back */
3956 bus->sdiodev->bus_if->brcmf_bus_stop = brcmf_sdbrcm_bus_stop; 3956 bus->sdiodev->bus_if->brcmf_bus_stop = brcmf_sdbrcm_bus_stop;
3957 bus->sdiodev->bus_if->brcmf_bus_init = brcmf_sdbrcm_bus_init; 3957 bus->sdiodev->bus_if->brcmf_bus_init = brcmf_sdbrcm_bus_init;
3958 bus->sdiodev->bus_if->brcmf_bus_txdata = brcmf_sdbrcm_bus_txdata;
3958 /* Attach to the brcmf/OS/network interface */ 3959 /* Attach to the brcmf/OS/network interface */
3959 ret = brcmf_attach(SDPCM_RESERVE, bus->sdiodev->dev); 3960 ret = brcmf_attach(SDPCM_RESERVE, bus->sdiodev->dev);
3960 if (ret != 0) { 3961 if (ret != 0) {