]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/net/wireless/brcm80211/brcmfmac/proto.h
Merge remote-tracking branches 'spi/fix/doc', 'spi/fix/nuc900' and 'spi/fix/rspi...
[karo-tx-linux.git] / drivers / net / wireless / brcm80211 / brcmfmac / proto.h
1 /*
2  * Copyright (c) 2013 Broadcom Corporation
3  *
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.
7  *
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.
15  */
16 #ifndef BRCMFMAC_PROTO_H
17 #define BRCMFMAC_PROTO_H
18
19 struct brcmf_proto {
20         int (*hdrpull)(struct brcmf_pub *drvr, bool do_fws, u8 *ifidx,
21                        struct sk_buff *skb);
22         int (*query_dcmd)(struct brcmf_pub *drvr, int ifidx, uint cmd,
23                           void *buf, uint len);
24         int (*set_dcmd)(struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf,
25                         uint len);
26         int (*txdata)(struct brcmf_pub *drvr, int ifidx, u8 offset,
27                       struct sk_buff *skb);
28         void *pd;
29 };
30
31
32 int brcmf_proto_attach(struct brcmf_pub *drvr);
33 void brcmf_proto_detach(struct brcmf_pub *drvr);
34
35 static inline int brcmf_proto_hdrpull(struct brcmf_pub *drvr, bool do_fws,
36                                       u8 *ifidx, struct sk_buff *skb)
37 {
38         return drvr->proto->hdrpull(drvr, do_fws, ifidx, skb);
39 }
40 static inline int brcmf_proto_query_dcmd(struct brcmf_pub *drvr, int ifidx,
41                                          uint cmd, void *buf, uint len)
42 {
43         return drvr->proto->query_dcmd(drvr, ifidx, cmd, buf, len);
44 }
45 static inline int brcmf_proto_set_dcmd(struct brcmf_pub *drvr, int ifidx,
46                                        uint cmd, void *buf, uint len)
47 {
48         return drvr->proto->set_dcmd(drvr, ifidx, cmd, buf, len);
49 }
50 static inline int brcmf_proto_txdata(struct brcmf_pub *drvr, int ifidx,
51                                        u8 offset, struct sk_buff *skb)
52 {
53         return drvr->proto->txdata(drvr, ifidx, offset, skb);
54 }
55
56
57 #endif /* BRCMFMAC_PROTO_H */