brcmfmac: Adding msgbuf protocol.
This patch will add the msgbuf protocol. This protocol is used by the soon to be added new bus interface PCIe. Msgbuf is a protocol where most data is and remains located on the host (driver) side and transferred by DMA from and to device. Msgbuf is the protocol which takes care of the signalling of the buffers between host and device which identifies this DMA-able data. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@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>
This commit is contained in:

committed by
John W. Linville

parent
8851cce085
commit
9a1bb60250
@@ -21,9 +21,11 @@
|
||||
|
||||
#include <brcmu_wifi.h>
|
||||
#include "dhd.h"
|
||||
#include "dhd_bus.h"
|
||||
#include "dhd_dbg.h"
|
||||
#include "proto.h"
|
||||
#include "bcdc.h"
|
||||
#include "msgbuf.h"
|
||||
|
||||
|
||||
int brcmf_proto_attach(struct brcmf_pub *drvr)
|
||||
@@ -37,10 +39,18 @@ int brcmf_proto_attach(struct brcmf_pub *drvr)
|
||||
goto fail;
|
||||
|
||||
drvr->proto = proto;
|
||||
/* BCDC protocol is only protocol supported for the moment */
|
||||
if (brcmf_proto_bcdc_attach(drvr))
|
||||
goto fail;
|
||||
|
||||
if (drvr->bus_if->proto_type == BRCMF_PROTO_BCDC) {
|
||||
if (brcmf_proto_bcdc_attach(drvr))
|
||||
goto fail;
|
||||
} else if (drvr->bus_if->proto_type == BRCMF_PROTO_MSGBUF) {
|
||||
if (brcmf_proto_msgbuf_attach(drvr))
|
||||
goto fail;
|
||||
} else {
|
||||
brcmf_err("Unsupported proto type %d\n",
|
||||
drvr->bus_if->proto_type);
|
||||
goto fail;
|
||||
}
|
||||
if ((proto->txdata == NULL) || (proto->hdrpull == NULL) ||
|
||||
(proto->query_dcmd == NULL) || (proto->set_dcmd == NULL) ||
|
||||
(proto->configure_addr_mode == NULL) ||
|
||||
@@ -61,7 +71,10 @@ void brcmf_proto_detach(struct brcmf_pub *drvr)
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
if (drvr->proto) {
|
||||
brcmf_proto_bcdc_detach(drvr);
|
||||
if (drvr->bus_if->proto_type == BRCMF_PROTO_BCDC)
|
||||
brcmf_proto_bcdc_detach(drvr);
|
||||
else if (drvr->bus_if->proto_type == BRCMF_PROTO_MSGBUF)
|
||||
brcmf_proto_msgbuf_detach(drvr);
|
||||
kfree(drvr->proto);
|
||||
drvr->proto = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user