2 * Copyright (c) 2013 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 #include <linux/types.h>
19 #include <linux/slab.h>
20 #include <linux/netdevice.h>
22 #include <brcmu_wifi.h>
29 int brcmf_proto_attach(struct brcmf_pub
*drvr
)
31 struct brcmf_proto
*proto
;
33 proto
= kzalloc(sizeof(*proto
), GFP_ATOMIC
);
38 /* BCDC protocol is only protocol supported for the moment */
39 if (brcmf_proto_bcdc_attach(drvr
))
42 if ((proto
->txdata
== NULL
) || (proto
->hdrpull
== NULL
) ||
43 (proto
->query_dcmd
== NULL
) || (proto
->set_dcmd
== NULL
)) {
44 brcmf_err("Not all proto handlers have been installed\n");
55 void brcmf_proto_detach(struct brcmf_pub
*drvr
)
58 brcmf_proto_bcdc_detach(drvr
);