1 /*
2  * Definitions for DHD nl80211 driver interface.
3  *
4  *
5  * Copyright (C) 1999-2013, Broadcom Corporation
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
14  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
16  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  *
19  * $Id: $
20  */
21 
22 #ifndef DHDU_NL80211_H_
23 #define DHDU_NL80211_H_
24 
25 #ifdef NL80211
26 
27 #include <netlink/genl/genl.h>
28 #include <netlink/genl/family.h>
29 #include <netlink/genl/ctrl.h>
30 
31 /* libnl 1.x compatibility code */
32 #if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30)
33 #define nl_sock		nl_handle
34 #endif
35 
36 struct dhd_netlink_info
37 {
38 	struct nl_sock *nl;
39 	struct nl_cb *cb;
40 	int nl_id;
41 	int ifidx;
42 };
43 
44 int dhd_nl_sock_connect(struct dhd_netlink_info *dhd_nli);
45 void dhd_nl_sock_disconnect(struct dhd_netlink_info *dhd_nli);
46 int dhd_nl_do_testmode(struct dhd_netlink_info *dhd_nli, dhd_ioctl_t *ioc);
47 
48 #endif /* NL80211 */
49 
50 #endif /* DHDU_NL80211_H_ */
51