X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fwireless%2Fbrcm80211%2Fbrcmfmac%2Fdhd_bus.h;h=080395f49fa5922400419d821e1fda4fcc1b460e;hb=e2432b6787a15e0b3c255a017d16033ba30204c0;hp=ad25c3408b59abaf2315e89352fcf2fce7bc6f6a;hpb=d15591b008c2b758e480660ecca85889f99bc240;p=deliverable%2Flinux.git diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h index ad25c3408b59..080395f49fa5 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h @@ -39,10 +39,12 @@ struct brcmf_bus_dcmd { * @txdata: send a data frame to the dongle (callee disposes skb). * @txctl: transmit a control request message to dongle. * @rxctl: receive a control response message from dongle. + * @gettxq: obtain a reference of bus transmit queue (optional). * * This structure provides an abstract interface towards the * bus specific driver. For control messages to common driver - * will assure there is only one active transaction. + * will assure there is only one active transaction. Unless + * indicated otherwise these callbacks are mandatory. */ struct brcmf_bus_ops { int (*init)(struct device *dev); @@ -50,6 +52,7 @@ struct brcmf_bus_ops { int (*txdata)(struct device *dev, struct sk_buff *skb); int (*txctl)(struct device *dev, unsigned char *msg, uint len); int (*rxctl)(struct device *dev, unsigned char *msg, uint len); + struct pktq * (*gettxq)(struct device *dev); }; /** @@ -115,6 +118,14 @@ int brcmf_bus_rxctl(struct brcmf_bus *bus, unsigned char *msg, uint len) return bus->ops->rxctl(bus->dev, msg, len); } +static inline +struct pktq *brcmf_bus_gettxq(struct brcmf_bus *bus) +{ + if (!bus->ops->gettxq) + return ERR_PTR(-ENOENT); + + return bus->ops->gettxq(bus->dev); +} /* * interface functions from common layer */ @@ -134,7 +145,7 @@ extern void brcmf_dev_reset(struct device *dev); /* Indication from bus module to change flow-control state */ extern void brcmf_txflowblock(struct device *dev, bool state); -/* Notify tx completion */ +/* Notify the bus has transferred the tx packet to firmware */ extern void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success);