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.
16 #ifndef BRCMFMAC_PROTO_H
17 #define BRCMFMAC_PROTO_H
20 int (*hdrpull
)(struct brcmf_pub
*drvr
, bool do_fws
, u8
*ifidx
,
22 int (*query_dcmd
)(struct brcmf_pub
*drvr
, int ifidx
, uint cmd
,
24 int (*set_dcmd
)(struct brcmf_pub
*drvr
, int ifidx
, uint cmd
, void *buf
,
26 int (*txdata
)(struct brcmf_pub
*drvr
, int ifidx
, u8 offset
,
32 int brcmf_proto_attach(struct brcmf_pub
*drvr
);
33 void brcmf_proto_detach(struct brcmf_pub
*drvr
);
35 static inline int brcmf_proto_hdrpull(struct brcmf_pub
*drvr
, bool do_fws
,
36 u8
*ifidx
, struct sk_buff
*skb
)
38 return drvr
->proto
->hdrpull(drvr
, do_fws
, ifidx
, skb
);
40 static inline int brcmf_proto_query_dcmd(struct brcmf_pub
*drvr
, int ifidx
,
41 uint cmd
, void *buf
, uint len
)
43 return drvr
->proto
->query_dcmd(drvr
, ifidx
, cmd
, buf
, len
);
45 static inline int brcmf_proto_set_dcmd(struct brcmf_pub
*drvr
, int ifidx
,
46 uint cmd
, void *buf
, uint len
)
48 return drvr
->proto
->set_dcmd(drvr
, ifidx
, cmd
, buf
, len
);
50 static inline int brcmf_proto_txdata(struct brcmf_pub
*drvr
, int ifidx
,
51 u8 offset
, struct sk_buff
*skb
)
53 return drvr
->proto
->txdata(drvr
, ifidx
, offset
, skb
);
57 #endif /* BRCMFMAC_PROTO_H */