linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Hante Meuleman <meuleman@broadcom.com>,
	Arend van Spriel <arend@broadcom.com>
Subject: [PATCH 14/18] brcmfmac: Add definition of new protocol layer msgbuf.
Date: Thu, 12 Dec 2013 11:59:02 +0100	[thread overview]
Message-ID: <1386845946-9859-15-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1386845946-9859-1-git-send-email-arend@broadcom.com>

From: Hante Meuleman <meuleman@broadcom.com>

A new protocol layer msgbuf will be added in the future. This
change makes it possible to select the desired layer by the
bus driver. USB and SDIO will select BCDC. At the moment
nothing is being done with this information.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c  |    1 +
 drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h |    8 ++++++++
 drivers/net/wireless/brcm80211/brcmfmac/usb.c     |    1 +
 3 files changed, 10 insertions(+)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 5ff34e6..9c41438 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -1036,6 +1036,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
 
 	sdiodev->bus_if = bus_if;
 	bus_if->bus_priv.sdio = sdiodev;
+	bus_if->proto_type = BRCMF_PROTO_BCDC;
 	dev_set_drvdata(&func->dev, bus_if);
 	dev_set_drvdata(&sdiodev->func[1]->dev, bus_if);
 	sdiodev->dev = &sdiodev->func[1]->dev;
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
index 6a54905..5c12a076 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
@@ -24,6 +24,12 @@ enum brcmf_bus_state {
 	BRCMF_BUS_DATA		/* Ready for frame transfers */
 };
 
+/* The level of bus communication with the dongle */
+enum brcmf_bus_protocol_type {
+	BRCMF_PROTO_BCDC,
+	BRCMF_PROTO_MSGBUF
+};
+
 struct brcmf_bus_dcmd {
 	char *name;
 	char *param;
@@ -65,6 +71,7 @@ struct brcmf_bus_ops {
  * struct brcmf_bus - interface structure between common and bus layer
  *
  * @bus_priv: pointer to private bus device.
+ * @proto_type: protocol type, bcdc or msgbuf
  * @dev: device pointer of bus device.
  * @drvr: public driver information.
  * @state: operational state of the bus interface.
@@ -80,6 +87,7 @@ struct brcmf_bus {
 		struct brcmf_sdio_dev *sdio;
 		struct brcmf_usbdev *usb;
 	} bus_priv;
+	enum brcmf_bus_protocol_type proto_type;
 	struct device *dev;
 	struct brcmf_pub *drvr;
 	enum brcmf_bus_state state;
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index 51c4de0..c345c32 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -1253,6 +1253,7 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo)
 	bus->ops = &brcmf_usb_bus_ops;
 	bus->chip = bus_pub->devid;
 	bus->chiprev = bus_pub->chiprev;
+	bus->proto_type = BRCMF_PROTO_BCDC;
 
 	/* Attach to the common driver interface */
 	ret = brcmf_attach(dev);
-- 
1.7.10.4


  parent reply	other threads:[~2013-12-12 10:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 10:58 [PATCH 00/18] brcmfmac: sdio rework and msgbuf protocol changes Arend van Spriel
2013-12-12 10:58 ` [PATCH 01/18] brcmfmac: add missing curly braces in brcmf_fws_txstatus_suppressed() Arend van Spriel
2013-12-12 10:58 ` [PATCH 02/18] brcmfmac: combine bcmsdh source files into one Arend van Spriel
2013-12-12 10:58 ` [PATCH 03/18] brcmfmac: remove unnecessary function prototypes Arend van Spriel
2013-12-12 10:58 ` [PATCH 04/18] brcmfmac: remove unused struct brcmf_sdio_dev::func_cis_ptr attribute Arend van Spriel
2013-12-12 10:58 ` [PATCH 05/18] brcmfmac: use sdio functions to enable/disable F2 Arend van Spriel
2013-12-12 10:58 ` [PATCH 06/18] brcmfmac: remove brcmf_sdio_regrw_helper() from header file Arend van Spriel
2013-12-12 10:58 ` [PATCH 07/18] brcmfmac: remove regs parameter from sdio probe functions Arend van Spriel
2013-12-12 10:58 ` [PATCH 08/18] brcmfmac: get rid of some void pointer parameters Arend van Spriel
2013-12-12 10:58 ` [PATCH 09/18] brcmfmac: remove brcmf_sdio_wdtimer_enable() function Arend van Spriel
2013-12-12 10:58 ` [PATCH 10/18] brcmfmac: use consistent function names in bcmsdh.c Arend van Spriel
2013-12-12 10:58 ` [PATCH 11/18] brcmfmac: reduce function parameters in sdio send/receive calls Arend van Spriel
2013-12-12 10:59 ` [PATCH 12/18] brcmfmac: Move common BCDC code in single function Arend van Spriel
2013-12-12 10:59 ` [PATCH 13/18] brcmfmac: Fix hex dump for FWIL Arend van Spriel
2013-12-12 10:59 ` Arend van Spriel [this message]
2013-12-12 10:59 ` [PATCH 15/18] brcmfmac: Combine protocol push hdr and bus txdata Arend van Spriel
2013-12-12 10:59 ` [PATCH 16/18] brcmfmac: use consistent function names in dhd_sdio.c Arend van Spriel
2013-12-12 10:59 ` [PATCH 17/18] brcmfmac: remove brcmf_sdio_disconnect() function Arend van Spriel
2013-12-12 10:59 ` [PATCH 18/18] brcmfmac: clarify struct brcmf_sdio_dev::func[0] reference Arend van Spriel
2013-12-13  9:02 ` [PATCH 00/18] brcmfmac: sdio rework and msgbuf protocol changes Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1386845946-9859-15-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=meuleman@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).