Browse Source

brcmfmac: Add definition of new protocol layer msgbuf.

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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman 11 years ago
parent
commit
943258b6a3

+ 1 - 0
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;
 	sdiodev->bus_if = bus_if;
 	bus_if->bus_priv.sdio = sdiodev;
 	bus_if->bus_priv.sdio = sdiodev;
+	bus_if->proto_type = BRCMF_PROTO_BCDC;
 	dev_set_drvdata(&func->dev, bus_if);
 	dev_set_drvdata(&func->dev, bus_if);
 	dev_set_drvdata(&sdiodev->func[1]->dev, bus_if);
 	dev_set_drvdata(&sdiodev->func[1]->dev, bus_if);
 	sdiodev->dev = &sdiodev->func[1]->dev;
 	sdiodev->dev = &sdiodev->func[1]->dev;

+ 8 - 0
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h

@@ -24,6 +24,12 @@ enum brcmf_bus_state {
 	BRCMF_BUS_DATA		/* Ready for frame transfers */
 	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 {
 struct brcmf_bus_dcmd {
 	char *name;
 	char *name;
 	char *param;
 	char *param;
@@ -65,6 +71,7 @@ struct brcmf_bus_ops {
  * struct brcmf_bus - interface structure between common and bus layer
  * struct brcmf_bus - interface structure between common and bus layer
  *
  *
  * @bus_priv: pointer to private bus device.
  * @bus_priv: pointer to private bus device.
+ * @proto_type: protocol type, bcdc or msgbuf
  * @dev: device pointer of bus device.
  * @dev: device pointer of bus device.
  * @drvr: public driver information.
  * @drvr: public driver information.
  * @state: operational state of the bus interface.
  * @state: operational state of the bus interface.
@@ -80,6 +87,7 @@ struct brcmf_bus {
 		struct brcmf_sdio_dev *sdio;
 		struct brcmf_sdio_dev *sdio;
 		struct brcmf_usbdev *usb;
 		struct brcmf_usbdev *usb;
 	} bus_priv;
 	} bus_priv;
+	enum brcmf_bus_protocol_type proto_type;
 	struct device *dev;
 	struct device *dev;
 	struct brcmf_pub *drvr;
 	struct brcmf_pub *drvr;
 	enum brcmf_bus_state state;
 	enum brcmf_bus_state state;

+ 1 - 0
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->ops = &brcmf_usb_bus_ops;
 	bus->chip = bus_pub->devid;
 	bus->chip = bus_pub->devid;
 	bus->chiprev = bus_pub->chiprev;
 	bus->chiprev = bus_pub->chiprev;
+	bus->proto_type = BRCMF_PROTO_BCDC;
 
 
 	/* Attach to the common driver interface */
 	/* Attach to the common driver interface */
 	ret = brcmf_attach(dev);
 	ret = brcmf_attach(dev);